|
||||||||||
| 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.Insert
public final class Insert
Class to generate SQL Insert query statements.
Note: Be aware that the SQL statement will be invalid without any assignment.
| Constructor Summary | |
|---|---|
Insert(String name)
Construct a SQL insert statement that inserts into the table. |
|
| 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. |
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 Insert(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 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 | |||||||||