public interface DsContext
Modifier and Type | Interface and Description |
---|---|
static interface |
DsContext.AfterCommitListener |
static interface |
DsContext.BeforeCommitListener
This listener allows to intercept commit events.
|
static interface |
DsContext.CommitListener
Deprecated.
|
static class |
DsContext.CommitListenerAdapter
Deprecated.
|
Modifier and Type | Method and Description |
---|---|
void |
addAfterCommitListener(DsContext.AfterCommitListener listener) |
void |
addAlias(java.lang.String aliasDatasourceId,
java.lang.String originalDatasourceId)
Add alias for datasource.
|
void |
addBeforeCommitListener(DsContext.BeforeCommitListener listener) |
void |
addListener(DsContext.CommitListener listener)
Deprecated.
|
boolean |
commit()
Commit all changed datasources.
|
Datasource |
get(java.lang.String name)
Get datasource by name.
|
java.util.Collection<Datasource> |
getAll() |
java.util.List<DsContext> |
getChildren() |
DataSupplier |
getDataSupplier() |
FrameContext |
getFrameContext() |
Datasource |
getNN(java.lang.String name)
Get datasource by name.
|
DsContext |
getParent() |
boolean |
isDiscardCommitted()
Indicates that the DsContext will be discarded right after commit hence it doesn't need committed instances.
|
boolean |
isModified() |
void |
refresh()
Refresh all datasources.
|
void |
registerDependency(Datasource ds,
Datasource dependFrom,
java.lang.String property)
Register dependency between datasources.
|
void |
removeAfterCommitListener(DsContext.AfterCommitListener listener) |
void |
removeBeforeCommitListener(DsContext.BeforeCommitListener listener) |
void |
removeListener(DsContext.CommitListener listener)
Deprecated.
|
void |
setDiscardCommitted(boolean discardCommitted)
Set to true if the DsContext will be discarded right after commit hence it doesn't need committed instances.
|
void |
setFrameContext(FrameContext context) |
FrameContext getFrameContext()
Window
, its WindowContext
is returned.void setFrameContext(FrameContext context)
DataSupplier getDataSupplier()
@Nullable Datasource get(java.lang.String name)
someFrameId.someDatasourceId
name
- datasource nameDatasource getNN(java.lang.String name)
someFrameId.someDatasourceId
.
Never returns null.
name
- datasource namejava.lang.IllegalArgumentException
- if not foundjava.util.Collection<Datasource> getAll()
void addAlias(java.lang.String aliasDatasourceId, java.lang.String originalDatasourceId)
aliasDatasourceId
- additional datasource idoriginalDatasourceId
- original datasource idboolean isModified()
void refresh()
boolean commit()
boolean isDiscardCommitted()
void setDiscardCommitted(boolean discardCommitted)
void registerDependency(Datasource ds, Datasource dependFrom, @Nullable java.lang.String property)
ds
- dependent datasourcedependFrom
- master datasourceproperty
- property of master datasource. If specified, the dependent datasource will be refreshed
also on this property value change@Deprecated void addListener(DsContext.CommitListener listener)
@Deprecated void removeListener(DsContext.CommitListener listener)
void addBeforeCommitListener(DsContext.BeforeCommitListener listener)
void removeBeforeCommitListener(DsContext.BeforeCommitListener listener)
void addAfterCommitListener(DsContext.AfterCommitListener listener)
void removeAfterCommitListener(DsContext.AfterCommitListener listener)
@Nullable DsContext getParent()
java.util.List<DsContext> getChildren()