|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.kfs.module.purap.util.PurApObjectUtils
public class PurApObjectUtils
Purap Object Utils. Similar to the nervous system ObjectUtils this class contains methods to reflectively set and get values on BusinessObjects that are passed in.
| Constructor Summary | |
|---|---|
PurApObjectUtils()
|
|
| Method Summary | |
|---|---|
protected static void |
attemptCopyOfFieldName(String baseClassName,
String fieldName,
org.kuali.rice.kns.bo.BusinessObject sourceObject,
org.kuali.rice.kns.bo.BusinessObject targetObject,
Map supplementalUncopyable)
Attempts to copy a field |
protected static void |
copyCollection(String fieldName,
org.kuali.rice.kns.bo.BusinessObject targetObject,
Object propertyValue,
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.kns.bo.BusinessObject bo1,
org.kuali.rice.kns.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.kns.bo.BusinessObject src,
org.kuali.rice.kns.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.kns.bo.BusinessObject src,
org.kuali.rice.kns.bo.BusinessObject target,
Map supplementalUncopyable)
Populates a class using a base class to determine fields |
static void |
populateFromBaseWithSuper(org.kuali.rice.kns.bo.BusinessObject sourceObject,
org.kuali.rice.kns.bo.BusinessObject targetObject,
Map supplementalUncopyableFieldNames,
Set<Class> classesToExclude)
Populates from a base class traversing up the object hierarchy. |
static org.kuali.rice.kns.bo.BusinessObject |
retrieveObjectWithIdentitcalKey(Collection controlList,
org.kuali.rice.kns.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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PurApObjectUtils()
| Method Detail |
|---|
public static void populateFromBaseClass(Class base,
org.kuali.rice.kns.bo.BusinessObject src,
org.kuali.rice.kns.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 copy
protected static boolean isProcessableField(Class baseClass,
String fieldName,
Map excludedFieldNames)
baseClass - the base classfieldName - the field name to detrmine if processableexcludedFieldNames - field names to exclude
protected static void attemptCopyOfFieldName(String baseClassName,
String fieldName,
org.kuali.rice.kns.bo.BusinessObject sourceObject,
org.kuali.rice.kns.bo.BusinessObject targetObject,
Map supplementalUncopyable)
baseClass - the base classfieldName - the field name to determine if processablesourceObject - source objecttargetObject - target objectsupplementalUncopyable -
protected static void copyCollection(String fieldName,
org.kuali.rice.kns.bo.BusinessObject targetObject,
Object propertyValue,
Map supplementalUncopyable)
throws org.kuali.rice.kns.web.format.FormatException,
IllegalAccessException,
InvocationTargetException,
NoSuchMethodException
fieldName - field to copytargetObject - the object of the collectionpropertyValue - value to copysupplementalUncopyable - uncopyable fields
org.kuali.rice.kns.web.format.FormatException
IllegalAccessException
InvocationTargetException
NoSuchMethodExceptionprotected 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.kns.bo.BusinessObject src,
org.kuali.rice.kns.bo.BusinessObject target)
base - the base classsrc - sourcetarget - target
public static void populateFromBaseWithSuper(org.kuali.rice.kns.bo.BusinessObject sourceObject,
org.kuali.rice.kns.bo.BusinessObject targetObject,
Map supplementalUncopyableFieldNames,
Set<Class> classesToExclude)
sourceObject - object to copy fromtargetObject - object to copy tosupplementalUncopyableFieldNames - fields to excludeclassesToExclude - classes to exclude
public static org.kuali.rice.kns.bo.BusinessObject retrieveObjectWithIdentitcalKey(Collection controlList,
org.kuali.rice.kns.bo.BusinessObject bo)
controlList - - The list of items to checkbo - - The BO whose keys we are looking for in the controlList
public static boolean equalByKeys(org.kuali.rice.kns.bo.BusinessObject bo1,
org.kuali.rice.kns.bo.BusinessObject bo2)
bo1 - bo2 -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||