|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.rc.celeritas.db.DBHelper
public class DBHelper
Constructor Summary | |
---|---|
DBHelper()
|
Method Summary | |
---|---|
static boolean |
addDs(java.lang.String datasource)
|
static boolean |
addDs(java.lang.String[] datasources)
|
static void |
closeConnection(java.sql.Connection conn)
|
static int |
execute(java.lang.String sql)
|
static java.util.HashMap<java.lang.String,java.lang.String> |
fetchRow(java.lang.String sql)
|
static java.util.HashMap<java.lang.String,java.lang.String> |
fetchRow(java.lang.String table,
java.lang.String pk,
java.lang.String pVal)
|
static java.util.HashMap<java.lang.String,java.lang.String> |
generateLU(java.lang.String sql)
Generate Lookup SQL |
static java.lang.String |
generatePValFromSequence(java.lang.String seq)
|
static java.util.ArrayList<java.lang.String> |
getColumnNames(java.lang.String table)
|
static java.util.ArrayList<Column> |
getColumns(java.lang.String table)
Return metadata about the columns in a table |
static java.util.ArrayList<Column> |
getColumnsFromSQL(java.lang.String sql)
Return the names of the column for a sql statement |
static java.sql.Connection |
getConnection()
|
static java.lang.String |
getDateFormat()
Return the date format set globally for the project |
static java.util.ArrayList |
getQueryResults(java.lang.String sql)
|
static java.util.HashMap |
getRowMap(java.lang.String sql)
Return a single row from the sql with column name as key. |
static boolean |
init()
|
static java.util.HashMap<java.lang.String,java.lang.String> |
insert(java.lang.String insertSQL,
java.lang.String table,
java.lang.String pk,
java.lang.String pVal)
|
static java.util.HashMap<java.lang.String,java.lang.String> |
update(java.lang.String updateSQL,
java.lang.String table,
java.lang.String pk,
java.lang.String pVal)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DBHelper()
Method Detail |
---|
public static java.lang.String getDateFormat()
public static java.util.HashMap getRowMap(java.lang.String sql) throws CeleritasException
sql
-
CeleritasException
public static java.util.HashMap<java.lang.String,java.lang.String> generateLU(java.lang.String sql)
sql
-
public static java.lang.String generatePValFromSequence(java.lang.String seq)
seq
-
public static java.util.ArrayList getQueryResults(java.lang.String sql) throws CeleritasException
sql
-
CeleritasException
public static boolean init() throws CeleritasException
CeleritasException
public static boolean addDs(java.lang.String datasource) throws CeleritasException, java.lang.ClassCastException
datasource
-
CeleritasException
java.lang.ClassCastException
public static boolean addDs(java.lang.String[] datasources) throws CeleritasException, java.lang.ClassCastException
datasources
-
CeleritasException
java.lang.ClassCastException
public static java.sql.Connection getConnection() throws CeleritasException
CeleritasException
public static java.util.ArrayList<java.lang.String> getColumnNames(java.lang.String table) throws CeleritasException
table
-
CeleritasException
public static java.util.ArrayList<Column> getColumns(java.lang.String table) throws CeleritasException
table
-
CeleritasException
public static java.util.ArrayList<Column> getColumnsFromSQL(java.lang.String sql) throws CeleritasException
sql
-
CeleritasException
public static void closeConnection(java.sql.Connection conn)
conn
- public static java.util.HashMap<java.lang.String,java.lang.String> insert(java.lang.String insertSQL, java.lang.String table, java.lang.String pk, java.lang.String pVal) throws CeleritasException
insertSQL
- table
- pk
- pVal
-
CeleritasException
public static int execute(java.lang.String sql) throws CeleritasException
sql
-
CeleritasException
public static java.util.HashMap<java.lang.String,java.lang.String> fetchRow(java.lang.String table, java.lang.String pk, java.lang.String pVal) throws CeleritasException
table
- pk
- pVal
-
CeleritasException
public static java.util.HashMap<java.lang.String,java.lang.String> fetchRow(java.lang.String sql) throws CeleritasException
sql
-
CeleritasException
public static java.util.HashMap<java.lang.String,java.lang.String> update(java.lang.String updateSQL, java.lang.String table, java.lang.String pk, java.lang.String pVal) throws CeleritasException
updateSQL
- table
- pk
- pVal
-
CeleritasException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |