Class Insert
java.lang.Object
org.castor.cpa.persistence.sql.query.Insert
- All Implemented Interfaces:
QueryObject
Class to generate SQL Insert query statements.
Note: Be aware that the SQL statement will be invalid without any assignment.
Note: Be aware that the SQL statement will be invalid without any assignment.
- Version:
- $Revision$ $Date: 2009-07-13 17:22:43 (Tue, 28 Jul 2009) $
- Author:
- Ahmad Hassan, Ralf Joachim
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
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.Getter returning list of assignments currently set.Getter returning Qualifier currently set.toString()
Method constructing query string.
-
Constructor Details
-
Insert
Construct a SQL insert statement that inserts into the table.- Parameters:
name
- Name of the table in update statement.
-
-
Method Details
-
getQualifier
Getter returning Qualifier currently set.- Returns:
- Qualifier currently set.
-
getAssignment
Getter returning list of assignments currently set.- Returns:
- List of assignments currently set.
-
addAssignment
Appends given assignment to the list of Assignment objects.- Parameters:
assignment
- Assignment object added to the list of assignments that will be appended to SET clause of sql statement.
-
addAssignment
Appends an assignment of the given value to the given column.- Parameters:
column
- Column to assign the value to.value
- Expression to be assigned to the column.
-
accept
Accept method to handle incoming visitors.- Specified by:
accept
in interfaceQueryObject
- Parameters:
visitor
- Visitor to be handled.
-
toString
Method constructing query string.
-