org.jpox.store.mapping
Class IndexMapping

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

public class IndexMapping
extends SingleFieldMapping
implements SimpleDatastoreRepresentation

Mapping for Index Columns. This class is for internal use only. It should not be used in user mappings nor extended.

Version:
$Revision: 1.12 $

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
IndexMapping(DatastoreAdapter dba, AbstractPropertyMetaData fmd, DatastoreContainerObject datastoreContainer, ClassLoaderResolver clr)
          Constructor.
IndexMapping(DatastoreAdapter dba, java.lang.String type)
          Constructor.
 
Method Summary
 java.lang.Class getJavaType()
          Accessor for the type represented here, returning the class itself
 java.lang.Object getSampleValue()
          Accessor for a sample value for this field
 boolean includeInFetchStatement()
          Accessor for whether to include this column in any fetch statement
 ScalarExpression newLiteral(QueryExpression qs, java.lang.Object value)
          Accessor for a new literal for this mapping.
 ScalarExpression newScalarExpression(QueryExpression qs, LogicSetExpression te)
          Accessor for a new literal for this mapping.
 
Methods inherited from class org.jpox.store.mapping.SingleFieldMapping
equals, getBoolean, getByte, getChar, getDatastoreContainer, getDouble, getFloat, getInt, getLong, getObject, getShort, getString, hasValue, 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

IndexMapping

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

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

IndexMapping

public IndexMapping(DatastoreAdapter dba,
                    AbstractPropertyMetaData fmd,
                    DatastoreContainerObject datastoreContainer,
                    ClassLoaderResolver clr)
Constructor.

Parameters:
dba - Datastore Adapter
fmd - AbstractPropertyMetaData for the field
datastoreContainer - The table
clr - The ClassLoaderResolver
Method Detail

getSampleValue

public java.lang.Object getSampleValue()
Accessor for a sample value for this field

Specified by:
getSampleValue in class JavaTypeMapping
Returns:
Sample field value

newLiteral

public ScalarExpression newLiteral(QueryExpression qs,
                                   java.lang.Object value)
Accessor for a new literal for this mapping.

Specified by:
newLiteral in class JavaTypeMapping
Parameters:
qs - The QueryStatement
value - The value of the object
Returns:
The new literal

newScalarExpression

public ScalarExpression newScalarExpression(QueryExpression qs,
                                            LogicSetExpression te)
Accessor for a new literal for this mapping.

Specified by:
newScalarExpression in class JavaTypeMapping
Parameters:
qs - The QueryStatement
te - The table Expression
Returns:
The new literal

includeInFetchStatement

public boolean includeInFetchStatement()
Accessor for whether to include this column in any fetch statement

Overrides:
includeInFetchStatement in class SingleFieldMapping
Returns:
Whether to include the column when fetching.

getJavaType

public java.lang.Class getJavaType()
Accessor for the type represented here, returning the class itself

Specified by:
getJavaType in class JavaTypeMapping
Returns:
This class.


Copyright © -2007 . All Rights Reserved.