org.datanucleus.store.mapping.jts
Class GeometryMapping

java.lang.Object
  extended by org.datanucleus.store.mapped.mapping.JavaTypeMapping
      extended by org.datanucleus.store.mapped.mapping.SingleFieldMultiMapping
          extended by org.datanucleus.store.mapping.jts.GeometryMapping
All Implemented Interfaces:
org.datanucleus.store.mapped.mapping.MappingCallbacks
Direct Known Subclasses:
GeometryCollectionMapping, LinearRingMapping, LineStringMapping, MultiLineStringMapping, MultiPointMapping, MultiPolygonMapping, PointMapping, PolygonMapping

public class GeometryMapping
extends org.datanucleus.store.mapped.mapping.SingleFieldMultiMapping
implements org.datanucleus.store.mapped.mapping.MappingCallbacks

Mapping for com.vividsolutions.jts.geom.Geometry to its datastore representation.


Field Summary
 
Fields inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping
datastoreContainer, datastoreMappings, dba, LOCALISER, mmd, referenceMapping, roleForMember, type
 
Constructor Summary
GeometryMapping()
           
 
Method Summary
protected static com.vividsolutions.jts.geom.Geometry createGeom(java.lang.String wkt)
           
 void deleteDependent(org.datanucleus.StateManager sm)
           
 java.lang.Class getJavaType()
           
 java.lang.String getJavaTypeForDatastoreMapping(int index)
           
 java.lang.Object getObject(org.datanucleus.ObjectManager om, java.lang.Object datastoreResults, int[] exprIndex)
           
 java.lang.Object getSampleValue(org.datanucleus.ClassLoaderResolver clr)
           
 void initialize(org.datanucleus.store.mapped.DatastoreAdapter dba, org.datanucleus.metadata.AbstractMemberMetaData mmd, org.datanucleus.store.mapped.DatastoreContainerObject container, org.datanucleus.ClassLoaderResolver clr)
           
 org.datanucleus.store.mapped.expression.ScalarExpression newLiteral(org.datanucleus.store.mapped.expression.QueryExpression qs, java.lang.Object value)
           
 org.datanucleus.store.mapped.expression.ScalarExpression newScalarExpression(org.datanucleus.store.mapped.expression.QueryExpression qs, org.datanucleus.store.mapped.expression.LogicSetExpression te)
           
 void postFetch(org.datanucleus.StateManager sm)
           
 void postInsert(org.datanucleus.StateManager sm)
          Some nasty stuff that's only needed for Oracle.
 void postUpdate(org.datanucleus.StateManager sm)
           
 void preDelete(org.datanucleus.StateManager sm)
           
 void setObject(org.datanucleus.ObjectManager om, java.lang.Object datastoreStatement, int[] exprIndex, java.lang.Object value)
           
 
Methods inherited from class org.datanucleus.store.mapped.mapping.SingleFieldMultiMapping
addDatastoreField, hasSimpleDatastoreRepresentation
 
Methods inherited from class org.datanucleus.store.mapped.mapping.JavaTypeMapping
addDataStoreMapping, failureMessage, getBoolean, getByte, getChar, getDatastoreContainer, getDataStoreMapping, getDataStoreMappings, getDouble, getFloat, getInt, getLong, getMemberMetaData, getNumberOfDatastoreFields, getObject, getReferenceMapping, getRoleForMember, getShort, getString, getType, includeInFetchStatement, includeInInsertStatement, includeInUpdateStatement, initialize, isNullable, isSerialised, setBoolean, setByte, setChar, setDatastoreContainer, setDefault, setDouble, setFloat, setInt, setLong, setMemberMetaData, setObject, setReferenceMapping, setRoleForMember, setShort, setString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GeometryMapping

public GeometryMapping()
Method Detail

createGeom

protected static final com.vividsolutions.jts.geom.Geometry createGeom(java.lang.String wkt)

getJavaTypeForDatastoreMapping

public java.lang.String getJavaTypeForDatastoreMapping(int index)
Overrides:
getJavaTypeForDatastoreMapping in class org.datanucleus.store.mapped.mapping.SingleFieldMultiMapping

initialize

public void initialize(org.datanucleus.store.mapped.DatastoreAdapter dba,
                       org.datanucleus.metadata.AbstractMemberMetaData mmd,
                       org.datanucleus.store.mapped.DatastoreContainerObject container,
                       org.datanucleus.ClassLoaderResolver clr)
Overrides:
initialize in class org.datanucleus.store.mapped.mapping.JavaTypeMapping

getJavaType

public java.lang.Class getJavaType()
Specified by:
getJavaType in class org.datanucleus.store.mapped.mapping.JavaTypeMapping

getSampleValue

public java.lang.Object getSampleValue(org.datanucleus.ClassLoaderResolver clr)
Specified by:
getSampleValue in class org.datanucleus.store.mapped.mapping.JavaTypeMapping

getObject

public java.lang.Object getObject(org.datanucleus.ObjectManager om,
                                  java.lang.Object datastoreResults,
                                  int[] exprIndex)
Overrides:
getObject in class org.datanucleus.store.mapped.mapping.JavaTypeMapping

setObject

public void setObject(org.datanucleus.ObjectManager om,
                      java.lang.Object datastoreStatement,
                      int[] exprIndex,
                      java.lang.Object value)
Overrides:
setObject in class org.datanucleus.store.mapped.mapping.JavaTypeMapping

postInsert

public void postInsert(org.datanucleus.StateManager sm)
Some nasty stuff that's only needed for Oracle.

Specified by:
postInsert in interface org.datanucleus.store.mapped.mapping.MappingCallbacks

postUpdate

public void postUpdate(org.datanucleus.StateManager sm)
Specified by:
postUpdate in interface org.datanucleus.store.mapped.mapping.MappingCallbacks

newLiteral

public org.datanucleus.store.mapped.expression.ScalarExpression newLiteral(org.datanucleus.store.mapped.expression.QueryExpression qs,
                                                                           java.lang.Object value)
Overrides:
newLiteral in class org.datanucleus.store.mapped.mapping.JavaTypeMapping

newScalarExpression

public org.datanucleus.store.mapped.expression.ScalarExpression newScalarExpression(org.datanucleus.store.mapped.expression.QueryExpression qs,
                                                                                    org.datanucleus.store.mapped.expression.LogicSetExpression te)
Overrides:
newScalarExpression in class org.datanucleus.store.mapped.mapping.JavaTypeMapping

deleteDependent

public void deleteDependent(org.datanucleus.StateManager sm)

postFetch

public void postFetch(org.datanucleus.StateManager sm)
Specified by:
postFetch in interface org.datanucleus.store.mapped.mapping.MappingCallbacks

preDelete

public void preDelete(org.datanucleus.StateManager sm)
Specified by:
preDelete in interface org.datanucleus.store.mapped.mapping.MappingCallbacks


Copyright © 2009. All Rights Reserved.