JDBaccess API 1.0

com.jdbaccess.dao
Interface DataAccessObject

All Known Implementing Classes:
DataAccessObjectImpl

public interface DataAccessObject

Super interface of all data access object interfaces.


Method Summary
 void createSequence(java.lang.String seqName)
          Creates sequence with that sequence name
 void createTable(java.lang.String sqlCreateTableString)
          Creates table with that create table string
 java.lang.Long delete(TransferObject to)
          Deletes one database row (wit the id of the transfer object) or delete some database rows (with the whereCondition of the transfer object)
 java.lang.Long deleteAll(java.lang.String entity)
          Deletes all rows for that entity
 void dropSequence(java.lang.String seqName)
          Drops sequence with that sequence name
 void dropTable(java.lang.String tableName)
          Drops table with that table name
 Function executeFunction(java.lang.String objectType, java.lang.String name, java.lang.String moduleName, java.lang.String functionName, java.util.ArrayList params, java.lang.String outputParamType)
          Try to find the function with that object type and name over the defined data access xml files.
 Procedure executeProcedure(java.lang.String objectType, java.lang.String name, java.lang.String moduleName, java.lang.String procedureName, java.util.ArrayList params, java.util.ArrayList outputParamTypes)
          Try to find the procedure with that object type and name with user defined data access xml files.
 Result find(java.lang.String objectType, java.lang.String selectName)
          Try to do a find with that object type and select name over the defined data access xml files.
 Result find(java.lang.String objectType, java.lang.String selectName, java.lang.String sql, java.lang.String sqlCount, java.util.ArrayList params, java.util.ArrayList orderBy, java.lang.Class resultType, java.util.ArrayList resultFieldTypes, boolean readFull)
          Try to do a find with that object type and select name over the defined data access xml files.
 java.lang.Long getSequenceNextValue(java.lang.String seqName)
          Gets one next value of that sequence
 java.util.ArrayList getSequenceNextValues(java.lang.String seqName, int count)
          Gets "count" number of values for that sequence
 java.util.ArrayList insert(java.util.ArrayList tos)
          Inserts these transfer objects
 TransferObject insert(TransferObject to)
          Inserts this transfer object
 java.lang.Long update(TransferObject to)
          Updates modified values of this transfer object in one database row (over id of that transfer object) or update modified values of this transfer object in some database rows (over whereCondition of that transfer object)
 

Method Detail

createTable

void createTable(java.lang.String sqlCreateTableString)
                 throws ApplicationException
Creates table with that create table string

Parameters:
sqlCreateTableString - sql string for creating the table
Throws:
ApplicationException

dropTable

void dropTable(java.lang.String tableName)
               throws ApplicationException
Drops table with that table name

Parameters:
tableName - table name
Throws:
ApplicationException

createSequence

void createSequence(java.lang.String seqName)
                    throws ApplicationException
Creates sequence with that sequence name

Parameters:
seqName - sequence name
Throws:
ApplicationException

dropSequence

void dropSequence(java.lang.String seqName)
                  throws ApplicationException
Drops sequence with that sequence name

Parameters:
seqName - sequence name
Throws:
ApplicationException

getSequenceNextValue

java.lang.Long getSequenceNextValue(java.lang.String seqName)
                                    throws ApplicationException
Gets one next value of that sequence

Parameters:
seqName - sequence name
Returns:
next sequence as Long value
Throws:
ApplicationException

getSequenceNextValues

java.util.ArrayList getSequenceNextValues(java.lang.String seqName,
                                          int count)
                                          throws ApplicationException
Gets "count" number of values for that sequence

Parameters:
seqName - sequence name
count - number of sequences to fetch from sequence
Returns:
sequences as an ArrayList of Long values
Throws:
ApplicationException

insert

TransferObject insert(TransferObject to)
                      throws ApplicationException
Inserts this transfer object

