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

  • Making http requests using okhttp
  • findViewById (Activity)
  • onCreateOptionsMenu (Activity)
  • getSystemService (Context)
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • MalformedURLException (java.net)
    This exception is thrown when a program attempts to create an URL from an incorrect specification.
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • TreeMap (java.util)
    Walk the nodes of the tree left-to-right or right-to-left. Note that in descending iterations, next
  • 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 Sublime Text plugins
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