org.jpox.store.mapped.mapping
Class MapMapping

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.AbstractContainerMapping
              extended by org.jpox.store.mapped.mapping.MapMapping
All Implemented Interfaces:
MappingCallbacks

public class MapMapping
extends AbstractContainerMapping
implements MappingCallbacks

SCO Mapping for Map types.

Version:
$Revision: 1.52 $

Field Summary
 
Fields inherited from class org.jpox.store.mapped.mapping.AbstractContainerMapping
fieldName, storeMgr
 
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
MapMapping()
           
 
Method Summary
 boolean equals(java.lang.Object obj)
          Equality operator.
 java.lang.Class getJavaType()
          Accessor for the Java type represented here.
 ScalarExpression newLiteral(QueryExpression qs, java.lang.Object value)
          Accessor for a literal representing this type.
 ScalarExpression newScalarExpression(QueryExpression qs, LogicSetExpression te)
          Method to return a scalar expression for the Map.
 void postInsert(StateManager sm)
          Method to be called after the insert of the owner class element.
 void postUpdate(StateManager sm)
          Method to be called after any update of the owner class element.
 void preDelete(StateManager sm)
          Method to be called before any delete of the owner class element.
 
Methods inherited from class org.jpox.store.mapped.mapping.AbstractContainerMapping
containerIsStoredInSingleColumn, getDatastoreContainer, getDataStoreMapping, getDataStoreMappings, getJavaTypeForDatastoreMapping, getNumberOfDatastoreFields, getObject, getSampleValue, hashCode, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, postFetch, prepareDatastoreMapping, replaceFieldWithWrapper, setObject
 
Methods inherited from class org.jpox.store.mapped.mapping.SingleFieldMapping
getBoolean, getByte, getChar, getDefaultLength, getDouble, getFloat, getInt, getLong, getShort, getString, getValidValues, setBoolean, setByte, setChar, setDouble, setFloat, setInt, setLong, setShort, setString
 
Methods inherited from class org.jpox.store.mapped.mapping.JavaTypeMapping
addDataStoreMapping, failureMessage, getFieldMetaData, getObject, getReferenceMapping, getRoleForField, getType, initialize, isNullable, isSerialised, setDefault, setFieldInformation, setObject, setReferenceMapping, setRoleForField
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.jpox.store.mapped.mapping.MappingCallbacks
postFetch
 

Constructor Detail

MapMapping

public MapMapping()
Method Detail

equals

public boolean equals(java.lang.Object obj)
Equality operator.

Overrides:
equals in class SingleFieldMapping
Parameters:
obj - Object to compare against
Returns:
Whether they are equal

getJavaType

public java.lang.Class getJavaType()
Accessor for the Java type represented here.

Specified by:
getJavaType in class JavaTypeMapping
Returns:
The java type

postInsert

public void postInsert(StateManager sm)
Method to be called after the insert of the owner class element.

Specified by:
postInsert in interface MappingCallbacks
Parameters:
sm - StateManager of the owner

postUpdate

public void postUpdate(StateManager sm)
Method to be called after any update of the owner class element.

Specified by:
postUpdate in interface MappingCallbacks
Parameters:
sm - StateManager of the owner

preDelete

public void preDelete(StateManager sm)
Method to be called before any delete of the owner class element.

Specified by:
preDelete in interface MappingCallbacks
Parameters:
sm - StateManager of the owner

newLiteral

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

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

newScalarExpression

public ScalarExpression newScalarExpression(QueryExpression qs,
                                            LogicSetExpression te)
Method to return a scalar expression for the Map.

Specified by:
newScalarExpression in class JavaTypeMapping
Parameters:
qs - The QueryStatement
te - The TableExpression
Returns:
The ScalarExpression


Copyright © -2008 . All Rights Reserved.