org.synchronoss.cpo
Interface CpoAdapterRemote

Package class diagram package CpoAdapterRemote
All Superinterfaces:
java.io.Serializable
All Known Subinterfaces:
CpoAdapterEJB

public interface CpoAdapterRemote
extends java.io.Serializable

CpoAdapter is an interface for a set of routines that are responsible for Creating, Retrieving, Updating, and Deleting (CRUD) value objects within a datasource. CpoAdapter is an interface that acts as a common facade for different datasources. It is conceivable that an CpoAdapter can be implemented for JDBC, CSV, XML, LDAP, and more datasources producing classes such as JdbcCpoAdapter, CsvCpoAdapter, XmlCpoAdapter, LdapCpoAdapter, etc.

Author:
david berry

Field Summary
static int CREATE
           
static int DELETE
           
static int EXECUTE
           
static int EXIST
           
static int INSERT
           
static int LIST
           
static int PERSIST
           
static int RETRIEVE
           
static int UPDATE
           
 
Method Summary
 void clearMetaClass()
          Clears the metadata for all classes.
 void clearMetaClass(java.lang.Object obj)
          Clears the metadata for the specified object.
 void clearMetaClass(java.lang.String className)
          Clears the metadata for the specified fully qualifed class name.
<T> long
deleteObject(java.lang.String name, T obj)
          Removes the Object from the datasource.
<T> long
deleteObject(T obj)
          Removes the Object from the datasource.
<T> long
deleteObjects(java.util.Collection<T> coll)
          Removes the Objects contained in the collection from the datasource.
<T> long
deleteObjects(java.lang.String name, java.util.Collection<T> coll)
          Removes the Objects contained in the collection from the datasource.
<T,C> T
executeObject(java.lang.String name, C criteria, T result)
          Executes an Object that represents an executable object within the datasource.
<T> T
executeObject(java.lang.String name, T object)
          Executes an Object whose MetaData contains a stored procedure.
<T> T
executeObject(T obj)
          Executes an Object that represents an executable object within the datasource.
<T> long
existsObject(java.lang.String name, T obj)
          The CpoAdapter will check to see if this object exists in the datasource.
<T> long
existsObject(T obj)
          The CpoAdapter will check to see if this object exists in the datasource.
<T> long
insertObject(java.lang.String name, T obj)
          Creates the Object in the datasource.
<T> long
insertObject(T obj)
          Creates the Object in the datasource.
<T> long
insertObjects(java.util.Collection<T> coll)
          Iterates through a collection of Objects, creates and stores them in the datasource.
<T> long
insertObjects(java.lang.String name, java.util.Collection<T> coll)
          Iterates through a collection of Objects, creates and stores them in the datasource.
 CpoOrderBy newOrderBy(java.lang.String attribute, boolean ascending)
          DOCUMENT ME!
<T> CpoOrderBy
newOrderBy(java.lang.String attribute, boolean ascending, java.lang.String function)
          DOCUMENT ME!
 CpoWhere newWhere()
          DOCUMENT ME!
<T> CpoWhere
newWhere(int logical, java.lang.String attr, int comp, T value)
          DOCUMENT ME!
<T> CpoWhere
newWhere(int logical, java.lang.String attr, int comp, T value, boolean not)
          DOCUMENT ME!
<T> long
persistObject(java.lang.String name, T obj)
          Persists the Object into the datasource.
<T> long
persistObject(T obj)
          Persists the Object into the datasource.
<T> long
persistObjects(java.util.Collection<T> coll)
          Persists a collection of Objects into the datasource.
<T> long
persistObjects(java.lang.String name, java.util.Collection<T> coll)
          Persists a collection of Objects into the datasource.
<T,C> T
retrieveObject(java.lang.String name, C criteria, T result, CpoWhere where, java.util.Collection<? extends CpoOrderBy> orderBy)
          Retrieves the Object from the datasource.
<T> T
retrieveObject(java.lang.String name, T obj)
          Retrieves the Object from the datasource.
<T> T
retrieveObject(T obj)
          Retrieves the Object from the datasource.
<T,C> T
retrieveObjects(java.lang.String name, C criteria, T result, CpoWhere where, java.util.Collection<? extends CpoOrderBy> orderBy)
          Retrieves the Object from the datasource.
<T> long
transactObjects(java.util.Collection<CpoObject<T>> coll)
          Deprecated.  
<T> long
updateObject(java.lang.String name, T obj)
          Update the Object in the datasource.
<T> long
updateObject(T obj)
          Update the Object in the datasource.
<T> long
updateObjects(java.util.Collection<T> coll)
          Updates a collection of Objects in the datasource.
