Package org.eclipse.persistence.internal.jpa.metadata.accessors.objects

Examples of org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotation


            processAssociationOverride(associationOverride);
        }
       
        // Process the association override annotations.
        // Look for an @AssociationOverrides.
        MetadataAnnotation associationOverrides = getAnnotation(JPA_ASSOCIATION_OVERRIDES);
        if (associationOverrides != null) {
            for (Object associationOverride : (Object[]) associationOverrides.getAttributeArray("value")) {
                processAssociationOverride(new AssociationOverrideMetadata((MetadataAnnotation) associationOverride, this));
            }
        }
       
        // Look for an @AssociationOverride.
        MetadataAnnotation associationOverride = getAnnotation(JPA_ASSOCIATION_OVERRIDE);
        if (associationOverride != null) {
            processAssociationOverride(new AssociationOverrideMetadata(associationOverride, this));
        }
    }
View Full Code Here


            processAttributeOverride(attributeOverride);
        }
       
        // Process the attribute override annotations.
        // Look for an @AttributeOverrides.
        MetadataAnnotation attributeOverrides = getAnnotation(JPA_ATTRIBUTE_OVERRIDES);
        if (attributeOverrides != null) {
            for (Object attributeOverride : (Object[]) attributeOverrides.getAttribute("value")){
                processAttributeOverride(new AttributeOverrideMetadata((MetadataAnnotation)attributeOverride, this));
            }
        }
       
        // Look for an @AttributeOverride.
        MetadataAnnotation attributeOverride = getAnnotation(JPA_ATTRIBUTE_OVERRIDE);
        if (attributeOverride != null) {
            processAttributeOverride(new AttributeOverrideMetadata(attributeOverride, this));
        }
    }
