Examples of JpaSecondaryTable


Examples of org.apache.cayenne.jpa.map.JpaSecondaryTable

                JpaEntity entity,
                AnnotatedElement element,
                AnnotationProcessorStack context) {

            SecondaryTable annotation = element.getAnnotation(SecondaryTable.class);
            entity.getSecondaryTables().add(new JpaSecondaryTable(annotation));
        }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaSecondaryTable

                AnnotationProcessorStack context) {

            SecondaryTables annotation = element.getAnnotation(SecondaryTables.class);
            for (int i = 0; i < annotation.value().length; i++) {
                entity.getSecondaryTables().add(
                        new JpaSecondaryTable(annotation.value()[i]));
            }
        }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaSecondaryTable

    class JpaSecondaryTableVisitor extends NestedVisitor {

        @Override
        Object createObject(ProjectPath path) {

            JpaSecondaryTable jpaTable = (JpaSecondaryTable) path.getObject();
            ObjEntity parentCayenneEntity = (ObjEntity) targetPath.getObject();

            DbEntity secondaryEntity = parentCayenneEntity.getDataMap().getDbEntity(
                    jpaTable.getName());
            if (secondaryEntity == null) {
                secondaryEntity = new DbEntity(jpaTable.getName());
                parentCayenneEntity.getDataMap().addDbEntity(secondaryEntity);
            }

            secondaryEntity.setCatalog(jpaTable.getCatalog());
            secondaryEntity.setSchema(jpaTable.getSchema());

            // defer primary./secondary relationship creation till after parent entity's
            // children are fully parsed...

            return secondaryEntity;
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaSecondaryTable

                if (column.getTable().equals(entity.lookupTable().getName())) {
                    return column.getName();
                }

                JpaSecondaryTable table = entity.getSecondaryTable(column.getTable());
                if (table == null) {
                    recordConflict(path, "Unrecognized secondary table: '"
                            + column.getTable()
                            + "'");
                    return column.getName();
                }

                return getSecondaryTableDbRelationshipName(table.getName())
                        + '.'
                        + column.getName();
            }
            else {
                // TODO: andrus, 12/23/2007 this would miss a case if a user decides to
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaSecondaryTable

                if (column.getTable().equals(entity.lookupTable().getName())) {
                    return column.getName();
                }

                JpaSecondaryTable table = entity.getSecondaryTable(column.getTable());
                if (table == null) {
                    recordConflict(path, "Unrecognized secondary table: '"
                            + column.getTable()
                            + "'");
                    return column.getName();
                }

                return getSecondaryTableDbRelationshipName(table.getName())
                        + '.'
                        + column.getName();
            }
            else {
                // TODO: andrus, 12/23/2007 this would miss a case if a user decides to
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaSecondaryTable

                JpaEntity entity,
                AnnotatedElement element,
                AnnotationProcessorStack context) {

            SecondaryTable annotation = element.getAnnotation(SecondaryTable.class);
            entity.getSecondaryTables().add(new JpaSecondaryTable(annotation));
        }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaSecondaryTable

                AnnotationProcessorStack context) {

            SecondaryTables annotation = element.getAnnotation(SecondaryTables.class);
            for (int i = 0; i < annotation.value().length; i++) {
                entity.getSecondaryTables().add(
                        new JpaSecondaryTable(annotation.value()[i]));
            }
        }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaSecondaryTable

    class JpaSecondaryTableVisitor extends NestedVisitor {

        @Override
        Object createObject(ProjectPath path) {

            JpaSecondaryTable jpaTable = (JpaSecondaryTable) path.getObject();
            ObjEntity parentCayenneEntity = (ObjEntity) targetPath.getObject();

            DbEntity secondaryEntity = parentCayenneEntity.getDataMap().getDbEntity(
                    jpaTable.getName());
            if (secondaryEntity == null) {
                secondaryEntity = new DbEntity(jpaTable.getName());
                parentCayenneEntity.getDataMap().addDbEntity(secondaryEntity);
            }

            secondaryEntity.setCatalog(jpaTable.getCatalog());
            secondaryEntity.setSchema(jpaTable.getSchema());

            // defer primary./secondary relationship creation till after parent entity's
            // children are fully parsed...

            return secondaryEntity;
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaSecondaryTable

                JpaEntity entity,
                AnnotatedElement element,
                AnnotationProcessorStack context) {

            SecondaryTable annotation = element.getAnnotation(SecondaryTable.class);
            entity.getSecondaryTables().add(new JpaSecondaryTable(annotation));
        }
View Full Code Here

Examples of org.apache.cayenne.jpa.map.JpaSecondaryTable

                AnnotationProcessorStack context) {

            SecondaryTables annotation = element.getAnnotation(SecondaryTables.class);
            for (int i = 0; i < annotation.value().length; i++) {
                entity.getSecondaryTables().add(
                        new JpaSecondaryTable(annotation.value()[i]));
            }
        }
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.