congrats Icon
New! Tabnine Pro 14-day free trial
Start a free trial
Tabnine Logo
EISOneToOneMapping.getSelectionCriteria
Code IndexAdd Tabnine to your IDE (free)

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

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

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

/**
 * INTERNAL:
 * Selection criteria is created with source foreign keys and target keys.
 * This criteria is then used to read target records from the table.
 *
 * CR#3922 - This method is almost the same as buildSelectionCriteria() the difference
 * is that getSelectionCriteria() is called
 */
protected void initializeSelectionCriteria(AbstractSession session) {
  if (this.getSourceToTargetKeyFields().isEmpty()) {
    throw DescriptorException.noForeignKeysAreSpecified(this);
  }
  Expression criteria;
  Expression builder = new ExpressionBuilder();
  Iterator keyIterator = getSourceToTargetKeyFields().keySet().iterator();
  while (keyIterator.hasNext()) {
    DatabaseField foreignKey = (DatabaseField)keyIterator.next();
    DatabaseField targetKey = (DatabaseField)getSourceToTargetKeyFields().get(foreignKey);
    Expression expression = builder.getField(targetKey).equal(builder.getParameter(foreignKey));
    criteria = expression.and(getSelectionCriteria());
    setSelectionCriteria(criteria);
  }
}
origin: org.eclipse.persistence/org.eclipse.persistence.core

/**
 * INTERNAL:
 * Selection criteria is created with source foreign keys and target keys.
 * This criteria is then used to read target records from the table.
 *
 * CR#3922 - This method is almost the same as buildSelectionCriteria() the difference
 * is that getSelectionCriteria() is called
 */
protected void initializeSelectionCriteria(AbstractSession session) {
  if (this.getSourceToTargetKeyFields().isEmpty()) {
    throw DescriptorException.noForeignKeysAreSpecified(this);
  }
  Expression criteria;
  Expression builder = new ExpressionBuilder();
  Iterator keyIterator = getSourceToTargetKeyFields().keySet().iterator();
  while (keyIterator.hasNext()) {
    DatabaseField foreignKey = (DatabaseField)keyIterator.next();
    DatabaseField targetKey = getSourceToTargetKeyFields().get(foreignKey);
    Expression expression = builder.getField(targetKey).equal(builder.getParameter(foreignKey));
    criteria = expression.and(getSelectionCriteria());
    setSelectionCriteria(criteria);
  }
}
origin: com.haulmont.thirdparty/eclipselink

/**
 * INTERNAL:
 * Selection criteria is created with source foreign keys and target keys.
 * This criteria is then used to read target records from the table.
 *
 * CR#3922 - This method is almost the same as buildSelectionCriteria() the difference
 * is that getSelectionCriteria() is called
 */
protected void initializeSelectionCriteria(AbstractSession session) {
  if (this.getSourceToTargetKeyFields().isEmpty()) {
    throw DescriptorException.noForeignKeysAreSpecified(this);
  }
  Expression criteria;
  Expression builder = new ExpressionBuilder();
  Iterator keyIterator = getSourceToTargetKeyFields().keySet().iterator();
  while (keyIterator.hasNext()) {
    DatabaseField foreignKey = (DatabaseField)keyIterator.next();
    DatabaseField targetKey = getSourceToTargetKeyFields().get(foreignKey);
    Expression expression = builder.getField(targetKey).equal(builder.getParameter(foreignKey));
    criteria = expression.and(getSelectionCriteria());
    setSelectionCriteria(criteria);
  }
}
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));
  }
}
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));
  }
}
org.eclipse.persistence.eis.mappingsEISOneToOneMappinggetSelectionCriteria

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
  • getDescriptor
  • getFields
  • getForeignKeyFields
  • getIndirectionPolicy
  • getPrivateOwnedCriteria
    INTERNAL: The private owned criteria is only used outside of the unit of work to compare the previou
  • getRealAttributeValueFromObject
  • getReferenceDescriptor
  • getSelectionQuery
  • getReferenceDescriptor,
  • getSelectionQuery,
  • getSourceToTargetKeyFields,
  • getTargetToSourceKeyFields,
  • initializeForeignKeys,
  • initializePrivateOwnedCriteria,
  • initializeSelectionCriteria,
  • isForeignKeyRelationship,
  • isPrivateOwned

Popular in Java

  • Making http requests using okhttp
  • onRequestPermissionsResult (Fragment)
  • setContentView (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • Kernel (java.awt.image)
  • Deque (java.util)
    A linear collection that supports element insertion and removal at both ends. The name deque is shor
  • Hashtable (java.util)
    A plug-in replacement for JDK1.5 java.util.Hashtable. This version is based on org.cliffc.high_scale
  • Executors (java.util.concurrent)
    Factory and utility methods for Executor, ExecutorService, ScheduledExecutorService, ThreadFactory,
  • JFileChooser (javax.swing)
  • BasicDataSource (org.apache.commons.dbcp)
    Basic implementation of javax.sql.DataSource that is configured via JavaBeans properties. This is no
  • Top 12 Jupyter Notebook Extensions
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