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

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

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

origin: com.haulmont.thirdparty/eclipselink

protected void initializeSourceForeignKeysToTargetKeys() throws DescriptorException {
  // Since we require a custom selection query, these keys are optional.
  if (getSourceForeignKeyFields().size() != getTargetForeignKeyFields().size()) {
    throw DescriptorException.sizeMismatchOfForeignKeys(this);
  }
  for (int i = 0; i < getTargetForeignKeyFields().size(); i++) {
    DatabaseField field = getReferenceDescriptor().buildField(getTargetForeignKeyFields().get(i));
    getTargetForeignKeyFields().set(i, field);
  }
  for (int i = 0; i < getSourceForeignKeyFields().size(); i++) {
    DatabaseField field = getDescriptor().buildField(getSourceForeignKeyFields().get(i));
    getSourceForeignKeyFields().set(i, field);
    getSourceForeignKeysToTargetKeys().put(field, getTargetForeignKeyFields().get(i));
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

protected void initializeSourceForeignKeysToTargetKeys() throws DescriptorException {
  // Since we require a custom selection query, these keys are optional.
  if (getSourceForeignKeyFields().size() != getTargetForeignKeyFields().size()) {
    throw DescriptorException.sizeMismatchOfForeignKeys(this);
  }
  for (int i = 0; i < getTargetForeignKeyFields().size(); i++) {
    DatabaseField field = getReferenceDescriptor().buildField(getTargetForeignKeyFields().get(i));
    getTargetForeignKeyFields().set(i, field);
  }
  for (int i = 0; i < getSourceForeignKeyFields().size(); i++) {
    DatabaseField field = getDescriptor().buildField(getSourceForeignKeyFields().get(i));
    getSourceForeignKeyFields().set(i, field);
    getSourceForeignKeysToTargetKeys().put(field, getTargetForeignKeyFields().get(i));
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * Build and return a database row that contains a foreign key for the specified reference
 * object.  This will be stored in the nested row(s).
 */
protected AbstractRecord extractKeyRowFromReferenceObject(Object object, AbstractSession session, AbstractRecord parentRecord) {
  int size = this.sourceForeignKeyFields.size();
  AbstractRecord result;
  if (((EISDescriptor) this.getDescriptor()).isXMLFormat()) {
    Element newNode = XPathEngine.getInstance().createUnownedElement(((XMLRecord)parentRecord).getDOM(), (XMLField)getForeignKeyGroupingElement());
    result = new DOMRecord(newNode);
    ((DOMRecord)result).setSession(session);
  } else {
    result = this.descriptor.getObjectBuilder().createRecord(size, session);
  }
  for (int index = 0; index < size; index++) {
    DatabaseField fkField = this.sourceForeignKeyFields.get(index);
    if (object == null) {
      result.add(fkField, null);
    } else {
      DatabaseField pkField = this.sourceForeignKeysToTargetKeys.get(fkField);
      Object value = this.referenceDescriptor.getObjectBuilder().extractValueFromObjectForField(object, pkField, session);
      result.add(fkField, value);
    }
  }
  return result;
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * Build and return a database row that contains a foreign key for the specified reference 
 * object.  This will be stored in the nested row(s).
 */
protected AbstractRecord extractKeyRowFromReferenceObject(Object object, AbstractSession session, AbstractRecord parentRecord) {
  int size = this.sourceForeignKeyFields.size();
  AbstractRecord result;
  if (((EISDescriptor) this.getDescriptor()).isXMLFormat()) {
    Element newNode = XPathEngine.getInstance().createUnownedElement(((XMLRecord)parentRecord).getDOM(), (XMLField)getForeignKeyGroupingElement());
    result = new DOMRecord(newNode);
    ((DOMRecord)result).setSession(session);
  } else {
    result = this.descriptor.getObjectBuilder().createRecord(size, session);
  }
  for (int index = 0; index < size; index++) {
    DatabaseField fkField = this.sourceForeignKeyFields.get(index);
    if (object == null) {
      result.add(fkField, null);
    } else {
      DatabaseField pkField = this.sourceForeignKeysToTargetKeys.get(fkField);
      Object value = this.referenceDescriptor.getObjectBuilder().extractValueFromObjectForField(object, pkField, session);
      result.add(fkField, value);
    }
  }
  return result;
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Initialize the mapping.
 */
public void initialize(AbstractSession session) throws DescriptorException {
  super.initialize(session);
  if (!this.hasCustomSelectionQuery()) {
    throw DescriptorException.operationNotSupported("customSelectionQueryRequired");
  }
  if ((this.getForeignKeyGroupingElement() == null) && (this.getSourceForeignKeysToTargetKeys().size() > 1)) {
    throw EISException.groupingElementRequired();
  }
  if (this.getForeignKeyGroupingElement() != null) {
    DatabaseField field = this.getDescriptor().buildField(this.getForeignKeyGroupingElement());
    setForeignKeyGroupingElement((XMLField)field);
  }
  this.initializeSourceForeignKeysToTargetKeys();
  this.initializeDeleteAllQuery();
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Initialize the mapping.
 */
@Override
public void initialize(AbstractSession session) throws DescriptorException {
  super.initialize(session);
  if ((this.getForeignKeyGroupingElement() == null) && (this.getSourceForeignKeysToTargetKeys().size() > 1)) {
    throw EISException.groupingElementRequired();
  }
  if (this.getForeignKeyGroupingElement() != null) {
    DatabaseField field = this.getDescriptor().buildField(this.getForeignKeyGroupingElement());
    setForeignKeyGroupingElement(field);
  }
  this.initializeSourceForeignKeysToTargetKeys();
  
  if (shouldInitializeSelectionCriteria()) {
    initializeSelectionCriteria(session);
  }
  this.initializeDeleteAllQuery();
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Initialize the mapping.
 */
@Override
public void initialize(AbstractSession session) throws DescriptorException {
  super.initialize(session);
  if ((this.getForeignKeyGroupingElement() == null) && (this.getSourceForeignKeysToTargetKeys().size() > 1)) {
    throw EISException.groupingElementRequired();
  }
  if (this.getForeignKeyGroupingElement() != null) {
    DatabaseField field = this.getDescriptor().buildField(this.getForeignKeyGroupingElement());
    setForeignKeyGroupingElement(field);
  }
  this.initializeSourceForeignKeysToTargetKeys();
  if (shouldInitializeSelectionCriteria()) {
    initializeSelectionCriteria(session);
  }
  this.initializeDeleteAllQuery();
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

if (((EISDescriptor) this.getDescriptor()).getDataFormat() == EISDescriptor.XML) {
  ((XMLRecord) row).setSession(executionSession);
origin: org.eclipse.persistence/org.eclipse.persistence.core

if (((EISDescriptor) this.getDescriptor()).isXMLFormat()) {
  ((XMLRecord) row).setSession(executionSession);
origin: com.haulmont.thirdparty/eclipselink

if (((EISDescriptor) this.getDescriptor()).isXMLFormat()) {
  ((XMLRecord) row).setSession(executionSession);
org.eclipse.persistence.eis.mappingsEISOneToManyMappinggetDescriptor

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,
  • getForeignKeyGroupingElement,
  • getForeignKeyRows

Popular in Java

  • Reading from database using SQL prepared statement
  • runOnUiThread (Activity)
  • notifyDataSetChanged (ArrayAdapter)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • EOFException (java.io)
    Thrown when a program encounters the end of a file or stream during an input operation.
  • Socket (java.net)
    Provides a client-side TCP socket.
  • Charset (java.nio.charset)
    A charset is a named mapping between Unicode characters and byte sequences. Every Charset can decode
  • Date (java.util)
    A specific moment in time, with millisecond precision. Values typically come from System#currentTime
  • JLabel (javax.swing)
  • DateTimeFormat (org.joda.time.format)
    Factory that creates instances of DateTimeFormatter from patterns and styles. Datetime formatting i
  • Top 17 Plugins for Android Studio
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