All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.java.ao.schema.ddl.DDLActions Maven / Gradle / Ivy

Go to download

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);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy