Examples of BaseTreeVisitor


Examples of org.apache.cayenne.util.BaseTreeVisitor

    }

    abstract class AbstractEntityVisitor extends BaseTreeVisitor {

        AbstractEntityVisitor() {
            BaseTreeVisitor attributeVisitor = new BaseTreeVisitor();
            attributeVisitor.addChildVisitor(JpaId.class, new IdVisitor());
            attributeVisitor.addChildVisitor(JpaBasic.class, new BasicVisitor());
            attributeVisitor.addChildVisitor(JpaVersion.class, new VersionVisitor());
            attributeVisitor.addChildVisitor(JpaManyToOne.class, new FKVisitor());
            attributeVisitor.addChildVisitor(JpaOneToOne.class, new FKVisitor());
            attributeVisitor.addChildVisitor(
                    JpaManyToMany.class,
                    new RelationshipVisitor());
            attributeVisitor.addChildVisitor(
                    JpaOneToMany.class,
                    new RelationshipVisitor());

            addChildVisitor(JpaAttributes.class, attributeVisitor);
            addChildVisitor(JpaId.class, new IdVisitor());
View Full Code Here

Examples of org.apache.cayenne.util.BaseTreeVisitor

    /**
     * Creates a stateless instance of the JpaEntityMap traversal visitor. This method is
     * lazily invoked and cached by this object.
     */
    protected HierarchicalTreeVisitor createVisitor() {
        BaseTreeVisitor listenersVisitor = new BaseTreeVisitor();
        listenersVisitor.addChildVisitor(
                JpaEntityListener.class,
                new JpaDefaultEntityListenerVisitor());

        BaseTreeVisitor defaultsVisitor = new BaseTreeVisitor();
        defaultsVisitor.addChildVisitor(JpaEntityListeners.class, listenersVisitor);
        BaseTreeVisitor metadataVisitor = new BaseTreeVisitor();
        metadataVisitor
                .addChildVisitor(JpaPersistenceUnitDefaults.class, defaultsVisitor);

        BaseTreeVisitor visitor = new BaseTreeVisitor();
        visitor.addChildVisitor(JpaEntity.class, new JpaEntityVisitor());
        visitor.addChildVisitor(JpaNamedQuery.class, new JpaNamedQueryVisitor());
        visitor.addChildVisitor(JpaPersistenceUnitMetadata.class, metadataVisitor);
        return visitor;
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.