congrats Icon
New! Announcing our next generation AI code completions
Read here
Tabnine Logo
EISOneToManyMapping.isForeignKeyRelationship
Code IndexAdd Tabnine to your IDE (free)

How to use
isForeignKeyRelationship
method
in
org.eclipse.persistence.eis.mappings.EISOneToManyMapping

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

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

/**
 * Return all the fields mapped by the mapping.
 */
protected Vector collectFields() {
  if (isForeignKeyRelationship()) {
    if (this.getForeignKeyGroupingElement() != null) {
      Vector fields = new Vector(1);
      fields.addElement(this.getForeignKeyGroupingElement());
      return fields;
    } else {
      return NO_FIELDS;
    }
  } else {
    return NO_FIELDS;
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Return all the fields mapped by the mapping.
 */
@Override
protected Vector collectFields() {
  if (isForeignKeyRelationship()) {
    if (this.getForeignKeyGroupingElement() != null) {
      Vector fields = new Vector(1);
      fields.addElement(this.getForeignKeyGroupingElement());
      return fields;
    } else {
      return NO_FIELDS;
    }
  } else {
    return NO_FIELDS;
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Compare the attributes belonging to this mapping for the objects.
 */
@Override
public boolean compareObjects(Object object1, Object object2, AbstractSession session) {
  if (isForeignKeyRelationship()) {
    return (new EISOneToManyMappingHelper(this)).compareObjects(object1, object2, session);
  }
  return super.compareObjects(object1, object2, session);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * If the mapping has a foreign key, it is order, so must use a different merge.
 */
@Override
public void mergeIntoObject(Object target, boolean isTargetUnInitialized, Object source, MergeManager mergeManager, AbstractSession targetSession) {
  if (isForeignKeyRelationship()) {
    (new EISOneToManyMappingHelper(this)).mergeIntoObject(target, isTargetUnInitialized, source, mergeManager, targetSession);
    return;
  }
  super.mergeIntoObject(target, isTargetUnInitialized, source, mergeManager, targetSession);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Compare the attributes belonging to this mapping for the objects.
 */
public boolean compareObjects(Object object1, Object object2, AbstractSession session) {
  if (isForeignKeyRelationship()) {
    return (new EISOneToManyMappingHelper(this)).compareObjects(object1, object2, session);
  }
  return super.compareObjects(object1, object2, session);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Compare the attributes belonging to this mapping for the objects.
 */
@Override
public boolean compareObjects(Object object1, Object object2, AbstractSession session) {
  if (isForeignKeyRelationship()) {
    return (new EISOneToManyMappingHelper(this)).compareObjects(object1, object2, session);
  }
  return super.compareObjects(object1, object2, session);
}
 
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * If the mapping has a foreign key, it is order, so must use a different merge.
 */
@Override
public void mergeChangesIntoObject(Object target, ChangeRecord chgRecord, Object source, MergeManager mergeManager, AbstractSession targetSession) {
  if (isForeignKeyRelationship()) {
    (new EISOneToManyMappingHelper(this)).mergeChangesIntoObject(target, chgRecord, source, mergeManager, targetSession);
    return;
  }
  super.mergeChangesIntoObject(target, chgRecord, source, mergeManager, targetSession);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * If the mapping has a foreign key, it is order, so must use a different merge.
 */
@Override
public void mergeChangesIntoObject(Object target, ChangeRecord chgRecord, Object source, MergeManager mergeManager, AbstractSession targetSession) {
  if (isForeignKeyRelationship()) {
    (new EISOneToManyMappingHelper(this)).mergeChangesIntoObject(target, chgRecord, source, mergeManager, targetSession);
    return;
  }
  super.mergeChangesIntoObject(target, chgRecord, source, mergeManager, targetSession);
}
 
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * If the mapping has a foreign key, it is order, so must use a different merge.
 */
@Override
public void mergeIntoObject(Object target, boolean isTargetUnInitialized, Object source, MergeManager mergeManager, AbstractSession targetSession) {
  if (isForeignKeyRelationship()) {
    (new EISOneToManyMappingHelper(this)).mergeIntoObject(target, isTargetUnInitialized, source, mergeManager, targetSession);
    return;
  }
  super.mergeIntoObject(target, isTargetUnInitialized, source, mergeManager, targetSession);
}
   
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Get the appropriate attribute value from the object
 * and put it in the appropriate field of the database row.
 * Loop through the reference objects and extract the
 * primary keys and put them in the vector of "nested" rows.
 */
public void writeFromObjectIntoRowWithChangeRecord(ChangeRecord changeRecord, AbstractRecord row, AbstractSession session) {
  if (isForeignKeyRelationship()) {
    Object object = ((ObjectChangeSet)changeRecord.getOwner()).getUnitOfWorkClone();
    this.writeFromObjectIntoRow(object, row, session);
  } else {
    super.writeFromObjectIntoRowWithChangeRecord(changeRecord, row, session);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Get the appropriate attribute value from the object
 * and put it in the appropriate field of the database row.
 * Loop through the reference objects and extract the
 * primary keys and put them in the vector of "nested" rows.
 */
@Override
public void writeFromObjectIntoRowWithChangeRecord(ChangeRecord changeRecord, AbstractRecord row, AbstractSession session, WriteType writeType) {
  if (isForeignKeyRelationship()) {
    Object object = ((ObjectChangeSet)changeRecord.getOwner()).getUnitOfWorkClone();
    this.writeFromObjectIntoRow(object, row, session, writeType);
  } else {
    super.writeFromObjectIntoRowWithChangeRecord(changeRecord, row, session, writeType);
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Get the appropriate attribute value from the object
 * and put it in the appropriate field of the database row.
 * Loop through the reference objects and extract the
 * primary keys and put them in the vector of "nested" rows.
 */
@Override
public void writeFromObjectIntoRowWithChangeRecord(ChangeRecord changeRecord, AbstractRecord row, AbstractSession session, WriteType writeType) {
  if (isForeignKeyRelationship()) {
    Object object = ((ObjectChangeSet)changeRecord.getOwner()).getUnitOfWorkClone();
    this.writeFromObjectIntoRow(object, row, session, writeType);
  } else {
    super.writeFromObjectIntoRowWithChangeRecord(changeRecord, row, session, writeType);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Write fields needed for insert into the template for with null values.
 */
public void writeInsertFieldsIntoRow(AbstractRecord row, AbstractSession session) {
  if (isForeignKeyRelationship() && !isReadOnly()) {
    if (getForeignKeyGroupingElement() != null) {
      row.put(getForeignKeyGroupingElement(), null);
    } else if (this.getSourceForeignKeyFields().size() > 0) {
      row.put(getSourceForeignKeyFields().get(0), null);
    }
  } else {
    super.writeInsertFieldsIntoRow(row, session);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Write fields needed for insert into the template for with null values.
 */
@Override
public void writeInsertFieldsIntoRow(AbstractRecord row, AbstractSession session) {
  if (isForeignKeyRelationship() && !isReadOnly()) {
    if (getForeignKeyGroupingElement() != null) {
      row.put(getForeignKeyGroupingElement(), null);
    } else if (this.getSourceForeignKeyFields().size() > 0) {
      row.put(getSourceForeignKeyFields().get(0), null);
    }
  } else {
    super.writeInsertFieldsIntoRow(row, session);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * This row is built for shallow insert which happens in case of bidirectional inserts.
 * The foreign keys must be set to null to avoid constraints.
 */
public void writeFromObjectIntoRowForShallowInsert(Object object, AbstractRecord row, AbstractSession session) {
  if (isForeignKeyRelationship() && !isReadOnly()) {
    if (getForeignKeyGroupingElement() != null) {
      row.put(getForeignKeyGroupingElement(), null);
    } else if (this.getSourceForeignKeyFields().size() > 0) {
      row.put(getSourceForeignKeyFields().get(0), null);
    }
  } else {
    super.writeFromObjectIntoRowForShallowInsert(object, row, session);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * This row is built for shallow insert which happens in case of bidirectional inserts.
 * The foreign keys must be set to null to avoid constraints.
 */
@Override
public void writeFromObjectIntoRowForShallowInsert(Object object, AbstractRecord row, AbstractSession session) {
  if (isForeignKeyRelationship() && !isReadOnly()) {
    if (getForeignKeyGroupingElement() != null) {
      row.put(getForeignKeyGroupingElement(), null);
    } else if (this.getSourceForeignKeyFields().size() > 0) {
      row.put(getSourceForeignKeyFields().get(0), null);
    }
  } else {
    super.writeFromObjectIntoRowForShallowInsert(object, row, session);
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Write fields needed for insert into the template for with null values.
 */
@Override
public void writeInsertFieldsIntoRow(AbstractRecord row, AbstractSession session) {
  if (isForeignKeyRelationship() && !isReadOnly()) {
    if (getForeignKeyGroupingElement() != null) {
      row.put(getForeignKeyGroupingElement(), null);
    } else if (this.getSourceForeignKeyFields().size() > 0) {
      row.put(getSourceForeignKeyFields().get(0), null);
    }
  } else {
    super.writeInsertFieldsIntoRow(row, session);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * This row is built for shallow insert which happens in case of bidirectional inserts.
 * The foreign keys must be set to null to avoid constraints.
 */
public void writeFromObjectIntoRowForShallowInsertWithChangeRecord(ChangeRecord changeRecord, AbstractRecord row, AbstractSession session) {
  if (isForeignKeyRelationship() && !isReadOnly()) {
    if (getForeignKeyGroupingElement() != null) {
      row.put(getForeignKeyGroupingElement(), null);
    } else if (this.getSourceForeignKeyFields().size() > 0) {
      row.put(getSourceForeignKeyFields().get(0), null);
    }
  } else {
    super.writeFromObjectIntoRowForShallowInsertWithChangeRecord(changeRecord, row, session);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Compare the changes between two collections. Element comparisons are
 * made using identity and, when appropriate, the value of the element's key
 * for the Map container.
 */
@Override
public ChangeRecord compareForChange(Object clone, Object backup, ObjectChangeSet owner, AbstractSession session) {
  if (isForeignKeyRelationship()) {
    if ((this.getAttributeValueFromObject(clone) != null) && (!this.isAttributeValueInstantiatedOrChanged(clone))) {
      return null;// never instantiated - no changes to report
    }
    return (new EISOneToManyMappingHelper(this)).compareForChange(clone, backup, owner, session);
  } else {
    return super.compareForChange(clone, backup, owner, session);
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Compare the changes between two collections. Element comparisons are
 * made using identity and, when appropriate, the value of the element's key
 * for the Map container.
 */
public ChangeRecord compareForChange(Object clone, Object backup, ObjectChangeSet owner, AbstractSession session) {
  if (isForeignKeyRelationship()) {
    if ((this.getAttributeValueFromObject(clone) != null) && (!this.isAttributeValueInstantiatedOrChanged(clone))) {
      return null;// never instantiated - no changes to report
    }
    return (new EISOneToManyMappingHelper(this)).compareForChange(clone, backup, owner, session);
  } else {
    return super.compareForChange(clone, backup, owner, session);
  }
}
org.eclipse.persistence.eis.mappingsEISOneToManyMappingisForeignKeyRelationship

Javadoc

Keeps track if any of the fields are foreign keys.

Popular methods of EISOneToManyMapping

  • addForeignKeyField
    PUBLIC: Define the source foreign key relationship in the one-to-many mapping. This method is used f
  • buildAddedElementFromChangeSet
    INTERNAL: Build and return a new element based on the change set.
  • buildChangeSet
    INTERNAL: Build and return a change set for the specified element.
  • buildElementFromChangeSet
    Build and return a new element based on the change set.
  • buildElementFromElement
    INTERNAL: Build and return a new element based on the specified element.
  • buildRemovedElementFromChangeSet
    INTERNAL: Build and return a new element based on the change set.
  • compareElements
    INTERNAL: Compare the non-null elements and return true if they are alike.
  • compareElementsForChange
    INTERNAL: Compare the non-null elements and return true if they are alike. Here we use object identi
  • compareObjectsAndWrite
  • compareObjectsWithoutPrivateOwned
  • deleteAll
    Delete all the reference objects.
  • deleteReferenceObjectsLeftOnDatabase
    This method will make sure that all the records privately owned by this mapping are actually removed
  • deleteAll,
  • deleteReferenceObjectsLeftOnDatabase,
  • extractKeyRowFromReferenceObject,
  • getAttributeName,
  • getAttributeValueFromObject,
  • getContainerPolicy,
  • getDeleteAllQuery,
  • getDescriptor,
  • getForeignKeyGroupingElement,
  • getForeignKeyRows

Popular in Java

  • Reading from database using SQL prepared statement
  • getContentResolver (Context)
  • getResourceAsStream (ClassLoader)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Font (java.awt)
    The Font class represents fonts, which are used to render text in a visible way. A font provides the
  • Window (java.awt)
    A Window object is a top-level window with no borders and no menubar. The default layout for a windo
  • IOException (java.io)
    Signals a general, I/O-related error. Error details may be specified when calling the constructor, a
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Set (java.util)
    A Set is a data structure which does not allow duplicate elements.
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • 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