|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.esri.sde.sdk.client.SeTable
public class SeTable
SeTable - An object that creates/alters/deletes/queries a DBMS table through an sde server.
Nested Class Summary | |
---|---|
static class |
SeTable.SeTableIdRange
|
static class |
SeTable.SeTableIndexDefs
SeTable inner class that stores the index definition information for a table. |
static class |
SeTable.SeTableLock
SeTable inner class that retrieves the locks information for a table. |
static class |
SeTable.SeTableRowLockInfo
SeTable inner class that retrieves the rowlocks information from the server. |
static class |
SeTable.SeTableStats
SeTable inner class that retrieves the statistics information for a column. |
Field Summary | |
---|---|
static int |
SE_TABLE_EXCLUSIVE_SCHEMA_LOCK
|
static int |
SE_TABLE_SHARED_SCHEMA_LOCK
|
static int |
SE_UPDATE_ADDS_TABLE_STATS
|
static int |
SE_UPDATE_ALL_TABLE_STATS
|
static int |
SE_UPDATE_BUSINESS_TABLE_STATS
|
static int |
SE_UPDATE_DELETES_TABLE_STATS
|
static int |
SE_UPDATE_FEATURE_TABLE_STATS
|
static int |
SE_UPDATE_RASTER_TABLE_STATS
|
static int |
SE_UPDATE_XML_TABLE_STATS
|
Constructor Summary | |
---|---|
SeTable(SeConnection conn,
java.lang.String qualifiedTabName)
Table constructor with an SeConnection and qualified table name argument. |
|
SeTable(SeConnection conn,
java.lang.String databaseName,
java.lang.String ownerName,
java.lang.String tableName)
Table constructor with an SeConnection, database, owner and table name argument that qualifies the table in RDBMS. |
Method Summary | |
---|---|
void |
addColumn(SeColumnDefinition columnDef)
Adds a column to the table. |
void |
addMetaData(int recordCount,
SeMetaData[] metaData)
Adds metadata records. |
void |
addRowLocks(int numLocks,
SeObjectId[] rowIds,
SeObjectId stateId)
Adds one or more row locks. |
void |
addUUIDColumn(java.lang.String columnName)
Adds a UUID column to the table. |
void |
alterColumn(SeRegisteredColumn column)
Alter SDE Column Metadata. |
void |
alterMetaData(int recordCount,
SeMetaData[] metaData)
Alters metadata records. |
void |
create(SeColumnDefinition[] columnDefs)
Creates the table with specified column definitions and the default configuration keyword. |
void |
create(SeColumnDefinition[] columnDefs,
java.lang.String configKeyword)
Creates the table with specified column definitions. |
void |
createIndex(java.lang.String column,
boolean unique,
boolean ascending,
java.lang.String configKeyword,
java.lang.String indexName)
Creates a DBMS index on the specified column of a table. |
void |
createIndexes(short numIndexes,
SeTable.SeTableIndexDefs[] indexDefs,
java.lang.String configKeyword)
Creates DBMS indexes on a table. |
void |
createMultiVersionView(java.lang.String viewName)
Creates a multiversion DBMS view on the specified multiversion table. |
void |
createPrimaryConstraint(java.lang.String[] columns,
java.lang.String constraintName,
java.lang.String configKeyword)
Creates primary constraint. |
void |
createUniqueConstraint(java.lang.String[] columns,
java.lang.String constraintName,
java.lang.String configKeyword)
Creates unique constraint. |
void |
createView(java.lang.String viewName,
java.lang.String[] viewColumns,
java.lang.String[] tableColumns,
SeSqlConstruct sqlC)
Creates a DBMS view on a table. |
void |
delete()
Drops a DBMS table.If the table is spatially enabled, all of its associated spatial information for the layer is also deleted. |
void |
deleteConstraint(java.lang.String constraintName)
Deletes the named constraint from specified table. |
void |
deleteIndex(java.lang.String indexName)
Drops a DBMS table index for the specified table. |
void |
deleteMetaData(int recordCount,
SeObjectId[] recordIds)
Deletes metadata records. |
void |
deleteMetaDataByWhere(java.lang.String whereClause)
Deletes metadata records filtered by a where clause. |
void |
deleteMultiVersionView()
Deletes a multiversion DBMS view on a multiversion table. |
SeColumnDefinition[] |
describe()
Returns column definitions of the table.This function maps the underlying DBMS data types to ArcSDE data types. |
SeTable.SeTableIndexDefs[] |
describeIndexes()
Returns index definitions. |
void |
dropColumn(java.lang.String column)
Drops a column from the table. |
void |
freeLock()
Frees the lock on a table. |
SeRegisteredColumn[] |
getColumnList()
Returns the full column descriptions for this registered table. |
java.lang.String |
getDatabase()
Returns the database's name. |
SeTable.SeTableIdRange |
getIds(int numIds)
Returns a range of row id values. |
SeTable.SeTableLock[] |
getLocks()
Returns a list of locks info for the table. |
SeMetaData[] |
getMetaDataInfoList()
Returns the meta-data associated with a table. |
SeState[] |
getMvEditStates()
Returns a list of states in which a multiversion table was edited. |
java.lang.String |
getName()
Returns the table's name. |
java.lang.String |
getOwner()
Returns the owner's name. |
int |
getPermissions()
Returns the permissions for the table. |
java.lang.String |
getQualifiedName()
Returns the table's name, qualified with the owner and database. |
SeTable.SeTableRowLockInfo |
getRowLocks()
Returns the row locks information. |
SeTable.SeTableRowLockInfo |
getRowLocksByUser(java.lang.String user)
Returns rowlocks set by the specified user. |
void |
grantAccess(int privilege,
boolean grant,
java.lang.String user)
Grants specified privileges to the specified user. |
void |
lock(int lockMode)
Locks the table. |
void |
migrateAttributeBinary(java.lang.String columnName,
java.lang.String config_keyword)
Changes the data type of a column from LONG RAW storage to BLOB based on the configuration keyword specified. |
void |
populateUUIDColumn(java.lang.String columnName)
|
java.lang.String |
qualifyColumn(java.lang.String columnName)
Returns a qualified column name. |
void |
rebuildIndex(SeObjectId indexMask)
Rebuilds this table's indexes. |
void |
removeRowLocks(int numLocks,
SeObjectId[] rowIds,
SeObjectId stateId)
Deletes one or more row locks. |
void |
rename(java.lang.String newTableName)
Renames the table. |
void |
returnIds(SeObjectId startId,
int numIds)
Sends a set of unused id values back to the server. |
void |
revokeAccess(int privilege,
java.lang.String user)
Revokes specified privileges from the specified user. |
void |
truncate()
Deletes the data from a table but keeps the table definition. |
void |
updateDBMSStats(java.lang.String indexName,
java.lang.String mode,
int tableUpdateMask)
This method updates the DBMS statistics on the specified table. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int SE_TABLE_SHARED_SCHEMA_LOCK
public static final int SE_TABLE_EXCLUSIVE_SCHEMA_LOCK
public static final int SE_UPDATE_ADDS_TABLE_STATS
public static final int SE_UPDATE_DELETES_TABLE_STATS
public static final int SE_UPDATE_FEATURE_TABLE_STATS
public static final int SE_UPDATE_BUSINESS_TABLE_STATS
public static final int SE_UPDATE_RASTER_TABLE_STATS
public static final int SE_UPDATE_XML_TABLE_STATS
public static final int SE_UPDATE_ALL_TABLE_STATS
Constructor Detail |
---|
public SeTable(SeConnection conn, java.lang.String qualifiedTabName) throws SeException
conn
- SeConnection object handle.qualifiedTabName
- qualified table name.
SeException
public SeTable(SeConnection conn, java.lang.String databaseName, java.lang.String ownerName, java.lang.String tableName) throws SeException
conn
- SeConnection object handle.databaseName
- database name.ownerName
- owner name.tableName
- table name.
SeException
Method Detail |
---|
public java.lang.String qualifyColumn(java.lang.String columnName) throws SeException
columnName
- columnName.
SeException
public void populateUUIDColumn(java.lang.String columnName) throws SeException
SeException
public void addUUIDColumn(java.lang.String columnName) throws SeException
columnName
- The uuid column name.
SeException
public void addColumn(SeColumnDefinition columnDef) throws SeException
columnDef
- an SeColumnDefinition object.
SeException
public void alterColumn(SeRegisteredColumn column) throws SeException
column
- The new description of the column,
matched by name and table.
SeException
public void addMetaData(int recordCount, SeMetaData[] metaData) throws SeException
recordCount
- number of records to insert.metaData
- list of metadata records to be inserted.
SeException
public void alterMetaData(int recordCount, SeMetaData[] metaData) throws SeException
recordCount
- number of records to alter.metaData
- list of metadata records to be altered.
SeException
public void deleteMetaData(int recordCount, SeObjectId[] recordIds) throws SeException
recordCount
- number of records to delete.recordIds
- list of metadata record ids to be deleted.
SeException
public void deleteMetaDataByWhere(java.lang.String whereClause) throws SeException
whereClause
- where clause used to delete the records.
SeException
public SeState[] getMvEditStates() throws SeException
SeException
public SeMetaData[] getMetaDataInfoList() throws SeException
SeException
public void dropColumn(java.lang.String column) throws SeException
column
- column to be dropped.
SeException
public void create(SeColumnDefinition[] columnDefs) throws SeException
columnDefs
- An array of SeColumnDefinition objects.
SeException
public void create(SeColumnDefinition[] columnDefs, java.lang.String configKeyword) throws SeException
columnDefs
- An array of SeColumnDefinition objects.configKeyword
- The keyword corresponding to an ArcSDE table configuration. The keyword and its corresponding table configuration must be defined in the dbtune table. Refer the ArcSDE Configuration and Tuning guide for more information on setting up the dbtune.sde configuration parameters.
SeException
public void createIndex(java.lang.String column, boolean unique, boolean ascending, java.lang.String configKeyword, java.lang.String indexName) throws SeException
column
- column name.unique
- set to TRUE if index is unique.ascending
- set to TRUE if index is ascending.configKeyword
- keyword indicating alternate default
configurations. The keyword is found in
the dbtune.sde file.indexName
- index name.
SeException
public void createIndexes(short numIndexes, SeTable.SeTableIndexDefs[] indexDefs, java.lang.String configKeyword) throws SeException
numIndexes
- number of indexes to create.indexDefs
- an aray of SeTableIndexDefs objects defining index properties.configKeyword
- keyword indicating alternate default configurations. The
keyword is found in the dbtune.sde file.
SeException
public void createPrimaryConstraint(java.lang.String[] columns, java.lang.String constraintName, java.lang.String configKeyword) throws SeException
columns
- array of column names.constraintName
- the constraint name.configKeyword
- the configuration keyword.
SeException
public void createUniqueConstraint(java.lang.String[] columns, java.lang.String constraintName, java.lang.String configKeyword) throws SeException
columns
- array of column names.constraintName
- the constraint name.configKeyword
- the configuration keyword.
SeException
public SeTable.SeTableIndexDefs[] describeIndexes() throws SeException
SeException
SeColumnDefinition
public void rebuildIndex(SeObjectId indexMask) throws SeException
indexMask
- SeObjectId indexMask The type of index.
SeException
public SeColumnDefinition[] describe() throws SeException
SeException
SeColumnDefinition
public SeRegisteredColumn[] getColumnList() throws SeException
SeException
SeRegisteredColumn
public void delete() throws SeException
SeException
public void deleteConstraint(java.lang.String constraintName) throws SeException
SeException
public void deleteIndex(java.lang.String indexName) throws SeException
SeException
public void truncate() throws SeException
SeException
public void lock(int lockMode) throws SeException
lockMode
- lock type.
SeException
public SeTable.SeTableIdRange getIds(int numIds) throws SeException
numIds
- number of id values requested.
SeException
public void returnIds(SeObjectId startId, int numIds) throws SeException
startId
- start id of the range being released.numIds
- number of id values returned.
SeException
public SeTable.SeTableLock[] getLocks() throws SeException
SeException
public void freeLock() throws SeException
SeException
public void addRowLocks(int numLocks, SeObjectId[] rowIds, SeObjectId stateId) throws SeException
numLocks
- number of locks.rowIds
- array of rowid to lock.stateId
- state id to use. Set to SE_NULL_STATE_ID if
the table isn't multiversioned.
SeException
public void removeRowLocks(int numLocks, SeObjectId[] rowIds, SeObjectId stateId) throws SeException
numLocks
- number of locks.rowIds
- array of rowid to remove lock from.stateId
- state id to use. Set to SE_NULL_STATE_ID if
the table isn't multiversioned.
SeException
public SeTable.SeTableRowLockInfo getRowLocks() throws SeException
SeException
SeTable.SeTableRowLockInfo
public SeTable.SeTableRowLockInfo getRowLocksByUser(java.lang.String user) throws SeException
SeException
SeTable.SeTableRowLockInfo
public void createView(java.lang.String viewName, java.lang.String[] viewColumns, java.lang.String[] tableColumns, SeSqlConstruct sqlC) throws SeException
viewName
- Name of the view to be created.viewColumns
- an array of view columns names.tableColumns
- an array of table columns names.
SeException
public void createMultiVersionView(java.lang.String viewName) throws SeException
viewName
- name of the view to be created.
SeException
public void deleteMultiVersionView() throws SeException
SeException
public void rename(java.lang.String newTableName) throws SeException
newTableName
- new name of the table.
SeException
public void updateDBMSStats(java.lang.String indexName, java.lang.String mode, int tableUpdateMask) throws SeException
The mode values for Oracle are:
COMPUTE ESTIMATE
The mode values for Informix are:
LOW MEDIUM HIGH DISTRIBUTIONS DROP RESOLUTION SPECIFIC ROUTINE FUNCTION PROCEDURE
The mode values for Sqlserver are:
with fullscan [index] with sample %% percent [index]
The mode value for DB2 is NULL( The DB2 mode implementation has been fixed at "with distributions and detailed indexes all" for all tables).
The tableUpdateMask can be an 'OR'ed combination of the following:
SE_UPDATE_ADDS_TABLE_STATS
SE_UPDATE_DELETES_TABLE_STATS
SE_UPDATE_FEATURE_TABLE_STATS
SE_UPDATE_BUSINESS_TABLE_STATS
SE_UPDATE_RASTER_TABLE_STATS
SE_UPDATE_ALL_TABLE_STATS
indexName
- index name.mode
- Statistics mode.tableUpdateMask
- bitmask indicating the tables whose
statistics needs to be updated.
SeException
public void migrateAttributeBinary(java.lang.String columnName, java.lang.String config_keyword) throws SeException
Notes
- It is strongly recommended to create a backup of data before geometry storage type migration. For example, this could be in the form of an sdeexport file.
- If the table was registered as versioned, migrating the LONG RAW column to a BLOB data type will also update the column in the Adds table. If the table has archiving enabled, the archive table's LONG RAW column will also be updated.
- Storage migration must be done by the user who owns the table.
config_keyword
- The DBTUNE configuration keyword specifying the
ATTRIBUTE_BINARY BLOB storage, plus storage clauses
for the BLOB data such as tablespaces
SeException
- if an error occurspublic void grantAccess(int privilege, boolean grant, java.lang.String user) throws SeException
SeDefs.SE_SELECT_PRIVILEGE
SeDefs.SE_UPDATE_PRIVILEGE
SeDefs.SE_INSERT_PRIVILEGE
SeDefs.SE_DELETE_PRIVILEGE
privilege
- privilege to grant.grant
- granted user can/can't GRANT/REVOKE privilge.user
- DBMS user name to whom privilges need to be granted.
SeException
public void revokeAccess(int privilege, java.lang.String user) throws SeException
SeDefs.SE_SELECT_PRIVILEGE
SeDefs.SE_UPDATE_PRIVILEGE
SeDefs.SE_INSERT_PRIVILEGE
SeDefs.SE_DELETE_PRIVILEGE
privilege
- privilege to grant.user
- DBMS user name to whom privilges need to be granted.
SeException
public int getPermissions() throws SeException
SeDefs.SE_SELECT_PRIVILEGE
SeDefs.SE_UPDATE_PRIVILEGE
SeDefs.SE_INSERT_PRIVILEGE
SeDefs.SE_DELETE_PRIVILEGE
SeException
SeDefs
public java.lang.String getName()
public java.lang.String getDatabase()
public java.lang.String getOwner()
public java.lang.String getQualifiedName()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |