public interface ValueHolder<E> extends Serializable
Here is an example of a bean property implemented using ValueHolder:
protected ValueHolder someProperty;
public SomeClass getSomeProperty() {
return (SomeClass) somePropertyHolder.getValue(SomeClass.class);
}
public void setSomeProperty(SomeClass newValue) {
somePropertyHolder.setValue(SomeClass.class, newValue);
}
| Modifier and Type | Method and Description |
|---|---|
E |
getValue()
Returns an object stored by this ValueHolder.
|
E |
getValueDirectly()
Retrieves ValueHolder value without triggering fault resolution.
|
void |
invalidate()
Turns a ValueHolder into a fault.
|
boolean |
isFault()
Returns true if the internal value is not yet resolved.
|
E |
setValue(E value)
Sets an object stored by this ValueHolder.
|
E |
setValueDirectly(E value)
Sets ValueHolder vaue without triggering fault resolution.
|
E getValue() throws CayenneRuntimeException
CayenneRuntimeExceptionE getValueDirectly() throws CayenneRuntimeException
CayenneRuntimeExceptionE setValue(E value) throws CayenneRuntimeException
value - a new value of the ValueHolder.CayenneRuntimeExceptionE setValueDirectly(E value) throws CayenneRuntimeException
CayenneRuntimeExceptionboolean isFault()
void invalidate()
Copyright © 2001–2021 Apache Cayenne. All rights reserved.