| Modifier and Type | Field and Description |
|---|---|
| private Map |
| Access | Constructor and Description |
|---|---|
| public | |
| public | EmbeddableAccessor(MetadataAnnotation annotation, MetadataClass cls, MetadataProject project)
INTERNAL: |
| Modifier and Type | Method and Description |
|---|---|
| protected void | addEmbeddingAccessor(ClassAccessor embeddingAccessor)
INTERNAL: Embedding accessors are those accessors that actually embed the embeddable class with an embedded mapping. |
| public void | |
| public void | |
| public void | |
| protected void | addPotentialEmbeddableAccessor(MetadataClass potentialEmbeddableClass, ClassAccessor embeddingAccessor)
INTERNAL
Ensure any embeddable classes that are discovered during pre-process
are added to the project.
|
| protected void | discoverMappedSuperclassesAndInheritanceParents(boolean addMappedSuperclassAccessors)
INTERNAL: Build a list of classes that are decorated with a MappedSuperclass annotation or that are tagged as a mapped-superclass in an XML document. |
| public Map | |
| public MetadataDescriptor | getOwningDescriptor()
Overrides org. |
| public boolean | isEmbeddableAccessor()
Overrides org. |
| public void | preProcess()
Overrides org. |
| public void | preProcessForCanonicalModel()
INTERNAL:
The pre-process for canonical model method is called (and only called)
during the canonical model generation.
|
| protected void | preProcessMappedSuperclassMetadata(MappedSuperclassAccessor mappedSuperclass)
INTERNAL
Sub classes (Entity and Embeddable) must override this method to control
the metadata that is processed for their context.
|
| public void | process()
Overrides org. |
| public void | processAccessMethods()
INTERNAL: For VIRTUAL access we need to look for default access methods that we need to use with our mapping attributes. |
| protected void | processAccessType()
Implements abstract org. |
| protected void | processMappedSuperclassMetadata(MappedSuperclassAccessor mappedSuperclass)
INTERNAL
From an embeddable we need pair down what we process as things like
ID metadata does not apply.
|
| m_embeddingAccessors | back to summary |
|---|---|
| private Map<String, ClassAccessor> m_embeddingAccessors | |
| EmbeddableAccessor | back to summary |
|---|---|
| public EmbeddableAccessor() INTERNAL: | |
| EmbeddableAccessor | back to summary |
|---|---|
| public EmbeddableAccessor(MetadataAnnotation annotation, MetadataClass cls, MetadataProject project) INTERNAL: | |
| addEmbeddingAccessor | back to summary |
|---|---|
| protected void addEmbeddingAccessor(ClassAccessor embeddingAccessor) INTERNAL: Embedding accessors are those accessors that actually embed the embeddable class with an embedded mapping. We use this list to extract and validate the access type of this embeddable when the embeddable does not specify an explicit access type. | |
| addEmbeddingAccessors | back to summary |
|---|---|
| public void addEmbeddingAccessors(Map<String, ClassAccessor> embeddingAccessors) INTERNAL: | |
| addOwningDescriptor | back to summary |
|---|---|
| public void addOwningDescriptor(MetadataDescriptor owningDescriptor) INTERNAL: | |
| addOwningDescriptors | back to summary |
|---|---|
| public void addOwningDescriptors(List<MetadataDescriptor> owningDescriptors) INTERNAL: | |
| addPotentialEmbeddableAccessor | back to summary |
|---|---|
| protected void addPotentialEmbeddableAccessor(MetadataClass potentialEmbeddableClass, ClassAccessor embeddingAccessor) INTERNAL Ensure any embeddable classes that are discovered during pre-process are added to the project. The newly discovered embeddable accesors will also be pre-processed now as well.
| |
| discoverMappedSuperclassesAndInheritanceParents | back to summary |
|---|---|
| protected void discoverMappedSuperclassesAndInheritanceParents(boolean addMappedSuperclassAccessors) INTERNAL: Build a list of classes that are decorated with a MappedSuperclass annotation or that are tagged as a mapped-superclass in an XML document. This method will also do a couple other things as well since we are traversing the parent classes: - Build a map of generic types specified and will be used to resolve actual class types for mappings. - save mapped-superclass descriptors on the project for later use by the Metamodel API We don't support embeddable inheritance yet. When that is added, this method will need to change and in fact we may be able to re-use the existing discover method from EntityAccessor (with minor tweaks). | |
| getEmbeddingAccessors | back to summary |
|---|---|
| public Map INTERNAL: | |
| getOwningDescriptor | back to summary |
|---|---|
| public MetadataDescriptor getOwningDescriptor() Overrides org. INTERNAL: So, here's the deal ... this method typically gets called when defaulting pk's name, primary table names etc. for various mappings. The problem however is that we go beyond the spec and allow more mappings to be specified on embeddable classes. For example, a M-M would default its join table and join columns using the info from its owning descriptor. The problem then is ... what to do when this embedabble has multiple owning descriptors? That is, is shared. Right now, their pk names from the owners better be same or mappings must be fully specified and not use any defaults. I think that is somewhat ok given we're going beyond the spec and TopLink doesn't even support it anyway??? So the stance is, we'll allow the extra mappings on embeddables that are not shared, however on shared cases there are restrictions. Users should use mapped superclasses when they have a need to share complex embeddables. Or they can write customizers to modify their embeddable descriptors after initialize (after they have been cloned) Future: the metadata processing 'could' set all necessary (per owning descriptor) metadata and have the descriptor initialize code handle it. Metadata processing would process embeddable classes as it currently does for MappedSuperclasses. Clone them and process under each owning entity context. At descriptor initialize time, we would avoid cloning the aggregate descriptor and use the one metadata processing provided. Investigate further at a later date ... Callers to this method are ... BasicCollectionAccessor - processCollectionTable - defaults pk names from the owning descriptor. RelationshipAccessor - processJoinTable - defaults the join table name and the source field name OneToManyAccessor - processUnidirectionalOneToManyMapping - defaults the pk field and table. MappingAccessor - processAssociationOverride and updatePrimaryKeyField. ObjectAccessor - processId
| |
| isEmbeddableAccessor | back to summary |
|---|---|
| public boolean isEmbeddableAccessor() Overrides org. INTERNAL: Return true if this accessor represents an embeddable accessor.
| |
| preProcess | back to summary |
|---|---|
| public void preProcess() Overrides org. INTERNAL: The pre-process method is called during regular deployment and metadata processing. This method is called after each entity of the persistence unit has had an opportunity to pre-process itself first since we'll rely on owning entities for things like access type etc. The pre-process will run some validation. The order of processing is important, care must be taken if changes must be made.
| |
| preProcessForCanonicalModel | back to summary |
|---|---|
| public void preProcessForCanonicalModel() INTERNAL: The pre-process for canonical model method is called (and only called) during the canonical model generation. The use of this pre-process allows us to remove some items from the regular pre-process that do not apply to the canonical model generation. The order of processing is important, care must be taken if changes must be made.
| |
| preProcessMappedSuperclassMetadata | back to summary |
|---|---|
| protected void preProcessMappedSuperclassMetadata(MappedSuperclassAccessor mappedSuperclass) INTERNAL Sub classes (Entity and Embeddable) must override this method to control the metadata that is processed for their context.
| |
| process | back to summary |
|---|---|
| public void process() Overrides org. INTERNAL: Process the metadata from this embeddable class.
| |
| processAccessMethods | back to summary |
|---|---|
| public void processAccessMethods() INTERNAL: For VIRTUAL access we need to look for default access methods that we need to use with our mapping attributes. | |
| processAccessType | back to summary |
|---|---|
| protected void processAccessType() Implements abstract org. INTERNAL: Process the access type of this embeddable. If this embeddable is not embedded by at least one entity, it will not be processed. Therefore, embedding accessors can not be empty at this point.
| |
| processMappedSuperclassMetadata | back to summary |
|---|---|
| protected void processMappedSuperclassMetadata(MappedSuperclassAccessor mappedSuperclass) INTERNAL From an embeddable we need pair down what we process as things like ID metadata does not apply.
| |