congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
OptimisticLockingPolicy.shouldUpdateVersionOnMappingChange
Code IndexAdd Tabnine to your IDE (free)

How to use
shouldUpdateVersionOnMappingChange
method
in
org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy

Best Java code snippets using org.eclipse.persistence.internal.descriptors.OptimisticLockingPolicy.shouldUpdateVersionOnMappingChange (Showing top 3 results out of 315)

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

/**
 * Add the attribute change record.
 */
public void addChange(ChangeRecord changeRecord) {
  if (changeRecord == null) {
    return;
  }
  String attributeName = changeRecord.getAttribute();
  Map attributeToChanges = getAttributesToChanges();
  List changes = getChanges();
  ChangeRecord existingChangeRecord = (ChangeRecord)attributeToChanges.get(attributeName);
  // change tracking may add a change to an existing attribute fix that here.
  if (existingChangeRecord != null) {
    changes.remove(existingChangeRecord);
  }
  changes.add(changeRecord);
  attributeToChanges.put(attributeName, changeRecord);
  dirtyUOWChangeSet();
  
  // now let's do some house keeping.
  DatabaseMapping mapping = changeRecord.getMapping();
  OptimisticLockingPolicy olp = getDescriptor().getOptimisticLockingPolicy();
  if (olp != null){
    if ((olp.shouldUpdateVersionOnOwnedMappingChange() && mapping.isOwned()) || (olp.shouldUpdateVersionOnMappingChange())){
      this.shouldModifyVersionField = true;  // must update version field when owned mapping changes
    }
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Add the attribute change record.
 */
public void addChange(ChangeRecord changeRecord) {
  if (changeRecord == null) {
    return;
  }
  String attributeName = changeRecord.getAttribute();
  Map attributeToChanges = getAttributesToChanges();
  List changes = getChanges();
  ChangeRecord existingChangeRecord = (ChangeRecord)attributeToChanges.get(attributeName);
  // change tracking may add a change to an existing attribute fix that here.
  if (existingChangeRecord != null) {
    changes.remove(existingChangeRecord);
  }
  changes.add(changeRecord);
  attributeToChanges.put(attributeName, changeRecord);
  dirtyUOWChangeSet();
  // now let's do some house keeping.
  DatabaseMapping mapping = changeRecord.getMapping();
  OptimisticLockingPolicy olp = getDescriptor().getOptimisticLockingPolicy();
  if (olp != null){
    if ((olp.shouldUpdateVersionOnOwnedMappingChange() && mapping.isOwned()) || (olp.shouldUpdateVersionOnMappingChange())){
      this.shouldModifyVersionField = true;  // must update version field when owned mapping changes
    }
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Add the attribute change record.
 */
public void addChange(ChangeRecord changeRecord) {
  if (changeRecord == null) {
    return;
  }
  String attributeName = changeRecord.getAttribute();
  Map attributeToChanges = getAttributesToChanges();
  List changes = getChanges();
  ChangeRecord existingChangeRecord = (ChangeRecord)attributeToChanges.get(attributeName);
  // change tracking may add a change to an existing attribute fix that here.
  if (existingChangeRecord != null) {
    changes.remove(existingChangeRecord);
  }
  changes.add(changeRecord);
  attributeToChanges.put(attributeName, changeRecord);
  dirtyUOWChangeSet();
  
  // now let's do some house keeping.
  DatabaseMapping mapping = changeRecord.getMapping();
  OptimisticLockingPolicy olp = getDescriptor().getOptimisticLockingPolicy();
  if (olp != null){
    if ((olp.shouldUpdateVersionOnOwnedMappingChange() && mapping.isOwned()) || (olp.shouldUpdateVersionOnMappingChange())){
      this.shouldModifyVersionField = true;  // must update version field when owned mapping changes
    }
  }
}
org.eclipse.persistence.internal.descriptorsOptimisticLockingPolicyshouldUpdateVersionOnMappingChange

Javadoc

INTERNAL: Returns true if the policy has been set to set an optimistic read lock when any mapping changes.

Popular methods of OptimisticLockingPolicy

  • addLockFieldsToUpdateRow
    INTERNAL: Add update fields for template row. These are any unmapped fields required to write in an
  • addLockValuesToTranslationRow
    INTERNAL: The method should update the translation row with the correct write lock values. This meth
  • buildDeleteExpression
    INTERNAL: When given an expression, this method will return a new expression with the optimistic loc
  • buildUpdateExpression
    INTERNAL: When given an expression, this method will return a new expression with the optimistic loc
  • clone
  • compareWriteLockValues
    INTERNAL: This method shouldn't be called if supportsWriteLockValuesComparison() returns false. This
  • getBaseValue
    INTERNAL: This is the base value that is older than all other values, it is used in the place of nul
  • getValueToPutInCache
    INTERNAL: Return the value that should be stored in the identity map. If the value is not stored in
  • getVersionDifference
    PUBLIC: Return the number of versions different between these objects.
  • getWriteLockField
    INTERNAL: Return the write lock field. #see this method in VersionLockingPolicy
  • getWriteLockUpdateExpression
    INTERNAL: This method will return an expression that is used to update its optimistic locking field
  • getWriteLockValue
    INTERNAL: This method will return the optimistic lock value for the object #see this method in Versi
  • getWriteLockUpdateExpression,
  • getWriteLockValue,
  • initialize,
  • initializeProperties,
  • isCascaded,
  • isNewerVersion,
  • isStoredInCache,
  • mergeIntoParentCache,
  • setDescriptor,
  • setupWriteFieldsForInsert

Popular in Java

  • Making http requests using okhttp
  • startActivity (Activity)
  • setRequestProperty (URLConnection)
  • setScale (BigDecimal)
  • FileReader (java.io)
    A specialized Reader that reads from a file in the file system. All read requests made by calling me
  • Annotation (javassist.bytecode.annotation)
    The annotation structure.An instance of this class is returned bygetAnnotations() in AnnotationsAttr
  • ImageIO (javax.imageio)
  • JCheckBox (javax.swing)
  • Base64 (org.apache.commons.codec.binary)
    Provides Base64 encoding and decoding as defined by RFC 2045.This class implements section 6.8. Base
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top 17 PhpStorm Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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