|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.opensha.refFaultParamDb.dao.db.PrioritizedDB_Access
public class PrioritizedDB_Access
This class represents a list of DB_AccessAPI's. The first one that works will be used for all connections. This is ideal for the case where you would prefer a direct DB connection, but it might be blocked by a firewall, in which case you fall back to a servlet brokered connection.
| Field Summary |
|---|
| Fields inherited from interface org.opensha.refFaultParamDb.dao.db.DB_AccessAPI |
|---|
INSERT_UPDATE_QUERY, INSERT_UPDATE_SPATIAL, RESET_PASSWORD, SELECT_QUERY, SELECT_QUERY_SPATIAL, SEQUENCE_NUMBER |
| Constructor Summary | |
|---|---|
PrioritizedDB_Access(ArrayList<DB_AccessAPI> accessors)
|
|
| Method Summary | |
|---|---|
static ArrayList<DB_AccessAPI> |
createDB2ReadOnlyAccessors()
|
static ArrayList<DB_AccessAPI> |
createDB3ReadOnlyAccessors()
|
void |
destroy()
|
void |
destroy(int millis)
|
int |
getNextSequenceNumber(String sequenceName)
Gets the next unique sequence number to be insertd in the table. |
String |
getSystemDate()
Get the sytem date from oracle database |
int[] |
insertUpdateOrDeleteBatch(ArrayList<String> sqls,
boolean rollbackOnFail)
Executes a batch of sql statements. |
int |
insertUpdateOrDeleteData(String sql)
Insert/Update/Delete record in the database. |
int |
insertUpdateOrDeleteData(String sql,
ArrayList<oracle.spatial.geometry.JGeometry> geometryList)
Insert/Update/Delete record in the database. |
static boolean |
isAccessorValid(DB_AccessAPI dbAccess)
|
static void |
main(String[] args)
|
CachedRowSet |
queryData(String sql)
Query the databse and returns the Results in a CachedRowset object. |
SpatialQueryResult |
queryData(String sqlWithSpatialColumnNames,
String sqlWithNoSpatialColumnNames,
ArrayList<String> spatialColumnNames)
Query the databse and returns the Results in a object which contains CachedRowSet as well as JGeomtery objects. |
int |
resetPasswordByEmail(String email)
Reset the password in the database for the provided email address |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PrioritizedDB_Access(ArrayList<DB_AccessAPI> accessors)
| Method Detail |
|---|
public static ArrayList<DB_AccessAPI> createDB2ReadOnlyAccessors()
public static ArrayList<DB_AccessAPI> createDB3ReadOnlyAccessors()
public static boolean isAccessorValid(DB_AccessAPI dbAccess)
public int getNextSequenceNumber(String sequenceName)
throws SQLException
DB_AccessAPI
getNextSequenceNumber in interface DB_AccessAPIsequenceName - String
SQLException
public String getSystemDate()
throws SQLException
DB_AccessAPI
getSystemDate in interface DB_AccessAPISQLException
public int insertUpdateOrDeleteData(String sql)
throws SQLException
DB_AccessAPI
insertUpdateOrDeleteData in interface DB_AccessAPIsql - String
SQLException
public int[] insertUpdateOrDeleteBatch(ArrayList<String> sqls,
boolean rollbackOnFail)
throws SQLException
DB_AccessAPI
insertUpdateOrDeleteBatch in interface DB_AccessAPISQLException
public int insertUpdateOrDeleteData(String sql,
ArrayList<oracle.spatial.geometry.JGeometry> geometryList)
throws SQLException
DB_AccessAPI
insertUpdateOrDeleteData in interface DB_AccessAPIsql - String
SQLException
public CachedRowSet queryData(String sql)
throws SQLException
DB_AccessAPI
queryData in interface DB_AccessAPIsql - String
SQLException
public SpatialQueryResult queryData(String sqlWithSpatialColumnNames,
String sqlWithNoSpatialColumnNames,
ArrayList<String> spatialColumnNames)
throws SQLException
DB_AccessAPI
queryData in interface DB_AccessAPISQLException
public int resetPasswordByEmail(String email)
throws SQLException
DB_AccessAPI
resetPasswordByEmail in interface DB_AccessAPISQLExceptionpublic static void main(String[] args)
public void destroy()
throws SQLException
destroy in interface DB_AccessAPISQLException
public void destroy(int millis)
throws SQLException
destroy in interface DB_AccessAPISQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||