class JpaEntityVisitor extends NestedVisitor {
JpaEntityVisitor() {
BaseTreeVisitor listenersVisitor = new BaseTreeVisitor();
listenersVisitor.addChildVisitor(
JpaEntityListener.class,
new JpaEntityListenerVisitor());
BaseTreeVisitor attributeVisitor = new BaseTreeVisitor();
attributeVisitor.addChildVisitor(
JpaManyToOne.class,
new JpaManyToOneVisitor());
attributeVisitor.addChildVisitor(JpaOneToOne.class, new JpaOneToOneVisitor());
attributeVisitor.addChildVisitor(
JpaOneToMany.class,
new JpaOneToManyVisitor());
attributeVisitor.addChildVisitor(
JpaManyToMany.class,
new JpaManyToManyVisitor());
JpaBasicVisitor basicVisitor = new JpaBasicVisitor();
basicVisitor.addChildVisitor(JpaColumn.class, new JpaColumnVisitor());
attributeVisitor.addChildVisitor(JpaBasic.class, basicVisitor);
JpaEmbeddedVisitor embeddedVisitor = new JpaEmbeddedVisitor();
attributeVisitor.addChildVisitor(JpaEmbedded.class, embeddedVisitor);
JpaVersionVisitor versionVisitor = new JpaVersionVisitor();
versionVisitor.addChildVisitor(JpaColumn.class, new JpaColumnVisitor());
attributeVisitor.addChildVisitor(JpaVersion.class, versionVisitor);
JpaIdVisitor idVisitor = new JpaIdVisitor();
idVisitor.addChildVisitor(JpaColumn.class, new JpaIdColumnVisitor());
attributeVisitor.addChildVisitor(JpaId.class, idVisitor);
// TODO: andrus 8/6/2006 - handle EmbeddedId, AttributeOverride
addChildVisitor(JpaAttributes.class, attributeVisitor);
addChildVisitor(JpaTable.class, new JpaTableVisitor());