org.nuiton.topia.persistence.util
Class EntityLoador<E extends TopiaEntity>

java.lang.Object
  extended by org.nuiton.topia.persistence.util.BeanPropertyLoador<E>
      extended by org.nuiton.topia.persistence.util.EntityLoador<E>
Type Parameters:
E - type of entity
All Implemented Interfaces:
java.io.Serializable, Loador<E>

public class EntityLoador<E extends TopiaEntity>
extends BeanPropertyLoador<E>

A implementation of BeanPropertyLoador for TopiaEntity

Some factory methods are defined to simplify the generic cast, prefer used them instead of the (protected) constructor).

Author:
chemit
See Also:
Serialized Form

Field Summary
protected  E empty
           
 
Fields inherited from class org.nuiton.topia.persistence.util.BeanPropertyLoador
descriptors, klass, properties, ZERO, ZEROB, ZEROD, ZEROF, ZEROL
 
Constructor Summary
protected EntityLoador(java.lang.Class<E> klass, E empty, java.lang.String... properties)
           
 
Method Summary
 void load(E from, E dst, boolean tech)
          Bind an entity to another.
static
<E extends TopiaEntity>
EntityLoador<E>
newEntityLoador(java.lang.Class<E> klass, E empty, java.lang.String... properties)
           
static
<E extends TopiaEntity>
EntityLoador<E>
newEntityLoador(java.lang.Class<E> klass, java.lang.String... properties)
           
 
Methods inherited from class org.nuiton.topia.persistence.util.BeanPropertyLoador
checkProperties, getDescriptors, getNullValue, getProperties, isNullValue, newLoador, obtainProgperties, obtainProperties, setProperty
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

empty

protected E extends TopiaEntity empty
Constructor Detail

EntityLoador

protected EntityLoador(java.lang.Class<E> klass,
                       E empty,
                       java.lang.String... properties)
Method Detail

newEntityLoador

public static <E extends TopiaEntity> EntityLoador<E> newEntityLoador(java.lang.Class<E> klass,
                                                                      E empty,
                                                                      java.lang.String... properties)

newEntityLoador

public static <E extends TopiaEntity> EntityLoador<E> newEntityLoador(java.lang.Class<E> klass,
                                                                      java.lang.String... properties)

load

public void load(E from,
                 E dst,
                 boolean tech)
Description copied from interface: Loador
Bind an entity to another.

Specified by:
load in interface Loador<E extends TopiaEntity>
Overrides:
load in class BeanPropertyLoador<E extends TopiaEntity>
Parameters:
from - the source entity
dst - the destination entity
tech - a flag to bind or not the technical values of the entity (says TopiaId, TopiaVersion and TopiaCreateDate).


Copyright © 2004-2010 CodeLutin. All Rights Reserved.