protected static Long convertTimepointToBucketingLong(Date timepointToBeConverted){
  if (timepointToBeConverted == null) {
    return null;
  }
  Long toReturn=timepointToBeConverted.getTime() - PrimaryIndexBucketGeneratorImpl.TIMEPOINT_MIN;
  if (toReturn < 0l) {
    return 0l;
  }
 else   if (toReturn > PrimaryIndexBucketGeneratorImpl.TIMEPOINT_MAX) {
    return PrimaryIndexBucketGeneratorImpl.TIMEPOINT_MAX;
  }
 else {
    return toReturn;
  }
}

protected static Long convertTimepointToBucketingLong ( Date timepointToBeConverted ) { if ( timepointToBeConverted == null ) { return null ; } Long toReturn = timepointToBeConverted . getTime ( ) - PrimaryIndexBucketGeneratorImpl . TIMEPOINT_MIN ; if ( toReturn < 0l ) { return 0l ; } else if ( toReturn > PrimaryIndexBucketGeneratorImpl . TIMEPOINT_MAX ) { return PrimaryIndexBucketGeneratorImpl . TIMEPOINT_MAX ; } else { return toReturn ; } }
this method converts the timepoint value to its corresponding long value , this method assumes that the date format is the same as the format being returned by the parseutils . parsestringasdate . note : any value prior to y2k ( 00 : 00 : 00 utc on 1 january 2000 ) will be bucketed as 0 and any value after 2030 will be bucketed as bucket max . this is done to reduce the number of buckets that are required for this type ( by eliminating ranges that are likely to be entirely unused ) .
