org.jpox.store.mapping
Class DateMapping

java.lang.Object
  extended byorg.jpox.store.mapping.JavaTypeMapping
      extended byorg.jpox.store.mapping.SingleFieldMapping
          extended byorg.jpox.store.mapping.SqlTimestampMapping
              extended byorg.jpox.store.mapping.DateMapping
All Implemented Interfaces:
SimpleDatastoreRepresentation

public class DateMapping
extends SqlTimestampMapping

SCO Mapping for java.util.Date type.

Version:
$Revision: 1.9 $

Field Summary
 
Fields inherited from class org.jpox.store.mapping.SingleFieldMapping
datastoreContainer, typeInfo
 
Fields inherited from class org.jpox.store.mapping.JavaTypeMapping
datastoreMappings, dba, fmd, LOCALISER, referenceMapping, type
 
Constructor Summary
DateMapping(DatastoreAdapter dba, AbstractPropertyMetaData fmd, DatastoreContainerObject datastoreContainer, ClassLoaderResolver clr)
          Creates a new DateyMapping object.
DateMapping(DatastoreAdapter dba, java.lang.String type)
          Constructor.
 
Method Summary
 java.lang.Class getJavaType()
          Accessor for the java type being mapped
 ScalarExpression newLiteral(QueryExpression qs, java.lang.Object value)
          Creates a literal from an value.
 
Methods inherited from class org.jpox.store.mapping.SqlTimestampMapping
getSampleValue, newScalarExpression
 
Methods inherited from class org.jpox.store.mapping.SingleFieldMapping
equals, getBoolean, getByte, getChar, getDatastoreContainer, getDouble, getFloat, getInt, getLong, getObject, getShort, getString, hasValue, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, prepareDatastoreMapping, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setObject, setShort, setString
 
Methods inherited from class org.jpox.store.mapping.JavaTypeMapping
addDataStoreMapping, failureMessage, getDataStoreMapping, getDataStoreMappings, getFieldMetaData, getNumberOfDatastoreFields, getObject, getReferenceMapping, getType, isNullable, setDefault, setObject, setReferenceMapping
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateMapping

public DateMapping(DatastoreAdapter dba,
                   java.lang.String type)
Constructor.

Parameters:
dba - Datastore Adapter
type - Type of the field

DateMapping

public DateMapping(DatastoreAdapter dba,
                   AbstractPropertyMetaData fmd,
                   DatastoreContainerObject datastoreContainer,
                   ClassLoaderResolver clr)
Creates a new DateyMapping object.

Parameters:
dba - Database Adapter
fmd - AbstractPropertyMetaData for the field
datastoreContainer - Table for persisting this field
clr - The ClassLoaderResolver
Method Detail

newLiteral

public ScalarExpression newLiteral(QueryExpression qs,
                                   java.lang.Object value)
Description copied from class: JavaTypeMapping
Creates a literal from an value. A string literal is enclosed in single quotes. for example: "literal". A string literal that includes a single quote is represented by two single quotes. for example: "literal''s". An exact numeric literal is a numeric value without a decimal point, such as 57, -957, +62. An approximate numeric literal is a numeric value in scientific notation, such as 7E3, -57.9E2, or a numeric value with a decimal, such as 7., -95.7, +6.2.

Overrides:
newLiteral in class SqlTimestampMapping

getJavaType

public java.lang.Class getJavaType()
Description copied from class: JavaTypeMapping
Accessor for the java type being mapped

Overrides:
getJavaType in class SqlTimestampMapping


Copyright © -2007 . All Rights Reserved.