org.rice.krms.test
Class TestBoService

java.lang.Object
  extended by org.rice.krms.test.TestBoService
All Implemented Interfaces:
BusinessObjectService

public class TestBoService
extends Object
implements BusinessObjectService


Field Summary
private  GenericTestDao dao
           
private  Map<Class<?>,String> idFieldNamesMap
           
 
Constructor Summary
TestBoService(GenericTestDao genericDao)
           
 
Method Summary
 void addIdFieldNameMapping(Class<?> clazz, String fieldName)
           
 int countMatching(Class clazz, Map<String,?> fieldValues)
           
 int countMatching(Class clazz, Map<String,?> positiveFieldValues, Map<String,?> negativeFieldValues)
           
 void delete(List<? extends PersistableBusinessObject> boList)
           
 void delete(PersistableBusinessObject bo)
           
 void deleteMatching(Class clazz, Map<String,?> fieldValues)
           
<T extends BusinessObject>
Collection<T>
findAll(Class<T> clazz)
           
<T extends BusinessObject>
Collection<T>
findAllOrderBy(Class<T> clazz, String sortField, boolean sortAscending)
           
<T extends BusinessObject>
T
findByPrimaryKey(Class<T> clazz, Map<String,?> primaryKeys)
           
<T extends BusinessObject>
T
findBySinglePrimaryKey(Class<T> clazz, Object primaryKey)
           
<T extends BusinessObject>
Collection<T>
findMatching(Class<T> clazz, Map<String,?> fieldValues)
           
<T extends BusinessObject>
Collection<T>
findMatchingOrderBy(Class<T> clazz, Map<String,?> fieldValues, String sortField, boolean sortAscending)
           
 BusinessObject getReferenceIfExists(BusinessObject bo, String referenceName)
           
 List<? extends PersistableBusinessObject> linkAndSave(List<? extends PersistableBusinessObject> businessObjects)
           
 PersistableBusinessObject linkAndSave(PersistableBusinessObject bo)
           
 void linkUserFields(List<PersistableBusinessObject> bos)
           
 void linkUserFields(PersistableBusinessObject bo)
           
 PersistableBusinessObject manageReadOnly(PersistableBusinessObject bo)
           
 PersistableBusinessObject retrieve(PersistableBusinessObject object)
           
 List<? extends PersistableBusinessObject> save(List<? extends PersistableBusinessObject> businessObjects)
           
 PersistableBusinessObject save(PersistableBusinessObject bo)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

idFieldNamesMap

private Map<Class<?>,String> idFieldNamesMap

dao

private final GenericTestDao dao
Constructor Detail

TestBoService

public TestBoService(GenericTestDao genericDao)
Method Detail

addIdFieldNameMapping

public void addIdFieldNameMapping(Class<?> clazz,
                                  String fieldName)

save

public PersistableBusinessObject save(PersistableBusinessObject bo)
Specified by:
save in interface BusinessObjectService

save

public List<? extends PersistableBusinessObject> save(List<? extends PersistableBusinessObject> businessObjects)
Specified by:
save in interface BusinessObjectService

linkAndSave

public PersistableBusinessObject linkAndSave(PersistableBusinessObject bo)
Specified by:
linkAndSave in interface BusinessObjectService

linkAndSave

public List<? extends PersistableBusinessObject> linkAndSave(List<? extends PersistableBusinessObject> businessObjects)
Specified by:
linkAndSave in interface BusinessObjectService

findBySinglePrimaryKey

public <T extends BusinessObject> T findBySinglePrimaryKey(Class<T> clazz,
                                                           Object primaryKey)
Specified by:
findBySinglePrimaryKey in interface BusinessObjectService

findByPrimaryKey

public <T extends BusinessObject> T findByPrimaryKey(Class<T> clazz,
                                                     Map<String,?> primaryKeys)
Specified by:
findByPrimaryKey in interface BusinessObjectService

retrieve

public PersistableBusinessObject retrieve(PersistableBusinessObject object)
Specified by:
retrieve in interface BusinessObjectService

findAll

public <T extends BusinessObject> Collection<T> findAll(Class<T> clazz)
Specified by:
findAll in interface BusinessObjectService

findAllOrderBy

public <T extends BusinessObject> Collection<T> findAllOrderBy(Class<T> clazz,
                                                               String sortField,
                                                               boolean sortAscending)
Specified by:
findAllOrderBy in interface BusinessObjectService

findMatching

public <T extends BusinessObject> Collection<T> findMatching(Class<T> clazz,
                                                             Map<String,?> fieldValues)
Specified by:
findMatching in interface BusinessObjectService

countMatching

public int countMatching(Class clazz,
                         Map<String,?> fieldValues)
Specified by:
countMatching in interface BusinessObjectService

countMatching

public int countMatching(Class clazz,
                         Map<String,?> positiveFieldValues,
                         Map<String,?> negativeFieldValues)
Specified by:
countMatching in interface BusinessObjectService

findMatchingOrderBy

public <T extends BusinessObject> Collection<T> findMatchingOrderBy(Class<T> clazz,
                                                                    Map<String,?> fieldValues,
                                                                    String sortField,
                                                                    boolean sortAscending)
Specified by:
findMatchingOrderBy in interface BusinessObjectService

delete

public void delete(PersistableBusinessObject bo)
Specified by:
delete in interface BusinessObjectService

delete

public void delete(List<? extends PersistableBusinessObject> boList)
Specified by:
delete in interface BusinessObjectService

deleteMatching

@Transactional
public void deleteMatching(Class clazz,
                                         Map<String,?> fieldValues)
Specified by:
deleteMatching in interface BusinessObjectService

getReferenceIfExists

public BusinessObject getReferenceIfExists(BusinessObject bo,
                                           String referenceName)
Specified by:
getReferenceIfExists in interface BusinessObjectService

linkUserFields

public void linkUserFields(PersistableBusinessObject bo)
Specified by:
linkUserFields in interface BusinessObjectService

linkUserFields

public void linkUserFields(List<PersistableBusinessObject> bos)
Specified by:
linkUserFields in interface BusinessObjectService

manageReadOnly

public PersistableBusinessObject manageReadOnly(PersistableBusinessObject bo)
Specified by:
manageReadOnly in interface BusinessObjectService


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.