<T> long
updateObjects(java.lang.String name, java.util.Collection<T> coll)
          Updates a collection of Objects in the datasource.
 

Field Detail

CREATE

static final int CREATE
See Also:
Constant Field Values

INSERT

static final int INSERT
See Also:
Constant Field Values

UPDATE

static final int UPDATE
See Also:
Constant Field Values

DELETE

static final int DELETE
See Also:
Constant Field Values

RETRIEVE

static final int RETRIEVE
See Also:
Constant Field Values

LIST

static final int LIST
See Also:
Constant Field Values

PERSIST

static final int PERSIST
See Also:
Constant Field Values

EXIST

static final int EXIST
See Also:
Constant Field Values

EXECUTE

static final int EXECUTE
See Also:
Constant Field Values
Method Detail

clearMetaClass

void clearMetaClass(java.lang.Object obj)
                    throws CpoException,
                           java.rmi.RemoteException
Clears the metadata for the specified object. The metadata will be reloaded the next time that this object is loaded by dataPersist.

Parameters:
obj - The object whose metadata must be cleared
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

clearMetaClass

void clearMetaClass(java.lang.String className)
                    throws CpoException,
                           java.rmi.RemoteException
Clears the metadata for the specified fully qualifed class name. The metadata will be reloaded the next time that this class is loaded by dataPersist.

Parameters:
className - The fully qualified class name for the class that needs its metadata cleared.
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

clearMetaClass

void clearMetaClass()
                    throws CpoException,
                           java.rmi.RemoteException
Clears the metadata for all classes. The metadata will be lazy-loaded from the metadata repository as classes are accessed.

Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

insertObject

<T> long insertObject(T obj)
                  throws CpoException,
                         java.rmi.RemoteException
Creates the Object in the datasource. The assumption is that the object does not exist in the datasource. This method creates and stores the object in the datasource

Parameters:
obj - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown.
Returns:
The number of objects created in the datasource
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

insertObject

<T> long insertObject(java.lang.String name,
                      T obj)
                  throws CpoException,
                         java.rmi.RemoteException
Creates the Object in the datasource. The assumption is that the object does not exist in the datasource. This method creates and stores the object in the datasource

Parameters:
name - The String name of the CREATE Query group that will be used to create the object in the datasource. null signifies that the default rules will be used.
obj - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown.
Returns:
The number of objects created in the datasource
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

insertObjects

<T> long insertObjects(java.util.Collection<T> coll)
                   throws CpoException,
                          java.rmi.RemoteException
Iterates through a collection of Objects, creates and stores them in the datasource. The assumption is that the objects contained in the collection do not exist in the datasource. This method creates and stores the objects in the datasource. The objects in the collection will be treated as one transaction, assuming the datasource supports transactions. This means that if one of the objects fail being created in the datasource then the CpoAdapter should stop processing the remainder of the collection, and if supported, rollback all the objects created thus far.

Parameters:
coll - This is a collection of objects that have been defined within the metadata of the datasource. If the class is not defined an exception will be thrown.
Returns:
The number of objects created in the datasource
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

insertObjects

<T> long insertObjects(java.lang.String name,
                       java.util.Collection<T> coll)
                   throws CpoException,
                          java.rmi.RemoteException
Iterates through a collection of Objects, creates and stores them in the datasource. The assumption is that the objects contained in the collection do not exist in the datasource. This method creates and stores the objects in the datasource. The objects in the collection will be treated as one transaction, assuming the datasource supports transactions. This means that if one of the objects fail being created in the datasource then the CpoAdapter should stop processing the remainder of the collection, and if supported, rollback all the objects created thus far.

Parameters:
name - The String name of the CREATE Query group that will be used to create the object in the datasource. null signifies that the default rules will be used.
coll - This is a collection of objects that have been defined within the metadata of the datasource. If the class is not defined an exception will be thrown.
Returns:
The number of objects created in the datasource
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

deleteObject

<T> long deleteObject(T obj)
                  throws CpoException,
                         java.rmi.RemoteException
Removes the Object from the datasource. The assumption is that the object exists in the datasource. This method stores the object in the datasource

Parameters:
obj - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown. If the object does not exist in the datasource an exception will be thrown.
Returns:
The number of objects deleted from the datasource
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

deleteObject

<T> long deleteObject(java.lang.String name,
                      T obj)
                  throws CpoException,
                         java.rmi.RemoteException
Removes the Object from the datasource. The assumption is that the object exists in the datasource. This method stores the object in the datasource

Parameters:
name - The String name of the DELETE Query group that will be used to create the object in the datasource. null signifies that the default rules will be used.
obj - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown. If the object does not exist in the datasource an exception will be thrown.
Returns:
The number of objects deleted from the datasource
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

