Tabnine Logo
DescriptorIterator.shouldIterateOnPrimitives
Code IndexAdd Tabnine to your IDE (free)

How to use
shouldIterateOnPrimitives
method
in
org.eclipse.persistence.internal.descriptors.DescriptorIterator

Best Java code snippets using org.eclipse.persistence.internal.descriptors.DescriptorIterator.shouldIterateOnPrimitives (Showing top 20 results out of 315)

origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Called when iterating through descriptors to handle iteration on this mapping when it is used as a MapKey
 * @param iterator
 * @param element
 */
public void iterateOnMapKey(DescriptorIterator iterator, Object element){
  if (iterator.shouldIterateOnPrimitives()) {
    iterator.iteratePrimitiveForMapping(element, this);
  }
}

origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Iterate on the attribute value.
 * The value holder has already been processed.
 * PERF: Avoid iteration if not required.
 */
@Override
public void iterateOnRealAttributeValue(DescriptorIterator iterator, Object realAttributeValue) {
  if (iterator.shouldIterateOnPrimitives()) {
    super.iterateOnRealAttributeValue(iterator, realAttributeValue);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Iterate on the attribute value.
 * The value holder has already been processed.
 * PERF: Avoid iteration if not required.
 */
public void iterateOnRealAttributeValue(DescriptorIterator iterator, Object realAttributeValue) {
  if (iterator.shouldIterateOnPrimitives()) {
    super.iterateOnRealAttributeValue(iterator, realAttributeValue);
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Called when iterating through descriptors to handle iteration on this mapping when it is used as a MapKey.
 */
public void iterateOnMapKey(DescriptorIterator iterator, Object element){
  if (iterator.shouldIterateOnPrimitives()) {
    iterator.iteratePrimitiveForMapping(element, this);
  }
}

origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Iterate on the attribute value.
 * The value holder has already been processed.
 * PERF: Avoid iteration if not required.
 */
@Override
public void iterateOnRealAttributeValue(DescriptorIterator iterator, Object realAttributeValue) {
  if (iterator.shouldIterateOnPrimitives()) {
    super.iterateOnRealAttributeValue(iterator, realAttributeValue);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Called when iterating through descriptors to handle iteration on this mapping when it is used as a MapKey.
 */
public void iterateOnMapKey(DescriptorIterator iterator, Object element){
  if (iterator.shouldIterateOnPrimitives()) {
    iterator.iteratePrimitiveForMapping(element, this);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Perform the iteration operation on the objects attributes through the mappings.
 */
public void iterate(DescriptorIterator iterator) {
  List<DatabaseMapping> mappings;
  // Only iterate on relationships if required.
  if (iterator.shouldIterateOnPrimitives()) {
    mappings = this.descriptor.getMappings();
  } else {
    // PERF: Only process relationships.
    if (this.isSimple) {
      return;
    }
    mappings = this.relationshipMappings;
  }
  int mappingsSize = mappings.size();
  for (int index = 0; index < mappingsSize; index++) {
    mappings.get(index).iterate(iterator);
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Perform the iteration operation on the objects attributes through the mappings.
 */
public void iterate(DescriptorIterator iterator) {
  List<DatabaseMapping> mappings;
  // Only iterate on relationships if required.
  if (iterator.shouldIterateOnPrimitives()) {
    mappings = this.descriptor.getMappings();
  } else {
    // PERF: Only process relationships.
    if (this.isSimple) {
      return;
    }
    mappings = this.relationshipMappings;
  }
  int mappingsSize = mappings.size();
  for (int index = 0; index < mappingsSize; index++) {
    mappings.get(index).iterate(iterator);
  }
}
 
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Iterate on the appropriate attribute.
 */
@Override
public void iterate(DescriptorIterator iterator) {
  // PERF: Only iterate when required.
  if (iterator.shouldIterateOnPrimitives()) {
    iterator.iteratePrimitiveForMapping(getAttributeValueFromObject(iterator.getVisitedParent()), this);
  }
}

origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Iterate on the appropriate attribute.
 */
@Override
public void iterate(DescriptorIterator iterator) {
  // PERF: Only iterate when required.
  if (iterator.shouldIterateOnPrimitives()) {
    iterator.iteratePrimitiveForMapping(getAttributeValueFromObject(iterator.getVisitedParent()), this);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Iterate on the appropriate attribute.
 */
public void iterate(DescriptorIterator iterator) {
  // PERF: Only iterate when required.
  if (iterator.shouldIterateOnPrimitives()) {
    iterator.iteratePrimitiveForMapping(getAttributeValueFromObject(iterator.getVisitedParent()), this);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Iterate on the primitive value for its mapping.
 */
public void iteratePrimitiveForMapping(Object primitiveValue, DatabaseMapping mapping) {
  if (primitiveValue == null) {
    return;
  }
  setCurrentMapping(mapping);
  setCurrentDescriptor(null);
  if (shouldIterateOnPrimitives()) {// false by default
    internalIteratePrimitive(primitiveValue);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Perform the iteration operation on the objects attributes through the mappings.
 */
public void iterate(DescriptorIterator iterator) {
  List<DatabaseMapping> mappings;
  // Only iterate on relationships if required.
  if (iterator.shouldIterateOnPrimitives()) {
    mappings = this.descriptor.getMappings();
  } else {
    ObjectBuilder builder = this.descriptor.getObjectBuilder();
    // PERF: Only process relationships.
    if (builder.isSimple()) {
      return;
    }
    mappings = builder.getRelationshipMappings();
  }
  int mappingsSize = mappings.size();
  for (int index = 0; index < mappingsSize; index++) {
    mappings.get(index).iterate(iterator);
  }
}
 
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Iterate on the primitive value for its mapping.
 */
public void iteratePrimitiveForMapping(Object primitiveValue, DatabaseMapping mapping) {
  if (primitiveValue == null) {
    return;
  }
  setCurrentMapping(mapping);
  setCurrentDescriptor(null);
  if (shouldIterateOnPrimitives()) {// false by default
    AttributeGroup currentGroupOriginal = null;
    AttributeItem currentItemOriginal = null;
    if(this.usesGroup) {
      currentGroupOriginal = this.currentGroup;
      currentItemOriginal = this.currentItem;
      this.currentGroup = this.currentItem.getGroup();
    }
    internalIteratePrimitive(primitiveValue);
    if(this.usesGroup) {
      this.currentGroup = currentGroupOriginal;
      this.currentItem = currentItemOriginal;
    }
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Iterate on the attribute value.
 * The value holder has already been processed.
 * PERF: Avoid iteration if not required.
 */
public void iterateOnRealAttributeValue(DescriptorIterator iterator, Object realAttributeValue) {
  super.iterateOnRealAttributeValue(iterator, realAttributeValue);
  ContainerPolicy cp = getContainerPolicy();
  if (realAttributeValue != null && !iterator.shouldIterateOnPrimitives()) {
    for (Object iter = cp.iteratorFor(realAttributeValue); cp.hasNext(iter);) {
      Object wrappedObject = cp.nextEntry(iter, iterator.getSession());
      cp.iterateOnMapKey(iterator, wrappedObject);
    }
  }
}
 
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Iterate on the attribute value.
 * The value holder has already been processed.
 * PERF: Avoid iteration if not required.
 */
@Override
public void iterateOnRealAttributeValue(DescriptorIterator iterator, Object realAttributeValue) {
  super.iterateOnRealAttributeValue(iterator, realAttributeValue);
  ContainerPolicy cp = getContainerPolicy();
  if (realAttributeValue != null && !iterator.shouldIterateOnPrimitives()) {
    for (Object iter = cp.iteratorFor(realAttributeValue); cp.hasNext(iter);) {
      Object wrappedObject = cp.nextEntry(iter, iterator.getSession());
      cp.iterateOnMapKey(iterator, wrappedObject);
    }
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Iterate on the attribute value.
 * The value holder has already been processed.
 * PERF: Avoid iteration if not required.
 */
@Override
public void iterateOnRealAttributeValue(DescriptorIterator iterator, Object realAttributeValue) {
  super.iterateOnRealAttributeValue(iterator, realAttributeValue);
  ContainerPolicy cp = getContainerPolicy();
  if (realAttributeValue != null && !iterator.shouldIterateOnPrimitives()) {
    for (Object iter = cp.iteratorFor(realAttributeValue); cp.hasNext(iter);) {
      Object wrappedObject = cp.nextEntry(iter, iterator.getSession());
      cp.iterateOnMapKey(iterator, wrappedObject);
    }
  }
}
 
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Iterate on the appropriate attribute value.
 */
public void iterate(DescriptorIterator iterator) {
  // PERF: Only iterate when required.
  if (iterator.shouldIterateOnPrimitives()) {
    Object attributeValue = this.getAttributeValueFromObject(iterator.getVisitedParent());
    if (attributeValue == null) {
      return;
    }
    ContainerPolicy cp = this.getContainerPolicy();
    for (Object iter = cp.iteratorFor(attributeValue); cp.hasNext(iter);) {
      iterator.iteratePrimitiveForMapping(cp.next(iter, iterator.getSession()), this);
    }
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Iterate on the appropriate attribute value.
 */
public void iterate(DescriptorIterator iterator) {
  // PERF: Only iterate when required.
  if (iterator.shouldIterateOnPrimitives()) {
    Object attributeValue = this.getAttributeValueFromObject(iterator.getVisitedParent());
    if (attributeValue == null) {
      return;
    }
    ContainerPolicy cp = this.getContainerPolicy();
    for (Object iter = cp.iteratorFor(attributeValue); cp.hasNext(iter);) {
      iterator.iteratePrimitiveForMapping(cp.next(iter, iterator.getSession()), this);
    }
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Iterate on the appropriate attribute value.
 */
public void iterate(DescriptorIterator iterator) {
  // PERF: Only iterate when required.
  if (iterator.shouldIterateOnPrimitives()) {
    Object attributeValue = this.getAttributeValueFromObject(iterator.getVisitedParent());
    if (attributeValue == null) {
      return;
    }
    ContainerPolicy cp = this.getContainerPolicy();
    for (Object iter = cp.iteratorFor(attributeValue); cp.hasNext(iter);) {
      iterator.iteratePrimitiveForMapping(cp.next(iter, iterator.getSession()), this);
    }
  }
}
org.eclipse.persistence.internal.descriptorsDescriptorIteratorshouldIterateOnPrimitives

Javadoc

Return whether to process primitive reference objects (e.g. Strings, Dates, ints).

Popular methods of DescriptorIterator

  • getCascadeDepth
  • getCurrentDescriptor
  • getDescriptorFor
    Fetch and return the descriptor for the specified object.
  • getSession
  • getVisitedObjects
  • getVisitedParent
    Return the last object visited.
  • getVisitedStack
  • internalIterateAggregateObject
    Iterate an aggregate object (i.e. an object that is the target of an AggregateMapping). Override thi
  • internalIterateIndirectContainer
    Iterate an indirect container (IndirectList or IndirectMap). Override this method if appropriate.
  • internalIteratePrimitive
    Iterate a primitive object (String, Date, Integer, etc.). Override this method if appropriate.
  • internalIterateReferenceObject
    Iterate a (a non-Aggregate) reference object. Override this method if appropriate.
  • internalIterateValueHolder
    Iterate a value holder. Override this method if appropriate.
  • internalIterateReferenceObject,
  • internalIterateValueHolder,
  • iterate,
  • iterateForAggregateMapping,
  • iterateIndirectContainerForMapping,
  • iteratePrimitiveForMapping,
  • iterateReferenceObjectForMapping,
  • iterateReferenceObjects,
  • iterateValueHolderForMapping,
  • setCascadeCondition

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getSystemService (Context)
  • scheduleAtFixedRate (Timer)
  • setContentView (Activity)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • VirtualMachine (com.sun.tools.attach)
    A Java virtual machine. A VirtualMachine represents a Java virtual machine to which this Java vir
  • LinkedHashMap (java.util)
    LinkedHashMap is an implementation of Map that guarantees iteration order. All optional operations a
  • PriorityQueue (java.util)
    A PriorityQueue holds elements on a priority heap, which orders the elements according to their natu
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • Table (org.hibernate.mapping)
    A relational table
  • CodeWhisperer alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now