EclipseLink 2.2.0, build 'v20110202-r8913' API Reference

org.eclipse.persistence.descriptors.partitioning
Class FieldPartitioningPolicy

java.lang.Object
  extended by org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy
      extended by org.eclipse.persistence.descriptors.partitioning.FieldPartitioningPolicy
All Implemented Interfaces:
java.io.Serializable
Direct Known Subclasses:
HashPartitioningPolicy, RangePartitioningPolicy, ValuePartitioningPolicy

public abstract class FieldPartitioningPolicy
extends PartitioningPolicy

PUBLIC: FieldPartitioningPolicy partitions access to a database cluster by a field value from the object, such as the object's id, location, or tenant. All write or read request for object's with that value are sent to the server. If a query does not include the field as a parameter, then it can either be sent to all server's and unioned, or left to the sesion's default behavior.

See Also:
Serialized Form
Author:
James Sutherland
Since:
EclipseLink 2.2

Field Summary
protected  org.eclipse.persistence.internal.helper.DatabaseField partitionField
          The column to partition by.
protected  boolean unionUnpartitionableQueries
          If query does not have the partition field in it, should the query be sent to all databases.
 
Fields inherited from class org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy
name
 
Constructor Summary
FieldPartitioningPolicy()
           
FieldPartitioningPolicy(java.lang.String partitionField)
           
FieldPartitioningPolicy(java.lang.String partitionField, boolean unionUnpartitionableQueries)
           
 
Method Summary
 org.eclipse.persistence.internal.helper.DatabaseField getPartitionField()
          PUBLIC: Return the database column or query parameter to partition queries by.
 java.lang.String getPartitionFieldName()
          PUBLIC: Return the database column or query parameter to partition queries by.
 boolean getUnionUnpartitionableQueries()
          PUBLIC: Return if queries that do not contain the partition field should be sent to every database and have the result unioned.
 void setPartitionField(org.eclipse.persistence.internal.helper.DatabaseField partitionField)
          PUBLIC: Set the database column or query parameter to partition queries by.
 void setPartitionField(java.lang.String partitionField)
          PUBLIC: Set the database column or query parameter to partition queries by.
 void setUnionUnpartitionableQueries(boolean unionUnpartitionableQueries)
          PUBLIC: Set if queries that do not contain the partition field should be sent to every database and have the result unioned.
 
Methods inherited from class org.eclipse.persistence.descriptors.partitioning.PartitioningPolicy
acquireAccessor, convertClassNamesToClasses, getAccessor, getConnectionsForQuery, getName, initialize, setName
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

partitionField

protected org.eclipse.persistence.internal.helper.DatabaseField partitionField
The column to partition by.


unionUnpartitionableQueries

protected boolean unionUnpartitionableQueries
If query does not have the partition field in it, should the query be sent to all databases.

Constructor Detail

FieldPartitioningPolicy

public FieldPartitioningPolicy()

FieldPartitioningPolicy

public FieldPartitioningPolicy(java.lang.String partitionField)

FieldPartitioningPolicy

public FieldPartitioningPolicy(java.lang.String partitionField,
                               boolean unionUnpartitionableQueries)
Method Detail

getPartitionField

public org.eclipse.persistence.internal.helper.DatabaseField getPartitionField()
PUBLIC: Return the database column or query parameter to partition queries by. This is the table column name, not the class attribute name. The column value must be included in the query and should normally be part of the object's Id. This can also be the name of a query parameter. If a query does not contain the field the query will not be partitioned.


setPartitionField

public void setPartitionField(org.eclipse.persistence.internal.helper.DatabaseField partitionField)
PUBLIC: Set the database column or query parameter to partition queries by. This is the table column name, not the class attribute name. The column value must be included in the query and should normally be part of the object's Id. This can also be the name of a query parameter. If a query does not contain the field the query will not be partitioned.


getPartitionFieldName

public java.lang.String getPartitionFieldName()
PUBLIC: Return the database column or query parameter to partition queries by. This is the table column name, not the class attribute name. The column value must be included in the query and should normally be part of the object's Id. This can also be the name of a query parameter. If a query does not contain the field the query will not be partitioned.


setPartitionField

public void setPartitionField(java.lang.String partitionField)
PUBLIC: Set the database column or query parameter to partition queries by. This is the table column name, not the class attribute name. The column value must be included in the query and should normally be part of the object's Id. This can also be the name of a query parameter. If a query does not contain the field the query will not be partitioned.


getUnionUnpartitionableQueries

public boolean getUnionUnpartitionableQueries()
PUBLIC: Return if queries that do not contain the partition field should be sent to every database and have the result unioned.


setUnionUnpartitionableQueries

public void setUnionUnpartitionableQueries(boolean unionUnpartitionableQueries)
PUBLIC: Set if queries that do not contain the partition field should be sent to every database and have the result unioned.


EclipseLink 2.2.0, build 'v20110202-r8913' API Reference