All Packages Class Hierarchy This Package Previous Next Index
Class JProjects.eab.data.DASQLGenerator
java.lang.Object
|
+----JProjects.eab.data.DASQLGenerator
- public class DASQLGenerator
- extends Object
- implements Serializable
Generates SQL for Manager classes.
- Author:
- Alexander Jaremenko < jarem@isb.gomel.by >
-
DASQLGenerator(String, String[], String[], String[])
- Public constructor.
-
genDelete(String)
- Generates parametrized SQL delete statement for table.
-
genInsert(String)
- Generates parametrized SQL insert statement for table.
-
genUpdate(String, boolean[])
- Generates parametrized SQL update statement for table.
-
genUpdateDataId(String, boolean[])
- Generates parametrized SQL update statement for table's primary key.
-
genUpdateDataIdFetched(String, boolean[])
- Generates parametrized update statement for positioned update.
-
genUpdateFetched(String, boolean[], boolean[])
- Generates parametrized update statement for positioned update.
DASQLGenerator
public DASQLGenerator(String tbl,
String pkCols[],
String cols[],
String mPk[])
- Public constructor.
- Parameters:
- tbl - table's name
- pkCols - column's names for columns that constitute primary key
- cols - other column's names of the table. May be null.
- mPk - primary key column's names that can be modified. May be null.
genUpdate
public String genUpdate(String tblQual,
boolean modified[])
- Generates parametrized SQL update statement for table. Assumes that at
least one element of modified array is true.
- Parameters:
- tblQual - qualifier of the table
- modified - array of columns modification indicators. Sequance must
correspond those that in constructor's cols arguments.
genInsert
public String genInsert(String tblQual)
- Generates parametrized SQL insert statement for table.
- Parameters:
- tblQual - qualifier of the table.
- Returns:
- - generated SQL statement.
genDelete
public String genDelete(String tblQual)
- Generates parametrized SQL delete statement for table.
- Parameters:
- tblQual - qualifier of the table.
- Returns:
- - generated SQL statement.
genUpdateDataId
public String genUpdateDataId(String tblQual,
boolean modified[])
- Generates parametrized SQL update statement for table's primary key.
Assumes that at least one element of modified array is true.
- Parameters:
- tblQual - qualifier of the table
- modified - array of columns modification indicators. Sequance must
correspond those that in constructor's cols arguments.
genUpdateFetched
public String genUpdateFetched(String tblQual,
boolean idModified[],
boolean modified[])
- Generates parametrized update statement for positioned update.
- Parameters:
- tblQual - qualifier of the table
- idModified - array of columns modification indicators. Sequance must
correspond those that in constructor's mPk argument.
- modified - array of columns modification indicators. Sequance must
correspond those that in constructor's cols argument.
genUpdateDataIdFetched
public String genUpdateDataIdFetched(String tblQual,
boolean idModified[])
- Generates parametrized update statement for positioned update.
- Parameters:
- tblQual - qualifier of the table
- idModified - array of columns modification indicators. Sequance must
correspond those that in constructor's mPk argument.
All Packages Class Hierarchy This Package Previous Next Index