|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.anasoft.os.daofusion.bitemporal.BitemporalProperty<V,T>
V
- Value wrapped by the Bitemporal
object.T
- Bitemporal
object implementation that wraps the given value type.public class BitemporalProperty<V,T extends Bitemporal>
Represents a bitemporally tracked property of a class (for instance the name of a person).
The BitemporalProperty
class provides a high-level API expressed in terms of actual
value classes (e.g. String), layered on top of low-level constructs such as the BitemporalTrace
and Bitemporal
objects. To be able to provide an API at the level of actual value classes,
the BitemporalProperty
uses a ValueAccessor
to extract actual values from
Bitemporal
objects.
BitemporalTrace
,
ValueAccessor
,
Serialized FormConstructor Summary | |
---|---|
BitemporalProperty(BitemporalTrace trace,
ValueAccessor<V,T> accessor)
Create a new bitemporal property wrapping the given trace and using the given value accessor. |
|
BitemporalProperty(java.util.Collection<? extends Bitemporal> data,
ValueAccessor<V,T> accessor)
Create a new bitemporal property on top of given data collection and using the given value accessor. |
Method Summary | |
---|---|
void |
end()
Forget the currently valid value. |
void |
end(org.joda.time.DateTime validOn)
Forget the valid valid on given date. |
T |
get()
Returns the Bitemporal object valid now as currently known. |
T |
get(org.joda.time.DateTime validOn)
Returns the Bitemporal object valid on specified date as currently known. |
T |
get(org.joda.time.DateTime validOn,
org.joda.time.DateTime knownOn)
Returns the Bitemporal object valid on specified date as known on given date. |
java.util.Collection<T> |
getData()
Returns the Bitemporal object collection contained within the trace. |
java.util.List<T> |
getEvolution()
Returns the evolution of the value currently valid. |
java.util.List<T> |
getEvolution(org.joda.time.DateTime validOn)
Returns the evolution of the value valid on given date. |
java.util.List<T> |
getHistory()
Returns the history of the value as currently known. |
java.util.List<T> |
getHistory(org.joda.time.DateTime knownOn)
Returns the history of the value as known on given date. |
BitemporalTrace |
getTrace()
Returns the wrapped bitemporal trace. |
boolean |
hasValue()
Returns whether or not this property has a known value currently valid. |
boolean |
hasValueOn(org.joda.time.DateTime validOn)
Returns whether or not this property has a value valid on given date. |
boolean |
hasValueOn(org.joda.time.DateTime validOn,
org.joda.time.DateTime knownOn)
Returns whether or not this property had a value valid on given date as known on specified date. |
V |
now()
Returns the value valid now as currently known. |
V |
on(org.joda.time.DateTime validOn)
Returns the value valid on specified date as currently known. |
V |
on(org.joda.time.DateTime validOn,
org.joda.time.DateTime knownOn)
Returns the value valid on specified date as known on given date. |
void |
set(V value)
Set the value of this bitemporal property. |
void |
set(V value,
org.joda.time.Interval validityInterval)
Set the value of this bitemporal property for specified validity interval. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BitemporalProperty(java.util.Collection<? extends Bitemporal> data, ValueAccessor<V,T> accessor)
public BitemporalProperty(BitemporalTrace trace, ValueAccessor<V,T> accessor)
Method Detail |
---|
public BitemporalTrace getTrace()
public V now()
now
as currently known.
public V on(org.joda.time.DateTime validOn)
public V on(org.joda.time.DateTime validOn, org.joda.time.DateTime knownOn)
public T get()
Bitemporal
object valid now
as currently known.
public T get(org.joda.time.DateTime validOn)
Bitemporal
object valid on specified date as currently known.
public T get(org.joda.time.DateTime validOn, org.joda.time.DateTime knownOn)
Bitemporal
object valid on specified date as known on given date.
public java.util.List<T> getHistory()
public java.util.List<T> getHistory(org.joda.time.DateTime knownOn)
public java.util.List<T> getEvolution()
public java.util.List<T> getEvolution(org.joda.time.DateTime validOn)
public java.util.Collection<T> getData()
Bitemporal
object collection contained within the trace.
public void set(V value)
from now on
.
public void set(V value, org.joda.time.Interval validityInterval)
public void end()
public void end(org.joda.time.DateTime validOn)
public boolean hasValue()
public boolean hasValueOn(org.joda.time.DateTime validOn)
public boolean hasValueOn(org.joda.time.DateTime validOn, org.joda.time.DateTime knownOn)
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |