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 >

Constructor Index

 o DASQLGenerator(String, String[], String[], String[])
Public constructor.

Method Index

 o genDelete(String)
Generates parametrized SQL delete statement for table.
 o genInsert(String)
Generates parametrized SQL insert statement for table.
 o genUpdate(String, boolean[])
Generates parametrized SQL update statement for table.
 o genUpdateDataId(String, boolean[])
Generates parametrized SQL update statement for table's primary key.
 o genUpdateDataIdFetched(String, boolean[])
Generates parametrized update statement for positioned update.
 o genUpdateFetched(String, boolean[], boolean[])
Generates parametrized update statement for positioned update.

Constructors

 o 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.

Methods

 o 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.
 o genInsert
 public String genInsert(String tblQual)
Generates parametrized SQL insert statement for table.

Parameters:
tblQual - qualifier of the table.
Returns:
- generated SQL statement.
 o genDelete
 public String genDelete(String tblQual)
Generates parametrized SQL delete statement for table.

Parameters:
tblQual - qualifier of the table.
Returns:
- generated SQL statement.
 o 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.
 o 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.
 o 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