public interface BusinessObjectService
Modifier and Type | Method and Description |
---|---|
int |
countMatching(Class clazz,
Map<String,?> fieldValues)
This method retrieves a count of the business objects populated with data which match the criteria in the given Map.
|
int |
countMatching(Class clazz,
Map<String,?> positiveFieldValues,
Map<String,?> 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.
|
void |
delete(List<? extends PersistableBusinessObject> boList)
Deletes each business object in the given List.
|
void |
delete(PersistableBusinessObject bo)
Deletes a business object from the database.
|
void |
deleteMatching(Class clazz,
Map<String,?> fieldValues)
Deletes the object(s) matching the given field values
|
<T extends BusinessObject> |
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.
|
<T extends BusinessObject> |
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.
|
<T extends BusinessObject> |
findByPrimaryKey(Class<T> clazz,
Map<String,?> primaryKeys)
Retrieves an object instance identified by its primary keys and values.
|
<T extends BusinessObject> |
findBySinglePrimaryKey(Class<T> clazz,
Object primaryKey)
Retrieves an object instance identified by its primary key.
|
<T extends BusinessObject> |
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.
|
<T extends BusinessObject> |
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.
|
BusinessObject |
getReferenceIfExists(BusinessObject bo,
String referenceName)
This method attempts to retrieve the reference from a BO if it exists.
|
List<? extends PersistableBusinessObject> |
linkAndSave(List<? extends PersistableBusinessObject> businessObjects)
Links up any contained objects, and Saves the businessObjects on the list via the persistence layer.
|
PersistableBusinessObject |
linkAndSave(PersistableBusinessObject bo)
Links up any contained objects, and then Saves the passed in object via the persistence layer.
|
void |
linkUserFields(List<PersistableBusinessObject> bos)
Updates all KualiUser or Person objects contained within this BO, based on the UserID as the authoritative key.
|
void |
linkUserFields(PersistableBusinessObject bo)
Updates all KualiUser or Person objects contained within this BO, based on the UserID as the authoritative key.
|
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<? extends PersistableBusinessObject> businessObjects)
Saves the businessObjects on the list via the persistence layer.
|
<T extends PersistableBusinessObject> |
save(T bo)
Saves the passed in object via the persistence layer.
|
<T extends PersistableBusinessObject> T save(T bo)
bo
- A BusinessObject instance or descendent that you wish to be stored.List<? extends PersistableBusinessObject> save(List<? extends PersistableBusinessObject> businessObjects)
businessObjects
- A ListPersistableBusinessObject linkAndSave(PersistableBusinessObject bo)
bo
- A BusinessObject instance or descendent that you wish to be stored.List<? extends PersistableBusinessObject> linkAndSave(List<? extends PersistableBusinessObject> businessObjects)
businessObjects
- A List<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
- PersistableBusinessObject retrieve(PersistableBusinessObject object)
object
- <T extends BusinessObject> Collection<T> findAll(Class<T> clazz)
clazz
- <T extends BusinessObject> Collection<T> findAllOrderBy(Class<T> clazz, String sortField, boolean sortAscending)
clazz
- <T extends BusinessObject> Collection<T> findMatching(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
- negativeFieldValues
- <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
- BusinessObject getReferenceIfExists(BusinessObject bo, String referenceName)
bo
- - populated BusinessObject instance that includes the referenceName propertyreferenceName
- - name of the member/property to loadvoid linkUserFields(PersistableBusinessObject bo)
bo
- The populated BO (or descendent) instance to be linked & updatedvoid linkUserFields(List<PersistableBusinessObject> bos)
bos
- A List of populated BusinessObject (or descendent) instances to be linked & updated.PersistableBusinessObject manageReadOnly(PersistableBusinessObject bo)
bo
- the business object to managedCopyright © 2005–2016 The Kuali Foundation. All rights reserved.