|
SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.solarmetric.rd.kodo.impl.jdbc.meta.Mapping
|
+--com.solarmetric.rd.kodo.impl.jdbc.meta.Indicator
|
+--com.solarmetric.rd.kodo.impl.jdbc.meta.VersionIndicator
|
+--com.solarmetric.rd.kodo.impl.jdbc.meta.map.ColumnVersionIndicator
Abstract base class for version indicators that use a column to hold version information.
| Field Summary |
| Fields inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.Mapping |
DEFAULT, FALSE, LOB, TRUE, UNIQUE |
| Constructor Summary | |
ColumnVersionIndicator()
|
|
| Method Summary | |
boolean |
fromMappingInfo(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfo info,
boolean adapt)
Deserialize this mapping from a simple MappingInfo
instance parsed from XML or some other format. |
com.solarmetric.rd.kodo.impl.jdbc.schema.Column |
getColumn()
Return the column used to hold version info. |
protected abstract int |
getDataStoreTypeCode()
Return the FieldMapping type code for the type of the
column. |
protected int |
getJDBCType()
Return the JDBC type of the column for this indicator. |
protected abstract java.lang.Object |
getNextVersion(java.lang.Object currentVersion)
Return the next version object, given the current one (which may be null for newly-persisted objects). |
void |
insert(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager rm)
Set values for the mapping into the proper rows. |
void |
load(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store,
com.solarmetric.rd.kodo.impl.jdbc.runtime.Result res)
Load virtual row data. |
boolean |
map()
Map a new instance of this mapping type. |
protected abstract boolean |
needsRefresh(java.lang.Object mem,
java.lang.Object db)
Return true if mem is not up-to-date with db. |
void |
refSchemaComponents()
Increment the reference count of all used schema components. |
void |
select(com.solarmetric.rd.kodo.impl.jdbc.runtime.Select sel)
Select the virtual row columns of this mapping. |
void |
setColumn(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
Set the column used to hold version info. |
boolean |
synchVersion(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store,
java.sql.Connection conn)
Synchronize the version of the given state manager with the version stored in memory. |
void |
toMappingInfo(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfo info)
Serialize this mapping to a simple MappingInfo instance
for transfer to XML or some other format. |
void |
update(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager rm)
Set values for the mapping into the proper rows. |
| Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.VersionIndicator |
getDefaults, newInstance, newInstance, postLoad, toString |
| Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.Indicator |
delete, getMappingRepository, getOwnerMapping, getTable, setOwnerMapping |
| Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.Mapping |
checkIndex, createColumn, delete, getDBDictionary, getForeignKey, getLog, getMappingType, getSchemaGroup, insert, invalidMapping, isCustomDelete, isCustomInsert, isCustomUpdate, reverseMap, setForeignKey, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
public ColumnVersionIndicator()
| Method Detail |
protected abstract int getDataStoreTypeCode()
FieldMapping type code for the type of the
column.
protected int getJDBCType()
getDataStoreTypeCode().
protected abstract java.lang.Object getNextVersion(java.lang.Object currentVersion)
protected abstract boolean needsRefresh(java.lang.Object mem,
java.lang.Object db)
mem is not up-to-date with db.
public com.solarmetric.rd.kodo.impl.jdbc.schema.Column getColumn()
public void setColumn(com.solarmetric.rd.kodo.impl.jdbc.schema.Column col)
public void toMappingInfo(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfo info)
MappingMappingInfo instance
for transfer to XML or some other format.
toMappingInfo in class Mapping
public boolean fromMappingInfo(com.solarmetric.rd.kodo.impl.jdbc.meta.MappingInfo info,
boolean adapt)
MappingMappingInfo
instance parsed from XML or some other format. If the info is
incompatible and adapt is true, try to adapt to the new
info, else return false. This method must validate
the given mapping information using the SchemaGroup.findTable(java.lang.String)
method to find any needed tables, the Table.getColumn(java.lang.String) method
to retrieve columns from those tables, and the
Column.isCompatible(int, int) method to check all column types. This is
important, as some schema groups use these methods to build themselves
up dynamically rather than reading schema information from the
database.
fromMappingInfo in class Mappingpublic boolean map()
Mapping
map in class Mappingpublic void refSchemaComponents()
Mapping
refSchemaComponents in class Indicator
public boolean synchVersion(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store,
java.sql.Connection conn)
throws java.sql.SQLException
VersionIndicator
synchVersion in class VersionIndicatorjava.sql.SQLExceptionStoreManager.synchVersion(com.solarmetric.rd.kodo.runtime.StateManagerImpl, java.lang.Object)public void select(com.solarmetric.rd.kodo.impl.jdbc.runtime.Select sel)
Indicator
select in class Indicator
public void load(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store,
com.solarmetric.rd.kodo.impl.jdbc.runtime.Result res)
throws java.sql.SQLException
VersionIndicator
load in class VersionIndicatorjava.sql.SQLException
public void insert(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager rm)
throws java.sql.SQLException
Mapping
insert in class Indicatorjava.sql.SQLException
public void update(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager rm)
throws java.sql.SQLException
Mapping
update in class Indicatorjava.sql.SQLExceptionMapping.insert(com.solarmetric.rd.kodo.runtime.StateManagerImpl, com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager)
|
SolarMetric Kodo JDO 2.5.0 Reverse Schema Tool | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||