|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.ojb.broker.accesslayer.RowReaderDefaultImpl
public class RowReaderDefaultImpl
Default implementation of the RowReader interface.
| Field Summary |
|---|
| Fields inherited from interface org.apache.ojb.broker.accesslayer.RowReader |
|---|
serialVersionUID |
| Constructor Summary | |
|---|---|
RowReaderDefaultImpl(ClassDescriptor cld)
|
|
| Method Summary | |
|---|---|
protected Object |
buildOrRefreshObject(Map row,
ClassDescriptor targetClassDescriptor,
Object targetObject)
Creates an object instance according to clb, and fills its fileds width data provided by row. |
protected String |
extractOjbConcreteClass(ClassDescriptor cld,
ResultSet rs,
Map row)
|
ClassDescriptor |
getClassDescriptor()
Returns the associated ClassDescriptor |
void |
readObjectArrayFrom(ResultSetAndStatement rs_stmt,
Map row)
materialize a single object, described by cld, from the first row of the ResultSet rs. |
Object |
readObjectFrom(Map row)
materialize a single object, described by cld, from the first row of the ResultSet rs. |
void |
readPkValuesFrom(ResultSetAndStatement rs_stmt,
Map row)
Read primary key fields from the current ResultRow into the Object[] row.# ConversionStrategies are applied here! |
protected void |
readValuesFrom(ResultSetAndStatement rs_stmt,
Map row,
FieldDescriptor[] fields)
|
void |
refreshObject(Object instance,
Map row)
refresh an existing instance from the values of the Map row. |
protected ClassDescriptor |
selectClassDescriptor(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 Object readObjectFrom(Map row)
throws PersistenceBrokerException
readObjectFrom in interface RowReaderrow - the Map containing the new values
PersistenceBrokerException
public void refreshObject(Object instance,
Map row)
RowReader
refreshObject in interface RowReaderinstance - the instance to refreshrow - the Map containing the new valuesRowReader.refreshObject(Object, Map)
protected Object buildOrRefreshObject(Map row,
ClassDescriptor targetClassDescriptor,
Object targetObject)
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).targetObject - If 'null' a new object instance is build, else fields of object will
be refreshed.
PersistenceBrokerException - if there ewas an error creating the new object
public void readObjectArrayFrom(ResultSetAndStatement rs_stmt,
Map row)
readObjectArrayFrom in interface RowReaderPersistenceBrokerException - if there is an error accessing the access layer
public void readPkValuesFrom(ResultSetAndStatement rs_stmt,
Map row)
RowReader
readPkValuesFrom in interface RowReader
protected void readValuesFrom(ResultSetAndStatement rs_stmt,
Map row,
FieldDescriptor[] fields)
protected String extractOjbConcreteClass(ClassDescriptor cld,
ResultSet rs,
Map row)
protected ClassDescriptor selectClassDescriptor(Map row)
throws PersistenceBrokerException
PersistenceBrokerExceptionpublic void setClassDescriptor(ClassDescriptor cld)
RowReader
setClassDescriptor in interface RowReaderpublic ClassDescriptor getClassDescriptor()
RowReaderClassDescriptor
getClassDescriptor in interface RowReader
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||