Search in sources :

Example 1 with NamedQueryMetadata

use of org.eclipse.persistence.internal.jpa.metadata.queries.NamedQueryMetadata in project eclipselink by eclipse-ee4j.

the class XMLEntityMappings method process.

/**
 * INTERNAL:
 * Process the metadata from the <entity-mappings> level except for the
 * classes themselves. They will be processed afterwards and controlled
 * by the MetadataProcessor. Note: this method does a few things of
 * interest. It not only adds metadata to the project but it will also
 * override (that is EclipseLink-ORM-XML-->JPA-XML {@literal &&} JPA-XML-->Annotation)
 * the necessary metadata and log messages to the user. A validation
 * exception could also be thrown. See the related processing methods for
 * more details.
 *
 * Any XML metadata of the types processed below should call these methods.
 * That is, as an example, a converter can be found at the entity-mappings
 * and entity level. Therefore you must ensure that those from levels other
 * than the entity-mappings call these methods as well to ensure consistent
 * metadata processing (and behavior).
 */
public void process() {
    // Add the XML converters to the project.
    for (ConverterMetadata converter : m_converters) {
        converter.initXMLObject(m_file, this);
        m_project.addConverter(converter);
    }
    // Add the XML type converters to the project.
    for (TypeConverterMetadata typeConverter : m_typeConverters) {
        typeConverter.initXMLObject(m_file, this);
        m_project.addConverter(typeConverter);
    }
    // Add the XML object type converters to the project.
    for (ObjectTypeConverterMetadata objectTypeConverter : m_objectTypeConverters) {
        objectTypeConverter.initXMLObject(m_file, this);
        m_project.addConverter(objectTypeConverter);
    }
    // Add the XML serialized converters to the project.
    for (SerializedConverterMetadata serializedConverter : m_serializedConverters) {
        serializedConverter.initXMLObject(m_file, this);
        m_project.addConverter(serializedConverter);
    }
    // Add the XML struct converters to the project.
    for (StructConverterMetadata structConverter : m_structConverters) {
        structConverter.initXMLObject(m_file, this);
        m_project.addConverter(structConverter);
    }
    // Add the XML table generators to the project.
    for (TableGeneratorMetadata tableGenerator : m_tableGenerators) {
        tableGenerator.initXMLObject(m_file, this);
        m_project.addTableGenerator(tableGenerator, getDefaultCatalog(), getDefaultSchema());
    }
    // Add the XML sequence generators to the project.
    for (SequenceGeneratorMetadata sequenceGenerator : m_sequenceGenerators) {
        sequenceGenerator.initXMLObject(m_file, this);
        m_project.addSequenceGenerator(sequenceGenerator, getDefaultCatalog(), getDefaultSchema());
    }
    // Add the XML uuid generators to the project.
    for (UuidGeneratorMetadata uuidGenerator : m_uuidGenerators) {
        uuidGenerator.initXMLObject(m_file, this);
        m_project.addUuidGenerator(uuidGenerator);
    }
    // Add the partitioning to the project.
    for (PartitioningMetadata partitioning : m_partitioning) {
        partitioning.initXMLObject(m_file, this);
        m_project.addPartitioningPolicy(partitioning);
    }
    // Add the replication partitioning to the project.
    for (ReplicationPartitioningMetadata partitioning : m_replicationPartitioning) {
        partitioning.initXMLObject(m_file, this);
        m_project.addPartitioningPolicy(partitioning);
    }
    // Add the round robin partitioning to the project.
    for (RoundRobinPartitioningMetadata partitioning : m_roundRobinPartitioning) {
        partitioning.initXMLObject(m_file, this);
        m_project.addPartitioningPolicy(partitioning);
    }
    // Add the pinned partitioning to the project.
    for (PinnedPartitioningMetadata partitioning : m_pinnedPartitioning) {
        partitioning.initXMLObject(m_file, this);
        m_project.addPartitioningPolicy(partitioning);
    }
    // Add the range partitioning to the project.
    for (RangePartitioningMetadata partitioning : m_rangePartitioning) {
        partitioning.initXMLObject(m_file, this);
        m_project.addPartitioningPolicy(partitioning);
    }
    // Add the value partitioning to the project.
    for (ValuePartitioningMetadata partitioning : m_valuePartitioning) {
        partitioning.initXMLObject(m_file, this);
        m_project.addPartitioningPolicy(partitioning);
    }
    // Add the hash partitioning to the project.
    for (HashPartitioningMetadata partitioning : m_hashPartitioning) {
        partitioning.initXMLObject(m_file, this);
        m_project.addPartitioningPolicy(partitioning);
    }
    // Add the XML named queries to the project.
    for (NamedQueryMetadata namedQuery : m_namedQueries) {
        namedQuery.initXMLObject(m_file, this);
        m_project.addQuery(namedQuery);
    }
    // Add the XML named native queries to the project.
    for (NamedNativeQueryMetadata namedNativeQuery : m_namedNativeQueries) {
        namedNativeQuery.initXMLObject(m_file, this);
        m_project.addQuery(namedNativeQuery);
    }
    // Add the XML named stored procedure queries to the project.
    for (NamedStoredProcedureQueryMetadata namedStoredProcedureQuery : m_namedStoredProcedureQueries) {
        namedStoredProcedureQuery.initXMLObject(m_file, this);
        m_project.addQuery(namedStoredProcedureQuery);
    }
    // Add the XML named stored function queries to the project.
    for (NamedStoredFunctionQueryMetadata namedStoredFunctionQuery : m_namedStoredFunctionQueries) {
        namedStoredFunctionQuery.initXMLObject(m_file, this);
        m_project.addQuery(namedStoredFunctionQuery);
    }
    // Add the XML named stored procedure queries to the project.
    for (NamedPLSQLStoredProcedureQueryMetadata namedPLSQLStoredProcedureQuery : m_namedPLSQLStoredProcedureQueries) {
        namedPLSQLStoredProcedureQuery.initXMLObject(m_file, this);
        m_project.addQuery(namedPLSQLStoredProcedureQuery);
    }
    // Add the XML named stored function queries to the project.
    for (NamedPLSQLStoredFunctionQueryMetadata namedPLSQLStoredFunctionQuery : m_namedPLSQLStoredFunctionQueries) {
        namedPLSQLStoredFunctionQuery.initXMLObject(m_file, this);
        m_project.addQuery(namedPLSQLStoredFunctionQuery);
    }
    // Add the XML sql result set mappings to the project.
    for (SQLResultSetMappingMetadata sqlResultSetMapping : m_sqlResultSetMappings) {
        sqlResultSetMapping.initXMLObject(m_file, this);
        m_project.addSQLResultSetMapping(sqlResultSetMapping);
    }
    // Add the Oracle object types to the project.
    for (OracleObjectTypeMetadata oType : m_oracleObjectTypes) {
        oType.initXMLObject(m_file, this);
        m_project.addComplexMetadataType(oType);
    }
    // Add the Oracle array types to the project.
    for (OracleArrayTypeMetadata aType : m_oracleArrayTypes) {
        aType.initXMLObject(m_file, this);
        m_project.addComplexMetadataType(aType);
    }
    // Add the PLSQL types to the project.
    for (PLSQLRecordMetadata record : m_plsqlRecords) {
        record.initXMLObject(m_file, this);
        m_project.addComplexMetadataType(record);
    }
    // Add the PLSQL tables to the project.
    for (PLSQLTableMetadata table : m_plsqlTables) {
        table.initXMLObject(m_file, this);
        m_project.addComplexMetadataType(table);
    }
}
Also used : NamedStoredFunctionQueryMetadata(org.eclipse.persistence.internal.jpa.metadata.queries.NamedStoredFunctionQueryMetadata) RoundRobinPartitioningMetadata(org.eclipse.persistence.internal.jpa.metadata.partitioning.RoundRobinPartitioningMetadata) PLSQLRecordMetadata(org.eclipse.persistence.internal.jpa.metadata.queries.PLSQLRecordMetadata) PinnedPartitioningMetadata(org.eclipse.persistence.internal.jpa.metadata.partitioning.PinnedPartitioningMetadata) TypeConverterMetadata(org.eclipse.persistence.internal.jpa.metadata.converters.TypeConverterMetadata) ObjectTypeConverterMetadata(org.eclipse.persistence.internal.jpa.metadata.converters.ObjectTypeConverterMetadata) ReplicationPartitioningMetadata(org.eclipse.persistence.internal.jpa.metadata.partitioning.ReplicationPartitioningMetadata) TableGeneratorMetadata(org.eclipse.persistence.internal.jpa.metadata.sequencing.TableGeneratorMetadata) HashPartitioningMetadata(org.eclipse.persistence.internal.jpa.metadata.partitioning.HashPartitioningMetadata) OracleArrayTypeMetadata(org.eclipse.persistence.internal.jpa.metadata.queries.OracleArrayTypeMetadata) StructConverterMetadata(org.eclipse.persistence.internal.jpa.metadata.converters.StructConverterMetadata) RangePartitioningMetadata(org.eclipse.persistence.internal.jpa.metadata.partitioning.RangePartitioningMetadata) NamedStoredProcedureQueryMetadata(org.eclipse.persistence.internal.jpa.metadata.queries.NamedStoredProcedureQueryMetadata) NamedQueryMetadata(org.eclipse.persistence.internal.jpa.metadata.queries.NamedQueryMetadata) StructConverterMetadata(org.eclipse.persistence.internal.jpa.metadata.converters.StructConverterMetadata) SerializedConverterMetadata(org.eclipse.persistence.internal.jpa.metadata.converters.SerializedConverterMetadata) TypeConverterMetadata(org.eclipse.persistence.internal.jpa.metadata.converters.TypeConverterMetadata) ConverterMetadata(org.eclipse.persistence.internal.jpa.metadata.converters.ConverterMetadata) MixedConverterMetadata(org.eclipse.persistence.internal.jpa.metadata.converters.MixedConverterMetadata) ObjectTypeConverterMetadata(org.eclipse.persistence.internal.jpa.metadata.converters.ObjectTypeConverterMetadata) SequenceGeneratorMetadata(org.eclipse.persistence.internal.jpa.metadata.sequencing.SequenceGeneratorMetadata) OracleObjectTypeMetadata(org.eclipse.persistence.internal.jpa.metadata.queries.OracleObjectTypeMetadata) UuidGeneratorMetadata(org.eclipse.persistence.internal.jpa.metadata.sequencing.UuidGeneratorMetadata) SQLResultSetMappingMetadata(org.eclipse.persistence.internal.jpa.metadata.queries.SQLResultSetMappingMetadata) ObjectTypeConverterMetadata(org.eclipse.persistence.internal.jpa.metadata.converters.ObjectTypeConverterMetadata) ValuePartitioningMetadata(org.eclipse.persistence.internal.jpa.metadata.partitioning.ValuePartitioningMetadata) SerializedConverterMetadata(org.eclipse.persistence.internal.jpa.metadata.converters.SerializedConverterMetadata) PLSQLTableMetadata(org.eclipse.persistence.internal.jpa.metadata.queries.PLSQLTableMetadata) NamedPLSQLStoredProcedureQueryMetadata(org.eclipse.persistence.internal.jpa.metadata.queries.NamedPLSQLStoredProcedureQueryMetadata) NamedNativeQueryMetadata(org.eclipse.persistence.internal.jpa.metadata.queries.NamedNativeQueryMetadata) PartitioningMetadata(org.eclipse.persistence.internal.jpa.metadata.partitioning.PartitioningMetadata) UnionPartitioningMetadata(org.eclipse.persistence.internal.jpa.metadata.partitioning.UnionPartitioningMetadata) ReplicationPartitioningMetadata(org.eclipse.persistence.internal.jpa.metadata.partitioning.ReplicationPartitioningMetadata) RoundRobinPartitioningMetadata(org.eclipse.persistence.internal.jpa.metadata.partitioning.RoundRobinPartitioningMetadata) HashPartitioningMetadata(org.eclipse.persistence.internal.jpa.metadata.partitioning.HashPartitioningMetadata) RangePartitioningMetadata(org.eclipse.persistence.internal.jpa.metadata.partitioning.RangePartitioningMetadata) ValuePartitioningMetadata(org.eclipse.persistence.internal.jpa.metadata.partitioning.ValuePartitioningMetadata) PinnedPartitioningMetadata(org.eclipse.persistence.internal.jpa.metadata.partitioning.PinnedPartitioningMetadata) NamedPLSQLStoredFunctionQueryMetadata(org.eclipse.persistence.internal.jpa.metadata.queries.NamedPLSQLStoredFunctionQueryMetadata)

