Search in sources :

Example 1 with OracleRecordStore

use of com.revolsys.oracle.recordstore.OracleRecordStore in project com.revolsys.open by revolsys.

the class ArcSdeStGeometryRecordStoreExtension method preProcess.

@Override
public void preProcess(final RecordStoreSchema schema) {
    final JdbcRecordStoreSchema jdbcSchema = (JdbcRecordStoreSchema) schema;
    final RecordStore recordStore = schema.getRecordStore();
    final OracleRecordStore oracleRecordStore = (OracleRecordStore) recordStore;
    try {
        try (final Connection connection = oracleRecordStore.getJdbcConnection()) {
            final String schemaName = jdbcSchema.getDbName();
            loadTableProperties(connection, schema, schemaName);
            loadColumnProperties(schema, schemaName, connection);
        }
    } catch (final Throwable e) {
        Logs.error(this, "Unable to get ArcSDE metadata for schema " + schema.getName(), e);
    }
}
Also used : JdbcRecordStoreSchema(com.revolsys.jdbc.io.JdbcRecordStoreSchema) OracleRecordStore(com.revolsys.oracle.recordstore.OracleRecordStore) RecordStore(com.revolsys.record.schema.RecordStore) Connection(java.sql.Connection) OracleRecordStore(com.revolsys.oracle.recordstore.OracleRecordStore)

Example 2 with OracleRecordStore

use of com.revolsys.oracle.recordstore.OracleRecordStore in project com.revolsys.open by revolsys.

the class ArcSdeConstants method isSdeAvailable.

public static boolean isSdeAvailable(final RecordStore recordStore) {
    if (recordStore instanceof OracleRecordStore) {
        final OracleRecordStore oracleRecordStore = (OracleRecordStore) recordStore;
        final Set<String> allSchemaNames = oracleRecordStore.getAllSchemaNames();
        return allSchemaNames.contains("SDE");
    }
    return false;
}
Also used : OracleRecordStore(com.revolsys.oracle.recordstore.OracleRecordStore)

Example 3 with OracleRecordStore

use of com.revolsys.oracle.recordstore.OracleRecordStore in project com.revolsys.open by revolsys.

the class ArcSdeStGeometryRecordStoreExtension method initialize.

@Override
public void initialize(final RecordStore recordStore, final Map<String, Object> connectionProperties) {
    final OracleRecordStore oracleRecordStore = (OracleRecordStore) recordStore;
    final JdbcFieldAdder stGeometryAttributeAdder = new ArcSdeStGeometryFieldAdder(oracleRecordStore);
    oracleRecordStore.addFieldAdder("ST_GEOMETRY", stGeometryAttributeAdder);
    oracleRecordStore.addFieldAdder("SDE.ST_GEOMETRY", stGeometryAttributeAdder);
}
Also used : JdbcFieldAdder(com.revolsys.jdbc.field.JdbcFieldAdder) OracleRecordStore(com.revolsys.oracle.recordstore.OracleRecordStore)

Aggregations

OracleRecordStore (com.revolsys.oracle.recordstore.OracleRecordStore)3 JdbcFieldAdder (com.revolsys.jdbc.field.JdbcFieldAdder)1 JdbcRecordStoreSchema (com.revolsys.jdbc.io.JdbcRecordStoreSchema)1 RecordStore (com.revolsys.record.schema.RecordStore)1 Connection (java.sql.Connection)1