org.javagen.revgen.visitor
Class PostProcessVisitor

java.lang.Object
  extended by org.javagen.agile.core.visitor.DefaultVisitor
      extended by org.javagen.revgen.visitor.PostProcessVisitor
All Implemented Interfaces:
org.javagen.agile.core.Generator, org.javagen.agile.core.visitor.Visit, org.javagen.agile.core.visitor.Visitor

public class PostProcessVisitor
extends org.javagen.agile.core.visitor.DefaultVisitor

Post-process DB-to-Java model before templates are generated, making sure model is consistant. Doing this in a seperate pass, allows changes to be made to the model by intermediate processes (ie customized metadata).

Author:
Richard Easterling

Field Summary
 
Fields inherited from class org.javagen.agile.core.visitor.DefaultVisitor
itinerary
 
Constructor Summary
PostProcessVisitor()
           
 
Method Summary
protected  void referenceOwningSide(org.javagen.agile.oo.model.Reference reference)
          Determines the owning side of a relationship as follows: if unidirectional then it IS the owning side if is the foreign key holding side then it IS the owning side if it is a ManyToMany and owningSide=true set in context then it IS the owning side if it is a ManyToMany then sort parent tables by name to determine owning side
 void visit(org.javagen.agile.core.model.Model model)
           
protected  void warn(String msg)
           
 
Methods inherited from class org.javagen.agile.core.visitor.DefaultVisitor
gen, getItinerary, itinerary, setItinerary
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PostProcessVisitor

public PostProcessVisitor()
Method Detail

visit

public void visit(org.javagen.agile.core.model.Model model)
Specified by:
visit in interface org.javagen.agile.core.visitor.Visit
Specified by:
visit in interface org.javagen.agile.core.visitor.Visitor
Overrides:
visit in class org.javagen.agile.core.visitor.DefaultVisitor

referenceOwningSide

protected void referenceOwningSide(org.javagen.agile.oo.model.Reference reference)
Determines the owning side of a relationship as follows:
  1. if unidirectional then it IS the owning side
  2. if is the foreign key holding side then it IS the owning side
  3. if it is a ManyToMany and owningSide=true set in context then it IS the owning side
  4. if it is a ManyToMany then sort parent tables by name to determine owning side

Parameters:
reference -

warn

protected void warn(String msg)


Copyright 2006-2006-2007 Outsource Cafe Inc.. All Rights Reserved.