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

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

public class TopiaEntityBinder<E extends TopiaEntity>
extends org.nuiton.util.beans.Binder<E,E>
implements Loador<E>

A Binder dedicated to TopiaEntity dealing with technical values.

There is an internal sate empty to deal with default values of properties of an entity.

Note: Should remove Loador contract soon.

Since:
2.3.0
Author:
tchemit < chemit@codelutin.com >
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class org.nuiton.util.beans.Binder
org.nuiton.util.beans.Binder.CollectionStrategy
 
Field Summary
protected  E empty
           
 
Fields inherited from class org.nuiton.util.beans.Binder
model
 
Constructor Summary
TopiaEntityBinder()
           
 
Method Summary
protected  java.lang.Object bind(org.nuiton.util.beans.Binder binder, java.lang.Object read)
           
 void load(E source, E target, boolean tech, java.lang.String... propertyNames)
          Bind an entity to another.
 void setEmpty(E empty)
           
 
Methods inherited from class org.nuiton.util.beans.Binder
bindCollection, bindProperty, copy, copy, copyExcluding, getAllPropertiesExclude, getCollectionValue, getModel, getProperties, getSourceType, getTargetType, obtainProperties, setModel
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.nuiton.topia.persistence.util.Loador
getSourceType, obtainProperties
 

Field Detail

empty

protected E extends TopiaEntity empty
Constructor Detail

TopiaEntityBinder

public TopiaEntityBinder()
Method Detail

setEmpty

public void setEmpty(E empty)

load

public void load(E source,
                 E target,
                 boolean tech,
                 java.lang.String... propertyNames)
Description copied from interface: Loador
Bind an entity to another.

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

bind

protected java.lang.Object bind(org.nuiton.util.beans.Binder binder,
                                java.lang.Object read)
                         throws java.lang.IllegalAccessException,
                                java.lang.InstantiationException
Overrides:
bind in class org.nuiton.util.beans.Binder<E extends TopiaEntity,E extends TopiaEntity>
Throws:
java.lang.IllegalAccessException
java.lang.InstantiationException


Copyright © 2004-2010 CodeLutin. All Rights Reserved.