| org.kuali.core.service.BusinessObjectService
All known Subclasses: org.kuali.core.service.impl.BusinessObjectServiceImpl,
BusinessObjectService | public interface BusinessObjectService (Code) | | This interface defines methods that a BusinessObjectService must provide.
|
Method Summary | |
public int | countMatching(Class clazz, Map fieldValues) This method retrieves a count of the business objects populated with data which match the criteria in the given Map. | public int | countMatching(Class clazz, Map positiveFieldValues, Map negativeFieldValues) This method retrieves a count of the business objects populated with data which match both the positive criteria
and the negative criteria in the given Map. | public void | delete(PersistableBusinessObject bo) Deletes a business object from the database. | public void | delete(List<PersistableBusinessObject> boList) Deletes each business object in the given List. | public void | deleteMatching(Class clazz, Map fieldValues) | public Collection | findAll(Class clazz) Retrieves a collection of business objects populated with data, such that each record in the database populates a new object
instance. | public PersistableBusinessObject | findByPrimaryKey(Class clazz, Map primaryKeys) Retrieves an object instance identified by its primary keys and values. | public Collection | findMatching(Class clazz, Map fieldValues) This method retrieves a collection of business objects populated with data, such that each record in the database populates a
new object instance. | public Collection | findMatchingOrderBy(Class clazz, Map 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. | public PersistableBusinessObject | getReferenceIfExists(PersistableBusinessObject bo, String referenceName) This method attempts to retrieve the reference from a BO if it exists. | public void | linkAndSave(PersistableBusinessObject bo) Links up any contained objects, and then Saves the passed in object via the persistence layer. | public void | linkAndSave(List<PersistableBusinessObject> businessObjects) Links up any contained objects, and Saves the businessObjects on the list via the persistence layer. | public void | linkUserFields(PersistableBusinessObject bo) Updates all KualiUser or UniversalUser objects contained within this BO, based on the UserID as the authoritative key. | public void | linkUserFields(List<PersistableBusinessObject> bos) Updates all KualiUser or UniversalUser objects contained within this BO, based on the UserID as the authoritative key. | public PersistableBusinessObject | retrieve(PersistableBusinessObject object) Retrieves an object instance identified by the class of the given object and the object's primary key values. | public void | save(PersistableBusinessObject bo) Saves the passed in object via the persistence layer. | public void | save(List businessObjects) Saves the businessObjects on the list via the persistence layer. |
countMatching | public int countMatching(Class clazz, Map fieldValues)(Code) | | This method retrieves a count of the business objects populated with data which match the criteria in the given Map.
Parameters: clazz - Parameters: fieldValues - number of businessObjects of the given class whose fields match the values in the given expected-value Map |
countMatching | public int countMatching(Class clazz, Map positiveFieldValues, Map negativeFieldValues)(Code) | | This method retrieves a count of the business objects populated with data which match both the positive criteria
and the negative criteria in the given Map.
Parameters: clazz - Parameters: positiveFieldValues - Parameters: negativeFieldValues - number of businessObjects of the given class whose fields match the values in the given expected-value Maps |
deleteMatching | public void deleteMatching(Class clazz, Map fieldValues)(Code) | | Deletes the object(s) matching the given field values
Parameters: clazz - Parameters: fieldValues - |
findAll | public Collection findAll(Class clazz)(Code) | | 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 - |
findByPrimaryKey | public PersistableBusinessObject findByPrimaryKey(Class clazz, Map primaryKeys)(Code) | | 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 - Parameters: primaryKeys - |
findMatching | public Collection findMatching(Class clazz, Map fieldValues)(Code) | | 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 and its expected value.
Parameters: clazz - Parameters: fieldValues - |
findMatchingOrderBy | public Collection findMatchingOrderBy(Class clazz, Map fieldValues, String sortField, boolean sortAscending)(Code) | | 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 and its expected value. Performs an order by on sort field.
Parameters: clazz - Parameters: fieldValues - |
getReferenceIfExists | public PersistableBusinessObject getReferenceIfExists(PersistableBusinessObject bo, String referenceName)(Code) | | This method attempts to retrieve the reference from a BO if it exists.
Parameters: bo - - populated BusinessObject instance that includes the referenceName property Parameters: referenceName - - name of the member/property to load A populated object from the DB, if it exists |
linkAndSave | public void linkAndSave(PersistableBusinessObject bo)(Code) | | Links up any contained objects, and then Saves the passed in object via the persistence layer.
This will throw an IllegalArgumentException (runtime exception) if the object passed in is not a descendent of
BusinessObject.
Parameters: bo - A BusinessObject instance or descendent that you wish to be stored. |
linkAndSave | public void linkAndSave(List<PersistableBusinessObject> businessObjects)(Code) | | Links up any contained objects, and Saves the businessObjects on the list via the persistence layer.
This will throw an IllegalArgumentException (runtime exception) if any of the objects passed in is not a descendent of
BusinessObject.
Parameters: businessObjects - A List of objects to persist. |
linkUserFields | public void linkUserFields(PersistableBusinessObject bo)(Code) | | Updates all KualiUser or UniversalUser objects contained within this BO, based on the UserID as the authoritative key. The
appropriate foreign-key field in the BO itself is also updated.
This allows UserIDs to be entered on forms, and the back-end will link up correctly based on this non-key field.
Parameters: bo - The populated BO (or descendent) instance to be linked & updated |
linkUserFields | public void linkUserFields(List<PersistableBusinessObject> bos)(Code) | | Updates all KualiUser or UniversalUser objects contained within this BO, based on the UserID as the authoritative key. The
appropriate foreign-key field in the BO itself is also updated.
This allows UserIDs to be entered on forms, and the back-end will link up correctly based on this non-key field.
Parameters: bos - A List of populated BusinessObject (or descendent) instances to be linked & updated. |
save | public void save(PersistableBusinessObject bo)(Code) | | Saves the passed in object via the persistence layer.
This will throw an IllegalArgumentException (runtime exception) if the object passed in is not a descendent of
BusinessObject.
Parameters: bo - A BusinessObject instance or descendent that you wish to be stored. |
save | public void save(List businessObjects)(Code) | | Saves the businessObjects on the list via the persistence layer.
This will throw an IllegalArgumentException (runtime exception) if any of the objects passed in is not a descendent of
BusinessObject.
Parameters: businessObjects - A List of objects to persist. |
|
|