Class RangePartition


  • public class RangePartition
    extends Object
    PUBLIC: Represent a specific range partition. Values >= startValue and <= endValue will be routed to the connection pool.
    Since:
    EclipseLink 2.2
    Author:
    James Sutherland
    • Field Detail

      • endValueName

        protected String endValueName
      • startValueName

        protected String startValueName
      • partitionValueTypeName

        protected String partitionValueTypeName
      • connectionPool

        protected String connectionPool
      • partitionValueType

        protected Class partitionValueType
    • 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.