public interface ValueHolder 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 |
|---|---|
Object |
getValue()
Returns an object stored by this ValueHolder.
|
Object |
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.
|
Object |
setValue(Object value)
Sets an object stored by this ValueHolder.
|
Object |
setValueDirectly(Object value)
Sets ValueHolder vaue without triggering fault resolution.
|
Object getValue() throws CayenneRuntimeException
CayenneRuntimeExceptionObject getValueDirectly() throws CayenneRuntimeException
CayenneRuntimeExceptionObject setValue(Object value) throws CayenneRuntimeException
value - a new value of the ValueHolder.CayenneRuntimeExceptionObject setValueDirectly(Object value) throws CayenneRuntimeException
CayenneRuntimeExceptionboolean isFault()
void invalidate()
Copyright © 2001–2023 Apache Cayenne. All rights reserved.