com.mizar.metadata.facade
Class UserSdoGeomMetadataFacade

java.lang.Object
  extended by com.mizar.persistence.jpa.facade.JPAFacade
      extended by com.mizar.metadata.facade.UserSdoGeomMetadataFacade

public class UserSdoGeomMetadataFacade
extends JPAFacade


Field Summary
 
Fields inherited from class com.mizar.persistence.jpa.facade.JPAFacade
em, emf, model, persistenceUnitName, schemaName, sequencesValidated, silent, verbose
 
Constructor Summary
UserSdoGeomMetadataFacade()
           
UserSdoGeomMetadataFacade(java.lang.String persistenceUnitName)
          This is the most useful constructor.
 
Method Summary
 UserSdoGeomMetadataBean find(java.lang.String tableName, java.lang.String columnName)
           
 UserSdoGeomMetadataBean persist(java.lang.String tableName, java.lang.String columnName, int srid, boolean removeExisting)
           
 UserSdoGeomMetadataBean persist(java.lang.String tableName, java.lang.String columnName, java.lang.String dimInfoArray, int srid, boolean removeExisting)
           
 void remove(java.lang.String tableName, java.lang.String columnName)
          Removes the bean if it exists
 
Methods inherited from class com.mizar.persistence.jpa.facade.JPAFacade
closeEm, closeEm, closeEmf, executeDDL, executeNativeUpdate, executeNativeUpdate, executeUpdate, getClosableConnectionAccessor, getConnection, getConnection, getEm, getEm, getEmf, getEmf, getLogger, getPassword, getPassword, getPersistenceUnitName, getSchemaName, getSequencesValidated, getSid, getSilent, getTableName, getToleratedErrorCodes, getUrl, getUser, getVerbose, mergeBean, persist, persistBean, printAnyBean, queryTester, queryTester, refreshBean, remove, removeBean, removeBean, setEmf, setPersistenceUnitName, setSilent, setToleratedErrorCodes, setVerbose, validateSequences
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UserSdoGeomMetadataFacade

public UserSdoGeomMetadataFacade()

UserSdoGeomMetadataFacade

public UserSdoGeomMetadataFacade(java.lang.String persistenceUnitName)
This is the most useful constructor. The facade must have a persistenceUnitName

Parameters:
persistenceUnitName -
Method Detail

find

public UserSdoGeomMetadataBean find(java.lang.String tableName,
                                    java.lang.String columnName)
Parameters:
tableName -
columnName -
Returns:

remove

public void remove(java.lang.String tableName,
                   java.lang.String columnName)
Removes the bean if it exists

Parameters:
tableName -
columnName -

persist

public UserSdoGeomMetadataBean persist(java.lang.String tableName,
                                       java.lang.String columnName,
                                       int srid,
                                       boolean removeExisting)
                                throws java.sql.SQLException
Parameters:
tableName -
columnName -
srid - must be a geographic or UTM srid
removeExisting - if true then first delete any existing row with matching tableName and columnName
Returns:
the new bean if created else null
Throws:
java.sql.SQLException
See Also:
JGeometryUtils.isGeographic(int), JGeometryUtils.isUTM(int)

persist

public UserSdoGeomMetadataBean persist(java.lang.String tableName,
                                       java.lang.String columnName,
                                       java.lang.String dimInfoArray,
                                       int srid,
                                       boolean removeExisting)
                                throws java.sql.SQLException
Parameters:
tableName -
columnName -
dimInfoArray - a SDO_DIM_ARRAY specification, e.g. SDO_DIM_ARRAY(SDO_DIM_ELEMENT('X', -180, 180, 0.0000001), SDO_DIM_ELEMENT('Y', -90, 90, 0.0000001))
srid - must be a geographic or UTM srid
removeExisting - if true then first delete any existing row with matching tableName and columnName
Returns:
the new bean if created else null
Throws:
java.sql.SQLException
See Also:
JGeometryUtils.isGeographic(int), JGeometryUtils.isUTM(int)