@Deprecated
public class SQLTableUtilities
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
tableStructureDescription
Deprecated.
|
static java.lang.String |
versionString
Deprecated.
|
Constructor and Description |
---|
SQLTableUtilities(java.sql.Connection sqlConnection,
java.lang.String tablePrefix)
Deprecated.
|
SQLTableUtilities(javax.sql.DataSource connectionPool,
java.lang.String tablePrefix)
Deprecated.
Use this constructor if you would rather have it check out connections
from the pool as needed.
|
Modifier and Type | Method and Description |
---|---|
void |
addRootRelationNode(java.lang.String codingScheme,
java.lang.String[] associationNames,
java.lang.String[] synNames,
java.lang.String relationName,
boolean root)
Deprecated.
Add the root or tail relationship node for an association name in a
coding scheme.
|
void |
addRootRelationNode(java.lang.String codingScheme,
java.lang.String[] associationNames,
java.lang.String relationName,
boolean root)
Deprecated.
Add the root or tail relationship node for an association name in a
coding scheme.
|
void |
cleanTables(java.lang.String codingScheme)
Deprecated.
Deletes all the data from the tables of a given Coding Scheme
does not delete data from system release or nci history tables
|
void |
computeTransitivityTable(java.lang.String codingScheme,
LgMessageDirectorIF md)
Deprecated.
|
void |
createCodingSchemeVersionsTable()
Deprecated.
|
void |
createConceptHistoryTable()
Deprecated.
|
void |
createDefaultTableConstraints()
Deprecated.
Inserts table constraints
|
void |
createDefaultTableIndexes()
Deprecated.
|
void |
createDefaultTables()
Deprecated.
Initializes, creates, and indexes all tables
|
void |
createDefaultTables(boolean index)
Deprecated.
Initializes and creates all tables, optionally indexing
|
void |
createMetaDataTable()
Deprecated.
|
void |
createNCIHistoryTable()
Deprecated.
|
void |
createSystemReleaseTables()
Deprecated.
|
void |
createVersionsTable()
Deprecated.
|
boolean |
doHistoryTablesExist()
Deprecated.
|
static boolean |
doHistoryTablesExist(java.lang.String server,
java.lang.String driver,
java.lang.String username,
java.lang.String password,
java.lang.String prefix)
Deprecated.
|
boolean |
doTablesExist()
Deprecated.
|
static boolean |
doTablesExist(java.lang.String server,
java.lang.String driver,
java.lang.String username,
java.lang.String password,
java.lang.String prefix)
Deprecated.
|
void |
dropDefaultTableConstraints()
Deprecated.
Drops the constraints from the table
|
void |
dropTables()
Deprecated.
Drop all of the tables from a LexGrid database (in the correct order)
This does drop all tables - including the optional ones.
|
java.sql.ResultSet |
extractDataFromDB(java.lang.String tableName,
java.util.Map attributeNames,
java.lang.String whereClause,
java.lang.String dbType)
Deprecated.
Runs SQL Statement "SELECT" with supplied attributes and where clause
|
java.util.Set<java.lang.String> |
getDefaultTableKeys()
Deprecated.
|
java.lang.String |
getExistingTableVersion()
Deprecated.
|
GenericSQLModifier |
getGenericSQLModifier()
Deprecated.
|
java.lang.String |
getNativeRelation(java.lang.String codingScheme)
Deprecated.
Get the native relation for a coding scheme.
|
SQLTableConstants |
getSQLTableConstants()
Deprecated.
|
boolean |
insertRow(java.lang.String table,
java.util.Map attributeValues)
Deprecated.
Runs SQL Statement "INSERT" on the given table and and table prefix for
the supplied attributeValues
|
void |
removeRootRelationNode(java.lang.String codingScheme,
java.lang.String relationName,
boolean root)
Deprecated.
Remove the root ('@') or tail ('@@') relationship node for the given
coding scheme.
|
int |
updateRow(java.lang.String tableName,
java.util.Map attributeNameValue,
java.lang.String whereClause,
java.lang.String dbType)
Deprecated.
Runs SQL Statement "UPDATE" on the given tableName with attribute values
and where clause.
|
public static final java.lang.String versionString
public static final java.lang.String tableStructureDescription
public SQLTableUtilities(java.sql.Connection sqlConnection, java.lang.String tablePrefix) throws java.lang.Exception
sqlConnection
- connection to a SQL databasejava.lang.Exception
public SQLTableUtilities(javax.sql.DataSource connectionPool, java.lang.String tablePrefix) throws java.lang.Exception
connectionPool
- tablePrefix
- java.lang.Exception
public SQLTableConstants getSQLTableConstants()
public GenericSQLModifier getGenericSQLModifier()
public void createDefaultTables() throws java.sql.SQLException
java.sql.SQLException
public java.util.Set<java.lang.String> getDefaultTableKeys()
public void createDefaultTables(boolean index) throws java.sql.SQLException
java.sql.SQLException
public void createSystemReleaseTables() throws java.sql.SQLException
java.sql.SQLException
public void createNCIHistoryTable() throws java.sql.SQLException
java.sql.SQLException
public void createConceptHistoryTable() throws java.sql.SQLException
java.sql.SQLException
public void createCodingSchemeVersionsTable() throws java.sql.SQLException
java.sql.SQLException
public void createVersionsTable() throws java.sql.SQLException
java.sql.SQLException
public void createMetaDataTable() throws java.sql.SQLException
java.sql.SQLException
public void createDefaultTableIndexes() throws java.sql.SQLException
java.sql.SQLException
public void createDefaultTableConstraints() throws java.sql.SQLException
java.sql.SQLException
public void dropDefaultTableConstraints() throws java.sql.SQLException
java.sql.SQLException
public java.lang.String getExistingTableVersion()
public static boolean doTablesExist(java.lang.String server, java.lang.String driver, java.lang.String username, java.lang.String password, java.lang.String prefix)
public static boolean doHistoryTablesExist(java.lang.String server, java.lang.String driver, java.lang.String username, java.lang.String password, java.lang.String prefix)
public boolean doTablesExist()
public boolean doHistoryTablesExist()
public void cleanTables(java.lang.String codingScheme) throws java.sql.SQLException
codingScheme
- target Coding Schemejava.sql.SQLException
public void dropTables() throws java.sql.SQLException
data.codingScheme
- target Coding Schemejava.sql.SQLException
public void computeTransitivityTable(java.lang.String codingScheme, LgMessageDirectorIF md) throws java.sql.SQLException
java.sql.SQLException
public java.lang.String getNativeRelation(java.lang.String codingScheme) throws java.sql.SQLException
codingScheme
- java.sql.SQLException
public void addRootRelationNode(java.lang.String codingScheme, java.lang.String[] associationNames, java.lang.String relationName, boolean root) throws java.sql.SQLException
codingScheme
- The coding scheme to add the root node to.associationNames
- The association name(s) to calculate the root node for. If you
provide more than one association, the root node will be
calculated using all of the association names (at the same
time). If you don't provide any association names, all
associations names will be used (at the same time).relationName
- The relation name that contains the association. If null, the
native relation for the coding scheme is used.root
- - true for root, false for tail.java.sql.SQLException
public void addRootRelationNode(java.lang.String codingScheme, java.lang.String[] associationNames, java.lang.String[] synNames, java.lang.String relationName, boolean root) throws java.sql.SQLException
codingScheme
- The coding scheme to add the root node to.associationNames
- The association name(s) to calculate the root node for. If you
provide more than one association, the root node will be
calculated using all of the association names (at the same
time). If you don't provide any association names, all
associations names will be used (at the same time).synNames
- The association name(s) that define synonymous relationships
between concepts. If provided, nodes that do not directly
participate in an association above but are synonymous with a
node that does participate are not included in the
calculation. If empty or null, synonymy is not considered as
part of the calculation.relationName
- The relation name that contains the association. If null, the
native relation for the coding scheme is used.root
- - true for root, false for tail.java.sql.SQLException
public void removeRootRelationNode(java.lang.String codingScheme, java.lang.String relationName, boolean root) throws java.sql.SQLException
codingScheme
- The coding scheme to remove the root node from.relationName
- The relation container for the root node. If null, the native
relation for the coding scheme is used.root
- - true for root ('@'), false for tail ('@@').java.sql.SQLException
public java.sql.ResultSet extractDataFromDB(java.lang.String tableName, java.util.Map attributeNames, java.lang.String whereClause, java.lang.String dbType) throws java.sql.SQLException
tableName
- attributeNames
- whereClause
- java.sql.SQLException
public boolean insertRow(java.lang.String table, java.util.Map attributeValues) throws java.sql.SQLException
table
- attributeValues
- java.sql.SQLException
public int updateRow(java.lang.String tableName, java.util.Map attributeNameValue, java.lang.String whereClause, java.lang.String dbType) throws java.sql.SQLException
tableName
- attributeNameValue
- whereClause
- java.sql.SQLException