Package com.im.df.api.ddl
Interface DFSchema
-
- All Superinterfaces:
DFItem
,DFScriptParent
,PropertiesEditingConfigurable
public interface DFSchema extends DFScriptParent
The definition of an set ofDFEntity
s,DFRelationship
s andDFDataTree
s. This can be thought of as an object oriented reflection of the underlying relational database schema (but not just this). This class provides containers for all these types ofDFItem
s and also is a starting point to all DML objects (Data providers).
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.im.df.api.ddl.DFItem
DFItem.Handle<T extends DFItem>
-
Nested classes/interfaces inherited from interface com.im.df.api.support.PropertiesEditingConfigurable
PropertiesEditingConfigurable.Extra
-
-
Field Summary
Fields Modifier and Type Field Description static java.lang.String
PROP_DATA_TREES
Fired whendata trees
of this schema had changed.static java.lang.String
PROP_ENTITIES
Fired whenentities
of this schema had changed.static java.lang.String
PROP_RELATIONSHIPS
Fired whenrelationships
of this schema had changed.-
Fields inherited from interface com.im.df.api.ddl.DFItem
PROP_CAPABILITIES, PROP_DESCRIPTION, PROP_ID, PROP_NAME, PROP_TYPE, PROP_VALID
-
Fields inherited from interface com.im.df.api.ddl.DFScriptParent
PROP_SCRIPTS
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description <E extends DFItem>
EfindItemById(java.lang.String id, java.lang.Class<E> type)
Find an item of the specified type by its id.DFSchemaDataProvider
getDataProvider()
Get the root object for all data manipulations.DFContainer<DFDataTree>
getDataTrees()
Get the data trees container.DFContainer<DFEntity>
getEntities()
Get the entities container.com.im.commons.progress.DFLockable
getLockable()
DFContainer<DFRelationship>
getRelationships()
Get the relationships container.DFSchemaProvider
getSchemaProvider()
com.im.commons.progress.DFLockable
getUserLockable()
Get universal lockable for actions working with views (adding/removing/modifying), queries and lists - it means all user's own artefacts (DFUserItem
).com.im.commons.progress.DFLockable
getUserLockable(DFUserItem item)
Get the lockable for user specific item.DFContainer<DFVisibilityRestriction>
getVisibilityRestrictions()
Get the visibility restrictions.-
Methods inherited from interface com.im.df.api.ddl.DFItem
addPropertyChangeListener, getCapabilities, getDescription, getHandle, getId, getName, getType, isValid, removePropertyChangeListener, setDescription, setName
-
Methods inherited from interface com.im.df.api.ddl.DFScriptParent
getSchema, getScripts
-
Methods inherited from interface com.im.df.api.support.PropertiesEditingConfigurable
isPropertyEditable
-
-
-
-
Field Detail
-
PROP_ENTITIES
static final java.lang.String PROP_ENTITIES
Fired whenentities
of this schema had changed. E.g. an entity was removed.- See Also:
- Constant Field Values
-
PROP_RELATIONSHIPS
static final java.lang.String PROP_RELATIONSHIPS
Fired whenrelationships
of this schema had changed. E.g. an relationship was removed.- See Also:
- Constant Field Values
-
PROP_DATA_TREES
static final java.lang.String PROP_DATA_TREES
Fired whendata trees
of this schema had changed. E.g. an datatree was deleted.- See Also:
- Constant Field Values
-
-
Method Detail
-
getEntities
DFContainer<DFEntity> getEntities()
Get the entities container.- Returns:
- The entities container
-
getRelationships
DFContainer<DFRelationship> getRelationships()
Get the relationships container.- Returns:
- The relationships container
-
getDataTrees
DFContainer<DFDataTree> getDataTrees()
Get the data trees container.- Returns:
- The data trees container
-
getVisibilityRestrictions
DFContainer<DFVisibilityRestriction> getVisibilityRestrictions()
Get the visibility restrictions.- Returns:
- The visibility restrictions container
- Since:
- 21.15.0
-
findItemById
<E extends DFItem> E findItemById(java.lang.String id, java.lang.Class<E> type)
Find an item of the specified type by its id.- Type Parameters:
E
- The type of item- Parameters:
id
- The id of the itemtype
- The class corresponding to the type of item- Returns:
- The item, or null if the schema contains no item for the given id and type
- Since:
- 15.2.23
-
getDataProvider
DFSchemaDataProvider getDataProvider()
Get the root object for all data manipulations.- Returns:
- The root object
-
getSchemaProvider
DFSchemaProvider getSchemaProvider()
- Returns:
- The factory class which was responsible for creating this object (DFSchema). The returned schema provider can be used for example for closing connection, for registering listener to status changes etc.
-
getLockable
com.im.commons.progress.DFLockable getLockable()
Get lockable for all DDL operations except actions related toDFView
s,DFQuery
s andDFList
s. DDL objects are shared among users, but views, lists and queries are always owned by a single user - to modify these objects (add new/remove/modify) usegetUserLockable()
instead.- Returns:
- The lockable
-
getUserLockable
com.im.commons.progress.DFLockable getUserLockable()
Get universal lockable for actions working with views (adding/removing/modifying), queries and lists - it means all user's own artefacts (DFUserItem
). This method is supposed to be used whenDFItem
is unknown - for example if you are going to add a new list, query or view. If you want to change existing userDFItem
, then usegetUserLockable(DFUserItem)
instead.- Returns:
- The lockable for user specific objects
-
getUserLockable
com.im.commons.progress.DFLockable getUserLockable(DFUserItem item)
Get the lockable for user specific item. If the item is not owned by current user it's expected that you will get some lockable which is "locked forever" and you won't be able to modify the object.- Parameters:
item
- The user specific itemDFUserItem
- Returns:
- The lockable for user specific item
-
-