org.datanucleus.jdo.spatial
Class JgeomSpatialHelper

java.lang.Object
  extended by org.datanucleus.jdo.spatial.SpatialHelper
      extended by org.datanucleus.jdo.spatial.JgeomSpatialHelper

public class JgeomSpatialHelper
extends SpatialHelper

Helper class to read Spatial MetaData from the datastore, specialized for Oracle's JGeometry class. The methods assumes that users know what they're doing and will automatically downcast query results to JGeometry.

Version:
$Revision: 1.1 $

Nested Class Summary
 
Nested classes/interfaces inherited from class org.datanucleus.jdo.spatial.SpatialHelper
SpatialHelper.QueryExecutor
 
Field Summary
 
Fields inherited from class org.datanucleus.jdo.spatial.SpatialHelper
pmf, storeMgr
 
Constructor Summary
JgeomSpatialHelper(org.datanucleus.jdo.JDOPersistenceManagerFactory pmf)
          Creates a new JgeomSpatialHelper instance for the given PMF.
 
Method Summary
 java.lang.Integer getSridFromDatastoreEntry(java.lang.Class pc, java.lang.String fieldName)
          Returns the srid of the first datastore entry for the given geometry field.
 java.lang.Integer getSridFromDatastoreEntry(java.lang.Class pc, java.lang.String fieldName, javax.jdo.PersistenceManager pm)
          Returns the srid of the first datastore entry for the given geometry field.
 
Methods inherited from class org.datanucleus.jdo.spatial.SpatialHelper
calculateBoundsInDatastore, calculateBoundsInDatastore, checkValid, estimateBoundsFromDatastoreMetadata, estimateBoundsFromDatastoreMetadata, getAdapter, getColumn, getColumn, getCrsNameForSrid, getCrsNameForSrid, getCrsWktForSrid, getCrsWktForSrid, getDimensionFromJdoMetadata, getGeometryColumnBackedFields, getIntegerFromJdoMetadata, getMetaDataManager, getSridFromDatastoreMetadata, getSridFromDatastoreMetadata, getSridFromJdoMetadata, getTable, getValueFromJdoMetadata, isGeometryColumnBackedField, isGeometryColumnBackedField, readFirstValueForField
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JgeomSpatialHelper

public JgeomSpatialHelper(org.datanucleus.jdo.JDOPersistenceManagerFactory pmf)
Creates a new JgeomSpatialHelper instance for the given PMF.

Parameters:
pmf - The PMF, can't be null or closed.
Method Detail

getSridFromDatastoreEntry

public java.lang.Integer getSridFromDatastoreEntry(java.lang.Class pc,
                                                   java.lang.String fieldName)
Returns the srid of the first datastore entry for the given geometry field. Will return null, if there are no entries or if the geometry field of the first entry is null. Creates a new PersistenceManager to execute the query on the datastore.

Parameters:
pc - The PersistenceCapapable class
fieldName - Name of the geometry field
Returns:
The srid or null

getSridFromDatastoreEntry

public java.lang.Integer getSridFromDatastoreEntry(java.lang.Class pc,
                                                   java.lang.String fieldName,
                                                   javax.jdo.PersistenceManager pm)
Returns the srid of the first datastore entry for the given geometry field. Will return null, if there are no entries or if the geometry field of the first entry is null.

Parameters:
pc - The PersistenceCapapable class
fieldName - Name of the geometry field
pm - PersistenceManager instance that should be used to access the datastore
Returns:
The srid or null


Copyright © 2009. All Rights Reserved.