| com.completex.objective.components.persistency.Persistency2
All known Subclasses: com.completex.objective.components.persistency.core.impl.AbstractDatabasePersistency,
Method Summary | |
int | delete(Transaction transaction, PersistentObject persistentObject) Delete persistent object by primary key
Parameters: transaction - Parameters: persistentObject - number of row affected. | int | delete(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller) Delete persistent object by primary key
Parameters: transaction - Parameters: persistentObject - Parameters: controller - number of row affected. | int[] | delete(Transaction transaction, Collection persistentObjects) | int | deleteByExample(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller, int limit) Deletes persistent object "by example" PersistentObject. | int | deleteByExample(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller) Deletes persistent object "by example" PersistentObject. | void | executeCall(Transaction transaction, Call call) | int | executeUpdate(Transaction transaction, String sql, Parameters parameters) Execute ad-hoc data modifying sql. | int | executeUpdate(Transaction transaction, String sql) Execute ad-hoc data modifying sql. | long | getNextSeqValue(Transaction transaction, Persistency persistency, Record record, String name) | int | insert(Transaction transaction, PersistentObject persistentObject) Insert persistent object
Parameters: transaction - transaction Parameters: persistentObject - PersistentObject number of row affected or RC_NON_DIRTY value if record is not "dirty". | int | insert(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller) Insert persistent object
Parameters: transaction - transaction Parameters: persistentObject - Parameters: controller - number of row affected or RC_NON_DIRTY value if record is not "dirty". | int[] | insert(Transaction transaction, Collection persistentObjects) | Object | load(Transaction transaction, PersistentObject persistentObject) Retrieves persistent object "by example" by primary key. | Object | load(Transaction transaction, PersistentObject persistentObject, LockType lock) Retrieves persistent object "by example" by primary key. | Object | load(Transaction transaction, PersistentObject persistentObject, LockType lockType, long timeout) Retrieves persistent object "by example" by primary key. | Object | load(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller, LockType lockType, long timeout) Retrieves persistent object "by example" by primary key. | Object | load(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller) | int | pipeInsert(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller) | CallableStatement | prepareCall(Transaction transaction, Call query, StringBuffer bindBuffer) | PreparedStatement | prepareStatement(Transaction transaction, Query query, StringBuffer bindBuffer) | ResultSetIterator | resultSetIterator(PreparedStatement statement, AbstractParameters parameters) | Collection | select(Transaction transaction, PersistentObject persistentObject) Retrieves collection of persistent objects "by example" PersistentObject.
The fields and their values that are set on the object are then joined by "and" into sql where clause.
PersistentObject passed as parameter used as a factory of objects to be returned. | Collection | select(Transaction transaction, Query query) Retrieves collection of persistent objects "by query".
Query controls the type of collection and objects to return.
Collection is never null. | Collection | select(Transaction transaction, Query query, LifeCycleController controller) Retrieves collection of persistent objects "by query".
Query controls the type of collection and objects to return.
Collection is never null. | Collection | select(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller) Retrieves collection of persistent objects "by example" PersistentObject.
The fields and their values that are set on the object are then joined by "and" into sql where clause.
PersistentObject passed as parameter used as a factory of objects to be returned. | Collection | select(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller, LockType lock) Retrieves collection of persistent objects "by example" PersistentObject.
The fields and their values that are set on the object are then joined by "and" into sql where clause.
PersistentObject passed as parameter used as a factory of objects to be returned. | Collection | select(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller, LockType lock, long timeout) Retrieves collection of persistent objects "by example" PersistentObject.
The fields and their values that are set on the object are then joined by "and" into sql where clause.
PersistentObject passed as parameter used as a factory of objects to be returned. | long | selectCount(Transaction transaction, Query query) Method will use query object to build "select count(*)" statement.
Concrete implementation may reject query in case sql string is set
externally. | long | selectCount(Transaction transaction, PersistentObject persistentObject) Method will use persistentObject object to build "select count(*)" statement. | boolean | selectExists(Transaction transaction, Query query) Method will use query object to build exists sql statement.
Concrete implementation may reject query in case sql string is set
externally. | boolean | selectExists(Transaction transaction, PersistentObject persistentObject) Method will use persistentObject to build exists sql statement.
Concrete implementation may reject query in case sql string is set
externally. | Object | selectFirst(Transaction transaction, Query query) Retrieves collection of persistent objects "by query" and returns the 1st object. | Object | selectFirst(Transaction transaction, PersistentObject persistentObject) Retrieves collection of persistent objects "by example" and returns the 1st object. | Object | selectFirst(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller) Retrieves collection of persistent objects "by example" and returns the 1st object. | Object | selectFirst(Transaction transaction, PersistentObject persistentObject, LockType lockType) Retrieves collection of persistent objects "by example" and returns the 1st object. | Object | selectFirst(Transaction transaction, Query query, LifeCycleController controller) | Object | selectFirst(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller, LockType lockType) | Object | selectSingle(Transaction transaction, Query query) | int | truncate(Transaction transaction, String tableName) Execute truncate table sql. | int | update(Transaction transaction, PersistentObject persistentObject) Update persistent object. | int | update(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller) Update persistent object. | int | update(Transaction transaction, PersistentObject persistentObject, String extraWhere, Parameters extraParameters, LifeCycleController controller) Update persistent object. | int | update(Transaction transaction, PersistentObject persistentObject, String extraWhere, Object[] extraParameters, LifeCycleController controller) Update persistent object. | int[] | update(Transaction transaction, Collection persistentObjects) | int[] | update(Transaction transaction, Collection collection, LifeCycleController lifeCycleController) | int[] | update(Transaction transaction, TracingCollection collection, Collection source, LifeCycleController lifeCycleController) Update collection of persistent objects.
TracingCollection collection will be matched with the source one and "trced". |
deleteByExample | int deleteByExample(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller, int limit) throws OdalPersistencyException(Code) | | Deletes persistent object "by example" PersistentObject. The fields and their values that are set on the object are then joined by "and" into sql where clause.
Parameters: transaction - Parameters: persistentObject - Parameters: controller - LifeCycleController Parameters: limit - max number of rows to delete (limit must be supported by the database) number of row affected. Should not be used for batch updates or complex/compound objects throws: OdalPersistencyException - |
deleteByExample | int deleteByExample(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller) throws OdalPersistencyException(Code) | | Deletes persistent object "by example" PersistentObject. The fields and their values that are set on the object are then joined by "and" into sql where clause.
Parameters: transaction - Parameters: persistentObject - Parameters: controller - LifeCycleController number of row affected. Should not be used for batch updates or complex/compound objects throws: OdalPersistencyException - |
executeUpdate | int executeUpdate(Transaction transaction, String sql) throws OdalPersistencyException(Code) | | Execute ad-hoc data modifying sql.
Parameters: transaction - Parameters: sql - number of row affected or RC_NON_DIRTY value if record is not "dirty". Should not be used for batch updates or complex/compound objects throws: OdalPersistencyException - |
load | Object load(Transaction transaction, PersistentObject persistentObject) throws OdalPersistencyException(Code) | | Retrieves persistent object "by example" by primary key. The fields and their values that are set on the object are then joined by "and" into sql where clause.
Even if non-key fields are set they will be ignored.
PersistentObject passed as parameter used as a factory of object to be returned.
The returned instance is different from the parameter one
Parameters: transaction - Parameters: persistentObject - loaded PersistentObject throws: OdalPersistencyException - throws: RecordValidationException - if primary key is missing or the values are not set |
load | Object load(Transaction transaction, PersistentObject persistentObject, LockType lock) throws OdalPersistencyException(Code) | | Retrieves persistent object "by example" by primary key. The fields and their values that are set on the object are then joined by "and" into sql where clause.
Even if non-key fields are set they will be ignored.
PersistentObject passed as parameter used as a factory of object to be returned.
The returned instance is different from the parameter one
See Also: LockType Parameters: transaction - Parameters: persistentObject - Parameters: lock - Lock type loaded PersistentObject throws: OdalPersistencyException - |
load | Object load(Transaction transaction, PersistentObject persistentObject, LockType lockType, long timeout) throws OdalPersistencyException(Code) | | Retrieves persistent object "by example" by primary key. The fields and their values that are set on the object are then joined by "and" into sql where clause.
Even if non-key fields are set they will be ignored.
PersistentObject passed as parameter used as a factory of object to be returned.
The returned instance is different from the parameter one
Parameters: transaction - Parameters: persistentObject - Parameters: lockType - Parameters: timeout - Timeout on lock in seconds loaded PersistentObject throws: OdalPersistencyException - |
select | Collection select(Transaction transaction, PersistentObject persistentObject) throws OdalPersistencyException(Code) | | Retrieves collection of persistent objects "by example" PersistentObject.
The fields and their values that are set on the object are then joined by "and" into sql where clause.
PersistentObject passed as parameter used as a factory of objects to be returned.
Parameters: transaction - Parameters: persistentObject - Collection of persistent objects never null. If nothing found the one with 0-length is returned. throws: OdalPersistencyException - |
select | Collection select(Transaction transaction, Query query) throws OdalPersistencyException(Code) | | Retrieves collection of persistent objects "by query".
Query controls the type of collection and objects to return.
Collection is never null. If nothing found the one with 0-length is returned.
See Also: Query Parameters: transaction - Parameters: query - Collection of persistent objects - never null. If nothing found the one with 0-length is returned. throws: OdalPersistencyException - |
select | Collection select(Transaction transaction, Query query, LifeCycleController controller) throws OdalPersistencyException(Code) | | Retrieves collection of persistent objects "by query".
Query controls the type of collection and objects to return.
Collection is never null. If nothing found the one with 0-length is returned.
Parameters: transaction - Parameters: query - Parameters: controller - LifeCycle interface that called when certain events happen Collection of persistent objects - never null. If nothing found the one with 0-length is returned. throws: OdalPersistencyException - |
select | Collection select(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller) throws OdalPersistencyException(Code) | | Retrieves collection of persistent objects "by example" PersistentObject.
The fields and their values that are set on the object are then joined by "and" into sql where clause.
PersistentObject passed as parameter used as a factory of objects to be returned.
Parameters: transaction - Parameters: persistentObject - Parameters: controller - Collection of persistent objects - never null. If nothing found the one with 0-length is returned. throws: OdalPersistencyException - |
select | Collection select(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller, LockType lock) throws OdalPersistencyException(Code) | | Retrieves collection of persistent objects "by example" PersistentObject.
The fields and their values that are set on the object are then joined by "and" into sql where clause.
PersistentObject passed as parameter used as a factory of objects to be returned.
Parameters: transaction - Parameters: persistentObject - Parameters: controller - Parameters: lock - Lock type Collection of persistent objects - never null. If nothing found the one with 0-length is returned. throws: OdalPersistencyException - |
select | Collection select(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller, LockType lock, long timeout) throws OdalPersistencyException(Code) | | Retrieves collection of persistent objects "by example" PersistentObject.
The fields and their values that are set on the object are then joined by "and" into sql where clause.
PersistentObject passed as parameter used as a factory of objects to be returned.
Parameters: transaction - Parameters: persistentObject - Parameters: controller - Parameters: lock - Parameters: timeout - Timeout on lock in seconds Collection of persistent objects - never null. If nothing found the one with 0-length is returned. throws: OdalPersistencyException - |
selectExists | boolean selectExists(Transaction transaction, Query query) throws OdalPersistencyException(Code) | | Method will use query object to build exists sql statement.
Concrete implementation may reject query in case sql string is set
externally.
Parameters: transaction - Parameters: query - true if query returns any results throws: OdalPersistencyException - |
update | int update(Transaction transaction, PersistentObject persistentObject) throws OdalPersistencyException(Code) | | Update persistent object. Key values are the ones of primary key and "optimistic lock" fields.
Parameters: transaction - transaction Parameters: persistentObject - number of row affected or RC_NON_DIRTY value if record is not "dirty". Should not be used for batch updates or complex/compound objects throws: OdalPersistencyException - |
update | int update(Transaction transaction, PersistentObject persistentObject, LifeCycleController controller) throws OdalPersistencyException(Code) | | Update persistent object. Key values are the ones of primary key and "optimistic lock" fields.
Parameters: transaction - transaction Parameters: persistentObject - Parameters: controller - number of row affected or RC_NON_DIRTY value if record is not "dirty". Should not be used for batch updates or complex/compound objects throws: OdalPersistencyException - |
update | int update(Transaction transaction, PersistentObject persistentObject, String extraWhere, Parameters extraParameters, LifeCycleController controller) throws OdalPersistencyException(Code) | | Update persistent object. Key values are the ones of primary key and "optimistic lock" fields.
Parameters: transaction - transaction Parameters: persistentObject - Parameters: extraWhere - sql fragment that is added to the where clause w/o actual "WHERE" keyword inside Parameters: extraParameters - optional parameters for extraWhere sql fragment Parameters: controller - LifeCycleController number of row affected or RC_NON_DIRTY value if record is not "dirty". Should not be used for batch updates or complex/compound objects throws: OdalPersistencyException - |
update | int update(Transaction transaction, PersistentObject persistentObject, String extraWhere, Object[] extraParameters, LifeCycleController controller) throws OdalPersistencyException(Code) | | Update persistent object. Key values are the ones of primary key and "optimistic lock" fields.
Parameters: transaction - transaction Parameters: persistentObject - Parameters: extraWhere - sql fragment Parameters: extraParameters - optional parameters for extraWhere sql fragment Parameters: controller - LifeCycleController number of row affected or RC_NON_DIRTY value if record is not "dirty". Should not be used for batch updates or complex/compound objects throws: OdalPersistencyException - |
update | int[] update(Transaction transaction, TracingCollection collection, Collection source, LifeCycleController lifeCycleController) throws OdalPersistencyException(Code) | | Update collection of persistent objects.
TracingCollection collection will be matched with the source one and "trced".
That is objects that are in collection but not in source will be deleted,
that are not in collection but are in source will be inserted, objects that are in
both but "dirty" will be updated
Parameters: transaction - Parameters: collection - Parameters: source - Parameters: lifeCycleController - array of return codes - one per collection entry throws: OdalPersistencyException - |
|
|