|
SRJRCFrames v0.1.296 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.schwarzrot.data.access.support.EntityUtils
public class EntityUtils
helper class for anonymous entity handling. Existing implementations are not robust enuf to handle null values, so I had to write my own bean handling. This class also handles the creation of derived entities, where several classes share a single database table.
| Constructor Summary | |
|---|---|
EntityUtils()
|
|
| Method Summary | ||
|---|---|---|
|
copyProperties(E dest,
E src,
EntityDescriptor ed,
String[] propertyNames)
|
|
|
createEntity(EntityDescriptor ed,
DataAccessor da,
EntityIntrospector ei)
create an entity from a resultset. |
|
void |
fillEntity(Entity entity,
EntityDescriptor ed,
DataAccessor da,
EntityIntrospector ei)
fills an entity instance from a resultset |
|
void |
fillEntity(Entity entity,
String[] propertyNames,
EntityDescriptor ed,
DataAccessor da,
EntityIntrospector ei)
fills given properties of the entity from a resultset |
|
ConverterFactory |
getConverterFactory()
|
|
EntityHolder |
getEntityCache()
|
|
void |
setConverterFactory(ConverterFactory converterFactory)
|
|
void |
setEntityCache(EntityHolder entityCache)
|
|
protected
|
setProperty(E instance,
String propertyName,
EntityDescriptor ed,
DataAccessor da)
|
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public EntityUtils()
| Method Detail |
|---|
public <E extends Entity> void copyProperties(E dest,
E src,
EntityDescriptor ed,
String[] propertyNames)
public <E extends Entity> E createEntity(EntityDescriptor ed,
DataAccessor da,
EntityIntrospector ei)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException
E - the entity to createed - the descriptor for the involved entityda - a wrapper to access data in a general fashionei - the entity introspector
ClassNotFoundException - - raise Exception from underlying layer to application
InstantiationException - - raise Exception from underlying layer to application
IllegalAccessException - - raise Exception from underlying layer to application
public void fillEntity(Entity entity,
EntityDescriptor ed,
DataAccessor da,
EntityIntrospector ei)
entity - the entity to fill with data from resultseted - the entity descriptorda - a wrapper to access data in a general fashionei - the entity introspector
public void fillEntity(Entity entity,
String[] propertyNames,
EntityDescriptor ed,
DataAccessor da,
EntityIntrospector ei)
entity - the entity to fill with data from resultsetpropertyNames - fill only given property namesed - the entity descriptorda - a wrapper to access data in a general fashionei - the entity introspectorpublic final ConverterFactory getConverterFactory()
public final EntityHolder getEntityCache()
public final void setConverterFactory(ConverterFactory converterFactory)
public final void setEntityCache(EntityHolder entityCache)
protected <E extends Entity> void setProperty(E instance,
String propertyName,
EntityDescriptor ed,
DataAccessor da)
|
SRJRCFrames v0.1.296 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||