Interface GenericDao
Deprecated.
This is the generic data access interface for business objects.
This class was adapted from the Kuali Nervous System
(org.kuali.rice.krad.dao.BusinessObjectDao).
It's not as generic as it could be as it relies on the OJB criteria object...
- Author:
- Kuali Rice Team (rice.collab@kuali.org)
-
Method Summary
Modifier and TypeMethodDescriptionintcountMatching(Class clazz, Map fieldValues) Deprecated.intcountMatching(Class clazz, Map positiveFieldValues, Map negativeFieldValues) Deprecated.This method returns the number of matching result given the positive criterias and negative criterias.voidDeprecated.Deletes a business object from the database.voidDeprecated.Deletes each business object in the given List from the database.voiddeleteMatching(Class clazz, Map fieldValues) Deprecated.Deletes the business objects matching the given fieldValuesDeprecated.Retrieves a collection of business objects populated with data, such that each record in the database populates a new object instance.findAllOrderBy(Class clazz, String sortField, boolean sortAscending) Deprecated.Retrieves a collection of business objects populated with data, such that each record in the database populates a new object instance.Deprecated.Retrieves an object instance identified bys it primary key.findByPrimaryKey(Class clazz, Map primaryKeys) Deprecated.Retrieves an object instance identified by its primary keys and values.findByUniqueKey(Class clazz, Map uniqueKeys) Deprecated.This method should be used to try and locate an object instance by passing in unique keys and values.findMatching(Class clazz, Map fieldValues) Deprecated.This method retrieves a collection of business objects populated with data, such that each record in the database populates a new object instance.findMatching(Class clazz, Map criteria, boolean selectForUpdate, long wait) Deprecated.findMatching(Class clazz, org.apache.ojb.broker.query.Criteria criteria) Deprecated.This method allows for a more flexible search by allowing the programmer to construct the criteria however they need to and then pass that in for execution.findMatching(Class clazz, org.apache.ojb.broker.query.Criteria criteria, boolean selectForUpdate, long wait) Deprecated.This method allows for a more flexible search by allowing the programmer to construct the criteria however they need to and then pass that in for execution.findMatchingByExample(Object object) Deprecated.This method allows you to pass in an object that has some fields filled in, and will query underneath by automatically constructing a select statement whose where clause is built automatically by looking at the non-null attributes and using their values as part of the query.findMatchingOrderBy(Class clazz, Map fieldValues, String sortField, boolean sortAscending) Deprecated.This method retrieves a collection of business objects populated with data, such that each record in the database populates a new object instance.Deprecated.Retrieves an object instance identified by the class of the given object and the object's primary key values.voidDeprecated.Saves any objectvoidDeprecated.Saves a List of objects
-
Method Details
-
save
Deprecated.Saves any object- Parameters:
bo-
-
save
Deprecated.Saves a List of objects- Parameters:
businessObjects-
-
findById
Deprecated.Retrieves an object instance identified bys it primary key.- Parameters:
clazz- the classid- the primary key value- Returns:
- Object
-
findByPrimaryKey
Deprecated.Retrieves an object instance identified by its primary keys and values. This can be done by constructing a map where the key to the map entry is the primary key attribute and the value of the entry being the primary key value. For composite keys, pass in each primaryKey attribute and its value as a map entry.- Parameters:
clazz-primaryKeys-- Returns:
- Object
-
findByUniqueKey
Deprecated.This method should be used to try and locate an object instance by passing in unique keys and values. This can be done by constructing a map where the key to the map entry is the unique key attribute and the value of the entry being the unique key value. For composite keys, pass in each unique key attribute and its value as a map entry.- Parameters:
clazz-uniqueKeys-- Returns:
- Object
-
retrieve
Deprecated.Retrieves an object instance identified by the class of the given object and the object's primary key values.- Parameters:
object-- Returns:
- Object
-
findMatchingByExample
Deprecated.This method allows you to pass in an object that has some fields filled in, and will query underneath by automatically constructing a select statement whose where clause is built automatically by looking at the non-null attributes and using their values as part of the query. This is basically a query by "template" method.- Parameters:
object-- Returns:
- Collection
-
findAll
Deprecated.Retrieves a collection of business objects populated with data, such that each record in the database populates a new object instance. This will only retrieve business objects by class type.- Parameters:
clazz-- Returns:
- Collection
-
findAllOrderBy
Deprecated.Retrieves a collection of business objects populated with data, such that each record in the database populates a new object instance. This will only retrieve business objects by class type. Orders the results by the given field.- Parameters:
clazz-- Returns:
- Collection
-
findMatching
Deprecated.This method retrieves a collection of business objects populated with data, such that each record in the database populates a new object instance. This will retrieve business objects by class type and also by criteria passed in as key-value pairs, specifically attribute name-expected value.- Parameters:
clazz-fieldValues-- Returns:
- Collection
-
findMatching
Deprecated.This method allows for a more flexible search by allowing the programmer to construct the criteria however they need to and then pass that in for execution.- Parameters:
clazz-criteria-- Returns:
- Collection
-
findMatching
Collection findMatching(Class clazz, org.apache.ojb.broker.query.Criteria criteria, boolean selectForUpdate, long wait) Deprecated.This method allows for a more flexible search by allowing the programmer to construct the criteria however they need to and then pass that in for execution.- Parameters:
clazz-criteria-selectForUpdate- whether to perform a select for update querywait- millis to wait for select for update- Returns:
- Collection
-
findMatching
Deprecated. -
countMatching
Deprecated.- Parameters:
clazz-fieldValues-- Returns:
- count of BusinessObjects of the given class whose fields match the values in the given Map.
-
countMatching
Deprecated.This method returns the number of matching result given the positive criterias and negative criterias. The negative criterias are the ones that will be set to "notEqualTo" or "notIn"- Parameters:
clazz-positiveFieldValues- Map of fields and values for positive criterianegativeFieldValues- Map of fields and values for negative criteria- Returns:
- int
-
findMatchingOrderBy
Collection findMatchingOrderBy(Class clazz, Map fieldValues, String sortField, boolean sortAscending) Deprecated.This method retrieves a collection of business objects populated with data, such that each record in the database populates a new object instance. This will retrieve business objects by class type and also by criteria passed in as key-value pairs, specifically attribute name-expected value. Orders the results by the given field.- Parameters:
clazz-fieldValues-- Returns:
- Collection
-
delete
Deprecated.Deletes a business object from the database.- Parameters:
bo-
-
delete
Deprecated.Deletes each business object in the given List from the database.- Parameters:
boList-
-
deleteMatching
Deprecated.Deletes the business objects matching the given fieldValues- Parameters:
clazz-fieldValues-
-
DataObjectService