public class RuntimePropsDatasourceImpl extends AbstractDatasource<DynamicAttributesEntity> implements RuntimePropsDatasource<DynamicAttributesEntity>
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 |
|---|
RuntimePropsDatasourceImpl(DsContext dsContext,
DataSupplier dataSupplier,
java.lang.String id,
java.lang.String mainDsId,
MetaClass categorizedEntityClass) |
| Modifier and Type | Method and Description |
|---|---|
void |
commit()
Performs commit
|
void |
committed(java.util.Set<Entity> entities)
Invoked after commit.
|
DataSupplier |
getDataSupplier() |
Category |
getDefaultCategory() |
DsContext |
getDsContext() |
DynamicAttributesEntity |
getItem() |
DynamicAttributesEntity |
getItemIfValid() |
Datasource |
getMainDs() |
MetaClass |
getMetaClass() |
java.util.Collection<DynamicAttributesMetaProperty> |
getPropertiesFilteredByCategory() |
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 |
refresh()
Refreshes the datasource moving it to the
Datasource.State.VALID state |
MetaClass |
resolveCategorizedEntityClass() |
void |
setItem(DynamicAttributesEntity item)
Set current entity in the datasource.
|
void |
setup(DsContext dsContext,
DataSupplier dataSupplier,
java.lang.String id,
MetaClass metaClass,
View view)
Setup the datasource right after creation.
|
void |
valid()
Moves the datasource to
State#VALID. |
addItemChangeListener, addItemPropertyChangeListener, addListener, addStateChangeListener, clearCommitLists, deleted, enableListeners, getCommitMode, getId, getItemsToCreate, getItemsToDelete, getItemsToUpdate, getLoadDynamicAttributes, getParent, isAllowCommit, isModified, modified, removeItemChangeListener, removeItemPropertyChangeListener, removeListener, removeStateChangeListener, setAllowCommit, setCommitMode, setLoadDynamicAttributes, setModified, setParent, toStringequals, getClass, hashCode, notify, notifyAll, wait, wait, waitaddItemChangeListener, addItemPropertyChangeListener, addListener, addStateChangeListener, getCommitMode, getId, getLoadDynamicAttributes, isAllowCommit, isModified, removeItemChangeListener, removeItemPropertyChangeListener, removeListener, removeStateChangeListener, setAllowCommit, setLoadDynamicAttributespublic RuntimePropsDatasourceImpl(DsContext dsContext, DataSupplier dataSupplier, java.lang.String id, java.lang.String mainDsId, @Nullable MetaClass categorizedEntityClass)
public void setup(DsContext dsContext, DataSupplier dataSupplier, java.lang.String id, MetaClass metaClass, @Nullable View view) throws java.lang.UnsupportedOperationException
Datasourcesetup in interface Datasource<DynamicAttributesEntity>setup in class AbstractDatasource<DynamicAttributesEntity>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.public MetaClass resolveCategorizedEntityClass()
resolveCategorizedEntityClass in interface RuntimePropsDatasource<DynamicAttributesEntity>public DsContext getDsContext()
getDsContext in interface Datasource<DynamicAttributesEntity>public DataSupplier getDataSupplier()
getDataSupplier in interface Datasource<DynamicAttributesEntity>public void commit()
Datasourcecommit in interface Datasource<DynamicAttributesEntity>public Datasource.State getState()
getState in interface Datasource<DynamicAttributesEntity>public DynamicAttributesEntity getItem()
getItem in interface Datasource<DynamicAttributesEntity>@Nullable public DynamicAttributesEntity getItemIfValid()
getItemIfValid in interface Datasource<DynamicAttributesEntity>public void setItem(DynamicAttributesEntity item)
DatasourcesetItem in interface Datasource<DynamicAttributesEntity>item - entity instancepublic void invalidate()
DatasourceDatasource.State.INVALID state.
In Datasource.State.NOT_INITIALIZED does nothing.invalidate in interface Datasource<DynamicAttributesEntity>public void refresh()
DatasourceDatasource.State.VALID staterefresh in interface Datasource<DynamicAttributesEntity>public MetaClass getMetaClass()
getMetaClass in interface Datasource<DynamicAttributesEntity>public View getView()
getView in interface Datasource<DynamicAttributesEntity>public void initialized()
DatasourceImplementationState#INVALID.initialized in interface DatasourceImplementation<DynamicAttributesEntity>public void valid()
DatasourceImplementationState#VALID.valid in interface DatasourceImplementation<DynamicAttributesEntity>public void committed(java.util.Set<Entity> entities)
DatasourceImplementationcommitted in interface DatasourceImplementation<DynamicAttributesEntity>entities - committed entities returned from middlewarepublic Datasource getMainDs()
getMainDs in interface RuntimePropsDatasource<DynamicAttributesEntity>public java.util.Collection<DynamicAttributesMetaProperty> getPropertiesFilteredByCategory()
getPropertiesFilteredByCategory in interface RuntimePropsDatasource<DynamicAttributesEntity>@Nullable public Category getDefaultCategory()