This project has retired. For details please refer to its Attic page.
TimePartition (Lens 2.1.0-beta-incubating API)

org.apache.lens.cube.metadata
Class TimePartition

java.lang.Object
  extended by org.apache.lens.cube.metadata.TimePartition
All Implemented Interfaces:
Comparable<TimePartition>, Named

public class TimePartition
extends Object
implements Comparable<TimePartition>, Named

stores a partition's update period, date and string representation. Provides some utility methods around it


Method Summary
 boolean after(TimePartition when)
           
 boolean before(TimePartition when)
           
 int compareTo(TimePartition o)
           
 String getName()
           
 TimePartition next()
           
static TimePartition of(UpdatePeriod updatePeriod, Date date)
           
static TimePartition of(UpdatePeriod updatePeriod, String dateString)
           
 TimePartition partitionAtDiff(int increment)
           
 TimePartition previous()
           
 TimePartitionRange rangeFrom(TimePartition from)
           
 TimePartitionRange rangeUpto(TimePartition to)
           
 TimePartitionRange singletonRange()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

of

public static TimePartition of(UpdatePeriod updatePeriod,
                               Date date)
                        throws LensException
Throws:
LensException

of

public static TimePartition of(UpdatePeriod updatePeriod,
                               String dateString)
                        throws LensException
Throws:
LensException

toString

public String toString()
Overrides:
toString in class Object

compareTo

public int compareTo(TimePartition o)
Specified by:
compareTo in interface Comparable<TimePartition>

partitionAtDiff

public TimePartition partitionAtDiff(int increment)

previous

public TimePartition previous()

next

public TimePartition next()

before

public boolean before(TimePartition when)

after

public boolean after(TimePartition when)

rangeUpto

public TimePartitionRange rangeUpto(TimePartition to)
                             throws LensException
Throws:
LensException

rangeFrom

public TimePartitionRange rangeFrom(TimePartition from)
                             throws LensException
Throws:
LensException

singletonRange

public TimePartitionRange singletonRange()
                                  throws LensException
Throws:
LensException

getName

public String getName()
Specified by:
getName in interface Named


Copyright © 2014–2015 Apache Software Foundation. All rights reserved.