|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.zphinx.spine.utils.PreparedData
public class PreparedData
PreparedData helps create the appropriate prepared statement to use in an sql query using a prepared statement.It contains methods which are useful for creating snippets of preparedStatement sequel
Copyright ©Zphinx Software Solutions
| Method Summary | |
|---|---|
String |
createSetClause(String[] setParams,
String joiner)
Creates a set clause for an sql prepared statement |
String |
createWhereClause(String[] whereParams,
String[] setParams,
String equalType)
Creates a where clause for an sql prepared statement |
String |
createWhereClause(String[] whereParams,
String setParam,
String equalType)
Creates a where clause for an sql prepared statement |
String |
createWhereClauseSep(String[] whereParams,
String setParam,
String equalType,
String separator)
Creates a where clause for an sql prepared statement |
String |
delete(DataPack dp)
Creates a delete prepared statement |
String |
getInsertString(String[] colNames)
Formats the insert string using the given array of column names |
static PreparedData |
getInstance()
Gets the only instance of this object |
String |
getSelectString(String[] colNames,
String concat)
Formats the select string and concatenates the tableName with each column name |
String |
getUpdateString(String[] colNames)
Formats the update string using the given column names |
protected String |
getWhereString(DataPack dataPack,
String sql)
Gets the where statement and conditions |
String |
insert(DataPack dp)
Creates an insert prepared statement |
String |
select(DataPack dp)
Creates a select prepared statement |
String |
selectDistinct(DataPack dp)
Creates a select distinct prepared statement |
String |
update(DataPack dp)
Creates an update prepared statement |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
protected String getWhereString(DataPack dataPack,
String sql)
dataPack - The DataPack object which contains the data to render as an sql stringsql - The sql string we are parsing
public String delete(DataPack dp)
dp - The DataPack object which contains the data to render as an sql string
public String update(DataPack dp)
dp - The DataPack object which contains the data to render as an sql string
public String select(DataPack dp)
dp - The DataPack object which contains the data to render as an sql string
public String selectDistinct(DataPack dp)
dp - The DataPack object which contains the data to render as an sql string
public String insert(DataPack dp)
dp - The DataPack object which contains the data to render as an sql string
public String createSetClause(String[] setParams,
String joiner)
setParams - The parameters used to create the set clausejoiner - The String to concatenate with
public String getInsertString(String[] colNames)
colNames - The array of strings representing the database fields
public String getSelectString(String[] colNames,
String concat)
colNames - The array of strings representing the database fieldsconcat - The name of the table to concatenate to the column name
public String getUpdateString(String[] colNames)
colNames - The array of strings representing the database fields
public String createWhereClause(String[] whereParams,
String[] setParams,
String equalType)
whereParams - The logical where clause to setsetParams - The equivalence of the where clause
public String createWhereClause(String[] whereParams,
String setParam,
String equalType)
whereParams - The logical where clause to setsetParam - The equivalence of the where clause
public String createWhereClauseSep(String[] whereParams,
String setParam,
String equalType,
String separator)
whereParams - The array of where clausessetParam - The parameter used to equate the where clause valueequalType - The type of equality sign used to create the where clauseseparator - The type of seperator in use
public static PreparedData getInstance()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||