Interface ValueHolder<E>

All Superinterfaces:
Serializable
All Known Implementing Classes:
IndexPropertyList, PersistentObjectHolder, PersistentObjectList, PersistentObjectMap, PersistentObjectSet, ToManyList, ToManySet

public interface ValueHolder<E> extends Serializable
Provides a level of indirection for property value access, most often used for deferred faulting of to-one relationships. A ValueHolder abstracts how a property value is obtained (fetched from DB, etc.), thus simplifying design of an object that uses it.

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);
 }
 
Since:
1.2
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns an object stored by this ValueHolder.
    Retrieves ValueHolder value without triggering fault resolution.
    void
    Turns a ValueHolder into a fault.
    boolean
    Returns true if the internal value is not yet resolved.
    setValue(E value)
    Sets an object stored by this ValueHolder.
    Sets ValueHolder vaue without triggering fault resolution.