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-core Show documentation
Show all versions of activeobjects-core Show documentation
This is the core library for Active Objects. It is generic and can be embedded in any environment.
As such it is generic and won't contain all connection pooling, etc.
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);
}
}