Parameters:
to - transfer object
Returns:
new inserted transfer object (with new sequence id if transfer object is id object)
Throws:
ApplicationException

insert

java.util.ArrayList insert(java.util.ArrayList tos)
                           throws ApplicationException
Inserts these transfer objects

Parameters:
tos - transfer objects
Returns:
ArrayList of new inserted transfer objects (with new sequence id if transfer object is id object)
Throws:
ApplicationException

update

java.lang.Long update(TransferObject to)
                      throws ApplicationException
Updates modified values of this transfer object in one database row (over id of that transfer object) or update modified values of this transfer object in some database rows (over whereCondition of that transfer object)

Parameters:
to - transfer object
Returns:
count of database rows which were updated
Throws:
ApplicationException

delete

java.lang.Long delete(TransferObject to)
                      throws ApplicationException
Deletes one database row (wit the id of the transfer object) or delete some database rows (with the whereCondition of the transfer object)

Parameters:
to - transfer object
Returns:
count of database rows which were deleted
Throws:
ApplicationException

deleteAll

java.lang.Long deleteAll(java.lang.String entity)
                         throws ApplicationException
Deletes all rows for that entity

Parameters:
entity - table name
Returns:
count of database rows which were deleted
Throws:
ApplicationException

find

Result find(java.lang.String objectType,
            java.lang.String selectName)
            throws ApplicationException
Try to do a find with that object type and select name over the defined data access xml files. If the select is not found in any data access file the method throws an ApplicationException

Parameters:
objectType - object type of the select object
selectName - name of the select object
Returns:
Result of the select execution
Throws:
ApplicationException

find

Result find(java.lang.String objectType,
            java.lang.String selectName,
            java.lang.String sql,
            java.lang.String sqlCount,
            java.util.ArrayList params,
            java.util.ArrayList orderBy,
            java.lang.Class resultType,
            java.util.ArrayList resultFieldTypes,
            boolean readFull)
            throws ApplicationException
Try to do a find with that object type and select name over the defined data access xml files. If further parameters such as sql, sqlCount etc. are specified these are used.

Parameters:
objectType - object type of the select object
selectName - name of the select object
sql - sql string of the select
sqlCount - sql count string of the select
params - parameters of the select
orderBy - order by parameters of the select
resultType - result type of the select
resultFieldTypes - result field type of the select
readFull - all fields are read full if true
Returns:
Result of the select execution
Throws:
ApplicationException

executeProcedure

Procedure executeProcedure(java.lang.String objectType,
                           java.lang.String name,
                           java.lang.String moduleName,
                           java.lang.String procedureName,
                           java.util.ArrayList params,
                           java.util.ArrayList outputParamTypes)
                           throws ApplicationException
Try to find the procedure with that object type and name with user defined data access xml files. If moduleName and procedureName are specified these are used. Then it executes the procedure and returns it.

Parameters:
objectType - object type of the procedure object
name - name of the procedure object
moduleName - package name of the database procedure
procedureName - name of the database procedure
params - parameters of the procedure
outputParamTypes - output parameter types of the procedure
Returns:
procedure object which was executed
Throws:
ApplicationException

executeFunction

Function executeFunction(java.lang.String objectType,
                         java.lang.String name,
                         java.lang.String moduleName,
                         java.lang.String functionName,
                         java.util.ArrayList params,
                         java.lang.String outputParamType)
                         throws ApplicationException
Try to find the function with that object type and name over the defined data access xml files. If moduleName and functionName are specified these are used. Then it executes the function and returns it.

Parameters:
objectType - object type of the function object
name - of the function object
moduleName - package name of the database function
functionName - name of the database function
params - parameters of the function
outputParamType - output parameter type of the function
Returns:
function object which was executed
Throws:
ApplicationException

JDBaccess API 1.0

Copyright © 2005-2006 JDBaccess.com, Königsweg 210, D-14129 Berlin, Germany. All Rights Reserved.