use of org.eclipse.persistence.mappings.AggregateMapping in project eclipselink by eclipse-ee4j.
the class EmbeddedAccessor method process.
/**
* INTERNAL:
* Process an embedded.
*/
@Override
public void process() {
// Build and aggregate object mapping and add it to the descriptor.
AggregateMapping mapping = getOwningDescriptor().getClassDescriptor().newAggregateMapping();
setMapping(mapping);
mapping.setReferenceClassName(getReferenceClassName());
mapping.setAttributeName(getAttributeName());
// Will check for PROPERTY access
setAccessorMethods(mapping);
// EIS and ORDT mappings may not be aggregate object mappings.
if (mapping.isAggregateObjectMapping()) {
AggregateObjectMapping aggregateMapping = (AggregateObjectMapping) mapping;
aggregateMapping.setIsNullAllowed(true);
// Process attribute overrides.
processAttributeOverrides(m_attributeOverrides, aggregateMapping, getReferenceDescriptor());
// Process association overrides.
processAssociationOverrides(m_associationOverrides, aggregateMapping, getReferenceDescriptor());
// Process converts.
processConverts(getConverts(m_converts), aggregateMapping, getReferenceClass(), false);
} else if (mapping.isAbstractCompositeObjectMapping()) {
((AbstractCompositeObjectMapping) mapping).setField(getDatabaseField(getDescriptor().getPrimaryTable(), MetadataLogger.COLUMN));
}
// Process a @ReturnInsert and @ReturnUpdate (to log a warning message)
processReturnInsertAndUpdate();
}
use of org.eclipse.persistence.mappings.AggregateMapping in project eclipselink by eclipse-ee4j.
the class DirectCollectionAccessor method process.
/**
* INTERNAL:
*/
protected void process(DatabaseMapping mapping) {
// Add the mapping to the descriptor.
setMapping(mapping);
// Set the attribute name.
mapping.setAttributeName(getAttributeName());
// Will check for PROPERTY access
setAccessorMethods(mapping);
if (mapping instanceof CollectionMapping) {
CollectionMapping collectionMapping = (CollectionMapping) mapping;
// Set the reference class name.
collectionMapping.setReferenceClassName(getReferenceClassName());
// Process join fetch type.
processJoinFetch(getJoinFetch(), collectionMapping);
// Process the batch fetch if specified.
processBatchFetch(collectionMapping);
// Process the collection table.
processCollectionTable(collectionMapping);
// The spec. requires pessimistic lock to be extend-able to CollectionTable
collectionMapping.setShouldExtendPessimisticLockScope(true);
// Set the cascade on delete if specified.
collectionMapping.setIsCascadeOnDeleteSetOnDatabase(isCascadeOnDelete());
} else if (mapping instanceof AggregateMapping) {
AggregateMapping aggregateMapping = (AggregateMapping) mapping;
// Set the reference class name.
aggregateMapping.setReferenceClassName(getReferenceClassName());
}
// Set the non cacheable if specified.
mapping.setIsCacheable(!isNonCacheable());
// Process a @ReturnInsert and @ReturnUpdate (to log a warning message)
processReturnInsertAndUpdate();
// Process any partitioning policies.
processPartitioning();
}
Aggregations