|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.nuiton.topia.persistence.util.BeanPropertyLoador<E>
E - type of bean to bindpublic class BeanPropertyLoador<E>
A implementation fo the Loador contract using
PropertyDescriptor.
| Field Summary | |
|---|---|
protected java.beans.PropertyDescriptor[] |
descriptors
|
protected java.lang.Class<E> |
klass
|
protected java.util.List<java.lang.String> |
properties
|
protected static java.lang.Integer |
ZERO
|
protected static java.lang.Byte |
ZEROB
|
protected static java.lang.Double |
ZEROD
|
protected static java.lang.Float |
ZEROF
|
protected static java.lang.Long |
ZEROL
|
| Constructor Summary | |
|---|---|
protected |
BeanPropertyLoador(java.lang.Class<E> klass,
java.lang.String... properties)
|
| Method Summary | ||
|---|---|---|
protected void |
checkProperties()
|
|
java.beans.PropertyDescriptor[] |
getDescriptors()
|
|
protected static java.lang.Object |
getNullValue(java.lang.Class<?> type)
Deprecated. use TopiaEntityHelper.getNullValue(Class) |
|
java.util.List<java.lang.String> |
getProperties()
|
|
static boolean |
isNullValue(java.lang.Object value)
Deprecated. use TopiaEntityHelper.isNullValue(Object) |
|
void |
load(E from,
E dst,
boolean tech)
Bind an entity to another. |
|
static
|
newLoador(java.lang.Class<E> klass,
java.lang.String... properties)
|
|
java.util.Map<java.lang.String,java.lang.Object> |
obtainProgperties(E from)
Deprecated. |
|
java.util.Map<java.lang.String,java.lang.Object> |
obtainProperties(E from)
Obtain from an entity all data to bind to another one according the definition of the loador. |
|
protected void |
setProperty(E dst,
java.beans.PropertyDescriptor descriptor,
java.lang.Object value)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final java.lang.Integer ZERO
protected static final java.lang.Float ZEROF
protected static final java.lang.Long ZEROL
protected static final java.lang.Double ZEROD
protected static final java.lang.Byte ZEROB
protected java.util.List<java.lang.String> properties
protected transient java.beans.PropertyDescriptor[] descriptors
protected java.lang.Class<E> klass
| Constructor Detail |
|---|
protected BeanPropertyLoador(java.lang.Class<E> klass,
java.lang.String... properties)
| Method Detail |
|---|
public static <E> BeanPropertyLoador<E> newLoador(java.lang.Class<E> klass,
java.lang.String... properties)
public java.util.List<java.lang.String> getProperties()
public java.beans.PropertyDescriptor[] getDescriptors()
public java.util.Map<java.lang.String,java.lang.Object> obtainProperties(E from)
LoadorLoador.load(Object, Object, boolean) method.
For example, when an entity has a immutable business key (says with an hibernate naturalId for example),
and that you want to create the data in a db, you must give all the properties at the create time so
this method allow you to do it).
obtainProperties in interface Loador<E>from - the entity to bind
@Deprecated public java.util.Map<java.lang.String,java.lang.Object> obtainProgperties(E from)
obtainProgperties in interface Loador<E>
public void load(E from,
E dst,
boolean tech)
Loador
load in interface Loador<E>from - the source entitydst - the destination entitytech - a flag to bind or not the technical values of the entity (says TopiaId, TopiaVersion and TopiaCreateDate).
protected void setProperty(E dst,
java.beans.PropertyDescriptor descriptor,
java.lang.Object value)
@Deprecated protected static java.lang.Object getNullValue(java.lang.Class<?> type)
TopiaEntityHelper.getNullValue(Class)
type - type to test
@Deprecated public static boolean isNullValue(java.lang.Object value)
TopiaEntityHelper.isNullValue(Object)
value - the value to test
true if value is nullprotected void checkProperties()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||