View Full Code Here

    /**
     * INTERNAL:
     * Process the change tracking setting for this accessor.
     */
    protected void processChangeTracking() {
        MetadataAnnotation changeTracking = getAnnotation(ChangeTracking.class);
       
        if (m_changeTracking != null || changeTracking != null) {
            if (getDescriptor().hasChangeTracking()) {   
                // We must be processing a mapped superclass setting for an
                // entity that has its own change tracking setting. Ignore it
View Full Code Here

   
    /**
     * INTERNAL:
     */
    protected void processCopyPolicy(){
        MetadataAnnotation copyPolicy = getAnnotation(CopyPolicy.class);
        MetadataAnnotation instantiationCopyPolicy = getAnnotation(InstantiationCopyPolicy.class);
        MetadataAnnotation cloneCopyPolicy = getAnnotation(CloneCopyPolicy.class);

        if (getCopyPolicy() != null || copyPolicy != null || instantiationCopyPolicy != null || cloneCopyPolicy != null) {
            if (getDescriptor().hasCopyPolicy()){
                // We must be processing a mapped superclass ...
                getLogger().logConfigMessage(MetadataLogger.IGNORE_MAPPED_SUPERCLASS_COPY_POLICY, getDescriptor().getJavaClass(), getJavaClass());
View Full Code Here

   
    /**
     * INTERNAL:
     */
    protected void processCustomizer() {
        MetadataAnnotation customizer = getAnnotation(Customizer.class);
       
        if ((m_customizerClass != null && ! m_customizerClass.equals(void.class)) || customizer != null) {
            if (getDescriptor().hasCustomizer()) {
                // We must be processing a mapped superclass and its subclass
                // override the customizer class, that is, defined its own. Log
                // a warning that we are ignoring the Customizer metadata on the
                // mapped superclass for the descriptor's java class.
                getLogger().logConfigMessage(MetadataLogger.IGNORE_MAPPED_SUPERCLASS_CUSTOMIZER, getDescriptor().getJavaClass(), getJavaClass());
            } else {
                if (m_customizerClass == null || m_customizerClass.equals(void.class)) {
                    // Use the annotation value.
                    m_customizerClass = getMetadataClass((String)customizer.getAttribute("value"));
                } else {
                    // Use the xml value and log a message if necessary.
                    if (customizer != null) {
                        getLogger().logConfigMessage(MetadataLogger.OVERRIDE_ANNOTATION_WITH_XML, customizer, getJavaClassName(), getLocation());
                    }
View Full Code Here

        for (PLSQLRecordMetadata record : m_plsqlRecords) {
            getProject().addPLSQLComplexType(record);
        }
       
        // Process the annotations.
        MetadataAnnotation records = getAnnotation(PLSQLRecords.class);
        if (records != null) {
            for (Object record : (Object[]) records.getAttribute("value")) {
                getProject().addPLSQLComplexType(new PLSQLRecordMetadata((MetadataAnnotation)record, this));
            }
        }
       
        MetadataAnnotation record = getAnnotation(PLSQLRecord.class);
        if (record != null) {
            getProject().addPLSQLComplexType(new PLSQLRecordMetadata(record, this));
        }
       
        // Process the XML first.
        for (PLSQLTableMetadata table : m_plsqlTables) {
            getProject().addPLSQLComplexType(table);
        }
       
        // Process the annotations.
        MetadataAnnotation tables = getAnnotation(PLSQLTables.class);
        if (tables != null) {
            for (Object table : (Object[]) tables.getAttribute("value")) {
                getProject().addPLSQLComplexType(new PLSQLTableMetadata((MetadataAnnotation)table, this));
            }
        }
       
        MetadataAnnotation table = getAnnotation(PLSQLTable.class);
        if (table != null) {
            getProject().addPLSQLComplexType(new PLSQLTableMetadata(table, this));
        }
    }
View Full Code Here

        for (PropertyMetadata property : getProperties()) {
            getDescriptor().addProperty(property);
        }

        // Now add the properties defined in annotations.
        MetadataAnnotation properties = getAnnotation(Properties.class);
        if (properties != null) {
            for (Object property : (Object[]) properties.getAttributeArray("value")) {
                getDescriptor().addProperty(new PropertyMetadata((MetadataAnnotation) property, this));
            }
        }
       
        MetadataAnnotation property = getAnnotation(Property.class);
        if (property != null) {
            getDescriptor().addProperty(new PropertyMetadata(property, this));
        }
    }
View Full Code Here

        // Check for XML defined struct.
        if (m_struct != null) {
            m_struct.process(getDescriptor());
        } else {
            // Check for a annotation
            MetadataAnnotation struct = getAnnotation(Struct.class);
            if (struct != null) {
                new StructMetadata(struct, this).process(getDescriptor());
            }
        }
    }
View Full Code Here

        // Check for XML defined struct.
        if (m_noSql != null) {
            m_noSql.process(getDescriptor());
        } else {
            // Check for a annotation
            MetadataAnnotation eis = getAnnotation("org.eclipse.persistence.nosql.annotations.NoSql");
            if (eis != null) {
                new NoSqlMetadata(eis, this).process(getDescriptor());
            }
        }
    }
View Full Code Here

        m_disableHits = (Boolean) cache.getAttribute("disableHits");
        m_coordinationType = (String) cache.getAttribute("coordinationType");
        m_databaseChangeNotificationType = (String) cache.getAttribute("databaseChangeNotificationType");
        m_expiry = (Integer) cache.getAttribute("expiry");

        MetadataAnnotation expiryTimeOfDay = (MetadataAnnotation) cache.getAttribute("expiryTimeOfDay");
       
        if (expiryTimeOfDay != null) {
            m_expiryTimeOfDay = new TimeOfDayMetadata(expiryTimeOfDay, accessor);
        }
       
View Full Code Here

TOP

Related Classes of org.eclipse.persistence.internal.jpa.metadata.accessors.objects.MetadataAnnotation

Copyright © 2018 www.massapicom. 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.