congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
EISOneToManyMapping.writeFromObjectIntoRow
Code IndexAdd Tabnine to your IDE (free)

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

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

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/org.eclipse.persistence.core

/**
 * INTERNAL:
 * This row is built for update after shallow insert which happens in case of bidirectional inserts.
 * It contains the foreign keys with non null values that were set to null for shallow insert.
 * If mapping overrides writeFromObjectIntoRowForShallowInsert method it must override this one, too.
 */
public void writeFromObjectIntoRowForUpdateAfterShallowInsert(Object object, AbstractRecord row, AbstractSession session, DatabaseTable table) {
  if (isReadOnly() || !isForeignKeyRelationship()) {
    return;
  }
  if (getForeignKeyGroupingElement() != null) {
    if (!getForeignKeyGroupingElement().getTable().equals(table)) {
      return;
    }
  } else if (this.getSourceForeignKeyFields().size() > 0) {
    if (!getSourceForeignKeyFields().get(0).getTable().equals(table)) {
      return;
    }
  }
  writeFromObjectIntoRow(object, row, session, WriteType.UPDATE);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * This row is built for update after shallow insert which happens in case of bidirectional inserts.
 * It contains the foreign keys with non null values that were set to null for shallow insert.
 * If mapping overrides writeFromObjectIntoRowForShallowInsert method it must override this one, too.
 */
public void writeFromObjectIntoRowForUpdateAfterShallowInsert(Object object, AbstractRecord row, AbstractSession session, DatabaseTable table) {
  if (isReadOnly() || !isForeignKeyRelationship()) {
    return;
  }
  if (getForeignKeyGroupingElement() != null) {
    if (!getForeignKeyGroupingElement().getTable().equals(table)) {
      return;
    }
  } else if (this.getSourceForeignKeyFields().size() > 0) {
    if (!getSourceForeignKeyFields().get(0).getTable().equals(table)) {
      return;
    }
  }
  writeFromObjectIntoRow(object, row, session, WriteType.UPDATE);
}
 
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * If any of the references objects has changed, write out
 * all the keys.
 */
@Override
public void writeFromObjectIntoRowForUpdate(WriteObjectQuery writeQuery, AbstractRecord row) throws DescriptorException {
  if (!this.isAttributeValueInstantiatedOrChanged(writeQuery.getObject())) {
    return;
  }
  AbstractSession session = writeQuery.getSession();
  if (session.isUnitOfWork()) {
    // PRS2074 fix for "traditional" Indirection
    Object collection1 = this.getRealCollectionAttributeValueFromObject(writeQuery.getObject(), session);
    Object collection2 = this.getRealCollectionAttributeValueFromObject(writeQuery.getBackupClone(), session);
    if (this.compareObjectsWithoutPrivateOwned(collection1, collection2, session)) {
      return;// nothing has changed - don't put anything in the row
    }
  }
  this.writeFromObjectIntoRow(writeQuery.getObject(), row, session, WriteType.UPDATE);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * If any of the references objects has changed, write out
 * all the keys.
 */
public void writeFromObjectIntoRowForUpdate(WriteObjectQuery writeQuery, AbstractRecord row) throws DescriptorException {
  if (!this.isAttributeValueInstantiatedOrChanged(writeQuery.getObject())) {
    return;
  }
  AbstractSession session = writeQuery.getSession();
  if (session.isUnitOfWork()) {
    // PRS2074 fix for "traditional" Indirection
    Object collection1 = this.getRealCollectionAttributeValueFromObject(writeQuery.getObject(), session);
    Object collection2 = this.getRealCollectionAttributeValueFromObject(writeQuery.getBackupClone(), session);
    if (this.compareObjectsWithoutPrivateOwned(collection1, collection2, session)) {
      return;// nothing has changed - don't put anything in the row
    }
  }
  this.writeFromObjectIntoRow(writeQuery.getObject(), row, session);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * If any of the references objects has changed, write out
 * all the keys.
 */
@Override
public void writeFromObjectIntoRowForUpdate(WriteObjectQuery writeQuery, AbstractRecord row) throws DescriptorException {
  if (!this.isAttributeValueInstantiatedOrChanged(writeQuery.getObject())) {
    return;
  }
  AbstractSession session = writeQuery.getSession();
  if (session.isUnitOfWork()) {
    // PRS2074 fix for "traditional" Indirection
    Object collection1 = this.getRealCollectionAttributeValueFromObject(writeQuery.getObject(), session);
    Object collection2 = this.getRealCollectionAttributeValueFromObject(writeQuery.getBackupClone(), session);
    if (this.compareObjectsWithoutPrivateOwned(collection1, collection2, session)) {
      return;// nothing has changed - don't put anything in the row
    }
  }
  this.writeFromObjectIntoRow(writeQuery.getObject(), row, session, WriteType.UPDATE);
}
org.eclipse.persistence.eis.mappingsEISOneToManyMappingwriteFromObjectIntoRow

Javadoc

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.

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

  • Making http requests using okhttp
  • getContentResolver (Context)
  • setRequestProperty (URLConnection)
  • onCreateOptionsMenu (Activity)
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • SortedMap (java.util)
    A map that has its keys ordered. The sorting is according to either the natural ordering of its keys
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • XPath (javax.xml.xpath)
    XPath provides access to the XPath evaluation environment and expressions. Evaluation of XPath Expr
  • Best plugins for Eclipse
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