deleteObjects

<T> long deleteObjects(java.util.Collection<T> coll)
                   throws CpoException,
                          java.rmi.RemoteException
Removes the Objects contained in the collection from the datasource. The assumption is that the object exists in the datasource. This method stores the objects contained in the collection in the datasource. The objects in the collection will be treated as one transaction, assuming the datasource supports transactions. This means that if one of the objects fail being deleted in the datasource then the CpoAdapter should stop processing the remainder of the collection, and if supported, rollback all the objects deleted thus far.

Parameters:
coll - This is a collection of objects that have been defined within the metadata of the datasource. If the class is not defined an exception will be thrown.
Returns:
The number of objects deleted from the datasource
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

deleteObjects

<T> long deleteObjects(java.lang.String name,
                       java.util.Collection<T> coll)
                   throws CpoException,
                          java.rmi.RemoteException
Removes the Objects contained in the collection from the datasource. The assumption is that the object exists in the datasource. This method stores the objects contained in the collection in the datasource. The objects in the collection will be treated as one transaction, assuming the datasource supports transactions. This means that if one of the objects fail being deleted in the datasource then the CpoAdapter should stop processing the remainder of the collection, and if supported, rollback all the objects deleted thus far.

Parameters:
name - The String name of the DELETE Query group that will be used to create the object in the datasource. null signifies that the default rules will be used.
coll - This is a collection of objects that have been defined within the metadata of the datasource. If the class is not defined an exception will be thrown.
Returns:
The number of objects deleted from the datasource
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

executeObject

<T> T executeObject(T obj)
                throws CpoException,
                       java.rmi.RemoteException
Executes an Object that represents an executable object within the datasource. It is assumed that the object exists in the datasource. If the object does not exist, an exception will be thrown

Parameters:
obj - This is an Object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown. If the object does not exist in the datasource, an exception will be thrown. This object is used to populate the IN parameters used to executed the datasource object. An object of this type will be created and filled with the returned data from the value_object. This newly created object will be returned from this method.
Returns:
An object populated with the data returned from the executable object
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

executeObject

<T> T executeObject(java.lang.String name,
                    T object)
                throws CpoException,
                       java.rmi.RemoteException
Executes an Object whose MetaData contains a stored procedure. An assumption is that the object exists in the datasource.

Parameters:
name - The filter name which tells the datasource which objects should be returned. The name also signifies what data in the object will be populated.
object - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown. If the object does not exist in the datasource, an exception will be thrown. This object is used to populate the IN parameters used to retrieve the collection of objects. This object defines the object type that will be returned in the collection and contain the result set data or the OUT Parameters.
Returns:
A result object populate with the OUT parameters
Throws:
CpoException - DOCUMENT ME!
java.rmi.RemoteException

executeObject

<T,C> T executeObject(java.lang.String name,
                      C criteria,
                      T result)
                throws CpoException,
                       java.rmi.RemoteException
Executes an Object that represents an executable object within the datasource. It is assumed that the object exists in the datasource. If the object does not exist, an exception will be thrown

Parameters:
name - The String name of the EXECUTE Query group that will be used to create the object in the datasource. null signifies that the default rules will be used.
criteria - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown. If the object does not exist in the datasource, an exception will be thrown. This object is used to populate the IN parameters used to retrieve the collection of objects.
result - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown. If the object does not exist in the datasource, an exception will be thrown. This object defines the object type that will be created, filled with the return data and returned from this method.
Returns:
An object populated with the out parameters
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

existsObject

<T> long existsObject(T obj)
                  throws CpoException,
                         java.rmi.RemoteException
The CpoAdapter will check to see if this object exists in the datasource.

Parameters:
obj - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown. This object will be searched for inside the datasource.
Returns:
The number of objects that exist in the datasource that match the specified object
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

existsObject

<T> long existsObject(java.lang.String name,
                      T obj)
                  throws CpoException,
                         java.rmi.RemoteException
The CpoAdapter will check to see if this object exists in the datasource.

Parameters:
name - The String name of the EXISTS Query group that will be used to create the object in the datasource. null signifies that the default rules will be used.
obj - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown. This object will be searched for inside the datasource.
Returns:
The number of objects that exist in the datasource that match the specified object
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

newOrderBy

CpoOrderBy newOrderBy(java.lang.String attribute,
                      boolean ascending)
                      throws CpoException,
                             java.rmi.RemoteException
DOCUMENT ME!

Parameters:
attribute - DOCUMENT ME!
ascending - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

newOrderBy

