org.apache.cayenne.merge
Class CreateTableToModel

java.lang.Object
  extended by org.apache.cayenne.merge.AbstractToModelToken
      extended by org.apache.cayenne.merge.CreateTableToModel
All Implemented Interfaces:
MergerToken

public class CreateTableToModel
extends AbstractToModelToken

A MergerToken to add a DbEntity to a DataMap


Constructor Summary
CreateTableToModel(DbEntity entity)
           
 
Method Summary
 MergerToken createReverse(MergerFactory factory)
          Create a token with the reverse direction.
 void execute(MergerContext mergerContext)
           
 DbEntity getEntity()
           
 String getTokenName()
           
 String getTokenValue()
           
 void setObjEntityClassName(String n)
          Set the ObjEntity className if ObjEntity should be generated with a special class name.
 
Methods inherited from class org.apache.cayenne.merge.AbstractToModelToken
getDirection, objEntitiesMappedToDbEntity, remove, remove, synchronizeWithObjEntity, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CreateTableToModel

public CreateTableToModel(DbEntity entity)
Method Detail

setObjEntityClassName

public void setObjEntityClassName(String n)
Set the ObjEntity className if ObjEntity should be generated with a special class name. Set to null if the ObjEntity should be created with a name based on DataMap.getDefaultPackage() and Entity.getName()

The default value is null


execute

public void execute(MergerContext mergerContext)

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.


getEntity

public DbEntity getEntity()

getTokenValue

public String getTokenValue()


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