|
||||||||||
| 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 bindTopiaEntityBinder
@Deprecated public class BeanPropertyLoador<E>
A implementation fo the Loador contract using
PropertyDescriptor.
| Field Summary | |
|---|---|
protected PropertyDescriptor[] |
descriptors
Deprecated. |
protected Class<E> |
klass
Deprecated. |
protected List<String> |
properties
Deprecated. |
| Constructor Summary | |
|---|---|
protected |
BeanPropertyLoador(Class<E> klass,
String... properties)
Deprecated. |
| Method Summary | ||
|---|---|---|
protected void |
checkProperties()
Deprecated. |
|
PropertyDescriptor[] |
getDescriptors()
Deprecated. |
|
protected static Object |
getNullValue(Class<?> type)
Deprecated. use TopiaEntityHelper.getNullValue(Class) |
|
List<String> |
getProperties()
Deprecated. |
|
static boolean |
isNullValue(Object value)
Deprecated. use TopiaEntityHelper.isNullValue(Object) |
|
void |
load(E from,
E dst,
boolean tech,
String... propertyNames)
Deprecated. Bind an entity to another. |
|
static
|
newLoador(Class<E> klass,
String... properties)
Deprecated. |
|
Map<String,Object> |
obtainProperties(E from,
String... propertyNames)
Deprecated. Obtain from an entity all data to bind to another one according the definition of the loador. |
|
protected void |
setProperty(E dst,
PropertyDescriptor descriptor,
Object value)
Deprecated. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected List<String> properties
protected transient PropertyDescriptor[] descriptors
protected Class<E> klass
| Constructor Detail |
|---|
protected BeanPropertyLoador(Class<E> klass,
String... properties)
| Method Detail |
|---|
public static <E> BeanPropertyLoador<E> newLoador(Class<E> klass,
String... properties)
public List<String> getProperties()
public PropertyDescriptor[] getDescriptors()
public Map<String,Object> obtainProperties(E from,
String... propertyNames)
LoadorLoador.load(Object, Object, boolean, String...) 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 bindpropertyNames - subset of properties to load
public void load(E from,
E dst,
boolean tech,
String... propertyNames)
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).propertyNames - subset of properties to load
protected void setProperty(E dst,
PropertyDescriptor descriptor,
Object value)
@Deprecated protected static Object getNullValue(Class<?> type)
TopiaEntityHelper.getNullValue(Class)
type - type to test
@Deprecated public static boolean isNullValue(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 | |||||||||