|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.ninja_squad.dbsetup.operation.Insert.RowBuilder
public static final class Insert.RowBuilder
A row builder, constructed with Insert.Builder.row()
. This builder
allows adding a row with named columns to an Insert:
Insert insert = Insert.into("CLIENT") .columns("CLIENT_ID", "FIRST_NAME", "LAST_NAME", "DATE_OF_BIRTH", "CLIENT_TYPE") .row().column("CLIENT_ID", 1L) .column("FIRST_NAME", "John") .column("LAST_NAME", "Doe") .column("DATE_OF_BIRTH", "1975-07-19") .column("CLIENT_TYPE", ClientType.NORMAL) .end() .row().column("CLIENT_ID", 2L) .column("FIRST_NAME", "Jack") .column("LAST_NAME", "Smith") .column("DATE_OF_BIRTH", "1969-08-22") .column("CLIENT_TYPE", ClientType.HIGH_PRIORITY) .end() .build();You may omit the call to
columns()
. In that case, the columns of the Insert will be the columns
specified in the first added row.
Method Summary | |
---|---|
Insert.RowBuilder |
column(java.lang.String name,
java.lang.Object value)
Adds a new named column to the row. |
Insert.Builder |
end()
Ends the row, adds it to the Insert Builder and returns it, for chaining. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public Insert.RowBuilder column(@Nonnull java.lang.String name, java.lang.Object value)
name
- the name of the column, which must match with a column name defined in the Insert Buildervalue
- the value of the column for the constructed row
java.lang.IllegalArgumentException
- if the given name is not the name of one of the columns to insertpublic Insert.Builder end()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |