|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--com.objectwave.persist.sqlConstruction.SQLObject
|
+--com.objectwave.persist.sqlConstruction.SQLModifier
Common behavior necessary for both inserts and updates to through JDBC.
com.objectwave.persist.RDBBroker| Field Summary | |
protected java.lang.String[] |
columnList
|
protected int[] |
sqlTypes
|
protected int |
valueCount
|
protected java.lang.Object[] |
valueList
|
| Fields inherited from class com.objectwave.persist.sqlConstruction.SQLObject |
availableForPool, table |
| Constructor Summary | |
SQLModifier()
|
|
| Method Summary | |
void |
addColumnList(java.lang.String[] columns)
Deprecated. |
void |
addColumnValue(java.lang.String columnName,
java.lang.Object value)
|
void |
addValueList(java.lang.Object[] values)
Deprecated. |
protected void |
bindValue(java.sql.PreparedStatement stmt,
int index,
java.lang.Object value,
int sqlType,
boolean verbose)
Bind the data to the PreparedStatement at the specified index. |
void |
bindValues(java.sql.PreparedStatement prepStmt,
java.lang.Class persistenceClass,
boolean verbose)
Bind data to a prepared statement. |
void |
clean()
We pool these objects for reuse. |
void |
copyValuesFrom(SQLModifier sql)
Used by prepared statements to copy the values from on SQLModifier to another. |
RDBBroker |
getBroker()
|
java.lang.String[] |
getColumnList()
|
abstract java.lang.String |
getPreparedString()
|
abstract java.lang.StringBuffer |
getSqlStatement()
Gets the SqlStatement attribute of the SQLModifier object |
java.lang.Object[] |
getValueList()
|
protected void |
growLists(int length)
|
void |
setBroker(RDBBroker newValue)
|
void |
setValues(java.lang.Object[] valueList)
Modify the valueList to use the new column/value mapping. |
| Methods inherited from class com.objectwave.persist.sqlConstruction.SQLObject |
formatValue, getDefaultFormatter, getObjectFormatter, insertWhereClause, isAvailableForPool, setAvailableForPool, setObjectFormatter, setTableName |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
protected java.lang.String[] columnList
protected java.lang.Object[] valueList
protected int valueCount
protected int[] sqlTypes
| Constructor Detail |
public SQLModifier()
| Method Detail |
public void setBroker(RDBBroker newValue)
newValue - com.objectwave.persist.RDBBrokerpublic void setValues(java.lang.Object[] valueList)
valueList - java.lang.Object[]public RDBBroker getBroker()
public java.lang.String[] getColumnList()
public abstract java.lang.String getPreparedString()
public abstract java.lang.StringBuffer getSqlStatement()
getSqlStatement in interface SQLAssemblerpublic java.lang.Object[] getValueList()
public void clean()
clean in class SQLObject
public void addColumnValue(java.lang.String columnName,
java.lang.Object value)
columnName - The feature to be added to the ColumnValue attributevalue - The feature to be added to the ColumnValue attributeprotected void growLists(int length)
length - public void addColumnList(java.lang.String[] columns)
columns - The feature to be added to the ColumnList attributepublic void addValueList(java.lang.Object[] values)
values - The feature to be added to the ValueList attribute
protected void bindValue(java.sql.PreparedStatement stmt,
int index,
java.lang.Object value,
int sqlType,
boolean verbose)
throws java.sql.SQLException
stmt - java.sql.PreparedStatement The statement that is being reused.index - int The index of the value in the prepared statement.value - java.lang.Object The object to store in the database.sqlType - int The known database column type to which the data is being stored.verbose -
java.sql.SQLException
public void bindValues(java.sql.PreparedStatement prepStmt,
java.lang.Class persistenceClass,
boolean verbose)
throws java.sql.SQLException,
QueryException
persistenceClass - The persistent class we are updating. Used for a query to determine sql types.verbose - boolean Should we be verbose about this effort?prepStmt -
java.sql.SQLException - An unexcepted database exception.
QueryException - An exception generated by JGrinder.public void copyValuesFrom(SQLModifier sql)
sql - The source SQLModifier from which to take values.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||