org.LexGrid.util.sql.lgTables
Class SQLTableUtilities

java.lang.Object
  extended by org.LexGrid.util.sql.lgTables.SQLTableUtilities

Deprecated.

@Deprecated
public class SQLTableUtilities
extends java.lang.Object

Class to make the tables for the new SQL format.

Author:
Dan Armbrust , Thomas Johnson, Sridhar Dwarkanath, Craig Stancl

Field Summary
static java.lang.String tableStructureDescription
          Deprecated.  
static java.lang.String versionString
          Deprecated.  
 
Constructor Summary
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.
 
Method Summary
 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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

versionString

public static final java.lang.String versionString
Deprecated. 
See Also:
Constant Field Values

tableStructureDescription

public static final java.lang.String tableStructureDescription
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

SQLTableUtilities

public SQLTableUtilities(java.sql.Connection sqlConnection,
                         java.lang.String tablePrefix)
                  throws java.lang.Exception
Deprecated. 
Parameters:
sqlConnection - connection to a SQL database
Throws:
java.lang.Exception

SQLTableUtilities

public SQLTableUtilities(javax.sql.DataSource connectionPool,
                         java.lang.String tablePrefix)
                  throws java.lang.Exception
Deprecated. 
Use this constructor if you would rather have it check out connections from the pool as needed.

Parameters:
connectionPool -
tablePrefix -
Throws:
java.lang.Exception
Method Detail

getSQLTableConstants

public SQLTableConstants getSQLTableConstants()
Deprecated. 

getGenericSQLModifier

public GenericSQLModifier getGenericSQLModifier()
Deprecated. 

createDefaultTables

public void createDefaultTables()
                         throws java.sql.SQLException
Deprecated. 
Initializes, creates, and indexes all tables

Throws:
java.sql.SQLException

getDefaultTableKeys

public java.util.Set<java.lang.String> getDefaultTableKeys()
Deprecated. 

createDefaultTables

public void createDefaultTables(boolean index)
                         throws java.sql.SQLException
Deprecated. 
Initializes and creates all tables, optionally indexing

Throws:
java.sql.SQLException

createSystemReleaseTables

public void createSystemReleaseTables()
                               throws java.sql.SQLException
Deprecated. 
Throws:
java.sql.SQLException

createNCIHistoryTable

public void createNCIHistoryTable()
                           throws java.sql.SQLException
Deprecated. 
Throws:
java.sql.SQLException

createConceptHistoryTable

public void createConceptHistoryTable()
                               throws java.sql.SQLException
Deprecated. 
Throws:
java.sql.SQLException

createCodingSchemeVersionsTable

public void createCodingSchemeVersionsTable()
                                     throws java.sql.SQLException
Deprecated. 
Throws:
java.sql.SQLException

createVersionsTable

public void createVersionsTable()
                         throws java.sql.SQLException
Deprecated. 
Throws:
java.sql.SQLException

createMetaDataTable

public void createMetaDataTable()
                         throws java.sql.SQLException
Deprecated. 
Throws:
java.sql.SQLException

createDefaultTableIndexes

public void createDefaultTableIndexes()
                               throws java.sql.SQLException
Deprecated. 
Throws:
java.sql.SQLException

createDefaultTableConstraints

public void createDefaultTableConstraints()
                                   throws java.sql.SQLException
Deprecated. 
Inserts table constraints

Throws:
java.sql.SQLException

dropDefaultTableConstraints

public void dropDefaultTableConstraints()
                                 throws java.sql.SQLException
Deprecated. 
Drops the constraints from the table

Throws:
java.sql.SQLException

getExistingTableVersion

public java.lang.String getExistingTableVersion()
Deprecated. 

doTablesExist

public static boolean doTablesExist(java.lang.String server,
                                    java.lang.String driver,
                                    java.lang.String username,
                                    java.lang.String password,
                                    java.lang.String prefix)
Deprecated. 

doHistoryTablesExist

public static boolean doHistoryTablesExist(java.lang.String server,
                                           java.lang.String driver,
                                           java.lang.String username,
                                           java.lang.String password,
                                           java.lang.String prefix)
Deprecated. 

doTablesExist

public boolean doTablesExist()
Deprecated. 

doHistoryTablesExist

public boolean doHistoryTablesExist()
Deprecated. 

cleanTables

public void cleanTables(java.lang.String codingScheme)
                 throws java.sql.SQLException
Deprecated. 
Deletes all the data from the tables of a given Coding Scheme does not delete data from system release or nci history tables

Parameters:
codingScheme - target Coding Scheme
Throws:
java.sql.SQLException

dropTables

public void dropTables()
                throws java.sql.SQLException
Deprecated. 
Drop all of the tables from a LexGrid database (in the correct order) This does drop all tables - including the optional ones.

Parameters:
codingScheme - target Coding Scheme
Throws:
java.sql.SQLException

computeTransitivityTable

public void computeTransitivityTable(java.lang.String codingScheme,
                                     LgMessageDirectorIF md)
                              throws java.sql.SQLException
Deprecated. 
Throws:
java.sql.SQLException

getNativeRelation

public java.lang.String getNativeRelation(java.lang.String codingScheme)
                                   throws java.sql.SQLException
Deprecated. 
Get the native relation for a coding scheme. If none are marked as native, returns an arbitrary relation name. Returns null if none were found.

Parameters:
codingScheme -
Returns:
Throws:
java.sql.SQLException

addRootRelationNode

public void addRootRelationNode(java.lang.String codingScheme,
                                java.lang.String[] associationNames,
                                java.lang.String relationName,
                                boolean root)
                         throws java.sql.SQLException
Deprecated. 
Add the root or tail relationship node for an association name in a coding scheme.

Parameters:
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.
Throws:
java.sql.SQLException

addRootRelationNode

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
Deprecated. 
Add the root or tail relationship node for an association name in a coding scheme.

Parameters:
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.
Throws:
java.sql.SQLException

removeRootRelationNode

public void removeRootRelationNode(java.lang.String codingScheme,
                                   java.lang.String relationName,
                                   boolean root)
                            throws java.sql.SQLException
Deprecated. 
Remove the root ('@') or tail ('@@') relationship node for the given coding scheme.

Parameters:
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 ('@@').
Throws:
java.sql.SQLException

extractDataFromDB

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
Deprecated. 
Runs SQL Statement "SELECT" with supplied attributes and where clause

Parameters:
tableName -
attributeNames -
whereClause -
Returns:
Throws:
java.sql.SQLException

insertRow

public boolean insertRow(java.lang.String table,
                         java.util.Map attributeValues)
                  throws java.sql.SQLException
Deprecated. 
Runs SQL Statement "INSERT" on the given table and and table prefix for the supplied attributeValues

Parameters:
table -
attributeValues -
Returns:
Throws:
java.sql.SQLException

updateRow

public int updateRow(java.lang.String tableName,
                     java.util.Map attributeNameValue,
                     java.lang.String whereClause,
                     java.lang.String dbType)
              throws java.sql.SQLException
Deprecated. 
Runs SQL Statement "UPDATE" on the given tableName with attribute values and where clause.

Parameters:
tableName -
attributeNameValue -
whereClause -
Returns:
Throws:
java.sql.SQLException

Copyright: (c) 2004-2006 Mayo Foundation for Medical Education and Research (MFMER). All rights reserved. MAYO, MAYO CLINIC, and the triple-shield Mayo logo are trademarks and service marks of MFMER.