|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object edu.jhu.tmaj.client.importer.specimens.data.ImportDBUtil
public final class ImportDBUtil
Database utility functions used in the import program. Maps are converted into SQL statements.
Method Summary | |
---|---|
static int |
insertHash(java.lang.String tableName,
java.lang.String primaryKeyName,
java.util.Map<java.lang.String,java.lang.String> fieldName_value,
int userID)
Inserts a record into a database tables based on values given in a Map. |
static void |
updateHash(java.lang.String tableName,
java.util.Map<java.lang.String,java.lang.String> fieldName_value,
java.lang.String primaryKey,
int id,
int userID)
Updates a record in a table based on values from a Map. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void updateHash(java.lang.String tableName, java.util.Map<java.lang.String,java.lang.String> fieldName_value, java.lang.String primaryKey, int id, int userID) throws java.sql.SQLException
tableName
- the name of the table to updatefieldName_value
- a Map containing column-names as keys, and their values as the hash's valuesprimaryKey
- the name of the primary key of the table (example: SpecimenID)id
- the id of the primary key of the record that is being updateduserID
- the UserID of the user updating this record.
java.sql.SQLException
public static int insertHash(java.lang.String tableName, java.lang.String primaryKeyName, java.util.Map<java.lang.String,java.lang.String> fieldName_value, int userID) throws java.sql.SQLException
java.sql.SQLException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |