net.java.ao.schema.ddl.DDLActionBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of activeobjects Show documentation
Show all versions of activeobjects Show documentation
This is the full Active Objects library, if you don't know which one to use, you probably want this one.
package net.java.ao.schema.ddl;
public class DDLActionBuilder {
private DDLActionType actionType;
private DDLTable table;
private DDLField oldField;
private DDLField field;
private DDLForeignKey key;
private DDLIndex index;
private DDLValue[] values;
public DDLActionBuilder(DDLActionType actionType) {
this.actionType = actionType;
}
public DDLActionBuilder setTable(DDLTable table) {
this.table = table;
return this;
}
public DDLActionBuilder setOldField(DDLField oldField) {
this.oldField = oldField;
return this;
}
public DDLActionBuilder setField(DDLField field) {
this.field = field;
return this;
}
public DDLActionBuilder setKey(DDLForeignKey key) {
this.key = key;
return this;
}
public DDLActionBuilder setIndex(DDLIndex index) {
this.index = index;
return this;
}
public DDLActionBuilder setValues(DDLValue[] values) {
this.values = values;
return this;
}
public DDLAction build() {
return new DDLAction(actionType, table, oldField, field, key, index, values);
}
}