Examples of JpaPrimaryKeyJoinColumn


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

            PrimaryKeyJoinColumn annotation = element
                    .getAnnotation(PrimaryKeyJoinColumn.class);
            entity
                    .getPrimaryKeyJoinColumns()
                    .add(new JpaPrimaryKeyJoinColumn(annotation));
        }
View Full Code Here

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

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

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

            for (JpaSecondaryTable table : entity.getSecondaryTables()) {

                if (table.getPrimaryKeyJoinColumns().isEmpty()) {

                    for (JpaId id : entity.getAttributes().getIds()) {
                        JpaPrimaryKeyJoinColumn joinColumn = new JpaPrimaryKeyJoinColumn();
                        joinColumn.setName(id.getColumn().getName());
                        joinColumn.setReferencedColumnName(joinColumn.getName());
                        table.getPrimaryKeyJoinColumns().add(joinColumn);
                    }
                }
                else {
                    for (JpaPrimaryKeyJoinColumn joinColumn : table
                            .getPrimaryKeyJoinColumns()) {

                        if (joinColumn.getReferencedColumnName() == null) {
                            if (entity.getAttributes().getIds().size() == 1) {
                                JpaId id = entity
                                        .getAttributes()
                                        .getIds()
                                        .iterator()
                                        .next();
                                joinColumn.setReferencedColumnName(id
                                        .getColumn()
                                        .getName());
                            }
                        }
                    }
View Full Code Here

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

            PrimaryKeyJoinColumn annotation = element
                    .getAnnotation(PrimaryKeyJoinColumn.class);
            entity
                    .getPrimaryKeyJoinColumns()
                    .add(new JpaPrimaryKeyJoinColumn(annotation));
        }
View Full Code Here

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

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

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

            for (JpaSecondaryTable table : entity.getSecondaryTables()) {

                if (table.getPrimaryKeyJoinColumns().isEmpty()) {

                    for (JpaId id : entity.getAttributes().getIds()) {
                        JpaPrimaryKeyJoinColumn joinColumn = new JpaPrimaryKeyJoinColumn();
                        joinColumn.setName(id.getColumn().getName());
                        joinColumn.setReferencedColumnName(joinColumn.getName());
                        table.getPrimaryKeyJoinColumns().add(joinColumn);
                    }
                }
                else {
                    for (JpaPrimaryKeyJoinColumn joinColumn : table
                            .getPrimaryKeyJoinColumns()) {

                        if (joinColumn.getReferencedColumnName() == null) {
                            if (entity.getAttributes().getIds().size() == 1) {
                                JpaId id = entity
                                        .getAttributes()
                                        .getIds()
                                        .iterator()
                                        .next();
                                joinColumn.setReferencedColumnName(id
                                        .getColumn()
                                        .getName());
                            }
                        }
                    }
View Full Code Here

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

            PrimaryKeyJoinColumn annotation = element
                    .getAnnotation(PrimaryKeyJoinColumn.class);
            entity
                    .getPrimaryKeyJoinColumns()
                    .add(new JpaPrimaryKeyJoinColumn(annotation));
        }
View Full Code Here

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

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

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

            PrimaryKeyJoinColumn annotation = element
                    .getAnnotation(PrimaryKeyJoinColumn.class);
            entity
                    .getPrimaryKeyJoinColumns()
                    .add(new JpaPrimaryKeyJoinColumn(annotation));
        }
View Full Code Here

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

            PrimaryKeyJoinColumns annotation = element
                    .getAnnotation(PrimaryKeyJoinColumns.class);
            for (int i = 0; i < annotation.value().length; i++) {
                entity.getPrimaryKeyJoinColumns().add(
                        new JpaPrimaryKeyJoinColumn(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.