public class PurApObjectUtils extends Object
| Constructor and Description |
|---|
PurApObjectUtils() |
| Modifier and Type | Method and Description |
|---|---|
protected static void |
attemptCopyOfFieldName(String baseClassName,
String fieldName,
org.kuali.rice.krad.bo.BusinessObject sourceObject,
org.kuali.rice.krad.bo.BusinessObject targetObject,
Map supplementalUncopyable)
Attempts to copy a field
|
protected static <T extends org.kuali.rice.krad.bo.BusinessObject> |
copyCollection(String fieldName,
org.kuali.rice.krad.bo.BusinessObject targetObject,
Collection<T> sourceList,
Map supplementalUncopyable)
Copies a collection
|
protected static Object |
createNewObjectFromClass(Class clazz)
This method safely creates a object from a class
Convenience method to create new object and throw a runtime exception if it cannot
If the class is an
ExternalizableBusinessObject, this method will determine the interface for the EBO and query the
appropriate module service to create a new instance. |
static boolean |
equalByKeys(org.kuali.rice.krad.bo.BusinessObject bo1,
org.kuali.rice.krad.bo.BusinessObject bo2)
Compares two business objects for equality of type and key values.
|
protected static boolean |
isProcessableField(Class baseClass,
String fieldName,
Map excludedFieldNames)
True if a field is processable
|
static void |
populateFromBaseClass(Class base,
org.kuali.rice.krad.bo.BusinessObject src,
org.kuali.rice.krad.bo.BusinessObject target)
Copies based on a class template it does not copy fields in Known Uncopyable Fields
|
static void |
populateFromBaseClass(Class base,
org.kuali.rice.krad.bo.BusinessObject src,
org.kuali.rice.krad.bo.BusinessObject target,
Map supplementalUncopyable)
Populates a class using a base class to determine fields
|
static void |
populateFromBaseWithSuper(org.kuali.rice.krad.bo.BusinessObject sourceObject,
org.kuali.rice.krad.bo.BusinessObject targetObject,
Map supplementalUncopyableFieldNames,
Set<Class> classesToExclude)
Populates from a base class traversing up the object hierarchy.
|
static org.kuali.rice.krad.bo.BusinessObject |
retrieveObjectWithIdentitcalKey(Collection controlList,
org.kuali.rice.krad.bo.BusinessObject bo)
Compares a business object with a List of BOs to determine if an object with the same key as the BO exists in the list.
|
public PurApObjectUtils()
public static void populateFromBaseClass(Class base, org.kuali.rice.krad.bo.BusinessObject src, org.kuali.rice.krad.bo.BusinessObject target, Map supplementalUncopyable)
base - the class to determine what fields to copysrc - the source classtarget - the target classsupplementalUncopyable - a list of fields to never copyprotected static boolean isProcessableField(Class baseClass, String fieldName, Map excludedFieldNames)
baseClass - the base classfieldName - the field name to detrmine if processableexcludedFieldNames - field names to excludeprotected static void attemptCopyOfFieldName(String baseClassName, String fieldName, org.kuali.rice.krad.bo.BusinessObject sourceObject, org.kuali.rice.krad.bo.BusinessObject targetObject, Map supplementalUncopyable)
baseClass - the base classfieldName - the field name to determine if processablesourceObject - source objecttargetObject - target objectsupplementalUncopyable - protected static <T extends org.kuali.rice.krad.bo.BusinessObject> void copyCollection(String fieldName, org.kuali.rice.krad.bo.BusinessObject targetObject, Collection<T> sourceList, Map supplementalUncopyable) throws org.kuali.rice.core.web.format.FormatException, IllegalAccessException, InvocationTargetException, NoSuchMethodException
fieldName - field to copytargetObject - the object of the collectionpropertyValue - value to copysupplementalUncopyable - uncopyable fieldsorg.kuali.rice.core.web.format.FormatExceptionIllegalAccessExceptionInvocationTargetExceptionNoSuchMethodExceptionprotected static Object createNewObjectFromClass(Class clazz)
ExternalizableBusinessObject, this method will determine the interface for the EBO and query the
appropriate module service to create a new instance.boClass - public static void populateFromBaseClass(Class base, org.kuali.rice.krad.bo.BusinessObject src, org.kuali.rice.krad.bo.BusinessObject target)
base - the base classsrc - sourcetarget - targetpublic static void populateFromBaseWithSuper(org.kuali.rice.krad.bo.BusinessObject sourceObject, org.kuali.rice.krad.bo.BusinessObject targetObject, Map supplementalUncopyableFieldNames, Set<Class> classesToExclude)
sourceObject - object to copy fromtargetObject - object to copy tosupplementalUncopyableFieldNames - fields to excludeclassesToExclude - classes to excludepublic static org.kuali.rice.krad.bo.BusinessObject retrieveObjectWithIdentitcalKey(Collection controlList, org.kuali.rice.krad.bo.BusinessObject bo)
controlList - - The list of items to checkbo - - The BO whose keys we are looking for in the controlListpublic static boolean equalByKeys(org.kuali.rice.krad.bo.BusinessObject bo1, org.kuali.rice.krad.bo.BusinessObject bo2)
bo1 - bo2 - Copyright © 2004–2015 The Kuali Foundation. All rights reserved.