net.java.ao.schema.ddl
Class DDLAction

java.lang.Object
  extended by 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

Constructor Summary
DDLAction(DDLActionType actionType)
           
 
Method Summary
 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)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DDLAction

public DDLAction(DDLActionType actionType)
Method Detail

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.