com.im.df.api.ddl
Interface DFItem.Handle<T extends DFItem>
- Enclosing interface:
- DFItem
public static interface DFItem.Handle<T extends DFItem>
Represents a handle-like identifier of the item. Since the Item's ID may
not be unique (e.g. when a Schema was replicated/copied), an additional
context must be kept in order to uniquely identify DFItems across DFSchemas.
Handle encapsulates such a context, but does not expose its details.
The Handle is implemented so that equals() and hashCode() satisfy the
equals/comparator contracts. It does not keep the original DFItem alive -
a Reference is used to track the instance.
Note that Handle is not serializable. The DFItem cannot be identified by
a Handle instance across application runs. The Handle can be used instead of
the DFItem in various lookup Maps.
getId
Object getId()
- Returns:
- The ID of the original DFItem
getInstance
T getInstance()
- Returns the original DFItem instance. May return
null if the
item was already garbage-collected.
- Returns:
- The instance of the original DFItem, or
null if the
DFItem is gone.