use of org.eclipse.persistence.internal.jpa.metadata.partitioning.UnionPartitioningMetadata in project eclipselink by eclipse-ee4j.
the class MetadataAccessor method processPartitioning.
/**
* Process the partitioning policies defined on this element.
*/
protected void processPartitioning() {
boolean found = false;
// Check for XML defined partitioning.
if (m_replicationPartitioning != null) {
found = true;
getProject().addPartitioningPolicy(m_replicationPartitioning);
}
if (m_roundRobinPartitioning != null) {
found = true;
getProject().addPartitioningPolicy(m_roundRobinPartitioning);
}
if (m_partitioning != null) {
found = true;
getProject().addPartitioningPolicy(m_partitioning);
}
if (m_rangePartitioning != null) {
found = true;
getProject().addPartitioningPolicy(m_rangePartitioning);
}
if (m_valuePartitioning != null) {
found = true;
getProject().addPartitioningPolicy(m_valuePartitioning);
}
if (m_hashPartitioning != null) {
found = true;
getProject().addPartitioningPolicy(m_hashPartitioning);
}
if (m_unionPartitioning != null) {
found = true;
getProject().addPartitioningPolicy(m_unionPartitioning);
}
if (m_pinnedPartitioning != null) {
found = true;
getProject().addPartitioningPolicy(m_pinnedPartitioning);
}
// Check for partitioning annotations.
MetadataAnnotation annotation = getAnnotation(Partitioning.class);
if (annotation != null) {
found = true;
getProject().addPartitioningPolicy(new PartitioningMetadata(annotation, this));
}
annotation = getAnnotation(ReplicationPartitioning.class);
if (annotation != null) {
found = true;
getProject().addPartitioningPolicy(new ReplicationPartitioningMetadata(annotation, this));
}
annotation = getAnnotation(RoundRobinPartitioning.class);
if (annotation != null) {
found = true;
getProject().addPartitioningPolicy(new RoundRobinPartitioningMetadata(annotation, this));
}
annotation = getAnnotation(UnionPartitioning.class);
if (annotation != null) {
found = true;
getProject().addPartitioningPolicy(new UnionPartitioningMetadata(annotation, this));
}
annotation = getAnnotation(RangePartitioning.class);
if (annotation != null) {
found = true;
getProject().addPartitioningPolicy(new RangePartitioningMetadata(annotation, this));
}
annotation = getAnnotation(ValuePartitioning.class);
if (annotation != null) {
found = true;
getProject().addPartitioningPolicy(new ValuePartitioningMetadata(annotation, this));
}
annotation = getAnnotation(ValuePartitioning.class);
if (annotation != null) {
found = true;
getProject().addPartitioningPolicy(new ValuePartitioningMetadata(annotation, this));
}
annotation = getAnnotation(PinnedPartitioning.class);
if (annotation != null) {
found = true;
getProject().addPartitioningPolicy(new PinnedPartitioningMetadata(annotation, this));
}
annotation = getAnnotation(HashPartitioning.class);
if (annotation != null) {
found = true;
getProject().addPartitioningPolicy(new HashPartitioningMetadata(annotation, this));
}
boolean processed = false;
if (m_partitioned != null) {
processed = true;
processPartitioned(m_partitioned);
}
annotation = getAnnotation(Partitioned.class);
if (!processed && annotation != null) {
processed = true;
processPartitioned(annotation.getAttributeString("value"));
}
if (found && !processed) {
getLogger().logWarningMessage(MetadataLogger.WARNING_PARTIONED_NOT_SET, getJavaClass(), getAccessibleObject());
}
}
Aggregations