org.jpox.store.mapped.mapping
Class SqlTimestampCharMapping

java.lang.Object
  extended by org.jpox.store.mapped.mapping.JavaTypeMapping
      extended by org.jpox.store.mapped.mapping.SingleFieldMapping
          extended by org.jpox.store.mapped.mapping.SqlTimestampMapping
              extended by org.jpox.store.mapped.mapping.SqlTimestampCharMapping
All Implemented Interfaces:
SimpleDatastoreRepresentation

public class SqlTimestampCharMapping
extends SqlTimestampMapping

Mapping for Java java.sql.Timestamp char type.

Version:
$Revision: 1.13 $

Field Summary
 
Fields inherited from class org.jpox.store.mapped.mapping.JavaTypeMapping
datastoreContainer, datastoreMappings, dba, fmd, LOCALISER, MAPPING_ARRAY_ELEMENT, MAPPING_COLLECTION_ELEMENT, MAPPING_FIELD, MAPPING_MAP_KEY, MAPPING_MAP_VALUE, referenceMapping, roleForField, type
 
Constructor Summary
SqlTimestampCharMapping()
           
 
Method Summary
 int getDefaultLength(int index)
          Method to return the default length of this type in the datastore.
 java.lang.String getJavaTypeForDatastoreMapping(int index)
          Accessor for the name of the java-type actually used when mapping the particular datastore field.
 
Methods inherited from class org.jpox.store.mapped.mapping.SqlTimestampMapping
getJavaType, getSampleValue, newLiteral, newScalarExpression
 
Methods inherited from class org.jpox.store.mapped.mapping.SingleFieldMapping
equals, getBoolean, getByte, getChar, getDouble, getFloat, getInt, getLong, getObject, getShort, getString, getValidValues, initialize, prepareDatastoreMapping, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setObject, setShort, setString
 
Methods inherited from class org.jpox.store.mapped.mapping.JavaTypeMapping
addDataStoreMapping, failureMessage, getDatastoreContainer, getDataStoreMapping, getDataStoreMappings, getFieldMetaData, getNumberOfDatastoreFields, getObject, getReferenceMapping, getRoleForField, getType, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, setDefault, setFieldInformation, setObject, setReferenceMapping, setRoleForField
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SqlTimestampCharMapping

public SqlTimestampCharMapping()
Method Detail

getDefaultLength

public int getDefaultLength(int index)
Method to return the default length of this type in the datastore. java.sql.Timestamp requires 29 characters ("YYYY-MM-DD HH:MM:SS.FFFFFFFFF")

Overrides:
getDefaultLength in class SingleFieldMapping
Parameters:
index - The index position
Returns:
The default length

getJavaTypeForDatastoreMapping

public java.lang.String getJavaTypeForDatastoreMapping(int index)
Accessor for the name of the java-type actually used when mapping the particular datastore field. This java-type must have an entry in the datastore mappings.

Overrides:
getJavaTypeForDatastoreMapping in class SingleFieldMapping
Parameters:
index - requested datastore field index.
Returns:
the name of java-type for the requested datastore field.


Copyright © -2008 . All Rights Reserved.