SRJRCFrames
v0.1.296

de.schwarzrot.data.access.jdbc
Class JDBCEntityIntrospector

java.lang.Object
  extended by de.schwarzrot.data.access.support.EntityIntrospector
      extended by de.schwarzrot.data.access.jdbc.JDBCEntityIntrospector

public class JDBCEntityIntrospector
extends EntityIntrospector

class to complete entity introspection for jdbc data storage systems. All unmapped physical names are set to lower case and the PropertyInfo entry is patched with the database model information.

Author:
Reinhard Mantey

Constructor Summary
JDBCEntityIntrospector()
           
 
Method Summary
protected  String getMapped(String pn)
          change all column-names to lower case value of property names
protected  void initForDescriptor(EntityDescriptor ed, Object handle)
          empty callback for subclasses to extend introspection.
protected  void patchPropertyInfo(PropertyInfo info, EntityDescriptor ed)
          callback to extend/change introspection.
protected  void setPersistenceInfo(EntityDescriptor ed, String colName, int colType, int colSize, int colDecimals)
          add database model information to PropertyInfo entry and marks that property as being persistent.
protected  void validate(EntityDescriptor ed, Object handle)
          empty callback for subclasses to extend introspection.
 
Methods inherited from class de.schwarzrot.data.access.support.EntityIntrospector
dumpCache, getEntityDescriptor, getLogger
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCEntityIntrospector

public JDBCEntityIntrospector()
Method Detail

getMapped

protected String getMapped(String pn)
change all column-names to lower case value of property names

Overrides:
getMapped in class EntityIntrospector
Parameters:
pn - the logical property name
Returns:
the properties name for physical data storage
See Also:
EntityIntrospector.getMapped(java.lang.String)

initForDescriptor

protected void initForDescriptor(EntityDescriptor ed,
                                 Object handle)
Description copied from class: EntityIntrospector
empty callback for subclasses to extend introspection. Will be called before walking over all collected PropertyInfo entries.

Overrides:
initForDescriptor in class EntityIntrospector
Parameters:
ed - the freshly created EntityDescriptor
handle - abstraction of an connection handle, in case physical data storage needs to do some extra investigation

patchPropertyInfo

protected void patchPropertyInfo(PropertyInfo info,
                                 EntityDescriptor ed)
Description copied from class: EntityIntrospector
callback to extend/change introspection. Default behaviour is to set all properties, that don't have an entry in skiplist, to being persistent.

Overrides:
patchPropertyInfo in class EntityIntrospector
Parameters:
info - the collected PropertyInfo
ed - the EntityDescriptor holding the PropertyInfo entry

setPersistenceInfo

protected void setPersistenceInfo(EntityDescriptor ed,
                                  String colName,
                                  int colType,
                                  int colSize,
                                  int colDecimals)
add database model information to PropertyInfo entry and marks that property as being persistent.

Parameters:
colName - column name from database
colType - column type from database
colSize - column size from database
colDecimals - number of decimal digits for that column

validate

protected void validate(EntityDescriptor ed,
                        Object handle)
Description copied from class: EntityIntrospector
empty callback for subclasses to extend introspection. Will be called after the loop over all collected PropertyInfo entries.

Overrides:
validate in class EntityIntrospector
Parameters:
ed - the EntityDescriptor to extend
handle - abstraction of an connection handle, in case physical data storage needs to do some extra investigation

SRJRCFrames
v0.1.296

hosted at
Find SRJRCFrames at SourceForge.net. Fast, secure and free:
           Open Source Software download
Submit a bug or request a feature

SRJRCFrames is published according to the GNU General Public License
Copyright 2005-2012 Reinhard Mantey - some rights reserved.