Search in sources :

Example 1 with TransientAccessor

use of org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.TransientAccessor in project eclipselink by eclipse-ee4j.

the class JPAMetadataGenerator method initializeXMLAttributeLists.

/**
 * XMLAttributes processing at runtime (i.e. PersistenceUnitProcessor.processORMetadata)
 * assumes that all lists are initialized.  We need to init all lists to avoid runtime
 * exceptions.
 *
 * @see org.eclipse.persistence.internal.jpa.metadata.accessors.classes.XMLAttributes
 */
protected void initializeXMLAttributeLists(ClassAccessor accessor) {
    accessor.setAttributes(new XMLAttributes());
    accessor.getAttributes().setIds(new ArrayList<IdAccessor>());
    accessor.getAttributes().setBasics(new ArrayList<BasicAccessor>());
    accessor.getAttributes().setArrays(new ArrayList<ArrayAccessor>());
    accessor.getAttributes().setStructures(new ArrayList<StructureAccessor>());
    accessor.getAttributes().setEmbeddeds(new ArrayList<EmbeddedAccessor>());
    // initialize other various lists (to avoid exceptions)
    accessor.getAttributes().setBasicCollections(new ArrayList<BasicCollectionAccessor>());
    accessor.getAttributes().setBasicMaps(new ArrayList<BasicMapAccessor>());
    accessor.getAttributes().setElementCollections(new ArrayList<ElementCollectionAccessor>());
    accessor.getAttributes().setManyToManys(new ArrayList<ManyToManyAccessor>());
    accessor.getAttributes().setManyToOnes(new ArrayList<ManyToOneAccessor>());
    accessor.getAttributes().setOneToManys(new ArrayList<OneToManyAccessor>());
    accessor.getAttributes().setOneToOnes(new ArrayList<OneToOneAccessor>());
    accessor.getAttributes().setTransformations(new ArrayList<TransformationAccessor>());
    accessor.getAttributes().setTransients(new ArrayList<TransientAccessor>());
    accessor.getAttributes().setVariableOneToOnes(new ArrayList<VariableOneToOneAccessor>());
    accessor.getAttributes().setVersions(new ArrayList<VersionAccessor>());
}
Also used : TransientAccessor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.TransientAccessor) VersionAccessor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VersionAccessor) ElementCollectionAccessor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.ElementCollectionAccessor) ManyToOneAccessor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.ManyToOneAccessor) VariableOneToOneAccessor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VariableOneToOneAccessor) BasicMapAccessor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicMapAccessor) ManyToManyAccessor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.ManyToManyAccessor) OneToManyAccessor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor) BasicAccessor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicAccessor) TransformationAccessor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.TransformationAccessor) ArrayAccessor(org.eclipse.persistence.internal.jpa.metadata.structures.ArrayAccessor) VariableOneToOneAccessor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VariableOneToOneAccessor) OneToOneAccessor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToOneAccessor) BasicCollectionAccessor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicCollectionAccessor) XMLAttributes(org.eclipse.persistence.internal.jpa.metadata.accessors.classes.XMLAttributes) IdAccessor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.IdAccessor) StructureAccessor(org.eclipse.persistence.internal.jpa.metadata.structures.StructureAccessor) EmbeddedAccessor(org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.EmbeddedAccessor)

Aggregations

XMLAttributes (org.eclipse.persistence.internal.jpa.metadata.accessors.classes.XMLAttributes)1 BasicAccessor (org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicAccessor)1 BasicCollectionAccessor (org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicCollectionAccessor)1 BasicMapAccessor (org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicMapAccessor)1 ElementCollectionAccessor (org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.ElementCollectionAccessor)1 EmbeddedAccessor (org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.EmbeddedAccessor)1 IdAccessor (org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.IdAccessor)1 ManyToManyAccessor (org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.ManyToManyAccessor)1 ManyToOneAccessor (org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.ManyToOneAccessor)1 OneToManyAccessor (org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToManyAccessor)1 OneToOneAccessor (org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.OneToOneAccessor)1 TransformationAccessor (org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.TransformationAccessor)1 TransientAccessor (org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.TransientAccessor)1 VariableOneToOneAccessor (org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VariableOneToOneAccessor)1 VersionAccessor (org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.VersionAccessor)1 ArrayAccessor (org.eclipse.persistence.internal.jpa.metadata.structures.ArrayAccessor)1 StructureAccessor (org.eclipse.persistence.internal.jpa.metadata.structures.StructureAccessor)1