kodo.jdbc.meta
Class DateVersionIndicator
java.lang.Object
|
+--kodo.jdbc.meta.Indicator
|
+--kodo.jdbc.meta.VersionIndicator
|
+--kodo.jdbc.meta.ColumnVersionIndicator
|
+--kodo.jdbc.meta.DateVersionIndicator
- All Implemented Interfaces:
- Mapping
- public class DateVersionIndicator
- extends ColumnVersionIndicator
Handles optimistic lock versioning via a lock column containing
timestamps in the data store.
Note that there are potentially severe granularity issues
with using Date types as Version indictators... namely
that some databases are not that fine grained with the
date types and should instead be using VersionNumberIndicator
.
Ensure that the column this indicator maps to has the granularity
that is sufficient for your application.
This mapping defaults to the dictionary's preferred Date type.
Methods inherited from class kodo.jdbc.meta.ColumnVersionIndicator |
addMappingInfoAttributes, compareVersion, delete, fromMappingInfo, getColumn, getColumns, getJDBCType, insert, load, map, select, setColumn, synchVersion, toMappingInfo, update |
Methods inherited from class kodo.jdbc.meta.Indicator |
delete, getDBDictionary, getMappingRepository, getOwnerMapping, getTable, insert, isCustomDelete, isCustomInsert, isCustomUpdate, refSchemaComponents, reverseMap, setOwnerMapping, update |
TYPE
public static final String TYPE
DateVersionIndicator
public DateVersionIndicator()
getMappingType
public String getMappingType()
- Description copied from interface:
Mapping
- Return the abbreviated name of this mapping, or the full class name if
it is a custom mapping.
getDataStoreTypeCode
protected int getDataStoreTypeCode()
- Description copied from class:
ColumnVersionIndicator
- Return the
FieldMapping
type code for the type of the
column.
- Overrides:
getDataStoreTypeCode
in class ColumnVersionIndicator
getNextVersion
protected Object getNextVersion(Object version)
- Description copied from class:
ColumnVersionIndicator
- Return the next version object, given the current one (which may be
null for newly-persisted objects).
- Overrides:
getNextVersion
in class ColumnVersionIndicator
needsRefresh
protected boolean needsRefresh(Object mem,
Object db)
- Description copied from class:
ColumnVersionIndicator
- Return true if
mem
is not up-to-date with db
.
- Overrides:
needsRefresh
in class ColumnVersionIndicator
Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.