|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectorg.jaffa.persistence.engines.jdbcengine.util.MoldingService
The MoldingService uses reflection to create/update persistent objects using ClassMetaData defintions. This can also set the initial state of a persistent object from the ResultSet.
| Method Summary | |
static Object |
getInstanceValue(IPersistent object,
ClassMetaData classMetaData,
String attributeName)
This gets the value of the attributeName from the Persistent object, using the accessor method cached in the ClassMetaData defintion. |
static IPersistent |
getObject(ClassMetaData classMetaData)
Creates an instance of the persistent class, as defined in the input ClassMetaData defintion. |
static IPersistent |
getObject(ClassMetaData classMetaData,
ResultSet rs,
String engineType)
Creates an instance of the persistent class, as defined in the input ClassMetaData defintion. |
static void |
setInstanceValue(IPersistent object,
ClassMetaData classMetaData,
String attributeName,
Object value)
This sets the value of the attribute from the Persistent object, using the mutator method cached in the ClassMetaData defintion. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
public static IPersistent getObject(ClassMetaData classMetaData)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException
classMetaData - The ClassMetaData object, whose corresponding persistent class is to be instantiated.
ClassNotFoundException - if the Persistent class is not found.
InstantiationException - if this Class represents an abstract class, an interface, an array class, a primitive type, or void; or if the class has no nullary constructor; or if the instantiation fails for some other reason.
IllegalAccessException - if the class or its nullary constructor is not accessible.
public static Object getInstanceValue(IPersistent object,
ClassMetaData classMetaData,
String attributeName)
throws IllegalAccessException,
InvocationTargetException
object - The Persistent object.classMetaData - The ClassMetaData definition for the Persistent object.attributeName - The attribute whose value will be returned.
IllegalAccessException - if the accessor Method object enforces Java language access control and the underlying method is inaccessible.
InvocationTargetException - if the accessor method throws an exception.
public static void setInstanceValue(IPersistent object,
ClassMetaData classMetaData,
String attributeName,
Object value)
throws IllegalAccessException,
InvocationTargetException
object - The Persistent object.classMetaData - The ClassMetaData definition for the Persistent object.attributeName - The attribute whose value will be set.value - The value to be set.
IllegalAccessException - if the mutator Method object enforces Java language access control and the underlying method is inaccessible.
InvocationTargetException - if the mutator method throws an exception.
public static IPersistent getObject(ClassMetaData classMetaData,
ResultSet rs,
String engineType)
throws ClassNotFoundException,
InstantiationException,
IllegalAccessException,
InvocationTargetException,
SQLException,
IOException
classMetaData - The ClassMetaData object, whose corresponding persistent class is to be instantiated.rs - The ResultSet used for creating the initial state of the persistent object.engineType - The engine type as defined in init.xml
ClassNotFoundException - if the Persistent class is not found.
InstantiationException - if this Class represents an abstract class, an interface, an array class, a primitive type, or void; or if the class has no nullary constructor; or if the instantiation fails for some other reason.
IllegalAccessException - if the class or its nullary constructor is not accessible.
InvocationTargetException - if the mutator method throws an exception.
SQLException - if a database access error occurs.
IOException - if any error occurs in reading the data from the database.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||