Examples of PrimaryKeyJoinColumnMetadata


Examples of org.eclipse.persistence.internal.jpa.metadata.columns.PrimaryKeyJoinColumnMetadata

       
        // Set the primary key join columns if some are present.
        // Process all the primary key join columns first.
        if (isAnnotationPresent(JPA_PRIMARY_KEY_JOIN_COLUMNS)) {
            for (Object primaryKeyJoinColumn : (Object[]) getAnnotation(JPA_PRIMARY_KEY_JOIN_COLUMNS).getAttributeArray("value")) {
                m_primaryKeyJoinColumns.add(new PrimaryKeyJoinColumnMetadata((MetadataAnnotation) primaryKeyJoinColumn, this));
            }
        }
       
        // Process the single primary key join column second.
        if (isAnnotationPresent(JPA_PRIMARY_KEY_JOIN_COLUMN)) {
            m_primaryKeyJoinColumns.add(new PrimaryKeyJoinColumnMetadata(getAnnotation(JPA_PRIMARY_KEY_JOIN_COLUMN), this));
        }
       
        // Set the mapped by id if one is present.
        if (isAnnotationPresent(JPA_MAPS_ID)) {
            // Call getAttributeString in this case because we rely on the
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.columns.PrimaryKeyJoinColumnMetadata

    public SecondaryTableMetadata(MetadataAnnotation secondaryTable, MetadataAccessor accessor) {
        super(secondaryTable, accessor);
      
        if (secondaryTable != null) {
            for (Object primaryKeyJoinColumn : (Object[]) secondaryTable.getAttributeArray("pkJoinColumns")) {
                m_primaryKeyJoinColumns.add(new PrimaryKeyJoinColumnMetadata((MetadataAnnotation)primaryKeyJoinColumn, accessor));
            }
        }
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.columns.PrimaryKeyJoinColumnMetadata

                for (Object joinColumn : (Object[]) collectionTable.getAttributeArray("joinColumns")) {
                    m_joinColumns.add(new JoinColumnMetadata((MetadataAnnotation)joinColumn, accessor));
                }
            } else {
                for (Object primaryKeyJoinColumn : (Object[]) collectionTable.getAttributeArray("primaryKeyJoinColumns")) {
                    m_primaryKeyJoinColumns.add(new PrimaryKeyJoinColumnMetadata((MetadataAnnotation)primaryKeyJoinColumn, accessor));
                }
            }
        }
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.columns.PrimaryKeyJoinColumnMetadata

        if (primaryKeyJoinColumns.isEmpty()) {
            if (getDescriptor().hasCompositePrimaryKey()) {
                // Add a default one for each part of the composite primary
                // key. Foreign and primary key to have the same name.
                for (DatabaseField primaryKeyField : getDescriptor().getPrimaryKeyFields()) {
                    PrimaryKeyJoinColumnMetadata primaryKeyJoinColumn = new PrimaryKeyJoinColumnMetadata(this.m_project);
                    primaryKeyJoinColumn.setReferencedColumnName(primaryKeyField.getName());
                    primaryKeyJoinColumn.setName(primaryKeyField.getName());
                    primaryKeyJoinColumns.add(primaryKeyJoinColumn);
                }
            } else {
                // Add a default one for the single case, not setting any
                // foreign and primary key names. They will default based
                // on which accessor is using them.
                primaryKeyJoinColumns.add(new PrimaryKeyJoinColumnMetadata(this.m_project));
            }
        }
       
        if (getDescriptor().hasCompositePrimaryKey()) {
            // All the primary and foreign key field names should be specified.
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.columns.PrimaryKeyJoinColumnMetadata

    public SecondaryTableMetadata(MetadataAnnotation secondaryTable, MetadataAccessor accessor) {
        super(secondaryTable, accessor);
      
        if (secondaryTable != null) {
            for (Object primaryKeyJoinColumn : (Object[]) secondaryTable.getAttributeArray("pkJoinColumns")) {
                m_primaryKeyJoinColumns.add(new PrimaryKeyJoinColumnMetadata((MetadataAnnotation)primaryKeyJoinColumn, accessor));
            }
        }
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.columns.PrimaryKeyJoinColumnMetadata

                for (Object joinColumn : (Object[]) collectionTable.getAttributeArray("joinColumns")) {
                    m_joinColumns.add(new JoinColumnMetadata((MetadataAnnotation)joinColumn, accessor));
                }
            } else {
                for (Object primaryKeyJoinColumn : (Object[]) collectionTable.getAttributeArray("primaryKeyJoinColumns")) {
                    m_primaryKeyJoinColumns.add(new PrimaryKeyJoinColumnMetadata((MetadataAnnotation)primaryKeyJoinColumn, accessor));
                }
            }
        }
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.columns.PrimaryKeyJoinColumnMetadata

       
        // Set the primary key join columns if some are present.
        // Process all the primary key join columns first.
        if (isAnnotationPresent(PrimaryKeyJoinColumns.class)) {
            for (Object primaryKeyJoinColumn : (Object[]) getAnnotation(PrimaryKeyJoinColumns.class).getAttributeArray("value")) {
                m_primaryKeyJoinColumns.add(new PrimaryKeyJoinColumnMetadata((MetadataAnnotation) primaryKeyJoinColumn, this));
            }
        }
       
        // Process the single primary key join column second.
        if (isAnnotationPresent(PrimaryKeyJoinColumn.class)) {
            m_primaryKeyJoinColumns.add(new PrimaryKeyJoinColumnMetadata(getAnnotation(PrimaryKeyJoinColumn.class), this));
        }
       
        // Set the mapped by id if one is present.
        if (isAnnotationPresent(MapsId.class)) {
            // Call getAttributeString in this case because we rely on the
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.columns.PrimaryKeyJoinColumnMetadata

        // Set the primary key join columns if some are present.
        // Process all the primary key join columns first.
        MetadataAnnotation primaryKeyJoinColumns = getAnnotation(PrimaryKeyJoinColumns.class);
        if (primaryKeyJoinColumns != null) {
            for (Object primaryKeyJoinColumn : (Object[]) primaryKeyJoinColumns.getAttributeArray("value")) {
                m_primaryKeyJoinColumns.add(new PrimaryKeyJoinColumnMetadata((MetadataAnnotation)primaryKeyJoinColumn, accessibleObject));
            }
        }
       
        // Process the single primary key join column second.
        MetadataAnnotation primaryKeyJoinColumn = getAnnotation(PrimaryKeyJoinColumn.class);
        if (primaryKeyJoinColumn != null) {
            m_primaryKeyJoinColumns.add(new PrimaryKeyJoinColumnMetadata(primaryKeyJoinColumn, accessibleObject));
        }
       
        // Set the mapped by id if one is present.
        if (isAnnotationPresent(MappedById.class)) {
            // Call getAttributeString in this case because we rely on the
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.columns.PrimaryKeyJoinColumnMetadata

        if (m_primaryKeyJoinColumns.isEmpty()) {
            // Process all the primary key join columns first.
            if (isAnnotationPresent(PrimaryKeyJoinColumns.class)) {
                MetadataAnnotation primaryKeyJoinColumns = getAnnotation(PrimaryKeyJoinColumns.class);
                for (Object primaryKeyJoinColumn : (Object[]) primaryKeyJoinColumns.getAttributeArray("value")) {
                    m_primaryKeyJoinColumns.add(new PrimaryKeyJoinColumnMetadata((MetadataAnnotation) primaryKeyJoinColumn, this));
                }
            }
           
            // Process the single primary key join column second.
            if (isAnnotationPresent(PrimaryKeyJoinColumn.class)) {
                m_primaryKeyJoinColumns.add(new PrimaryKeyJoinColumnMetadata(getAnnotation(PrimaryKeyJoinColumn.class), this));
            }
        }
       
        addMultipleTableKeyFields(m_primaryKeyJoinColumns, getDescriptor().getPrimaryTable(), MetadataLogger.INHERITANCE_PK_COLUMN, MetadataLogger.INHERITANCE_FK_COLUMN);
    }
View Full Code Here

Examples of org.eclipse.persistence.internal.jpa.metadata.columns.PrimaryKeyJoinColumnMetadata

    public SecondaryTableMetadata(MetadataAnnotation secondaryTable, MetadataAccessor accessor) {
        super(secondaryTable, accessor);
      
        if (secondaryTable != null) {
            for (Object primaryKeyJoinColumn : (Object[]) secondaryTable.getAttributeArray("pkJoinColumns")) {
                m_primaryKeyJoinColumns.add(new PrimaryKeyJoinColumnMetadata((MetadataAnnotation)primaryKeyJoinColumn, accessor));
            }
        }
    }
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.