net.java.ao.schema.ddl.DDLActions 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.
The newest version!
package net.java.ao.schema.ddl;
import static net.java.ao.schema.ddl.DDLActionType.ALTER_ADD_KEY;
import static net.java.ao.schema.ddl.DDLActionType.INSERT;
/**
* A utility class to manipulate {@link net.java.ao.schema.ddl.DDLAction DDL Actions}.
* Do not instantiate.
*/
public final class DDLActions {
private DDLActions() {
}
public static DDLAction newAlterAddKey(DDLForeignKey key) {
final DDLAction action = newAction(ALTER_ADD_KEY);
action.setKey(key);
return action;
}
public static DDLAction newInsert(DDLTable table, DDLValue[] values) {
final DDLAction action = newAction(INSERT);
action.setTable(table);
action.setValues(values);
return action;
}
private static DDLAction newAction(DDLActionType actionType) {
return new DDLAction(actionType);
}
}