Download
Getting Started
Members
Projects
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
More
Community
Marketplace
Events
Planet Eclipse
Newsletter
Videos
Participate
Report a Bug
Forums
Mailing Lists
Wiki
IRC
How to Contribute
Working Groups
Automotive
Internet of Things
LocationTech
Long-Term Support
PolarSys
Science
OpenMDM
Toggle navigation
Bugzilla – Attachment 201742 Details for
Bug 355093
Add new 'includeCriteria' flag to Multitenant metadata
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
Log In
[x]
|
Terms of Use
|
Copyright Agent
Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read
this important communication.
[patch]
Proposed changes - 2.3.1 stream
patch355093.patch (text/plain), 4.57 KB, created by
Guy Pelletier
on 2011-08-18 15:01:24 EDT
(
hide
)
Description:
Proposed changes - 2.3.1 stream
Filename:
MIME Type:
Creator:
Guy Pelletier
Created:
2011-08-18 15:01:24 EDT
Size:
4.57 KB
patch
obsolete
>Index: trunk/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/DescriptorQueryManager.java >=================================================================== >--- trunk/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/DescriptorQueryManager.java (revision 9906) >+++ trunk/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/DescriptorQueryManager.java (working copy) >@@ -15,6 +15,8 @@ > * - 337323: Multi-tenant with shared schema support (part 2) > * 05/24/2011-2.3 Guy Pelletier > * - 345962: Join fetch query when using tenant discriminator column fails. >+ * 08/18/2011-2.3.1 Guy Pelletier >+ * - 355093: Add new 'includeCriteria' flag to Multitenant metadata > ******************************************************************************/ > package org.eclipse.persistence.descriptors; > >@@ -69,6 +71,7 @@ > protected transient DeleteObjectQuery deleteQuery; > protected DoesExistQuery doesExistQuery; > protected ClassDescriptor descriptor; >+ protected boolean includeTenantCriteria; > protected boolean hasCustomMultipleTableJoinExpression; > protected transient String additionalCriteria; > protected transient Expression additionalJoinExpression; >@@ -102,6 +105,7 @@ > * Initialize the state of the descriptor query manager > */ > public DescriptorQueryManager() { >+ this.includeTenantCriteria = true; > this.queries = new LinkedHashMap(5); > this.cachedUpdateCalls = new ConcurrentFixedCache(10); > this.cachedExpressionQueries = new ConcurrentFixedCache(20); >@@ -816,6 +820,13 @@ > > /** > * INTERNAL: >+ */ >+ public boolean includeTenantCriteria() { >+ return includeTenantCriteria; >+ } >+ >+ /** >+ * INTERNAL: > * Post initialize the mappings > */ > public void initialize(AbstractSession session) { >@@ -942,7 +953,7 @@ > additionalJoinExpression = databaseQuery.getSelectionCriteria().and(additionalJoinExpression); > } > >- if (descriptor.hasTenantDiscriminatorFields()) { >+ if (descriptor.hasTenantDiscriminatorFields() && includeTenantCriteria) { > ExpressionBuilder builder = new ExpressionBuilder(); > > for (DatabaseField discriminatorField : descriptor.getTenantDiscriminatorFields().keySet()) { >@@ -1352,6 +1363,18 @@ > > /** > * ADVANCED: >+ * Set this boolean to exlude tenant column criteria in the additional >+ * join expression. This is of particualar use when using Oracle VPD >+ * that handles tenant identifiers. Setting this flag to false will ensure >+ * EclipseLink does not futher filter tenant information (and only populate >+ * it) >+ */ >+ public void setIncludeTenantCriteria(boolean includeTenantCriteria) { >+ this.includeTenantCriteria = includeTenantCriteria; >+ } >+ >+ /** >+ * ADVANCED: > * Set the receiver's insert call. > * This allows the user to override the insert operation. > */ >Index: trunk/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/InheritancePolicy.java >=================================================================== >--- trunk/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/InheritancePolicy.java (revision 9906) >+++ trunk/foundation/org.eclipse.persistence.core/src/org/eclipse/persistence/descriptors/InheritancePolicy.java (working copy) >@@ -11,6 +11,8 @@ > * Oracle - initial API and implementation from Oracle TopLink > * 04/01/2011-2.3 Guy Pelletier > * - 337323: Multi-tenant with shared schema support (part 2) >+ * 08/18/2011-2.3.1 Guy Pelletier >+ * - 355093: Add new 'includeCriteria' flag to Multitenant metadata > ******************************************************************************/ > package org.eclipse.persistence.descriptors; > >@@ -1151,6 +1153,9 @@ > getDescriptor().addTenantDiscriminatorField(property, discriminatorField); > } > >+ // Copy down the include criteria flag. >+ getDescriptor().getQueryManager().setIncludeTenantCriteria(getParentDescriptor().getQueryManager().includeTenantCriteria()); >+ > setClassIndicatorMapping(getParentDescriptor().getInheritancePolicy().getClassIndicatorMapping()); > setShouldUseClassNameAsIndicator(getParentDescriptor().getInheritancePolicy().shouldUseClassNameAsIndicator()); >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 355093
:
201741
| 201742