T
- type of entity this datasource is working withInstanceContainer
APIs instead.@Deprecated
public interface Datasource<T extends Entity>
Modifier and Type | Interface and Description |
---|---|
static class |
Datasource.CommitMode
Deprecated.
Where to commit changes
|
static class |
Datasource.ItemChangeEvent<T extends Entity>
Deprecated.
|
static interface |
Datasource.ItemChangeListener<T extends Entity>
Deprecated.
Listener to datasource item change events.
|
static class |
Datasource.ItemPropertyChangeEvent<T extends Entity>
Deprecated.
|
static interface |
Datasource.ItemPropertyChangeListener<T extends Entity>
Deprecated.
Listener to datasource item property value change events.
|
static class |
Datasource.State
Deprecated.
Possible states of datasource:
Datasource.State.NOT_INITIALIZED , Datasource.State.INVALID , Datasource.State.VALID |
static class |
Datasource.StateChangeEvent<T extends Entity>
Deprecated.
|
static interface |
Datasource.StateChangeListener<T extends Entity>
Deprecated.
Listener to datasource state change events.
|
Modifier and Type | Method and Description |
---|---|
void |
addItemChangeListener(Datasource.ItemChangeListener<T> listener)
Deprecated.
|
void |
addItemPropertyChangeListener(Datasource.ItemPropertyChangeListener<T> listener)
Deprecated.
|
void |
addStateChangeListener(Datasource.StateChangeListener<T> listener)
Deprecated.
|
void |
commit()
Deprecated.
Performs commit
|
Datasource.CommitMode |
getCommitMode()
Deprecated.
|
DataSupplier |
getDataSupplier()
Deprecated.
|
DsContext |
getDsContext()
Deprecated.
|
java.lang.String |
getId()
Deprecated.
|
T |
getItem()
Deprecated.
|
T |
getItemIfValid()
Deprecated.
|
boolean |
getLoadDynamicAttributes()
Deprecated.
|
MetaClass |
getMetaClass()
Deprecated.
|
Datasource.State |
getState()
Deprecated.
|
View |
getView()
Deprecated.
|
void |
invalidate()
Deprecated.
Clears internal data and sets the datasource in
Datasource.State.INVALID state. |
boolean |
isAllowCommit()
Deprecated.
|
boolean |
isModified()
Deprecated.
|
void |
refresh()
Deprecated.
Refreshes the datasource moving it to the
Datasource.State.VALID state |
void |
removeItemChangeListener(Datasource.ItemChangeListener<T> listener)
Deprecated.
|
void |
removeItemPropertyChangeListener(Datasource.ItemPropertyChangeListener<T> listener)
Deprecated.
|
void |
removeStateChangeListener(Datasource.StateChangeListener<T> listener)
Deprecated.
|
void |
setAllowCommit(boolean allowCommit)
Deprecated.
Switch on/off ability to commit.
|
void |
setItem(T item)
Deprecated.
Set current entity in the datasource.
|
void |
setLoadDynamicAttributes(boolean value)
Deprecated.
|
void |
setup(DsContext dsContext,
DataSupplier dataSupplier,
java.lang.String id,
MetaClass metaClass,
View view)
Deprecated.
Setup the datasource right after creation.
|
void setup(DsContext dsContext, DataSupplier dataSupplier, java.lang.String id, MetaClass metaClass, @Nullable View view) throws java.lang.UnsupportedOperationException
dsContext
- DsContext instancedataSupplier
- DataSupplier instanceid
- datasource IDmetaClass
- MetaClass of an entity that will be stored in this datasourceview
- a view that will be used to load entities form DB, can be nulljava.lang.UnsupportedOperationException
- if an implementation doesn't support this method. This is the case
for example for NestedDatasource
implementors, that have their own setup method.java.lang.String getId()
@Nullable DsContext getDsContext()
DataSupplier getDataSupplier()
boolean isModified()
boolean isAllowCommit()
void setAllowCommit(boolean allowCommit)
isModified()
always returns false and commit()
has no effect.Datasource.CommitMode getCommitMode()
void commit()
Datasource.State getState()
@Nullable T getItem()
@Nullable T getItemIfValid()
void setItem(@Nullable T item)
item
- entity instancevoid invalidate()
Datasource.State.INVALID
state.
In Datasource.State.NOT_INITIALIZED
does nothing.void refresh()
Datasource.State.VALID
stateMetaClass getMetaClass()
@Nullable View getView()
void addItemChangeListener(Datasource.ItemChangeListener<T> listener)
void removeItemChangeListener(Datasource.ItemChangeListener<T> listener)
void addStateChangeListener(Datasource.StateChangeListener<T> listener)
void removeStateChangeListener(Datasource.StateChangeListener<T> listener)
void addItemPropertyChangeListener(Datasource.ItemPropertyChangeListener<T> listener)
void removeItemPropertyChangeListener(Datasource.ItemPropertyChangeListener<T> listener)
boolean getLoadDynamicAttributes()
void setLoadDynamicAttributes(boolean value)
value
- whether to load dynamic attributes