org.datanucleus.jdo.spatial
Class PgSpatialHelper
java.lang.Object
org.datanucleus.jdo.spatial.SpatialHelper
org.datanucleus.jdo.spatial.PgSpatialHelper
public class PgSpatialHelper
- extends SpatialHelper
Helper class to read Spatial MetaData from the datastore, specialized for the geometry classes of
the PostGIS JDBC driver. The methods assumes that users know what they're doing and will
automatically downcast query results to org.postgis.Geometry.
- Version:
- $Revision: 1.1 $
|
Constructor Summary |
PgSpatialHelper(org.datanucleus.jdo.JDOPersistenceManagerFactory pmf)
Creates a new PgSpatialHelper 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 |
PgSpatialHelper
public PgSpatialHelper(org.datanucleus.jdo.JDOPersistenceManagerFactory pmf)
- Creates a new
PgSpatialHelper instance for the given PMF.
- Parameters:
pmf - The PMF, can't be null or closed.
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 classfieldName - 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 classfieldName - Name of the geometry fieldpm - PersistenceManager instance that should be used
to access the datastore
- Returns:
- The srid or
null
Copyright © 2009. All Rights Reserved.