org.apache.cayenne.merge
Class AddRelationshipToModel

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

public class AddRelationshipToModel
extends AbstractToModelToken


Constructor Summary
AddRelationshipToModel(DbEntity entity, DbRelationship rel)
           
 
Method Summary
 MergerToken createReverse(MergerFactory factory)
          Create a token with the reverse direction.
 void execute(MergerContext mergerContext)
           
 DbEntity getEntity()
           
 DbRelationship getRelationship()
           
 String getTokenName()
           
 String getTokenValue()
           
 
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

AddRelationshipToModel

public AddRelationshipToModel(DbEntity entity,
                              DbRelationship rel)
Method Detail

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.


execute

public void execute(MergerContext mergerContext)

getTokenName

public String getTokenName()

getTokenValue

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

getRelationship

public DbRelationship getRelationship()

getEntity

public DbEntity getEntity()


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