public class PrepQueryWithRef extends PrepareQuery
BG, BGE, DATE, EQ, equalityStr, errorString, INTEGER, isLocale, LK, NEQ, NUMBER, queryStr, queryString, SM, SME, STRING
Constructor and Description |
---|
PrepQueryWithRef()
The constructor set locale boolean by super usage.
|
Modifier and Type | Method and Description |
---|---|
java.lang.String[] |
setInsert(java.lang.String tableName,
java.lang.String[] fieldNames,
java.lang.String[] formData,
int[] fieldTypes,
int[] refFieldMatchs,
java.lang.String[] refData,
DateFormatter dateFormatter)
Creates a sql insert sentence and returns it.
|
void |
setKeyField(java.lang.String keyField)
If you want key field name different from id, you can set it.
|
void |
setKeyFields(java.lang.String[] keyFields)
If you want key field names different each other, you can set them.
|
java.lang.String[] |
setRefSelect(int[] fieldTypes,
java.lang.String[] formData,
java.lang.String[] refTableNames,
java.lang.String[] refFieldNames,
int[] refFieldMatchs)
Creates and returns the database query statement for the reference table.
|
java.lang.String[] |
setUpdate(java.lang.String tableName,
java.lang.String[] fieldNames,
java.lang.String[] formData,
int[] fieldTypes,
int[] refFieldMatchs,
java.lang.String[] refData,
DateFormatter dateFormatter)
Creates and returns a database update statement.
|
convert2EQLs, getEqualityStr, getErrorString, getQueryStr, setDelete, setEqualityStr, setInsert, setSelect, setUpdate
public PrepQueryWithRef()
isLocale
- If it is locale set true, else set false.public java.lang.String[] setRefSelect(int[] fieldTypes, java.lang.String[] formData, java.lang.String[] refTableNames, java.lang.String[] refFieldNames, int[] refFieldMatchs)
fieldTypes
- The data types of the fields of the table to access.formData
- An array of data from the form to be used in the SQL statement.refTableNames
- The desired reference table name to be accessed.refFieldNames
- The string of names of the fields of reference tables to be accessed.refFieldMatchs
- Sequence of the reference fields to be accessed.public java.lang.String[] setInsert(java.lang.String tableName, java.lang.String[] fieldNames, java.lang.String[] formData, int[] fieldTypes, int[] refFieldMatchs, java.lang.String[] refData, DateFormatter dateFormatter)
tableName
- The table name to be accessed.fieldNames
- Names of fields of the table to access.formData
- An array of data from the HTML form to be used in the SQL statement.fieldTypes
- The data types of the fields of the table to access.refFieldMatchs
- Sequence of the reference fields to be accessed.refData
- A set of reference data from the reference table to be used in the SQL statement.dateFormatter
- The DateFormatter instance to format dates.public java.lang.String[] setUpdate(java.lang.String tableName, java.lang.String[] fieldNames, java.lang.String[] formData, int[] fieldTypes, int[] refFieldMatchs, java.lang.String[] refData, DateFormatter dateFormatter)
tableName
- The table name to be accessed.fieldNames
- Names of fields of the table to access.formData
- An array of data from the HTML form to be used in the SQL statement.fieldTypes
- The data types of the fields of the table to access.refFieldMatchs
- Sequence of the reference fields to be accessed.refData
- A set of reference data from the reference table to be used in the SQL statement.dateFormatter
- The DateFormatter instance to format dates.public void setKeyField(java.lang.String keyField)
keyField
- public void setKeyFields(java.lang.String[] keyFields)
keyFields
-