<T> CpoOrderBy newOrderBy(java.lang.String attribute,
                          boolean ascending,
                          java.lang.String function)
                      throws CpoException,
                             java.rmi.RemoteException
DOCUMENT ME!

Parameters:
attribute - DOCUMENT ME!
ascending - DOCUMENT ME!
function - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

newWhere

CpoWhere newWhere()
                  throws CpoException,
                         java.rmi.RemoteException
DOCUMENT ME!

Returns:
DOCUMENT ME!
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

newWhere

<T> CpoWhere newWhere(int logical,
                      java.lang.String attr,
                      int comp,
                      T value)
                  throws CpoException,
                         java.rmi.RemoteException
DOCUMENT ME!

Parameters:
logical - DOCUMENT ME!
attr - DOCUMENT ME!
comp - DOCUMENT ME!
value - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

newWhere

<T> CpoWhere newWhere(int logical,
                      java.lang.String attr,
                      int comp,
                      T value,
                      boolean not)
                  throws CpoException,
                         java.rmi.RemoteException
DOCUMENT ME!

Parameters:
logical - DOCUMENT ME!
attr - DOCUMENT ME!
comp - DOCUMENT ME!
value - DOCUMENT ME!
not - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

persistObject

<T> long persistObject(T obj)
                   throws CpoException,
                          java.rmi.RemoteException
Persists the Object into the datasource. The CpoAdapter will check to see if this object exists in the datasource. If it exists, the object is updated in the datasource If the object does not exist, then it is created in the datasource. This method stores the object in the datasource

Parameters:
obj - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown.
Returns:
A count of the number of objects persisted
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.
See Also:
existsObject(T), insertObject(T), updateObject(T)

persistObject

<T> long persistObject(java.lang.String name,
                       T obj)
                   throws CpoException,
                          java.rmi.RemoteException
Persists the Object into the datasource. The CpoAdapter will check to see if this object exists in the datasource. If it exists, the object is updated in the datasource If the object does not exist, then it is created in the datasource. This method stores the object in the datasource

Parameters:
name - The name which identifies which EXISTS, INSERT, and UPDATE Query groups to execute to persist the object.
obj - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown.
Returns:
A count of the number of objects persisted
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.
See Also:
existsObject(T), insertObject(T), updateObject(T)

persistObjects

<T> long persistObjects(java.util.Collection<T> coll)
                    throws CpoException,
                           java.rmi.RemoteException
Persists a collection of Objects into the datasource. The CpoAdapter will check to see if this object exists in the datasource. If it exists, the object is updated in the datasource If the object does not exist, then it is created in the datasource. This method stores the object in the datasource. The objects in the collection will be treated as one transaction, meaning that if one of the objects fail being inserted or updated in the datasource then the entire collection will be rolled back.

Parameters:
coll - This is a collection of objects that have been defined within the metadata of the datasource. If the class is not defined an exception will be thrown.
name - The name which identifies which EXISTS, INSERT, and UPDATE Query groups to execute to persist the object.
Returns:
DOCUMENT ME!
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.
See Also:
existsObject(T), insertObject(T), updateObject(T)

persistObjects

<T> long persistObjects(java.lang.String name,
                        java.util.Collection<T> coll)
                    throws CpoException,
                           java.rmi.RemoteException
Persists a collection of Objects into the datasource. The CpoAdapter will check to see if this object exists in the datasource. If it exists, the object is updated in the datasource If the object does not exist, then it is created in the datasource. This method stores the object in the datasource. The objects in the collection will be treated as one transaction, meaning that if one of the objects fail being inserted or updated in the datasource then the entire collection will be rolled back.

Parameters:
name - The name which identifies which EXISTS, INSERT, and UPDATE Query groups to execute to persist the object.
coll - This is a collection of objects that have been defined within the metadata of the datasource. If the class is not defined an exception will be thrown.
Returns:
DOCUMENT ME!
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.
See Also:
existsObject(T), insertObject(T), updateObject(T)

retrieveObject

<T> T retrieveObject(T obj)
                 throws CpoException,
                        java.rmi.RemoteException
Retrieves the Object from the datasource. The assumption is that the object exists in the datasource. If the retrieve query defined for this objects returns more than one row, an exception will be thrown.

Parameters:
obj - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown. If the object does not exist in the datasource, an exception will be thrown. The input object is used to specify the search criteria, the output object is populated with the results of the query.
Returns:
DOCUMENT ME!
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

retrieveObject

<T> T retrieveObject(java.lang.String name,
                     T obj)
                 throws CpoException,
                        java.rmi.RemoteException
Retrieves the Object from the datasource. The assumption is that the object exists in the datasource. If the retrieve query defined for this objects returns more than one row, an exception will be thrown.

