SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

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.


Field Summary
static String TYPE
           
 
Constructor Summary
DateVersionIndicator()
           
 
Method Summary
protected  int getDataStoreTypeCode()
          Return the FieldMapping type code for the type of the column.
 String getMappingType()
          Return the abbreviated name of this mapping, or the full class name if it is a custom mapping.
protected  Object getNextVersion(Object version)
          Return the next version object, given the current one (which may be null for newly-persisted objects).
protected  boolean needsRefresh(Object mem, Object db)
          Return true if mem is not up-to-date with db.
 
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.VersionIndicator
getDefaults, newInstance, postLoad, toString
 
Methods inherited from class kodo.jdbc.meta.Indicator
delete, getDBDictionary, getMappingRepository, getOwnerMapping, getTable, insert, isCustomDelete, isCustomInsert, isCustomUpdate, refSchemaComponents, reverseMap, setOwnerMapping, update
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

TYPE

public static final String TYPE
Constructor Detail

DateVersionIndicator

public DateVersionIndicator()
Method Detail

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

SolarMetric Kodo JDO 3.3.5 generated on August 31 2005

Copyright 2001,2002 SolarMetric, Inc. All Rights Reserved.