Aggregations

ConverterMetadata (org.eclipse.persistence.internal.jpa.metadata.converters.ConverterMetadata)1 MixedConverterMetadata (org.eclipse.persistence.internal.jpa.metadata.converters.MixedConverterMetadata)1 ObjectTypeConverterMetadata (org.eclipse.persistence.internal.jpa.metadata.converters.ObjectTypeConverterMetadata)1 SerializedConverterMetadata (org.eclipse.persistence.internal.jpa.metadata.converters.SerializedConverterMetadata)1 StructConverterMetadata (org.eclipse.persistence.internal.jpa.metadata.converters.StructConverterMetadata)1 TypeConverterMetadata (org.eclipse.persistence.internal.jpa.metadata.converters.TypeConverterMetadata)1 HashPartitioningMetadata (org.eclipse.persistence.internal.jpa.metadata.partitioning.HashPartitioningMetadata)1 PartitioningMetadata (org.eclipse.persistence.internal.jpa.metadata.partitioning.PartitioningMetadata)1 PinnedPartitioningMetadata (org.eclipse.persistence.internal.jpa.metadata.partitioning.PinnedPartitioningMetadata)1 RangePartitioningMetadata (org.eclipse.persistence.internal.jpa.metadata.partitioning.RangePartitioningMetadata)1 ReplicationPartitioningMetadata (org.eclipse.persistence.internal.jpa.metadata.partitioning.ReplicationPartitioningMetadata)1 RoundRobinPartitioningMetadata (org.eclipse.persistence.internal.jpa.metadata.partitioning.RoundRobinPartitioningMetadata)1 UnionPartitioningMetadata (org.eclipse.persistence.internal.jpa.metadata.partitioning.UnionPartitioningMetadata)1 ValuePartitioningMetadata (org.eclipse.persistence.internal.jpa.metadata.partitioning.ValuePartitioningMetadata)1 NamedNativeQueryMetadata (org.eclipse.persistence.internal.jpa.metadata.queries.NamedNativeQueryMetadata)1 NamedPLSQLStoredFunctionQueryMetadata (org.eclipse.persistence.internal.jpa.metadata.queries.NamedPLSQLStoredFunctionQueryMetadata)1 NamedPLSQLStoredProcedureQueryMetadata (org.eclipse.persistence.internal.jpa.metadata.queries.NamedPLSQLStoredProcedureQueryMetadata)1 NamedQueryMetadata (org.eclipse.persistence.internal.jpa.metadata.queries.NamedQueryMetadata)1 NamedStoredFunctionQueryMetadata (org.eclipse.persistence.internal.jpa.metadata.queries.NamedStoredFunctionQueryMetadata)1 NamedStoredProcedureQueryMetadata (org.eclipse.persistence.internal.jpa.metadata.queries.NamedStoredProcedureQueryMetadata)1