Top Description Fields Constructors Methods
org.eclipse.persistence.descriptors.partitioning

public Class RangePartition

extends Object
Class Inheritance
Imports
org.eclipse.persistence.exceptions.ValidationException, org.eclipse.persistence.internal.security.PrivilegedAccessHelper

PUBLIC: Represent a specific range partition. Values >= startValue and <= endValue will be routed to the connection pool.
Author
James Sutherland
Since
EclipseLink 2.2

Field Summary

Modifier and TypeField and Description
protected String
protected Comparable<T>
protected String
protected Class<?>
protected String
protected Comparable<T>
protected String

Constructor Summary

AccessConstructor and Description
public
public
RangePartition(String connectionPool, String partitionValueTypeName, String startValueName, String endValueName)

INTERNAL: COnstructor used from metadata processing to avoid classloader dependencies.

public
RangePartition(String connectionPool, Comparable<T> startValue, Comparable<T> endValue)

PUBLIC: Create the partition for the connectionPool and start/end values.

Method Summary

Modifier and TypeMethod and Description
public void
convertClassNamesToClasses(ClassLoader classLoader)

INTERNAL: Convert all the class-name-based settings to actual class-based settings.

public String
getConnectionPool()

PUBLIC: Return the connection pool to use for this partition.

public Comparable<T>
getEndValue()

PUBLIC: Return the range end value.

public Comparable<T>
getStartValue()

PUBLIC: Return the range start value.

protected <T> T
initObject(Class<T> type, String value)

INTERNAL: TODO: clean up the exception handling.

public boolean
isInRange(Object value)

INTERNAL: Return if the value is in the partitions range.

public void
setConnectionPool(String connectionPool)

PUBLIC: Return the connection pool to use for this partition.

public void
setEndValue(Comparable<T> endValue)

PUBLIC: Set the range end value.

public void
setStartValue(Comparable<T> startValue)

PUBLIC: Set the range start value.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

connectionPoolback to summary
protected String connectionPool
endValueback to summary
protected Comparable<T> endValue
endValueNameback to summary
protected String endValueName
partitionValueTypeback to summary
protected Class<?> partitionValueType
partitionValueTypeNameback to summary
protected String partitionValueTypeName
startValueback to summary
protected Comparable<T> startValue
startValueNameback to summary
protected String startValueName

Constructor Detail

RangePartitionback to summary
public RangePartition()
RangePartitionback to summary
public RangePartition(String connectionPool, String partitionValueTypeName, String startValueName, String endValueName)

INTERNAL: COnstructor used from metadata processing to avoid classloader dependencies. Class names are converted/initialized in the convertClassNamesToClasses method.

RangePartitionback to summary
public RangePartition(String connectionPool, Comparable<T> startValue, Comparable<T> endValue)

PUBLIC: Create the partition for the connectionPool and start/end values.

Method Detail

convertClassNamesToClassesback to summary
public void convertClassNamesToClasses(ClassLoader classLoader)

INTERNAL: Convert all the class-name-based settings to actual class-based settings. This method is used when converting a project that has been built with class names to a project with classes.

getConnectionPoolback to summary
public String getConnectionPool()

PUBLIC: Return the connection pool to use for this partition.

getEndValueback to summary
public Comparable<T> getEndValue()

PUBLIC: Return the range end value. Values less than or equal this value are part of this partition.

getStartValueback to summary
public Comparable<T> getStartValue()

PUBLIC: Return the range start value. Values greater or equal to this value are part of this partition.

initObjectback to summary
protected <T> T initObject(Class<T> type, String value)

INTERNAL: TODO: clean up the exception handling.

Annotations
@SuppressWarnings:unchecked
isInRangeback to summary
public boolean isInRange(Object value)

INTERNAL: Return if the value is in the partitions range.

setConnectionPoolback to summary
public void setConnectionPool(String connectionPool)

PUBLIC: Return the connection pool to use for this partition.

setEndValueback to summary
public void setEndValue(Comparable<T> endValue)

PUBLIC: Set the range end value. Values less than or equal this value are part of this partition.

setStartValueback to summary
public void setStartValue(Comparable<T> startValue)

PUBLIC: Set the range start value. Values greater or equal to this value are part of this partition.