public final class Update extends Object implements QueryObject
Constructor and Description |
---|
Update(String name)
Construct a SQL update statement that updates records of the table
provided.
|
Modifier and Type | Method and Description |
---|---|
void |
accept(Visitor visitor)
Accept method to handle incoming visitors.
|
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.
|
List<Assignment> |
getAssignment()
Get method returning current list of assignments.
|
Condition |
getCondition()
Get condition that specifies which records to update.
|
Qualifier |
getQualifier()
Get method returning qualifier currently set.
|
void |
setCondition(Condition condition)
Set condition that specifies which records to update.
|
String |
toString()
Method constructing query string.
|
public Update(String name)
name
- Name of the table in update statement.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 Qualifier getQualifier()
public List<Assignment> getAssignment()
public void accept(Visitor visitor)
accept
in interface QueryObject
visitor
- Visitor to be handled.Copyright © 2018. All rights reserved.