|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.castor.cpa.persistence.sql.query.QueryObject
org.castor.cpa.persistence.sql.query.Update
public final class Update
Class to generate SQL update query statements.
Note: Be aware that the SQL statement will be invalid without any assignment
of for empty compound conditions.
| Constructor Summary | |
|---|---|
Update(String name)
Construct a SQL update statement that updates records of the table provided. |
|
| Method Summary | |
|---|---|
void |
addAssignment(Assignment assignment)
Appends given assignment to the list of Assignment objects. |
void |
addAssignment(Column column,
Expression value)
Appends an assignment of the given value to the given column. |
Condition |
getCondition()
Get condition that specifies which records to update. |
void |
setCondition(Condition condition)
Set condition that specifies which records to update. |
void |
toString(QueryContext ctx)
Append a string representation of the object to the given QueryContext. |
| Methods inherited from class org.castor.cpa.persistence.sql.query.QueryObject |
|---|
toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Update(String name)
name - Name of the table in update statement.| Method Detail |
|---|
public void addAssignment(Assignment assignment)
assignment - Assignment object added to the list of assignments that will
be appended to SET clause of sql statement.
public void addAssignment(Column column,
Expression value)
column - Column to assign the value to.value - Expression to be assigned to the column.public Condition getCondition()
public void setCondition(Condition condition)
condition - Condition that specifies which records to update.public void toString(QueryContext ctx)
QueryObject
toString in class QueryObjectctx - QueryContext to append the string representation of the object to.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||