org.apache.cayenne.merge
Class AddColumnToDb

java.lang.Object
  extended by org.apache.cayenne.merge.AbstractToDbToken
      extended by org.apache.cayenne.merge.AddColumnToDb
All Implemented Interfaces:
Comparable<MergerToken>, MergerToken

public class AddColumnToDb
extends AbstractToDbToken


Constructor Summary
AddColumnToDb(DbEntity entity, DbAttribute column)
           
 
Method Summary
protected  void appendPrefix(StringBuffer sqlBuffer, QuotingStrategy context)
          append the part of the token before the actual column data type
 int compareTo(MergerToken o)
           
 MergerToken createReverse(MergerFactory factory)
          Create a token with the reverse direction.
 List<String> createSql(DbAdapter adapter)
           
 DbAttribute getColumn()
           
 DbEntity getEntity()
           
protected  QuotingStrategy getQuotingStrategy(DbAdapter adapter)
           
 String getTokenName()
           
 String getTokenValue()
           
 
Methods inherited from class org.apache.cayenne.merge.AbstractToDbToken
execute, executeSql, getDirection, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AddColumnToDb

public AddColumnToDb(DbEntity entity,
                     DbAttribute column)
Method Detail

appendPrefix

protected void appendPrefix(StringBuffer sqlBuffer,
                            QuotingStrategy context)
append the part of the token before the actual column data type


createSql

public List<String> createSql(DbAdapter adapter)
Specified by:
createSql in class AbstractToDbToken

getTokenName

public String getTokenName()

createReverse

public MergerToken createReverse(MergerFactory factory)
Description copied from interface: MergerToken
Create a token with the reverse direction. AddColumn in one direction becomes DropColumn in the other direction.

Not all tokens are reversible.


getColumn

public DbAttribute getColumn()

getTokenValue

public String getTokenValue()
Specified by:
getTokenValue in interface MergerToken

getEntity

public DbEntity getEntity()

getQuotingStrategy

protected QuotingStrategy getQuotingStrategy(DbAdapter adapter)

compareTo

public int compareTo(MergerToken o)


Copyright © 2001-2011 Apache Cayenne. All Rights Reserved.