net.sf.fikin.pojostate.state
Class SnapshotState
java.lang.Object
net.sf.fikin.pojostate.state.AbstractState
net.sf.fikin.pojostate.state.SnapshotState
- All Implemented Interfaces:
- java.lang.Cloneable, java.lang.Iterable, java.util.Collection, State, StatePrototype
public class SnapshotState
- extends AbstractState
Static state information obtained from the POJO.
It maintains a permanent reference to the underlying POJO.
It takes a snapshot of all Property values at once, upon a call to
update()
. Later calls to SnapshotState.StaticProperty.getValue()
result in
returning already obtained value.
This type of behavior is useful when there is infrequent change of POJO state
and generally there are frequent reads of Property
values.
created on Mar 1, 2007
- Since:
- Version:
- $Revision: 1.1 $
- Author:
- fiykov
Nested Class Summary |
class |
SnapshotState.StaticProperty
Implements read-once method value, executed upon object construction time
created on Mar 1, 2007 |
Methods inherited from class net.sf.fikin.pojostate.state.AbstractState |
add, add, addAll, clear, clone, contains, containsAll, getClassLoader, getFormat, getLocale, getObject, getProperties, getProperty, isEmpty, iterator, remove, removeAll, retainAll, setClassLoader, setFormat, setLocale, setObject, setProperties, size, sort, sortArray, toArray, toArray, toString |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
equals, hashCode |
SnapshotState
public SnapshotState()
update
public void update()
throws DecorationException
- Update the state of all Properties.
- Throws:
DecorationException
newProperty
public Property newProperty(MethodMeta mm)
throws DecorationException
- instantiate new
SnapshotState.StaticProperty
object
- Parameters:
mm
- attached to that Property
- Throws:
DecorationException
- in case of internal error
Copyright © 2005 Nikolay Fiykov. All Rights Reserved.