public class HierarchicalPropertyDatasourceImpl<T extends Entity<K>,K> extends CollectionPropertyDatasourceImpl<T,K> implements HierarchicalDatasource<T,K>
AbstractDatasource.ItemListener
CollectionDatasource.Aggregatable<T extends Entity<K>,K>, CollectionDatasource.CollectionChangeEvent<T extends Entity<K>,K>, CollectionDatasource.CollectionChangeListener<T extends Entity<K>,K>, CollectionDatasource.Indexed<T extends Entity<K>,K>, CollectionDatasource.Lazy<T extends Entity<K>,K>, CollectionDatasource.Operation, CollectionDatasource.Ordered<T extends Entity<K>,K>, CollectionDatasource.RefreshMode, CollectionDatasource.Sortable<T extends Entity<K>,K>, CollectionDatasource.SortDelegate<T extends Entity<K>,K>, CollectionDatasource.SupportsApplyToSelected<T extends Entity<K>,K>, CollectionDatasource.SupportsPaging<T extends Entity<K>,K>, CollectionDatasource.SupportsRefreshMode<T extends Entity<K>,K>, CollectionDatasource.SupportsSortDelegate<T extends Entity<K>,K>, CollectionDatasource.Suspendable<T extends Entity<K>,K>, CollectionDatasource.UnmuteEventsMode
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>
CollectionDatasource.Sortable.Order, CollectionDatasource.Sortable.SortInfo<P>
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
hierarchyPropertyName |
protected java.lang.String |
sortPropertyName |
aggregatableDelegate, cascadeProperty, collectionChangeListeners, doNotModify, item, listenersSuspended, sortDelegate, sortInfos, suspendedEvents
masterDs, metaClass, metaProperty, view
allowCommit, backgroundWorker, commitMode, id, itemsToCreate, itemsToDelete, itemsToUpdate, listener, listenersEnabled, loadDynamicAttributes, metadata, modified, parentDs
Constructor and Description |
---|
HierarchicalPropertyDatasourceImpl() |
Modifier and Type | Method and Description |
---|---|
java.util.Collection<K> |
getChildren(K itemId)
Get children IDs for item with the given ID
|
java.lang.String |
getHierarchyPropertyName()
Property of entity which forms the hierarchy
|
K |
getParent(K itemId)
Get parent ID for item with the given ID
|
java.util.Collection<K> |
getRootItemIds()
Identifiers of all root items
|
java.lang.String |
getSortPropertyName() |
boolean |
hasChildren(K itemId)
True if item with the given ID has children
|
boolean |
isRoot(K itemId)
True if item with the given ID is a root item
|
void |
setHierarchyPropertyName(java.lang.String hierarchyPropertyName)
Set property of entity which forms the hierarchy
|
void |
setSortPropertyName(java.lang.String sortPropertyName)
Set property of entity which sort the nodes
|
addCollectionChangeListener, addItem, addItemFirst, addToCollectionFirst, aggregate, aggregateValues, checkPermission, checkState, clear, committed, containsItem, containsObjectInstance, createEntityComparator, doSort, excludeItem, fireCollectionChanged, firstItemId, getCollection, getCompiledLoadContext, getIdByIndex, getItem, getItem, getItemIds, getItemIds, getItemNN, getItems, getItemValue, getLastRefreshParameters, getMaxResults, getQuery, getQueryFilter, getRefreshOnComponentValueChange, includeItem, includeItemFirst, indexOfId, initCollection, initParentDsListeners, internalAddItem, internalIncludeItem, isCacheable, isFirstId, isLastId, isSoftDeletion, lastItemId, modified, modifyItem, mute, nextItemId, prevItemId, reattachListeners, refresh, refresh, removeCollectionChangeListener, removeItem, replaceItem, resetSortOrder, resumeListeners, revert, setCacheable, setItem, setMaxResults, setQuery, setQuery, setQueryFilter, setRefreshOnComponentValueChange, setSoftDeletion, setSortDelegate, setup, size, sort, suspendListeners, unmute, updateItem
commit, getDataSupplier, getDsContext, getItem, getItemIfValid, getMaster, getMetaClass, getProperty, getState, getView, initialized, invalidate, reattachListeners, valid
addItemChangeListener, addItemPropertyChangeListener, addParentsToNested, addStateChangeListener, attachListener, clearCommitLists, deleted, detachListener, enableListeners, fireItemChanged, fireStateChanged, getCommitMode, getEventRouter, getId, getItemsToCreate, getItemsToDelete, getItemsToUpdate, getLoadDynamicAttributes, getParent, isAllowCommit, isModified, removeItemChangeListener, removeItemPropertyChangeListener, removeStateChangeListener, setAllowCommit, setCommitMode, setLoadDynamicAttributes, setModified, setParent, setup, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addCollectionChangeListener, addItem, clear, containsItem, excludeItem, getCompiledLoadContext, getItem, getItemIds, getItemNN, getItems, getLastRefreshParameters, getMaxResults, getQuery, getQueryFilter, getRefreshOnComponentValueChange, includeItem, isCacheable, isSoftDeletion, modifyItem, mute, refresh, removeCollectionChangeListener, removeItem, resumeListeners, revert, setCacheable, setMaxResults, setQuery, setQuery, setQueryFilter, setRefreshOnComponentValueChange, setSoftDeletion, size, suspendListeners, unmute, updateItem
addItemChangeListener, addItemPropertyChangeListener, addStateChangeListener, commit, getCommitMode, getDataSupplier, getDsContext, getId, getItem, getItemIfValid, getLoadDynamicAttributes, getMetaClass, getState, getView, invalidate, isAllowCommit, isModified, refresh, removeItemChangeListener, removeItemPropertyChangeListener, removeStateChangeListener, setAllowCommit, setItem, setLoadDynamicAttributes, setup
clearCommitLists, deleted, enableListeners, getItemsToCreate, getItemsToDelete, getItemsToUpdate, getParent, setCommitMode, setModified, setParent
protected java.lang.String hierarchyPropertyName
protected java.lang.String sortPropertyName
public java.lang.String getHierarchyPropertyName()
HierarchicalDatasource
getHierarchyPropertyName
in interface HierarchicalDatasource<T extends Entity<K>,K>
public void setHierarchyPropertyName(java.lang.String hierarchyPropertyName)
HierarchicalDatasource
setHierarchyPropertyName
in interface HierarchicalDatasource<T extends Entity<K>,K>
public java.util.Collection<K> getChildren(K itemId)
HierarchicalDatasource
getChildren
in interface HierarchicalDatasource<T extends Entity<K>,K>
public K getParent(K itemId)
HierarchicalDatasource
public java.util.Collection<K> getRootItemIds()
HierarchicalDatasource
getRootItemIds
in interface HierarchicalDatasource<T extends Entity<K>,K>
public boolean isRoot(K itemId)
HierarchicalDatasource
public boolean hasChildren(K itemId)
HierarchicalDatasource
hasChildren
in interface HierarchicalDatasource<T extends Entity<K>,K>
public java.lang.String getSortPropertyName()
public void setSortPropertyName(java.lang.String sortPropertyName)
sortPropertyName
- Sort property