Tabnine Logo
EISOneToManyMappingHelper.getContainerPolicy
Code IndexAdd Tabnine to your IDE (free)

How to use
getContainerPolicy
method
in
org.eclipse.persistence.eis.mappings.EISOneToManyMappingHelper

Best Java code snippets using org.eclipse.persistence.eis.mappings.EISOneToManyMappingHelper.getContainerPolicy (Showing top 20 results out of 315)

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

/**
 * ADVANCED:
 * This method is used to add an object to a collection once the changeSet is applied.
 * The referenceKey parameter should only be used for direct Maps.
 */
public void simpleAddToCollectionChangeRecord(Object referenceKey, Object changeSetToAdd, ObjectChangeSet changeSet, AbstractSession session) {
  if (this.getContainerPolicy().hasOrder()) {
    this.simpleAddToCollectionChangeRecordWithOrder(referenceKey, changeSetToAdd, changeSet, session);
  } else {
    this.simpleAddToCollectionChangeRecordWithoutOrder(referenceKey, changeSetToAdd, changeSet, session);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * ADVANCED:
 * This method is used to remove an object from a collection once the changeSet is applied.
 * The referenceKey parameter should only be used for direct Maps.
 */
public void simpleRemoveFromCollectionChangeRecord(Object referenceKey, Object changeSetToRemove, ObjectChangeSet changeSet, AbstractSession session) {
  if (this.getContainerPolicy().hasOrder()) {
    this.simpleRemoveFromCollectionChangeRecordWithOrder(referenceKey, changeSetToRemove, changeSet, session);
  } else {
    this.simpleRemoveFromCollectionChangeRecordWithoutOrder(referenceKey, changeSetToRemove, changeSet, session);
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Merge changes from the source to the target object.
 */
public void mergeChangesIntoObject(Object target, ChangeRecord changeRecord, Object source, MergeManager mergeManager, AbstractSession targetSession) {
  if (this.getContainerPolicy().hasOrder()) {
    this.mergeChangesIntoObjectWithOrder(target, changeRecord, source, mergeManager, targetSession);
  } else {
    this.mergeChangesIntoObjectWithoutOrder(target, changeRecord, source, mergeManager, targetSession);
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * ADVANCED:
 * This method is used to add an object to a collection once the changeSet is applied.
 * The referenceKey parameter should only be used for direct Maps.
 */
public void simpleAddToCollectionChangeRecord(Object referenceKey, Object changeSetToAdd, ObjectChangeSet changeSet, AbstractSession session) {
  if (this.getContainerPolicy().hasOrder()) {
    this.simpleAddToCollectionChangeRecordWithOrder(referenceKey, changeSetToAdd, changeSet, session);
  } else {
    this.simpleAddToCollectionChangeRecordWithoutOrder(referenceKey, changeSetToAdd, changeSet, session);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * ADVANCED:
 * This method is used to remove an object from a collection once the changeSet is applied.
 * The referenceKey parameter should only be used for direct Maps.
 */
public void simpleRemoveFromCollectionChangeRecord(Object referenceKey, Object changeSetToRemove, ObjectChangeSet changeSet, AbstractSession session) {
  if (this.getContainerPolicy().hasOrder()) {
    this.simpleRemoveFromCollectionChangeRecordWithOrder(referenceKey, changeSetToRemove, changeSet, session);
  } else {
    this.simpleRemoveFromCollectionChangeRecordWithoutOrder(referenceKey, changeSetToRemove, changeSet, session);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Merge changes from the source to the target object.
 * Simply replace the entire target collection.
 */
private void mergeChangesIntoObjectWithOrder(Object target, ChangeRecord changeRecord, Object source, MergeManager mergeManager) {
  ContainerPolicy cp = this.getContainerPolicy();
  AbstractSession session = mergeManager.getSession();
  Vector changes = ((EISOrderedCollectionChangeRecord)changeRecord).getNewCollection();
  Object targetCollection = cp.containerInstance(changes.size());
  for (Enumeration stream = changes.elements(); stream.hasMoreElements();) {
    Object targetElement = this.buildAddedElementFromChangeSet(stream.nextElement(), mergeManager);
    cp.addInto(targetElement, targetCollection, session);
  }
  // reset the attribute to allow for set method to re-morph changes if the collection is not being stored directly
  this.setRealAttributeValueInObject(target, targetCollection);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * ADVANCED:
 * This method is used to remove an object from a collection once the changeSet is applied.
 * The referenceKey parameter should only be used for direct Maps.
 */
public void simpleRemoveFromCollectionChangeRecord(Object referenceKey, Object changeSetToRemove, ObjectChangeSet changeSet, AbstractSession session) {
  if (this.getContainerPolicy().hasOrder()) {
    this.simpleRemoveFromCollectionChangeRecordWithOrder(referenceKey, changeSetToRemove, changeSet, session);
  } else {
    this.simpleRemoveFromCollectionChangeRecordWithoutOrder(referenceKey, changeSetToRemove, changeSet, session);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Merge changes from the source to the target object.
 */
public void mergeChangesIntoObject(Object target, ChangeRecord changeRecord, Object source, MergeManager mergeManager) {
  if (this.getContainerPolicy().hasOrder()) {
    this.mergeChangesIntoObjectWithOrder(target, changeRecord, source, mergeManager);
  } else {
    this.mergeChangesIntoObjectWithoutOrder(target, changeRecord, source, mergeManager);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Merge changes from the source to the target object.
 */
public void mergeChangesIntoObject(Object target, ChangeRecord changeRecord, Object source, MergeManager mergeManager, AbstractSession targetSession) {
  if (this.getContainerPolicy().hasOrder()) {
    this.mergeChangesIntoObjectWithOrder(target, changeRecord, source, mergeManager, targetSession);
  } else {
    this.mergeChangesIntoObjectWithoutOrder(target, changeRecord, source, mergeManager, targetSession);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * ADVANCED:
 * This method is used to add an object to a collection once the changeSet is applied.
 * The referenceKey parameter should only be used for direct Maps.
 */
public void simpleAddToCollectionChangeRecord(Object referenceKey, Object changeSetToAdd, ObjectChangeSet changeSet, AbstractSession session) {
  if (this.getContainerPolicy().hasOrder()) {
    this.simpleAddToCollectionChangeRecordWithOrder(referenceKey, changeSetToAdd, changeSet, session);
  } else {
    this.simpleAddToCollectionChangeRecordWithoutOrder(referenceKey, changeSetToAdd, changeSet, session);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Merge changes from the source to the target object.
 * Simply replace the entire target collection.
 */
private void mergeChangesIntoObjectWithOrder(Object target, ChangeRecord changeRecord, Object source, MergeManager mergeManager, AbstractSession targetSession) {
  ContainerPolicy cp = this.getContainerPolicy();
  AbstractSession session = mergeManager.getSession();
  List changes = ((EISOrderedCollectionChangeRecord)changeRecord).getNewCollection();
  Object targetCollection = cp.containerInstance(changes.size());
  for (Object changed : changes) {
    Object targetElement = buildAddedElementFromChangeSet(changed, mergeManager, targetSession);
    cp.addInto(targetElement, targetCollection, session);
  }
  // reset the attribute to allow for set method to re-morph changes if the collection is not being stored directly
  this.setRealAttributeValueInObject(target, targetCollection);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Merge changes from the source to the target object.
 * Simply replace the entire target collection.
 */
private void mergeChangesIntoObjectWithOrder(Object target, ChangeRecord changeRecord, Object source, MergeManager mergeManager, AbstractSession targetSession) {
  ContainerPolicy cp = this.getContainerPolicy();
  AbstractSession session = mergeManager.getSession();
  List changes = ((EISOrderedCollectionChangeRecord)changeRecord).getNewCollection();
  Object targetCollection = cp.containerInstance(changes.size());
  for (Object changed : changes) {
    Object targetElement = buildAddedElementFromChangeSet(changed, mergeManager, targetSession);
    cp.addInto(targetElement, targetCollection, session);
  }
  // reset the attribute to allow for set method to re-morph changes if the collection is not being stored directly
  this.setRealAttributeValueInObject(target, targetCollection);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Compare the attributes. Return true if they are alike.
 * The order of the elements is significant.
 */
private boolean compareAttributeValuesWithOrder(Object collection1, Object collection2, AbstractSession session) {
  ContainerPolicy cp = this.getContainerPolicy();
  Object iter1 = cp.iteratorFor(collection1);
  Object iter2 = cp.iteratorFor(collection2);
  while (cp.hasNext(iter1)) {
    if (!this.compareElements(cp.next(iter1, session), cp.next(iter2, session), session)) {
      return false;
    }
  }
  return true;
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Compare the attributes. Return true if they are alike.
 * The order of the elements is significant.
 */
private boolean compareAttributeValuesWithOrder(Object collection1, Object collection2, AbstractSession session) {
  ContainerPolicy cp = this.getContainerPolicy();
  Object iter1 = cp.iteratorFor(collection1);
  Object iter2 = cp.iteratorFor(collection2);
  while (cp.hasNext(iter1)) {
    if (!this.compareElements(cp.next(iter1, session), cp.next(iter2, session), session)) {
      return false;
    }
  }
  return true;
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Compare the attributes. Return true if they are alike.
 * The order of the elements is significant.
 */
private boolean compareAttributeValuesWithOrder(Object collection1, Object collection2, AbstractSession session) {
  ContainerPolicy cp = this.getContainerPolicy();
  Object iter1 = cp.iteratorFor(collection1);
  Object iter2 = cp.iteratorFor(collection2);
  while (cp.hasNext(iter1)) {
    if (!this.compareElements(cp.next(iter1, session), cp.next(iter2, session), session)) {
      return false;
    }
  }
  return true;
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Compare the attributes. Return true if they are alike.
 * Assume the passed-in attributes are non-null.
 */
private boolean compareAttributeValues(Object collection1, Object collection2, AbstractSession session) {
  ContainerPolicy cp = this.getContainerPolicy();
  if (cp.sizeFor(collection1) != cp.sizeFor(collection2)) {
    return false;
  }
  // if they are both empty, go no further...
  if (cp.sizeFor(collection1) == 0) {
    return true;
  }
  if (cp.hasOrder()) {
    return this.compareAttributeValuesWithOrder(collection1, collection2, session);
  } else {
    return this.compareAttributeValuesWithoutOrder(collection1, collection2, session);
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Build and return the change record that results
 * from comparing the two collection attributes.
 */
public ChangeRecord compareForChange(Object clone, Object backup, ObjectChangeSet owner, AbstractSession session) {
  ContainerPolicy cp = this.getContainerPolicy();
  Object cloneCollection = this.getRealCollectionAttributeValueFromObject(clone, session);
  Object backupCollection = null;
  if (owner.isNew()) {
    backupCollection = cp.containerInstance(1);
  } else {
    backupCollection = this.getRealCollectionAttributeValueFromObject(backup, session);
  }
  if (cp.hasOrder()) {
    return this.compareAttributeValuesForChangeWithOrder(cloneCollection, backupCollection, owner, session);
  } else {
    return this.compareAttributeValuesForChangeWithoutOrder(cloneCollection, backupCollection, owner, session);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Merge changes from the source to the target object.
 * Simply replace the entire target collection.
 */
public void mergeIntoObject(Object target, boolean isTargetUnInitialized, Object source, MergeManager mergeManager) {
  ContainerPolicy cp = this.getContainerPolicy();
  AbstractSession session = mergeManager.getSession();
  Object sourceCollection = this.getRealCollectionAttributeValueFromObject(source, session);
  Object targetCollection = cp.containerInstance(cp.sizeFor(sourceCollection));
  for (Object iter = cp.iteratorFor(sourceCollection); cp.hasNext(iter);) {
    Object targetElement = this.buildElementFromElement(cp.next(iter, session), mergeManager);
    cp.addInto(targetElement, targetCollection, session);
  }
  // reset the attribute to allow for set method to re-morph changes if the collection is not being stored directly
  this.setRealAttributeValueInObject(target, targetCollection);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Merge changes from the source to the target object.
 * Simply replace the entire target collection.
 */
public void mergeIntoObject(Object target, boolean isTargetUnInitialized, Object source, MergeManager mergeManager, AbstractSession targetSession) {
  ContainerPolicy cp = this.getContainerPolicy();
  AbstractSession session = mergeManager.getSession();
  Object sourceCollection = this.getRealCollectionAttributeValueFromObject(source, session);
  Object targetCollection = cp.containerInstance(cp.sizeFor(sourceCollection));
  for (Object iter = cp.iteratorFor(sourceCollection); cp.hasNext(iter);) {
    Object targetElement = this.buildElementFromElement(cp.next(iter, session), mergeManager, targetSession);
    cp.addInto(targetElement, targetCollection, session);
  }
  // reset the attribute to allow for set method to re-morph changes if the collection is not being stored directly
  setRealAttributeValueInObject(target, targetCollection);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Merge changes from the source to the target object.
 * Simply replace the entire target collection.
 */
public void mergeIntoObject(Object target, boolean isTargetUnInitialized, Object source, MergeManager mergeManager, AbstractSession targetSession) {
  ContainerPolicy cp = this.getContainerPolicy();
  AbstractSession session = mergeManager.getSession();
  Object sourceCollection = this.getRealCollectionAttributeValueFromObject(source, session);
  Object targetCollection = cp.containerInstance(cp.sizeFor(sourceCollection));
  for (Object iter = cp.iteratorFor(sourceCollection); cp.hasNext(iter);) {
    Object targetElement = this.buildElementFromElement(cp.next(iter, session), mergeManager, targetSession);
    cp.addInto(targetElement, targetCollection, session);
  }
  // reset the attribute to allow for set method to re-morph changes if the collection is not being stored directly
  setRealAttributeValueInObject(target, targetCollection);
}
org.eclipse.persistence.eis.mappingsEISOneToManyMappingHelpergetContainerPolicy

Javadoc

Convenience method.

Popular methods of EISOneToManyMappingHelper

  • <init>
    Constructor.
  • buildAddedElementFromChangeSet
    Convenience method.
  • buildChangeSet
    Convenience method.
  • buildElementFromElement
    Convenience method.
  • buildRemovedElementFromChangeSet
    Convenience method.
  • compareAttributeValues
    Compare the attributes. Return true if they are alike. Assume the passed-in attributes are non-null.
  • compareAttributeValuesForChangeWithOrder
    Build and return the change record that results from comparing the two collection attributes. The or
  • compareAttributeValuesForChangeWithoutOrder
    Build and return the change record that results from comparing the two collection attributes. Ignore
  • compareAttributeValuesWithOrder
    Compare the attributes. Return true if they are alike. The order of the elements is significant.
  • compareAttributeValuesWithoutOrder
    Compare the attributes. Return true if they are alike. Ignore the order of the elements.
  • compareElements
    Convenience method. Check for null values before delegating to the mapping.
  • compareElementsForChange
    Convenience method. Check for null values before delegating to the mapping.
  • compareElements,
  • compareElementsForChange,
  • compareForChange,
  • compareObjects,
  • getAttributeName,
  • getDatabaseMapping,
  • getMapping,
  • getRealCollectionAttributeValueFromObject,
  • mapKeyHasChanged

Popular in Java

  • Start an intent from android
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • setScale (BigDecimal)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Runnable (java.lang)
    Represents a command that can be executed. Often used to run code in a different Thread.
  • NoSuchElementException (java.util)
    Thrown when trying to retrieve an element past the end of an Enumeration or Iterator.
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top Sublime Text plugins
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