org.kuali.rice.krad.dao.proxy
Class BusinessObjectDaoProxy

java.lang.Object
  extended by org.kuali.rice.krad.dao.proxy.BusinessObjectDaoProxy
All Implemented Interfaces:
BusinessObjectDao

@Transactional
public class BusinessObjectDaoProxy
extends Object
implements BusinessObjectDao


Constructor Summary
BusinessObjectDaoProxy()
           
 
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
<T extends BusinessObject>
Collection<T>
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>
Collection<T>
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.
<T extends BusinessObject>
Collection<T>
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.
<T extends BusinessObject>
Collection<T>
findAllInactive(Class<T> clazz)
           
<T extends BusinessObject>
Collection<T>
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>
T
findByPrimaryKey(Class<T> clazz, Map<String,?> primaryKeys)
          Retrieves an object instance identified bys it primary keys and values.
<T extends BusinessObject>
T
findByPrimaryKeyUsingKeyObject(Class<T> clazz, Object pkObject)
          Defers to correct DAO for this class
<T extends BusinessObject>
T
findBySinglePrimaryKey(Class<T> clazz, Object primaryKey)
          Retrieves an object instance identified by its primary key.
<T extends BusinessObject>
Collection<T>
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>
Collection<T>
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.
<T extends BusinessObject>
Collection<T>
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.
 void setBusinessObjectDaoJpa(BusinessObjectDao businessObjectDaoJpa)
           
 void setBusinessObjectDaoOjb(BusinessObjectDao businessObjectDaoOjb)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BusinessObjectDaoProxy

public BusinessObjectDaoProxy()
Method Detail

countMatching

public int countMatching(Class clazz,
                         Map<String,?> fieldValues)
Specified by:
countMatching in interface BusinessObjectDao
Returns:
count of BusinessObjects of the given class whose fields match the values in the given Map.
See Also:
BusinessObjectDao.countMatching(java.lang.Class, java.util.Map)

countMatching

public int countMatching(Class clazz,
                         Map<String,?> positiveFieldValues,
                         Map<String,?> negativeFieldValues)
Description copied from interface: BusinessObjectDao
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"

Specified by:
countMatching in interface BusinessObjectDao
positiveFieldValues - Map of fields and values for positive criteria
negativeFieldValues - Map of fields and values for negative criteria
Returns:
See Also:
BusinessObjectDao.countMatching(java.lang.Class, java.util.Map, java.util.Map)

delete

public void delete(PersistableBusinessObject bo)
Description copied from interface: BusinessObjectDao
Deletes a business object from the database.

Specified by:
delete in interface BusinessObjectDao
See Also:
BusinessObjectDao.delete(org.kuali.rice.krad.bo.PersistableBusinessObject)

delete

public void delete(List<? extends PersistableBusinessObject> boList)
Description copied from interface: BusinessObjectDao
Deletes each business object in the given List from the database.

Specified by:
delete in interface BusinessObjectDao
See Also:
BusinessObjectDao.delete(java.util.List)

deleteMatching

public void deleteMatching(Class clazz,
                           Map<String,?> fieldValues)
Description copied from interface: BusinessObjectDao
Deletes the business objects matching the given fieldValues

Specified by:
deleteMatching in interface BusinessObjectDao
See Also:
BusinessObjectDao.deleteMatching(java.lang.Class, java.util.Map)

findAll

public <T extends BusinessObject> Collection<T> findAll(Class<T> clazz)
Description copied from interface: BusinessObjectDao
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.

Specified by:
findAll in interface BusinessObjectDao
Returns:
See Also:
BusinessObjectDao.findAll(java.lang.Class)

findAllActive

public <T extends BusinessObject> Collection<T> findAllActive(Class<T> clazz)
Description copied from interface: BusinessObjectDao
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. Adds criteria on active column to return only active records. Assumes there exist a mapping for PropertyConstants.Active

Specified by:
findAllActive in interface BusinessObjectDao
Returns:
See Also:
BusinessObjectDao.findAllActive(java.lang.Class)

findAllInactive

public <T extends BusinessObject> Collection<T> findAllInactive(Class<T> clazz)
Specified by:
findAllInactive in interface BusinessObjectDao
See Also:
BusinessObjectDao.findAllInactive(java.lang.Class)

findAllActiveOrderBy

public <T extends BusinessObject> Collection<T> findAllActiveOrderBy(Class<T> clazz,
                                                                     String sortField,
                                                                     boolean sortAscending)
Description copied from interface: BusinessObjectDao
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. Adds criteria on active column to return only active records. Assumes there exist a mapping for PropertyConstants.Active

Specified by:
findAllActiveOrderBy in interface BusinessObjectDao
Returns:
See Also:
BusinessObjectDao.findAllActiveOrderBy(java.lang.Class, java.lang.String, boolean)

findAllOrderBy

public <T extends BusinessObject> Collection<T> findAllOrderBy(Class<T> clazz,
                                                               String sortField,
                                                               boolean sortAscending)
