Package com.jk.data.vendors.oracle
Class JKOracleDataAccess
java.lang.Object
com.jk.data.dataaccess.core.JKDataAccessImpl
com.jk.data.vendors.oracle.JKOracleDataAccess
- All Implemented Interfaces:
 JKDataAccessService
This class provides data access functionality specific to Oracle databases.
 
 It extends the JKDataAccessImpl class.
- Version:
 - 1.0
 - Author:
 - Dr. Jalal H. Kiswani
 
- 
Field Summary
Fields inherited from class com.jk.data.dataaccess.core.JKDataAccessImpl
acceptedTimeInMillis, bufferSize, logger, maxAcceptedTimeInMillis - 
Constructor Summary
ConstructorsConstructorDescriptionJKOracleDataAccess(JKDataSource dataSource) This method constructs a newJKOracleDataAccesswith the provided data source. - 
Method Summary
Modifier and TypeMethodDescriptionstatic byte[]blobToByteArray(Blob blob) This method converts aBlobobject to a byte array.describeTable(String name) This method retrieves data about a database table and returns it as a map of column names to their corresponding data types.intgetNextSequence(String squenceName) This method retrieves the next value from a specified sequence in the database.This method retrieves the current system date and time from the database.protected booleanThis method checks if the providedSQLExceptionindicates a duplicate key violation.protected booleanisDuplicateKey(SQLException e, boolean throwException) This method checks if the providedSQLExceptionindicates a duplicate key violation.booleanisTableExists(String tableName) This method checks whether the table with the provided name exists in the database or not.Methods inherited from class com.jk.data.dataaccess.core.JKDataAccessImpl
addQueryLog, beginTransaction, call, call, close, close, close, close, close, close, closeTransaction, dropTable, execute, executeQueryAsArray, executeQueryAsCachedRowSet, executeQueryAsIdValue, executeQueryAsList, executeQueryAsString, executeQueryAsString, executeSingleOutputQuery, executeUpdate, executeUpdate, executeUpdate, find, findAndCacheRecord, findRecord, findRecord, getCaller, getConnection, getConnection, getDataSource, getGeneratedKey, getList, getList, getList, getListAndCache, getNextId, getNextId, getNextId, getNextId, getRowsCount, isInTransaction, loadSql, prepareQueryStatement, prepareQueryStatement, prepareStatement, prepareStatement, prepareStatement, printRecordResultSet, printRecordResultSet, resetCache, runScript, setParams, setSession, writeLogMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.jk.data.dataaccess.core.JKDataAccessService
callAsSingleOutput, executeQueryAsDouble, executeQueryAsInteger, executeQueryAsListOfObjects, executeQueryAsListOfObjects, executeQueryAsLong, executeQueryAsMap, executeQueryAsRow, getTenantId 
- 
Constructor Details
- 
JKOracleDataAccess
This method constructs a newJKOracleDataAccesswith the provided data source.- Parameters:
 dataSource- Specifies the data source.
 
 - 
 - 
Method Details
- 
blobToByteArray
This method converts aBlobobject to a byte array.- Parameters:
 blob- Specifies theBlobobject to convert.- Returns:
 - the byte array representation of the `Blob` data.
 - Throws:
 IOException- if an I/O exception has occurred.SQLException- if a SQL error occurs while accessing theBlob.
 - 
getNextSequence
This method retrieves the next value from a specified sequence in the database.- Parameters:
 squenceName- Specifies the name of the sequence from which to retrieve the next value.- Returns:
 - the next value from the specified sequence as an integer.
 
 - 
getSystemDate
This method retrieves the current system date and time from the database.- Specified by:
 getSystemDatein interfaceJKDataAccessService- Overrides:
 getSystemDatein classJKDataAccessImpl- Returns:
 - a 
Dateobject representing the current system date and time 
 - 
isDuplicateKey
This method checks if the providedSQLExceptionindicates a duplicate key violation.- Parameters:
 e- Specifies the exception to check.- Returns:
 - true, if the exception indicates a duplicate key violation, false otherwise.
 - Throws:
 SQLException- if the exception is not a duplicate key violation.
 - 
isDuplicateKey
This method checks if the providedSQLExceptionindicates a duplicate key violation.- Parameters:
 e- Specifies the exception to check.throwException- Indicates whether to throw the exception if it's not a duplicate key violation (true) or not (false).- Returns:
 - true, if the exception indicates a duplicate key violation, false otherwise.
 - Throws:
 SQLException- if the exception is not a duplicate key violation andthrowExceptionistrue.
 - 
isTableExists
This method checks whether the table with the provided name exists in the database or not.- Specified by:
 isTableExistsin interfaceJKDataAccessService- Overrides:
 isTableExistsin classJKDataAccessImpl- Parameters:
 tableName- Specifies the table name in the database.- Returns:
 - true, if the table exists, false otherwise.
 
 - 
describeTable
This method retrieves data about a database table and returns it as a map of column names to their corresponding data types.- Specified by:
 describeTablein interfaceJKDataAccessService- Overrides:
 describeTablein classJKDataAccessImpl- Parameters:
 name- Specifies the name of the table to describe.- Returns:
 - the map containing column names as keys and their corresponding data types as values.
 
 
 -