|
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.StateImageIndicator
Bases versioning on the values of the object's persistent state. This indicator has the following limitations when determining whether an optimistic lock violation has occurred:
| Nested Class Summary | |
static class |
StateImageIndicator.CustomUpdate
Row implementation we use to pass to versionable mappings so they can set up the where conditions we need to add to update statements. |
| Field Summary | |
static java.lang.String |
TYPE
|
| Fields inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.Mapping |
DEFAULT, FALSE, LOB, TRUE, UNIQUE |
| Constructor Summary | |
StateImageIndicator()
|
|
| Method Summary | |
void |
customInsert(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm)
This method is for class mappings that take over the insert process, but still want to use this indicator for optimistic locking. |
StateImageIndicator.CustomUpdate |
customUpdate(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
com.solarmetric.rd.kodo.impl.jdbc.schema.Table table,
boolean record)
This method is for class mappings that take over the update process, but still want to use this indicator for optimistic locking. |
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. |
java.lang.String |
getMappingType()
Return the abbreviated name of this mapping, or the full class name if it is a custom mapping. |
void |
insert(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager rm)
Packages the version information based on the inserted state. |
boolean |
map()
Map a new instance of this mapping type. |
void |
postLoad(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store)
This method is called after data is loaded into the instance, in case the version indicator works off of a state image. |
void |
reverseMap(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup schema,
com.solarmetric.rd.kodo.impl.jdbc.meta.ReverseMappingTool tool)
Create mappings from the schema, using the given tool. |
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, load, newInstance, newInstance, toString |
| Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.Indicator |
delete, getMappingRepository, getOwnerMapping, getTable, refSchemaComponents, select, setOwnerMapping |
| Methods inherited from class com.solarmetric.rd.kodo.impl.jdbc.meta.Mapping |
checkIndex, createColumn, delete, getDBDictionary, getForeignKey, getLog, getSchemaGroup, insert, invalidMapping, isCustomDelete, isCustomInsert, isCustomUpdate, setForeignKey, update |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
public static final java.lang.String TYPE
| Constructor Detail |
public StateImageIndicator()
| Method Detail |
public java.lang.String getMappingType()
Mapping
getMappingType in class Mappingpublic 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 Mapping
public void reverseMap(com.solarmetric.rd.kodo.impl.jdbc.schema.SchemaGroup schema,
com.solarmetric.rd.kodo.impl.jdbc.meta.ReverseMappingTool tool)
Mapping
reverseMap in class Mapping
public void insert(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
com.solarmetric.rd.kodo.impl.jdbc.runtime.RowManager rm)
throws java.sql.SQLException
insert in class Indicatorjava.sql.SQLException
public void customInsert(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm)
throws java.sql.SQLException
java.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)
public StateImageIndicator.CustomUpdate customUpdate(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
com.solarmetric.rd.kodo.impl.jdbc.schema.Table table,
boolean record)
throws java.sql.SQLException
sm - the instance to testtable - only state image values in this table will be tested;
if the custom mapping uses different updates for
different tables, this method can be called multiple
times for the multiple tablesrecord - set this parameter to true the last time you call
this method, so the indicator can setup the next
version of the given state manager
StateImageIndicator.CustomUpdate whose getSQL method yields a
boolean SQL expression that tests whether the current
record is equal to our recorded state image, and whose
setParameters method parameterizes the given prepared
statement with the values used in the above boolean
expression
java.sql.SQLException
public void postLoad(com.solarmetric.rd.kodo.runtime.StateManagerImpl sm,
com.solarmetric.rd.kodo.impl.jdbc.runtime.JDBCStoreManager store)
VersionIndicator
postLoad in class VersionIndicator
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)
|
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 | |||||||||