|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.kuali.student.r2.common.assembler.TransformUtility
public class TransformUtility
Utility class containing utility methods to aide in DTO & Entity transformations
| Field Summary | |
|---|---|
static String |
DYNAMIC_ATTRIBUTE_DATE_FORMAT
|
| Constructor Summary | |
|---|---|
TransformUtility()
|
|
| Method Summary | ||
|---|---|---|
static String |
dateTimeToDynamicAttributeString(Date date)
dateTime refers to a date where hours/minutes/seconds are important in addition to the month day year This is used to convert to and from a dynamic attribute which requires a string format. |
|
static Date |
dynamicAttributeStringToDateTime(String formattedDateStr)
Takes a dynamic attribute representing |
|
static DynAttrConverter<? extends Object> |
getConverterByClass(Class clazz)
|
|
static
|
mergeToEntityAttributes(Class<A> attributeClass,
HasAttributes dto,
O owner)
This merges DTO attributes into Entity attributes and returns the orphaned attributes to delete |
|
static
|
toAttributeInfoList(AttributeOwner<A> owner)
Converts attributes from an entity to list of AttributeInfo objects for a DTO |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String DYNAMIC_ATTRIBUTE_DATE_FORMAT
| Constructor Detail |
|---|
public TransformUtility()
| Method Detail |
|---|
public static <A extends BaseAttributeEntity<O>,O extends AttributeOwner<A>> List<Object> mergeToEntityAttributes(Class<A> attributeClass,
HasAttributes dto,
O owner)
attributeClass - The attribute entity class for the attributes on the entity ownerdto - The dto to copy attributes fromowner - The owner entity of the attributes.
public static <A extends BaseAttributeEntity<O>,O extends AttributeOwner<A>> List<AttributeInfo> toAttributeInfoList(AttributeOwner<A> owner)
owner - The entity containing the attributes
public static String dateTimeToDynamicAttributeString(Date date)
date - A date object to convert
public static Date dynamicAttributeStringToDateTime(String formattedDateStr)
throws ParseException
formattedDateStr -
ParseExceptionpublic static DynAttrConverter<? extends Object> getConverterByClass(Class clazz)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||