use of org.eclipse.persistence.internal.jpa.metadata.accessors.mappings.BasicMapAccessor 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>());
}
Aggregations