public class EmbeddedDatasourceImpl<T extends EmbeddableEntity> extends AbstractDatasource<T> implements Datasource<T>, DatasourceImplementation<T>, EmbeddedDatasource<T>
Datasource.CommitMode, Datasource.ItemChangeEvent<T extends Entity>, Datasource.ItemChangeListener<T extends Entity>, Datasource.ItemPropertyChangeEvent<T extends Entity>, Datasource.ItemPropertyChangeListener<T extends Entity>, Datasource.State, Datasource.StateChangeEvent<T extends Entity>, Datasource.StateChangeListener<T extends Entity>| Constructor and Description |
|---|
EmbeddedDatasourceImpl() |
| Modifier and Type | Method and Description |
|---|---|
void |
commit()
Performs commit
|
void |
committed(java.util.Set<Entity> entities)
Invoked after commit.
|
DataSupplier |
getDataSupplier() |
DsContext |
getDsContext() |
T |
getItem() |
T |
getItemIfValid() |
java.util.Collection<T> |
getItemsToCreate()
New instances to be committed.
|
java.util.Collection<T> |
getItemsToDelete()
Deleted instances to be committed.
|
java.util.Collection<T> |
getItemsToUpdate()
Modified instances to be committed.
|
Datasource |
getMaster() |
MetaClass |
getMetaClass() |
MetaProperty |
getProperty() |
Datasource.State |
getState() |
View |
getView() |
void |
initialized()
Moves the datasource to
State#INVALID. |
void |
invalidate()
Clears internal data and sets the datasource in
Datasource.State.INVALID state. |
void |
modified(T item)
Invoked when the given instance is modified.
|
void |
refresh()
Refreshes the datasource moving it to the
Datasource.State.VALID state |
void |
setItem(T item)
Set current entity in the datasource.
|
void |
setup(java.lang.String id,
Datasource masterDs,
java.lang.String property)
Setup the datasource right after creation.
|
void |
valid()
Moves the datasource to
State#VALID. |
addItemChangeListener, addItemPropertyChangeListener, addListener, addStateChangeListener, clearCommitLists, deleted, enableListeners, getCommitMode, getId, getLoadDynamicAttributes, getParent, isAllowCommit, isModified, removeItemChangeListener, removeItemPropertyChangeListener, removeListener, removeStateChangeListener, setAllowCommit, setCommitMode, setLoadDynamicAttributes, setModified, setParent, setup, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitclearCommitLists, deleted, enableListeners, getParent, setCommitMode, setModified, setParentaddItemChangeListener, addItemPropertyChangeListener, addListener, addStateChangeListener, getCommitMode, getId, getLoadDynamicAttributes, isAllowCommit, isModified, removeItemChangeListener, removeItemPropertyChangeListener, removeListener, removeStateChangeListener, setAllowCommit, setLoadDynamicAttributes, setuppublic void setup(java.lang.String id,
Datasource masterDs,
java.lang.String property)
NestedDatasourcesetup in interface NestedDatasource<T extends EmbeddableEntity>id - datasource IDmasterDs - master datasourceproperty - property of the master datasource to bound this datasource topublic DsContext getDsContext()
getDsContext in interface Datasource<T extends EmbeddableEntity>public DataSupplier getDataSupplier()
getDataSupplier in interface Datasource<T extends EmbeddableEntity>public void commit()
Datasourcecommit in interface Datasource<T extends EmbeddableEntity>public Datasource.State getState()
getState in interface Datasource<T extends EmbeddableEntity>public T getItem()
getItem in interface Datasource<T extends EmbeddableEntity>@Nullable public T getItemIfValid()
getItemIfValid in interface Datasource<T extends EmbeddableEntity>public void setItem(T item)
DatasourcesetItem in interface Datasource<T extends EmbeddableEntity>item - entity instancepublic MetaClass getMetaClass()
getMetaClass in interface Datasource<T extends EmbeddableEntity>public View getView()
getView in interface Datasource<T extends EmbeddableEntity>public void committed(java.util.Set<Entity> entities)
DatasourceImplementationcommitted in interface DatasourceImplementation<T extends EmbeddableEntity>entities - committed entities returned from middlewarepublic Datasource getMaster()
getMaster in interface NestedDatasource<T extends EmbeddableEntity>public MetaProperty getProperty()
getProperty in interface NestedDatasource<T extends EmbeddableEntity>public void invalidate()
DatasourceDatasource.State.INVALID state.
In Datasource.State.NOT_INITIALIZED does nothing.invalidate in interface Datasource<T extends EmbeddableEntity>public void refresh()
DatasourceDatasource.State.VALID staterefresh in interface Datasource<T extends EmbeddableEntity>public void initialized()
DatasourceImplementationState#INVALID.initialized in interface DatasourceImplementation<T extends EmbeddableEntity>public void valid()
DatasourceImplementationState#VALID.valid in interface DatasourceImplementation<T extends EmbeddableEntity>public void modified(T item)
DatasourceImplementationmodified in interface DatasourceImplementation<T extends EmbeddableEntity>modified in class AbstractDatasource<T extends EmbeddableEntity>public java.util.Collection<T> getItemsToCreate()
DatasourceImplementationgetItemsToCreate in interface DatasourceImplementation<T extends EmbeddableEntity>getItemsToCreate in class AbstractDatasource<T extends EmbeddableEntity>public java.util.Collection<T> getItemsToUpdate()
DatasourceImplementationgetItemsToUpdate in interface DatasourceImplementation<T extends EmbeddableEntity>getItemsToUpdate in class AbstractDatasource<T extends EmbeddableEntity>public java.util.Collection<T> getItemsToDelete()
DatasourceImplementationgetItemsToDelete in interface DatasourceImplementation<T extends EmbeddableEntity>getItemsToDelete in class AbstractDatasource<T extends EmbeddableEntity>