public interface Persistable extends Savable
PersistenceService.
The save() and restore() methods save/restore the component state to/from a JavaBean.
Exactly what is being saved and restored is up to a specific component - in general, one should not
expect that saving and then restoring a component will result in an identical object.
The getDescriptor() method provides access to the descriptor maintained by this component.
Implementations are expected to ensure that any properties set on the descriptor returned by this
method are reflected by descriptors subsequently returned by save(), unless modified
between the two calls.| Modifier and Type | Interface and Description |
|---|---|
static class |
Persistable.Descriptor
JavaBean that describes a state of a
Persistable component. |
| Modifier and Type | Method and Description |
|---|---|
Persistable.Descriptor |
getDescriptor()
Returns a reference to the descriptor maintained by this component.
|
default void |
restore(Persistable.Descriptor descriptor)
Restores this component to the state specified by the provided JavaBean.
|
default void |
restore(Serializable descriptor)
Overrides
Savable.restore(Serializable) to forward the call to restore(Descriptor)
if the provided argument value is of type Persistable.Descriptor, and do nothing otherwise. |
default Persistable.Descriptor |
save()
Returns JavaBean describing the current state of this component.
|
default void restore(Serializable descriptor)
Savable.restore(Serializable) to forward the call to restore(Descriptor)
if the provided argument value is of type Persistable.Descriptor, and do nothing otherwise.default void restore(Persistable.Descriptor descriptor)
descriptor - JavaBean encapsulating the state.default Persistable.Descriptor save()
getDescriptor().Persistable.Descriptor getDescriptor()
null, and
that any properties set on the descriptor returned by this method are reflected by
descriptors subsequently returned by save(), unless modified between the two calls.Copyright © 2019 LSST. All rights reserved.