net.java.ao.schema.ddl
Class DDLAction
java.lang.Object
net.java.ao.schema.ddl.DDLAction
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.
- Author:
- Daniel Spiewak
DDLAction
public DDLAction(DDLActionType actionType)
getTable
public DDLTable getTable()
setTable
public void setTable(DDLTable table)
getField
public DDLField getField()
setField
public void setField(DDLField field)
getKey
public DDLForeignKey getKey()
setKey
public void setKey(DDLForeignKey key)
getActionType
public DDLActionType getActionType()
getOldField
public DDLField getOldField()
setOldField
public void setOldField(DDLField oldField)
getIndex
public DDLIndex getIndex()
setIndex
public void setIndex(DDLIndex index)
getValues
public DDLValue[] getValues()
setValues
public void setValues(DDLValue[] values)
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
equals
public boolean equals(Object obj)
- Overrides:
equals
in class Object
Copyright © 2007-2011. All Rights Reserved.