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

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

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

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

/**
 * INTERNAL:
 * The foreign keys primary keys are stored as database fields in the hashtable.
 */
protected void initializeForeignKeys(AbstractSession session) {
  HashMap newSourceToTargetKeyFields = new HashMap(getSourceToTargetKeyFields().size());
  HashMap newTargetToSourceKeyFields = new HashMap(getTargetToSourceKeyFields().size());
  Iterator iterator = getSourceToTargetKeyFields().entrySet().iterator();
  while (iterator.hasNext()) {
    Map.Entry entry = (Map.Entry)iterator.next();
    DatabaseField sourceField = (DatabaseField)entry.getKey();
    DatabaseField targetField = (DatabaseField)entry.getValue();
    sourceField = getDescriptor().buildField(sourceField);
    targetField = getReferenceDescriptor().buildField(targetField);
    newSourceToTargetKeyFields.put(sourceField, targetField);
    newTargetToSourceKeyFields.put(targetField, sourceField);
  }
  setSourceToTargetKeyFields(newSourceToTargetKeyFields);
  setTargetToSourceKeyFields(newTargetToSourceKeyFields);
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * The foreign keys primary keys are stored as database fields in the hashtable.
 */
protected void initializeForeignKeys(AbstractSession session) {
  HashMap newSourceToTargetKeyFields = new HashMap(getSourceToTargetKeyFields().size());
  HashMap newTargetToSourceKeyFields = new HashMap(getTargetToSourceKeyFields().size());
  Iterator iterator = getSourceToTargetKeyFields().entrySet().iterator();
  while (iterator.hasNext()) {
    Map.Entry entry = (Map.Entry)iterator.next();
    DatabaseField sourceField = (DatabaseField)entry.getKey();
    DatabaseField targetField = (DatabaseField)entry.getValue();
    sourceField = getDescriptor().buildField(sourceField);
    targetField = getReferenceDescriptor().buildField(targetField);
    newSourceToTargetKeyFields.put(sourceField, targetField);
    newTargetToSourceKeyFields.put(targetField, sourceField);
  }
  setSourceToTargetKeyFields(newSourceToTargetKeyFields);
  setTargetToSourceKeyFields(newTargetToSourceKeyFields);
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * The foreign keys primary keys are stored as database fields in the hashtable.
 */
protected void initializeForeignKeys(AbstractSession session) {
  HashMap newSourceToTargetKeyFields = new HashMap(getSourceToTargetKeyFields().size());
  HashMap newTargetToSourceKeyFields = new HashMap(getTargetToSourceKeyFields().size());
  Iterator iterator = getSourceToTargetKeyFields().entrySet().iterator();
  while (iterator.hasNext()) {
    Map.Entry entry = (Map.Entry)iterator.next();
    DatabaseField sourceField = (DatabaseField)entry.getKey();
    DatabaseField targetField = (DatabaseField)entry.getValue();
    sourceField = getDescriptor().buildField(sourceField);
    targetField = getReferenceDescriptor().buildField(targetField);
    newSourceToTargetKeyFields.put(sourceField, targetField);
    newTargetToSourceKeyFields.put(targetField, sourceField);
  }
  setSourceToTargetKeyFields(newSourceToTargetKeyFields);
  setTargetToSourceKeyFields(newTargetToSourceKeyFields);
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Extract the foreign key value from the source row.
 */
protected Vector extractForeignKeyFromRow(AbstractRecord row, AbstractSession session) {
  Vector key = new Vector();
  Iterator sourceKeyIterator = getSourceToTargetKeyFields().keySet().iterator();
  while (sourceKeyIterator.hasNext()) {
    DatabaseField field = (DatabaseField)sourceKeyIterator.next();
    Object value = row.get(field);
    // Must ensure the classification gets a cache hit.
    try {
      value = session.getDatasourcePlatform().getConversionManager().convertObject(value, getDescriptor().getObjectBuilder().getFieldClassification(field));
    } catch (ConversionException e) {
      throw ConversionException.couldNotBeConverted(this, getDescriptor(), e);
    }
    key.addElement(value);
  }
  return key;
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Initialize the mapping.
 */
@Override
public void initialize(AbstractSession session) throws DescriptorException {
  super.initialize(session);
  // Must build foreign keys fields.
  List foreignKeyFields = getForeignKeyFields();
  int size = foreignKeyFields.size();
  for (int index = 0; index < size; index++) {
    DatabaseField foreignKeyField = (DatabaseField)foreignKeyFields.get(index);
    foreignKeyField = getDescriptor().buildField(foreignKeyField);
    foreignKeyFields.set(index, foreignKeyField);
  }
  initializeForeignKeys(session);
  if (shouldInitializeSelectionCriteria()) {
    initializeSelectionCriteria(session);
  } else {
    setShouldVerifyDelete(false);
  }
  setFields(collectFields());
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Initialize the mapping.
 */
public void initialize(AbstractSession session) throws DescriptorException {
  super.initialize(session);
  // Must build foreign keys fields.
  List foreignKeyFields = getForeignKeyFields();
  int size = foreignKeyFields.size();
  for (int index = 0; index < size; index++) {
    DatabaseField foreignKeyField = (DatabaseField)foreignKeyFields.get(index);
    foreignKeyField = getDescriptor().buildField(foreignKeyField);
    foreignKeyFields.set(index, foreignKeyField);
  }
  initializeForeignKeys(session);
  if (shouldInitializeSelectionCriteria()) {
    initializeSelectionCriteria(session);
  } else {
    setShouldVerifyDelete(false);
  }
  setFields(collectFields());
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Initialize the mapping.
 */
@Override
public void initialize(AbstractSession session) throws DescriptorException {
  super.initialize(session);
  // Must build foreign keys fields.
  List foreignKeyFields = getForeignKeyFields();
  int size = foreignKeyFields.size();
  for (int index = 0; index < size; index++) {
    DatabaseField foreignKeyField = (DatabaseField)foreignKeyFields.get(index);
    foreignKeyField = getDescriptor().buildField(foreignKeyField);
    foreignKeyFields.set(index, foreignKeyField);
  }
  initializeForeignKeys(session);
  if (shouldInitializeSelectionCriteria()) {
    initializeSelectionCriteria(session);
  } else {
    setShouldVerifyDelete(false);
  }
  setFields(collectFields());
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Selection criteria is created with source foreign keys and target keys.
 */
protected void initializePrivateOwnedCriteria() {
  if (!isForeignKeyRelationship()) {
    setPrivateOwnedCriteria(getSelectionCriteria());
  } else {
    Expression pkCriteria = getDescriptor().getObjectBuilder().getPrimaryKeyExpression();
    ExpressionBuilder builder = new ExpressionBuilder();
    Expression backRef = builder.getManualQueryKey(getAttributeName() + "-back-ref", getDescriptor());
    Expression newPKCriteria = pkCriteria.rebuildOn(backRef);
    Expression twistedSelection = backRef.twist(getSelectionCriteria(), builder);
    if (getDescriptor().getQueryManager().getAdditionalJoinExpression() != null) {
      // We don't have to twist the additional join because it's all against the same node, which is our base
      // but we do have to rebuild it onto the manual query key
      Expression rebuiltAdditional = getDescriptor().getQueryManager().getAdditionalJoinExpression().rebuildOn(backRef);
      if (twistedSelection == null) {
        twistedSelection = rebuiltAdditional;
      } else {
        twistedSelection = twistedSelection.and(rebuiltAdditional);
      }
    }
    setPrivateOwnedCriteria(newPKCriteria.and(twistedSelection));
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Selection criteria is created with source foreign keys and target keys.
 */
protected void initializePrivateOwnedCriteria() {
  if (!isForeignKeyRelationship()) {
    setPrivateOwnedCriteria(getSelectionCriteria());
  } else {
    Expression pkCriteria = getDescriptor().getObjectBuilder().getPrimaryKeyExpression();
    ExpressionBuilder builder = new ExpressionBuilder();
    Expression backRef = builder.getManualQueryKey(getAttributeName() + "-back-ref", getDescriptor());
    Expression newPKCriteria = pkCriteria.rebuildOn(backRef);
    Expression twistedSelection = backRef.twist(getSelectionCriteria(), builder);
    if (getDescriptor().getQueryManager().getAdditionalJoinExpression() != null) {
      // We don't have to twist the additional join because it's all against the same node, which is our base
      // but we do have to rebuild it onto the manual query key
      Expression rebuiltAdditional = getDescriptor().getQueryManager().getAdditionalJoinExpression().rebuildOn(backRef);
      if (twistedSelection == null) {
        twistedSelection = rebuiltAdditional;
      } else {
        twistedSelection = twistedSelection.and(rebuiltAdditional);
      }
    }
    setPrivateOwnedCriteria(newPKCriteria.and(twistedSelection));
  }
}
origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence

/**
 * INTERNAL:
 * Selection criteria is created with source foreign keys and target keys.
 */
protected void initializePrivateOwnedCriteria() {
  if (!isForeignKeyRelationship()) {
    setPrivateOwnedCriteria(getSelectionCriteria());
  } else {
    Expression pkCriteria = getDescriptor().getObjectBuilder().getPrimaryKeyExpression();
    ExpressionBuilder builder = new ExpressionBuilder();
    Expression backRef = builder.getManualQueryKey(getAttributeName() + "-back-ref", getDescriptor());
    Expression newPKCriteria = pkCriteria.rebuildOn(backRef);
    Expression twistedSelection = backRef.twist(getSelectionCriteria(), builder);
    if (getDescriptor().getQueryManager().getAdditionalJoinExpression() != null) {
      // We don't have to twist the additional join because it's all against the same node, which is our base
      // but we do have to rebuild it onto the manual query key
      Expression rebuiltAdditional = getDescriptor().getQueryManager().getAdditionalJoinExpression().rebuildOn(backRef);
      if (twistedSelection == null) {
        twistedSelection = rebuiltAdditional;
      } else {
        twistedSelection = twistedSelection.and(rebuiltAdditional);
      }
    }
    setPrivateOwnedCriteria(newPKCriteria.and(twistedSelection));
  }
}
org.eclipse.persistence.eis.mappingsEISOneToOneMappinggetDescriptor

Popular methods of EISOneToOneMapping

  • addForeignKeyField
    PUBLIC: Define the source foreign key relationship in the one-to-one mapping. This method is used to
  • collectFields
  • getAttributeName
  • getAttributeValueFromObject
  • getFields
  • getForeignKeyFields
  • getIndirectionPolicy
  • getPrivateOwnedCriteria
    INTERNAL: The private owned criteria is only used outside of the unit of work to compare the previou
  • getRealAttributeValueFromObject
  • getReferenceDescriptor
  • getSelectionCriteria
  • getSelectionQuery
  • getSelectionCriteria,
  • getSelectionQuery,
  • getSourceToTargetKeyFields,
  • getTargetToSourceKeyFields,
  • initializeForeignKeys,
  • initializePrivateOwnedCriteria,
  • initializeSelectionCriteria,
  • isForeignKeyRelationship,
  • isPrivateOwned

Popular in Java

  • Creating JSON documents from java classes using gson
  • scheduleAtFixedRate (ScheduledExecutorService)
  • addToBackStack (FragmentTransaction)
  • putExtra (Intent)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • 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
  • ImageIO (javax.imageio)
  • HttpServletRequest (javax.servlet.http)
    Extends the javax.servlet.ServletRequest interface to provide request information for HTTP servlets.
  • JCheckBox (javax.swing)
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • Top plugins for Android Studio
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