|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface BusinessObjectDao
This is the generic data access interface for business objects. This should be used for unit testing purposes only.
Method Summary | ||
---|---|---|
int |
countMatching(Class clazz,
Map<String,?> fieldValues)
|
|
int |
countMatching(Class clazz,
Map<String,?> positiveFieldValues,
Map<String,?> negativeFieldValues)
This method returns the number of matching result given the positive criterias and negative criterias. |
|
void |
delete(List<? extends PersistableBusinessObject> boList)
Deletes each business object in the given List from the database. |
|
void |
delete(PersistableBusinessObject bo)
Deletes a business object from the database. |
|
void |
deleteMatching(Class clazz,
Map<String,?> fieldValues)
Deletes the business objects matching the given fieldValues |
|
|
findAll(Class<T> clazz)
Retrieves a collection of business objects populated with data, such that each record in the database populates a new object instance. |
|
|
findAllActive(Class<T> clazz)
Retrieves a collection of business objects populated with data, such that each record in the database populates a new object instance. |
|
|
findAllActiveOrderBy(Class<T> clazz,
String sortField,
boolean sortAscending)
Retrieves a collection of business objects populated with data, such that each record in the database populates a new object instance. |
|
|
findAllInactive(Class<T> clazz)
|
|
|
findAllOrderBy(Class<T> clazz,
String sortField,
boolean sortAscending)
Retrieves a collection of business objects populated with data, such that each record in the database populates a new object instance. |
|
|
findByPrimaryKey(Class<T> clazz,
Map<String,?> primaryKeys)
Retrieves an object instance identified bys it primary keys and values. |
|
|
findByPrimaryKeyUsingKeyObject(Class<T> clazz,
Object pkObject)
Retrieves an object, based on its PK object |
|
|
findBySinglePrimaryKey(Class<T> clazz,
Object primaryKey)
Retrieves an object instance identified by its primary key. |
|
|
findMatching(Class<T> clazz,
Map<String,?> fieldValues)
This method retrieves a collection of business objects populated with data, such that each record in the database populates a new object instance. |
|
|
findMatchingActive(Class<T> clazz,
Map<String,?> fieldValues)
This method retrieves a collection of business objects populated with data, such that each record in the database populates a new object instance. |
|
|
findMatchingOrderBy(Class<T> clazz,
Map<String,?> fieldValues,
String sortField,
boolean sortAscending)
This method retrieves a collection of business objects populated with data, such that each record in the database populates a new object instance. |
|
PersistableBusinessObject |
manageReadOnly(PersistableBusinessObject bo)
Merges the given business object, but tells the ORM that the object is to be treated as Read Only, and even if it has changes, it will not be persisted to the database |
|
PersistableBusinessObject |
retrieve(PersistableBusinessObject object)
Retrieves an object instance identified by the class of the given object and the object's primary key values. |
|
List<? extends PersistableBusinessObject> |
save(List businessObjects)
Saves a List of BusinessObjects. |
|
PersistableBusinessObject |
save(PersistableBusinessObject bo)
Saves any object that implements the BusinessObject interface. |
Method Detail |
---|
PersistableBusinessObject save(PersistableBusinessObject bo)
bo
- List<? extends PersistableBusinessObject> save(List businessObjects)
businessObjects
- <T extends BusinessObject> T findBySinglePrimaryKey(Class<T> clazz, Object primaryKey)
findByPrimaryKey(Class, Map)
clazz
- primaryKey
-
<T extends BusinessObject> T findByPrimaryKey(Class<T> clazz, Map<String,?> primaryKeys)
clazz
- primaryKeys
-
<T extends BusinessObject> T findByPrimaryKeyUsingKeyObject(Class<T> clazz, Object pkObject)
clazz
- the class of the object to retrievepkObject
- the value of the primary key
PersistableBusinessObject retrieve(PersistableBusinessObject object)
object
-
<T extends BusinessObject> Collection<T> findAll(Class<T> clazz)
clazz
-
<T extends BusinessObject> Collection<T> findAllActive(Class<T> clazz)
clazz
-
<T extends BusinessObject> Collection<T> findAllInactive(Class<T> clazz)
<T extends BusinessObject> Collection<T> findAllOrderBy(Class<T> clazz, String sortField, boolean sortAscending)
clazz
-
<T extends BusinessObject> Collection<T> findAllActiveOrderBy(Class<T> clazz, String sortField, boolean sortAscending)
clazz
-
<T extends BusinessObject> Collection<T> findMatching(Class<T> clazz, Map<String,?> fieldValues)
clazz
- fieldValues
-
<T extends BusinessObject> Collection<T> findMatchingActive(Class<T> clazz, Map<String,?> fieldValues)
clazz
- fieldValues
-
int countMatching(Class clazz, Map<String,?> fieldValues)
clazz
- fieldValues
-
int countMatching(Class clazz, Map<String,?> positiveFieldValues, Map<String,?> negativeFieldValues)
clazz
- positiveFieldValues
- Map of fields and values for positive criterianegativeFieldValues
- Map of fields and values for negative criteria
<T extends BusinessObject> Collection<T> findMatchingOrderBy(Class<T> clazz, Map<String,?> fieldValues, String sortField, boolean sortAscending)
clazz
- fieldValues
-
void delete(PersistableBusinessObject bo)
bo
- void delete(List<? extends PersistableBusinessObject> boList)
boList
- void deleteMatching(Class clazz, Map<String,?> fieldValues)
clazz
- fieldValues
- PersistableBusinessObject manageReadOnly(PersistableBusinessObject bo)
bo
- the business object to managed
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |