Tabnine Logo
EISOrderedCollectionChangeRecord
Code IndexAdd Tabnine to your IDE (free)

How to use
EISOrderedCollectionChangeRecord
in
org.eclipse.persistence.eis

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

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

/**
 * Add a change set after it has been applied.
 */
public void simpleAddChangeSet(Object changeSet) {
  // check whether the change set was removed earlier
  if (!this.restoreRemovedChangeSet(changeSet)) {
    // the change set is tacked on the end of the new collection
    this.addAddedChangeSet(changeSet, this.getNewCollectionSize());
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Attempt to restore the specified change set.
 * Return true if the change set was removed earlier
 * and was successfully restored to the end of
 * the collection.
 */
private boolean restoreRemovedChangeSet(Object changeSet) {
  int changeSetIndex = this.getRemovesIndexOf(changeSet);
  if (changeSetIndex == -1) {
    return false;
  }
  this.getRemoves().remove(changeSetIndex);
  int removeIndex = this.getRemoveIndex(changeSetIndex);
  this.setRemoveIndexes(this.removeFrom(changeSetIndex, this.getRemoveIndexes()));
  // now move the change set over to the collection of moves
  this.addMovedChangeSet(changeSet, removeIndex, this.getNewCollectionSize());
  return true;
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Attempt to remove the specified change set
 * from the collection of moved change sets.
 * Return true if the change set was moved earlier
 * and was successfully removed.
 */
private boolean removeMovedChangeSet(Object changeSet) {
  int changeSetIndex = this.getMovesIndexOf(changeSet);
  if (changeSetIndex == -1) {
    return false;
  }
  this.getMoves().remove(changeSetIndex);
  int beforeMoveIndex = this.getBeforeMoveIndex(changeSetIndex);
  this.setMoveIndexPairs(this.removeFrom(changeSetIndex, this.getMoveIndexPairs()));
  // now move the change set over to the collection of removes
  this.addRemovedChangeSet(changeSet, beforeMoveIndex);
  return true;
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

  /**
   * Remove a change set after it has been applied.
   */
  public void simpleRemoveChangeSet(Object changeSet) {
    // the change set must have been either moved or added earlier
    if (!this.removeMovedChangeSet(changeSet)) {
      this.cancelAddedChangeSet(changeSet);
    }
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Add an moved change set.
 */
public void addMovedChangeSet(Object changeSet, int oldIndex, int newIndex) {
  getMoves().add(changeSet);
  int[] pair = new int[2];
  pair[0] = oldIndex;
  pair[1] = newIndex;
  setMoveIndexPairs(this.addTo(pair, getMoveIndexPairs()));
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

EISOrderedCollectionChangeRecord changeRecord = new EISOrderedCollectionChangeRecord(owner, this.getAttributeName(), this.getDatabaseMapping());
      changeRecord.addMovedChangeSet(this.buildChangeSet(cloneElement, owner, session), j, i);
      break;// matching backup element found - skip the rest of them
    changeRecord.addAddedChangeSet(this.buildChangeSet(cloneElement, owner, session), i);
  if (backupElement != XXX) {
    changeRecord.addRemovedChangeSet(this.buildChangeSet(backupElement, owner, session), i);
if (changeRecord.hasChanges()) {
  return changeRecord;
} else {
origin: com.haulmont.thirdparty/eclipselink

/**
 * The specified change set was added earlier;
 * cancel it out.
 */
private void cancelAddedChangeSet(Object changeSet) {
  int changeSetIndex = this.getAddsIndexOf(changeSet);
  if (changeSetIndex == -1) {
    throw new IllegalStateException(changeSet.toString());
  }
  this.getAdds().remove(changeSetIndex);
  this.setAddIndexes(this.removeFrom(changeSetIndex, this.getAddIndexes()));
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Add an removed change set.
 */
public void addRemovedChangeSet(Object changeSet, int index) {
  getRemoves().add(changeSet);
  setRemoveIndexes(this.addTo(index, getRemoveIndexes()));
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Add an added change set.
 */
public void addAddedChangeSet(Object changeSet, int index) {
  getAdds().add(changeSet);
  setAddIndexes(this.addTo(index, getAddIndexes()));
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

int newSize = this.getNewCollectionSize();
Vector newCollection = new Vector(newSize);
for (int i = 0; i < newSize; i++) {
  if ((addIndex < localAddIndexes.length) && (localAddIndexes[addIndex] == i)) {
    newCollection.add(this.getAdd(addIndex));
    addIndex++;
    continue;
    newCollection.add(this.getMove(moveIndex));
    moveIndex++;
    continue;
origin: com.haulmont.thirdparty/eclipselink

/**
 * Remove stuff from an ordered collection.
 */
private void simpleRemoveFromCollectionChangeRecordWithOrder(Object referenceKey, Object changeSetToRemove, ObjectChangeSet changeSet, AbstractSession session) {
  EISOrderedCollectionChangeRecord changeRecord = (EISOrderedCollectionChangeRecord)changeSet.getChangesForAttributeNamed(this.getAttributeName());
  if (changeRecord == null) {
    changeRecord = new EISOrderedCollectionChangeRecord(changeSet, this.getAttributeName(), this.getDatabaseMapping());
    changeSet.addChange(changeRecord);
  }
  changeRecord.simpleRemoveChangeSet(changeSetToRemove);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Add stuff to an ordered collection.
 */
private void simpleAddToCollectionChangeRecordWithOrder(Object referenceKey, Object changeSetToAdd, ObjectChangeSet changeSet, AbstractSession session) {
  EISOrderedCollectionChangeRecord changeRecord = (EISOrderedCollectionChangeRecord)changeSet.getChangesForAttributeNamed(this.getAttributeName());
  if (changeRecord == null) {
    changeRecord = new EISOrderedCollectionChangeRecord(changeSet, this.getAttributeName(), this.getDatabaseMapping());
    changeSet.addChange(changeRecord);
  }
  changeRecord.simpleAddChangeSet(changeSetToAdd);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Return the specified add.
 */
private Object getAdd(int index) {
  return this.getAdds().get(index);
}
origin: com.haulmont.thirdparty/eclipselink

EISOrderedCollectionChangeRecord changeRecord = new EISOrderedCollectionChangeRecord(owner, getAttributeName(), this.getDatabaseMapping());
      changeRecord.addMovedChangeSet(this.buildChangeSet(cloneElement, owner, session), j, i);
      break;// matching backup element found - skip the rest of them
    changeRecord.addAddedChangeSet(this.buildChangeSet(cloneElement, owner, session), i);
  if (backupElement != XXX) {
    changeRecord.addRemovedChangeSet(this.buildChangeSet(backupElement, owner, session), i);
if (changeRecord.hasChanges()) {
  return changeRecord;
} else {
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * The specified change set was added earlier;
 * cancel it out.
 */
private void cancelAddedChangeSet(Object changeSet) {
  int changeSetIndex = this.getAddsIndexOf(changeSet);
  if (changeSetIndex == -1) {
    throw new IllegalStateException(changeSet.toString());
  }
  this.getAdds().remove(changeSetIndex);
  this.setAddIndexes(this.removeFrom(changeSetIndex, this.getAddIndexes()));
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Add an moved change set.
 */
public void addMovedChangeSet(Object changeSet, int oldIndex, int newIndex) {
  getMoves().add(changeSet);
  int[] pair = new int[2];
  pair[0] = oldIndex;
  pair[1] = newIndex;
  setMoveIndexPairs(this.addTo(pair, getMoveIndexPairs()));
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * Add an removed change set.
 */
public void addRemovedChangeSet(Object changeSet, int index) {
  this.getRemoves().addElement(changeSet);
  this.setRemoveIndexes(this.addTo(index, this.getRemoveIndexes()));
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Add an added change set.
 */
public void addAddedChangeSet(Object changeSet, int index) {
  getAdds().add(changeSet);
  setAddIndexes(this.addTo(index, getAddIndexes()));
}
origin: com.haulmont.thirdparty/eclipselink

int newSize = getNewCollectionSize();
List newCollection = new ArrayList(newSize);
for (int i = 0; i < newSize; i++) {
  if ((addIndex < localAddIndexes.length) && (localAddIndexes[addIndex] == i)) {
    newCollection.add(this.getAdd(addIndex));
    addIndex++;
    continue;
    newCollection.add(this.getMove(moveIndex));
    moveIndex++;
    continue;
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Remove stuff from an ordered collection.
 */
private void simpleRemoveFromCollectionChangeRecordWithOrder(Object referenceKey, Object changeSetToRemove, ObjectChangeSet changeSet, AbstractSession session) {
  EISOrderedCollectionChangeRecord changeRecord = (EISOrderedCollectionChangeRecord)changeSet.getChangesForAttributeNamed(this.getAttributeName());
  if (changeRecord == null) {
    changeRecord = new EISOrderedCollectionChangeRecord(changeSet, this.getAttributeName(), this.getDatabaseMapping());
    changeSet.addChange(changeRecord);
  }
  changeRecord.simpleRemoveChangeSet(changeSetToRemove);
}
org.eclipse.persistence.eisEISOrderedCollectionChangeRecord

Javadoc

INTERNAL: Capture the changes for an ordered collection where the entire collection is simply replaced if it has changed.

Most used methods

  • <init>
    Construct a ChangeRecord that can be used to represent the changes to an ordered collection.
  • addAddedChangeSet
    Add an added change set.
  • addMovedChangeSet
    Add an moved change set.
  • addRemovedChangeSet
    Add an removed change set.
  • addTo
    Add the int[] to the end of the array. Return the new array.
  • cancelAddedChangeSet
    The specified change set was added earlier; cancel it out.
  • getAdd
    Return the specified add.
  • getAddIndexes
    ADVANCED: Return the indexes into the new collection of the elements that were added.
  • getAdds
    ADVANCED: Return the entries for all the elements added to the new collection. The contents of this
  • getAddsIndexOf
    Return the index in the adds of the specified change set, without triggering the instantiation of th
  • getAddsSize
    Return the number of adds, without triggering the instantiation of the collection.
  • getBeforeMoveIndex
    Return the specified "before" move index.
  • getAddsSize,
  • getBeforeMoveIndex,
  • getMove,
  • getMoveIndexPairs,
  • getMoves,
  • getMovesIndexOf,
  • getMovesSize,
  • getNewCollection,
  • getNewCollectionSize,
  • getOwner

Popular in Java

  • Making http post requests using okhttp
  • runOnUiThread (Activity)
  • getOriginalFilename (MultipartFile)
    Return the original filename in the client's filesystem.This may contain path information depending
  • scheduleAtFixedRate (Timer)
  • Table (com.google.common.collect)
    A collection that associates an ordered pair of keys, called a row key and a column key, with a sing
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Dictionary (java.util)
    Note: Do not use this class since it is obsolete. Please use the Map interface for new implementatio
  • JFileChooser (javax.swing)
  • Response (javax.ws.rs.core)
    Defines the contract between a returned instance and the runtime when an application needs to provid
  • LoggerFactory (org.slf4j)
    The LoggerFactory is a utility class producing Loggers for various logging APIs, most notably for lo
  • Top plugins for WebStorm
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