org.apache.lens.cube.metadata
Class TimePartition
java.lang.Object
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
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.