|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.ojb.broker.accesslayer.RowReaderDefaultImpl
Field Summary |
Fields inherited from interface org.apache.ojb.broker.accesslayer.RowReader |
serialVersionUID |
Constructor Summary | |
RowReaderDefaultImpl(ClassDescriptor cld)
|
Method Summary | |
protected java.lang.Object |
buildWithMultiArgsConstructor(java.util.Map row,
java.lang.reflect.Constructor multiArgsConstructor)
|
protected java.lang.Object |
buildWithReflection(java.util.Map row,
ClassDescriptor targetClassDescriptor)
Creates an object instance according to clb, and fills its fileds width data provided by row. |
ClassDescriptor |
getClassDescriptor()
Returns the associated ClassDescriptor |
void |
readObjectArrayFrom(java.sql.ResultSet rs,
java.util.Map row)
materialize a single object, described by cld, from the first row of the ResultSet rs. |
java.lang.Object |
readObjectFrom(java.util.Map row)
materialize a single object, described by cld, from the first row of the ResultSet rs. |
void |
readPkValuesFrom(java.sql.ResultSet rs,
java.util.Map row)
Read primary key fields from the current ResultRow into the Object[] row.# ConversionStrategies are applied here! |
void |
refreshObject(java.lang.Object instance,
java.util.Map row)
refresh an existing instance from the values of the Map row. |
protected ClassDescriptor |
selectClassDescriptor(java.util.Map row)
Check if there is an attribute which tells us which concrete class is to be instantiated. |
void |
setClassDescriptor(ClassDescriptor cld)
Set the descriptor this RowReader worked with. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public RowReaderDefaultImpl(ClassDescriptor cld)
Method Detail |
public java.lang.Object readObjectFrom(java.util.Map row) throws PersistenceBrokerException
readObjectFrom
in interface RowReader
row
- the Map containing the new values
PersistenceBrokerException
public void readObjectArrayFrom(java.sql.ResultSet rs, java.util.Map row)
readObjectArrayFrom
in interface RowReader
PersistenceBrokerException
- if there is an error accessing the access layerprotected ClassDescriptor selectClassDescriptor(java.util.Map row) throws PersistenceBrokerException
PersistenceBrokerException
protected java.lang.Object buildWithReflection(java.util.Map row, ClassDescriptor targetClassDescriptor)
row
- A Map
contain the Object/Row mapping for the object.targetClassDescriptor
- If the "ojbConcreteClass" feature was used, the target
ClassDescriptor
could differ from the descriptor
this class was associated - see selectClassDescriptor(java.util.Map)
.
PersistenceBrokerException
- if there ewas an error creating the new objectprotected java.lang.Object buildWithMultiArgsConstructor(java.util.Map row, java.lang.reflect.Constructor multiArgsConstructor) throws java.sql.SQLException, java.lang.InstantiationException, java.lang.IllegalAccessException, java.lang.reflect.InvocationTargetException, PersistenceBrokerException
java.sql.SQLException
java.lang.InstantiationException
java.lang.IllegalAccessException
java.lang.reflect.InvocationTargetException
PersistenceBrokerException
public void readPkValuesFrom(java.sql.ResultSet rs, java.util.Map row)
RowReader
readPkValuesFrom
in interface RowReader
public void setClassDescriptor(ClassDescriptor cld)
RowReader
setClassDescriptor
in interface RowReader
public ClassDescriptor getClassDescriptor()
RowReader
ClassDescriptor
getClassDescriptor
in interface RowReader
public void refreshObject(java.lang.Object instance, java.util.Map row)
RowReader
refreshObject
in interface RowReader
instance
- the instance to refreshrow
- the Map containing the new valuesRowReader.refreshObject(Object, Map)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |