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

How to use
getLockFieldsByTable
method
in
org.eclipse.persistence.descriptors.SelectedFieldsLockingPolicy

Best Java code snippets using org.eclipse.persistence.descriptors.SelectedFieldsLockingPolicy.getLockFieldsByTable (Showing top 6 results out of 315)

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

/**
 * INTERNAL: It is responsible for initializing the policy;
 */
@Override
public void initialize(AbstractSession session) {
  super.initialize(session);
  List<DatabaseField> lockFields = getLockFields();
  int size = lockFields.size();
  for (int index = 0; index < size; index++) {
    DatabaseField field = lockFields.get(index);
    field = descriptor.buildField(field);
    lockFields.set(index, field);
    List<DatabaseField> fieldsForTable = getLockFieldsByTable().get(field.getTable());
    if (fieldsForTable == null) {
      fieldsForTable = org.eclipse.persistence.internal.helper.NonSynchronizedVector.newInstance();
      getLockFieldsByTable().put(field.getTable(), fieldsForTable);
    }
    fieldsForTable.add(field);
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL: It is responsible for initializing the policy;
 */
@Override
public void initialize(AbstractSession session) {
  super.initialize(session);
  List<DatabaseField> lockFields = getLockFields();
  int size = lockFields.size();
  for (int index = 0; index < size; index++) {
    DatabaseField field = lockFields.get(index);
    field = descriptor.buildField(field);
    lockFields.set(index, field);
    List<DatabaseField> fieldsForTable = getLockFieldsByTable().get(field.getTable());
    if (fieldsForTable == null) {
      fieldsForTable = org.eclipse.persistence.internal.helper.NonSynchronizedVector.newInstance();
      getLockFieldsByTable().put(field.getTable(), fieldsForTable);
    }
    fieldsForTable.add(field);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * It is responsible for initializing the policy;
 */
public void initialize(AbstractSession session) {
  super.initialize(session);
  List lockFields = getLockFields();
  int size = lockFields.size();
  for (int index = 0; index < size; index++) {
    DatabaseField field = (DatabaseField)lockFields.get(index);
    field = descriptor.buildField(field);
    lockFields.set(index, field);
    Vector fieldsForTable = (Vector)getLockFieldsByTable().get(field.getTable());
    if (fieldsForTable == null) {
      fieldsForTable = org.eclipse.persistence.internal.helper.NonSynchronizedVector.newInstance();
      getLockFieldsByTable().put(field.getTable(), fieldsForTable);
    }
    fieldsForTable.addElement(field);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Values to be included in the locking mechanism are added to the translation row.
 * For changed fields the normal build row is ok as only changed fields matter.
 */
public void addLockValuesToTranslationRow(ObjectLevelModifyQuery query) throws DatabaseException{
  Object object;
  verifyUsage(query.getSession());
  if (query.isDeleteObjectQuery()) {
    object = query.getObject();
  } else {
    object = query.getBackupClone();
  }
  for (Iterator vectors = getLockFieldsByTable().values().iterator(); vectors.hasNext();) {
    for (Enumeration fields = ((Vector)vectors.next()).elements();
         fields.hasMoreElements();) {
      DatabaseField field = (DatabaseField)fields.nextElement();
      DatabaseMapping mapping = descriptor.getObjectBuilder().getMappingForField(field);
      //Bug5892889, Exception will be thrown if no matched database field found
      if(mapping == null ){
        throw DatabaseException.specifiedLockingFieldsNotFoundInDatabase(field.getQualifiedName());
      }else{
        mapping.writeFromObjectIntoRow(object, query.getTranslationRow(), query.getSession());
      }
    }
  }
}
origin: com.haulmont.thirdparty/eclipselink

for (Iterator<List<DatabaseField>> fields = getLockFieldsByTable().values().iterator(); fields.hasNext();) {
  for (DatabaseField field : fields.next()) {
    DatabaseMapping mapping = descriptor.getObjectBuilder().getMappingForField(field);
origin: org.eclipse.persistence/org.eclipse.persistence.core

for (Iterator<List<DatabaseField>> fields = getLockFieldsByTable().values().iterator(); fields.hasNext();) {
  for (DatabaseField field : fields.next()) {
    DatabaseMapping mapping = descriptor.getObjectBuilder().getMappingForField(field);
org.eclipse.persistence.descriptorsSelectedFieldsLockingPolicygetLockFieldsByTable

Javadoc

INTERNAL: returns the lock fields

Popular methods of SelectedFieldsLockingPolicy

  • <init>
    PUBLIC: Create a new selected fields locking policy. A field locking policy is based on locking on t
  • addLockFieldName
    PUBLIC: Add a fieldname to lock on. All fields in this list will be compared when Updating if the va
  • getLockFields
    INTERNAL: returns the lock fields based on the passed in table
  • setLockFieldNames
    PUBLIC: Set the field names to lock on. All fields in this list will be compared when Updating. If t
  • verifyUsage

Popular in Java

  • Running tasks concurrently on multiple threads
  • getSharedPreferences (Context)
  • onRequestPermissionsResult (Fragment)
  • onCreateOptionsMenu (Activity)
  • Point (java.awt)
    A point representing a location in (x,y) coordinate space, specified in integer precision.
  • BigInteger (java.math)
    An immutable arbitrary-precision signed integer.FAST CRYPTOGRAPHY This implementation is efficient f
  • Enumeration (java.util)
    A legacy iteration interface.New code should use Iterator instead. Iterator replaces the enumeration
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Map (java.util)
    A Map is a data structure consisting of a set of keys and values in which each key is mapped to a si
  • IsNull (org.hamcrest.core)
    Is the value null?
  • Sublime Text for Python
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