Description copied from interface: BusinessObjectDao
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.

Specified by:
findAllOrderBy in interface BusinessObjectDao
Returns:
See Also:
BusinessObjectDao.findAllOrderBy(java.lang.Class, java.lang.String, boolean)

findBySinglePrimaryKey

public <T extends BusinessObject> T findBySinglePrimaryKey(Class<T> clazz,
                                                           Object primaryKey)
Description copied from interface: BusinessObjectDao
Retrieves an object instance identified by its primary key. For composite keys, use BusinessObjectDao.findByPrimaryKey(Class, Map)

Specified by:
findBySinglePrimaryKey in interface BusinessObjectDao
Returns:
See Also:
BusinessObjectDao.findBySinglePrimaryKey(java.lang.Class, java.lang.Object)

findByPrimaryKey

public <T extends BusinessObject> T findByPrimaryKey(Class<T> clazz,
                                                     Map<String,?> primaryKeys)
Description copied from interface: BusinessObjectDao
Retrieves an object instance identified bys it 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.

Specified by:
findByPrimaryKey in interface BusinessObjectDao
Returns:
See Also:
BusinessObjectDao.findByPrimaryKey(java.lang.Class, java.util.Map)

findMatching

public <T extends BusinessObject> Collection<T> findMatching(Class<T> clazz,
                                                             Map<String,?> fieldValues)
Description copied from interface: BusinessObjectDao
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.

Specified by:
findMatching in interface BusinessObjectDao
Returns:
See Also:
BusinessObjectDao.findMatching(java.lang.Class, java.util.Map)

findMatchingActive

public <T extends BusinessObject> Collection<T> findMatchingActive(Class<T> clazz,
                                                                   Map<String,?> fieldValues)
Description copied from interface: BusinessObjectDao
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. Adds criteria on active column to return only active records. Assumes there exist a mapping for PropertyConstants.Active

Specified by:
findMatchingActive in interface BusinessObjectDao
Returns:
See Also:
BusinessObjectDao.findMatchingActive(java.lang.Class, java.util.Map)

findMatchingOrderBy

public <T extends BusinessObject> Collection<T> findMatchingOrderBy(Class<T> clazz,
                                                                    Map<String,?> fieldValues,
                                                                    String sortField,
                                                                    boolean sortAscending)
Description copied from interface: BusinessObjectDao
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.

Specified by:
findMatchingOrderBy in interface BusinessObjectDao
Returns:
See Also:
BusinessObjectDao.findMatchingOrderBy(java.lang.Class, java.util.Map, java.lang.String, boolean)

retrieve

public PersistableBusinessObject retrieve(PersistableBusinessObject object)
Description copied from interface: BusinessObjectDao
Retrieves an object instance identified by the class of the given object and the object's primary key values.

Specified by:
retrieve in interface BusinessObjectDao
Returns:
See Also:
BusinessObjectDao.retrieve(org.kuali.rice.krad.bo.PersistableBusinessObject)

manageReadOnly

public PersistableBusinessObject manageReadOnly(PersistableBusinessObject bo)
Description copied from interface: BusinessObjectDao
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

Specified by:
manageReadOnly in interface BusinessObjectDao
Parameters:
bo - the business object to managed
Returns:
the managed copied of the business object
See Also:
BusinessObjectDao.manageReadOnly(org.kuali.rice.krad.bo.PersistableBusinessObject)

findByPrimaryKeyUsingKeyObject

public <T extends BusinessObject> T findByPrimaryKeyUsingKeyObject(Class<T> clazz,
                                                                   Object pkObject)
Defers to correct DAO for this class

Specified by:
findByPrimaryKeyUsingKeyObject in interface BusinessObjectDao
Parameters:
clazz - the class of the object to retrieve
pkObject - the value of the primary key
Returns:
the retrieved PersistableBusinessObject
See Also:
BusinessObjectDao.findByPrimaryKeyUsingKeyObject(java.lang.Class, java.lang.Object)

save

public PersistableBusinessObject save(PersistableBusinessObject bo)
Description copied from interface: BusinessObjectDao
Saves any object that implements the BusinessObject interface.

Specified by:
save in interface BusinessObjectDao
See Also:
BusinessObjectDao.save(org.kuali.rice.krad.bo.PersistableBusinessObject)

save

public List<? extends PersistableBusinessObject> save(List businessObjects)
Description copied from interface: BusinessObjectDao
Saves a List of BusinessObjects.

Specified by:
save in interface BusinessObjectDao
See Also:
BusinessObjectDao.save(java.util.List)

setBusinessObjectDaoJpa

public void setBusinessObjectDaoJpa(BusinessObjectDao businessObjectDaoJpa)

setBusinessObjectDaoOjb

public void setBusinessObjectDaoOjb(BusinessObjectDao businessObjectDaoOjb)


Copyright © 2005-2013 The Kuali Foundation. All Rights Reserved.