Parameters:
name - DOCUMENT ME!
obj - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown. If the object does not exist in the datasource, an exception will be thrown. The input object is used to specify the search criteria, the output object is populated with the results of the query.
Returns:
DOCUMENT ME!
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

retrieveObject

<T,C> T retrieveObject(java.lang.String name,
                       C criteria,
                       T result,
                       CpoWhere where,
                       java.util.Collection<? extends CpoOrderBy> orderBy)
                 throws CpoException,
                        java.rmi.RemoteException
Retrieves the Object from the datasource. The assumption is that the object exists in the datasource. If the retrieve query defined for this objects returns more than one row, an exception will be thrown.

Parameters:
name - DOCUMENT ME!
obj - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown. If the object does not exist in the datasource, an exception will be thrown. The input object is used to specify the search criteria, the output object is populated with the results of the query.
Returns:
DOCUMENT ME!
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

retrieveObjects

<T,C> T retrieveObjects(java.lang.String name,
                        C criteria,
                        T result,
                        CpoWhere where,
                        java.util.Collection<? extends CpoOrderBy> orderBy)
                  throws CpoException,
                         java.rmi.RemoteException
Retrieves the Object from the datasource. The assumption is that the object exists in the datasource.

Parameters:
name - The filter name which tells the datasource which objects should be returned. The name also signifies what data in the object will be populated.
criteria - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown. If the object does not exist in the datasource, an exception will be thrown. This object is used to specify the parameters used to retrieve the collection of objects.
result - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown. If the object does not exist in the datasource, an exception will be thrown. This object is used to specify the object type that will be returned in the collection.
where - DOCUMENT ME!
orderBy - DOCUMENT ME!
Returns:
A collection of objects will be returned that meet the criteria specified by obj. The objects will be of the same type as the Object that was passed in. If no objects match the criteria, an empty collection will be returned
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

transactObjects

@Deprecated
<T> long transactObjects(java.util.Collection<CpoObject<T>> coll)
                     throws CpoException,
                            java.rmi.RemoteException
Deprecated. 

DOCUMENT ME!

Parameters:
coll - DOCUMENT ME!
Returns:
DOCUMENT ME!
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

updateObject

<T> long updateObject(T obj)
                  throws CpoException,
                         java.rmi.RemoteException
Update the Object in the datasource. The CpoAdapter will check to see if the object exists in the datasource. If it exists then the object will be updated. If it does not exist, an exception will be thrown

Parameters:
obj - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown.
Returns:
The number of objects updated in the datasource
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

updateObject

<T> long updateObject(java.lang.String name,
                      T obj)
                  throws CpoException,
                         java.rmi.RemoteException
Update the Object in the datasource. The CpoAdapter will check to see if the object exists in the datasource. If it exists then the object will be updated. If it does not exist, an exception will be thrown

Parameters:
name - The String name of the UPDATE Query group that will be used to create the object in the datasource. null signifies that the default rules will be used.
obj - This is an object that has been defined within the metadata of the datasource. If the class is not defined an exception will be thrown.
Returns:
The number of objects updated in the datasource
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

updateObjects

<T> long updateObjects(java.util.Collection<T> coll)
                   throws CpoException,
                          java.rmi.RemoteException
Updates a collection of Objects in the datasource. The assumption is that the objects contained in the collection exist in the datasource. This method stores the object in the datasource. The objects in the collection will be treated as one transaction, meaning that if one of the objects fail being updated in the datasource then the entire collection will be rolled back, if supported by the datasource.

Parameters:
coll - This is a collection of objects that have been defined within the metadata of the datasource. If the class is not defined an exception will be thrown.
Returns:
The number of objects updated in the datasource
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.

updateObjects

<T> long updateObjects(java.lang.String name,
                       java.util.Collection<T> coll)
                   throws CpoException,
                          java.rmi.RemoteException
Updates a collection of Objects in the datasource. The assumption is that the objects contained in the collection exist in the datasource. This method stores the object in the datasource. The objects in the collection will be treated as one transaction, meaning that if one of the objects fail being updated in the datasource then the entire collection will be rolled back, if supported by the datasource.

Parameters:
name - The String name of the UPDATE Query group that will be used to create the object in the datasource. null signifies that the default rules will be used.
coll - This is a collection of objects that have been defined within the metadata of the datasource. If the class is not defined an exception will be thrown.
Returns:
The number of objects updated in the datasource
Throws:
CpoException - Thrown if there are errors accessing the datasource
java.rmi.RemoteException - Thrown if using dataPersist as an EJB and an Error occurs.


Copyright © 2010. All Rights Reserved.