Tabnine Logo
EISOneToOneMapping.setPrivateOwnedCriteria
Code IndexAdd Tabnine to your IDE (free)

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

Best Java code snippets using org.eclipse.persistence.eis.mappings.EISOneToOneMapping.setPrivateOwnedCriteria (Showing top 3 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.
 */
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.mappingsEISOneToOneMappingsetPrivateOwnedCriteria

Javadoc

INTERNAL: Private owned criteria is used to verify the deletion of the target. It joins from the source table on the foreign key to the target table, with a parameterization of the primary key of the source object.

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
  • getSelectionCriteria
  • getReferenceDescriptor,
  • getSelectionCriteria,
  • getSelectionQuery,
  • getSourceToTargetKeyFields,
  • getTargetToSourceKeyFields,
  • initializeForeignKeys,
  • initializePrivateOwnedCriteria,
  • initializeSelectionCriteria,
  • isForeignKeyRelationship,
  • isPrivateOwned

Popular in Java

  • Making http requests using okhttp
  • getContentResolver (Context)
  • setScale (BigDecimal)
  • getResourceAsStream (ClassLoader)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • HashSet (java.util)
    HashSet is an implementation of a Set. All optional operations (adding and removing) are supported.
  • List (java.util)
    An ordered collection (also known as a sequence). The user of this interface has precise control ove
  • 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
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • Top PhpStorm 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