|
Lines 15-20
Link Here
|
| 15 |
* - 337323: Multi-tenant with shared schema support (part 2) |
15 |
* - 337323: Multi-tenant with shared schema support (part 2) |
| 16 |
* 05/24/2011-2.3 Guy Pelletier |
16 |
* 05/24/2011-2.3 Guy Pelletier |
| 17 |
* - 345962: Join fetch query when using tenant discriminator column fails. |
17 |
* - 345962: Join fetch query when using tenant discriminator column fails. |
|
|
18 |
* 08/18/2011-2.3.1 Guy Pelletier |
| 19 |
* - 355093: Add new 'includeCriteria' flag to Multitenant metadata |
| 18 |
******************************************************************************/ |
20 |
******************************************************************************/ |
| 19 |
package org.eclipse.persistence.descriptors; |
21 |
package org.eclipse.persistence.descriptors; |
| 20 |
|
22 |
|
|
Lines 69-74
Link Here
|
| 69 |
protected transient DeleteObjectQuery deleteQuery; |
71 |
protected transient DeleteObjectQuery deleteQuery; |
| 70 |
protected DoesExistQuery doesExistQuery; |
72 |
protected DoesExistQuery doesExistQuery; |
| 71 |
protected ClassDescriptor descriptor; |
73 |
protected ClassDescriptor descriptor; |
|
|
74 |
protected boolean includeTenantCriteria; |
| 72 |
protected boolean hasCustomMultipleTableJoinExpression; |
75 |
protected boolean hasCustomMultipleTableJoinExpression; |
| 73 |
protected transient String additionalCriteria; |
76 |
protected transient String additionalCriteria; |
| 74 |
protected transient Expression additionalJoinExpression; |
77 |
protected transient Expression additionalJoinExpression; |
|
Lines 102-107
Link Here
|
| 102 |
* Initialize the state of the descriptor query manager |
105 |
* Initialize the state of the descriptor query manager |
| 103 |
*/ |
106 |
*/ |
| 104 |
public DescriptorQueryManager() { |
107 |
public DescriptorQueryManager() { |
|
|
108 |
this.includeTenantCriteria = true; |
| 105 |
this.queries = new LinkedHashMap(5); |
109 |
this.queries = new LinkedHashMap(5); |
| 106 |
this.cachedUpdateCalls = new ConcurrentFixedCache(10); |
110 |
this.cachedUpdateCalls = new ConcurrentFixedCache(10); |
| 107 |
this.cachedExpressionQueries = new ConcurrentFixedCache(20); |
111 |
this.cachedExpressionQueries = new ConcurrentFixedCache(20); |
|
Lines 816-821
Link Here
|
| 816 |
|
820 |
|
| 817 |
/** |
821 |
/** |
| 818 |
* INTERNAL: |
822 |
* INTERNAL: |
|
|
823 |
*/ |
| 824 |
public boolean includeTenantCriteria() { |
| 825 |
return includeTenantCriteria; |
| 826 |
} |
| 827 |
|
| 828 |
/** |
| 829 |
* INTERNAL: |
| 819 |
* Post initialize the mappings |
830 |
* Post initialize the mappings |
| 820 |
*/ |
831 |
*/ |
| 821 |
public void initialize(AbstractSession session) { |
832 |
public void initialize(AbstractSession session) { |
|
Lines 942-948
Link Here
|
| 942 |
additionalJoinExpression = databaseQuery.getSelectionCriteria().and(additionalJoinExpression); |
953 |
additionalJoinExpression = databaseQuery.getSelectionCriteria().and(additionalJoinExpression); |
| 943 |
} |
954 |
} |
| 944 |
|
955 |
|
| 945 |
if (descriptor.hasTenantDiscriminatorFields()) { |
956 |
if (descriptor.hasTenantDiscriminatorFields() && includeTenantCriteria) { |
| 946 |
ExpressionBuilder builder = new ExpressionBuilder(); |
957 |
ExpressionBuilder builder = new ExpressionBuilder(); |
| 947 |
|
958 |
|
| 948 |
for (DatabaseField discriminatorField : descriptor.getTenantDiscriminatorFields().keySet()) { |
959 |
for (DatabaseField discriminatorField : descriptor.getTenantDiscriminatorFields().keySet()) { |
|
Lines 1352-1357
Link Here
|
| 1352 |
|
1363 |
|
| 1353 |
/** |
1364 |
/** |
| 1354 |
* ADVANCED: |
1365 |
* ADVANCED: |
|
|
1366 |
* Set this boolean to exlude tenant column criteria in the additional |
| 1367 |
* join expression. This is of particualar use when using Oracle VPD |
| 1368 |
* that handles tenant identifiers. Setting this flag to false will ensure |
| 1369 |
* EclipseLink does not futher filter tenant information (and only populate |
| 1370 |
* it) |
| 1371 |
*/ |
| 1372 |
public void setIncludeTenantCriteria(boolean includeTenantCriteria) { |
| 1373 |
this.includeTenantCriteria = includeTenantCriteria; |
| 1374 |
} |
| 1375 |
|
| 1376 |
/** |
| 1377 |
* ADVANCED: |
| 1355 |
* Set the receiver's insert call. |
1378 |
* Set the receiver's insert call. |
| 1356 |
* This allows the user to override the insert operation. |
1379 |
* This allows the user to override the insert operation. |
| 1357 |
*/ |
1380 |
*/ |