Try OpenEdge Now
skip to main content
Java Open Clients
Proxy Objects and Methods : Sample proxy : Sample AppObject
 

Sample AppObject

The following methods comprise the definition of a sample Java AppObject, Account, where each method appears as it is displayed in Java:
*The AppObject constructors that connect to an Application Service. For example:
public Account(com.progress.open4gl.javaproxy.Connection connectObj)
   throws Open4GLException, IOException, ConnectException,
   SystemErrorException

public Account(String urlString, String userId, String password,
   String Info)
   throws Open4GLException, IOException, ConnectException,
   SystemErrorException

public Account(String userId, String password, String Info)
   throws Open4GLException, IOException, ConnectException,
   SystemErrorException

public Account() throws Open4GLException, IOException, ConnectException,
   SystemErrorException
*A SubAppObject class factory method that creates a SubAppObject called Tax. For example:
public Tax createAO_Tax() throws Open4GLException, RunTime4GLException,
   SystemErrorException
*A ProcObject class factory method that creates a ProcObject called AccountInfo and runs and instantiates the persistent procedure AccountInfo.p on the AppServer. For example:
public AccountInfo createPO_AccountInfo(int accountNum)
   throws Open4GLException, RunTime4GLException, SystemErrorException
If AccountInfo.p were to be run as a single-run or singleton procedure, the parameter in its main block would have to be removed and passed to its internal procedures or user-defined functions directly. The class factory method would then look like this:
public AccountInfo createPO_AccountInfo()
   throws Open4GLException, RunTime4GLException, SystemErrorException
See theSample ProcObject for an example of how the methods for the internal procedures and user-defined functions of might look if AccountInfo.p were called as a single-run or singleton procedure.
*Built-in class factory methods that run and instantiate a SmartDataObject on the AppServer. For example:
public SDOResultSet _createSDOResultSet(String procName)
   throws Open4GLException, ProSQLException

public SDOResultSet _createSDOResultSet(String procName,
   String whereClause, String sortBy)
   throws Open4GLException, ProSQLException

public SDOResultSet _createSDOResultSet(String procName,
   String whereClause, String sortBy, SDOPameters params)
   throws Open4GLException, ProSQLException
*Remote ABL methods to run the non-persistent procedures Add (defined by Add.p) and Remove (defined by Remove.p) on the AppServer. For example:
public void Add(int accountNum, String name)

public void Remove(int accountNum)
*Common methods in all Java proxy objects. For example:
public void _cancelAllRequests() throws Open4GLException

public String _getConnectionId() throws Open4GLException

public String _getProcReturnString()

public boolean _isStreaming() throws Open4GLException

public String _getRequestId() throws Open4GLException

public String _getSSLSubjectName() throws Open4GLException

public void _release()