public class DDLAction extends Object
Database-agnostic representation of any supported DDL action (usually one or two statements). The idea behind this class is to allow ActiveObjects to internally represent actions to be taken on a database schema without coupling to a database-specific rendering of the action.
As this class is meant to be a generic container of different
action types, some fields may not be relevant to certain action
types, and thus these fields will contain null
values. For example, the equivalent of an ALTER TABLE DROP FIELD
action will return null
for getIndex()
.
However, code should not depend on this behavior; instead testing
the action type and only retrieving relevant data.
Constructor and Description |
---|
DDLAction(DDLActionType actionType) |
Modifier and Type | Method and Description |
---|---|
static DDLActionBuilder |
builder(DDLActionType actionType) |
boolean |
equals(Object obj) |
DDLActionType |
getActionType() |
DDLField |
getField() |
DDLIndex |
getIndex() |
DDLForeignKey |
getKey() |
DDLField |
getOldField() |
DDLTable |
getTable() |
DDLValue[] |
getValues() |
int |
hashCode() |
void |
setField(DDLField field) |
void |
setIndex(DDLIndex index) |
void |
setKey(DDLForeignKey key) |
void |
setOldField(DDLField oldField) |
void |
setTable(DDLTable table) |
void |
setValues(DDLValue[] values) |
public DDLAction(DDLActionType actionType)
public static DDLActionBuilder builder(DDLActionType actionType)
public DDLTable getTable()
public void setTable(DDLTable table)
public DDLField getField()
public void setField(DDLField field)
public DDLForeignKey getKey()
public void setKey(DDLForeignKey key)
public DDLActionType getActionType()
public DDLField getOldField()
public void setOldField(DDLField oldField)
public DDLIndex getIndex()
public void setIndex(DDLIndex index)
public DDLValue[] getValues()
public void setValues(DDLValue[] values)
Copyright © 2007–2021 Atlassian. All rights reserved.