Class RangePartition
- java.lang.Object
-
- org.eclipse.persistence.descriptors.partitioning.RangePartition
-
public class RangePartition extends Object
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
Fields Modifier and Type Field Description protected String
connectionPool
protected Comparable
endValue
protected String
endValueName
protected Class
partitionValueType
protected String
partitionValueTypeName
protected Comparable
startValue
protected String
startValueName
-
Constructor Summary
Constructors Constructor Description RangePartition()
RangePartition(String connectionPool, Comparable startValue, Comparable endValue)
PUBLIC: Create the partition for the connectionPool and start/end values.RangePartition(String connectionPool, String partitionValueTypeName, String startValueName, String endValueName)
INTERNAL: COnstructor used from metadata processing to avoid classloader dependencies.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
convertClassNamesToClasses(ClassLoader classLoader)
INTERNAL: Convert all the class-name-based settings to actual class-based settings.String
getConnectionPool()
PUBLIC: Return the connection pool to use for this partition.Comparable
getEndValue()
PUBLIC: Return the range end value.Comparable
getStartValue()
PUBLIC: Return the range start value.protected Object
initObject(Class<?> type, String value)
INTERNAL: TODO: clean up the exception handling.boolean
isInRange(Object value)
INTERNAL: Return if the value is in the partitions range.void
setConnectionPool(String connectionPool)
PUBLIC: Return the connection pool to use for this partition.void
setEndValue(Comparable endValue)
PUBLIC: Set the range end value.void
setStartValue(Comparable startValue)
PUBLIC: Set the range start value.
-
-
-
Field Detail
-
endValueName
protected String endValueName
-
startValueName
protected String startValueName
-
partitionValueTypeName
protected String partitionValueTypeName
-
connectionPool
protected String connectionPool
-
partitionValueType
protected Class partitionValueType
-
startValue
protected Comparable startValue
-
endValue
protected Comparable endValue
-
-
Constructor Detail
-
RangePartition
public RangePartition()
-
RangePartition
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.
-
RangePartition
public RangePartition(String connectionPool, Comparable startValue, Comparable endValue)
PUBLIC: Create the partition for the connectionPool and start/end values.
-
-
Method Detail
-
convertClassNamesToClasses
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.
-
getStartValue
public Comparable getStartValue()
PUBLIC: Return the range start value. Values greater or equal to this value are part of this partition.
-
initObject
protected Object initObject(Class<?> type, String value)
INTERNAL: TODO: clean up the exception handling.
-
setStartValue
public void setStartValue(Comparable startValue)
PUBLIC: Set the range start value. Values greater or equal to this value are part of this partition.
-
getEndValue
public Comparable getEndValue()
PUBLIC: Return the range end value. Values less than or equal this value are part of this partition.
-
setEndValue
public void setEndValue(Comparable endValue)
PUBLIC: Set the range end value. Values less than or equal this value are part of this partition.
-
getConnectionPool
public String getConnectionPool()
PUBLIC: Return the connection pool to use for this partition.
-
setConnectionPool
public void setConnectionPool(String connectionPool)
PUBLIC: Return the connection pool to use for this partition.
-
isInRange
public boolean isInRange(Object value)
INTERNAL: Return if the value is in the partitions range.
-
-