com.vaadin.addon.jpacontainer
Interface HierarchicalEntityContainer<T>

All Superinterfaces:
AdvancedFilterable, com.vaadin.data.Buffered, com.vaadin.data.Container, com.vaadin.data.Container.Filterable, com.vaadin.data.Container.Hierarchical, com.vaadin.data.Container.ItemSetChangeNotifier, com.vaadin.data.Container.Ordered, com.vaadin.data.Container.Sortable, EntityContainer<T>, Serializable
All Known Implementing Classes:
JPAContainer

public interface HierarchicalEntityContainer<T>
extends EntityContainer<T>, com.vaadin.data.Container.Hierarchical

This is a preliminary interface for adding hierarchical support to JPAContainer. It works if the entities can be nested by means of a parent property, e.g. like this:

 class MyNodeEntity {
   MyNodeEntity parent;
   ...
 }
 

Since:
1.0
Author:
Petter Holmström (Vaadin Ltd)

Nested Class Summary
 
Nested classes/interfaces inherited from interface com.vaadin.data.Container
com.vaadin.data.Container.Editor, com.vaadin.data.Container.Filter, com.vaadin.data.Container.Filterable, com.vaadin.data.Container.Hierarchical, com.vaadin.data.Container.Indexed, com.vaadin.data.Container.ItemSetChangeEvent, com.vaadin.data.Container.ItemSetChangeListener, com.vaadin.data.Container.ItemSetChangeNotifier, com.vaadin.data.Container.Ordered, com.vaadin.data.Container.PropertySetChangeEvent, com.vaadin.data.Container.PropertySetChangeListener, com.vaadin.data.Container.PropertySetChangeNotifier, com.vaadin.data.Container.SimpleFilterable, com.vaadin.data.Container.Sortable, com.vaadin.data.Container.Viewer
 
Nested classes/interfaces inherited from interface com.vaadin.addon.jpacontainer.AdvancedFilterable
AdvancedFilterable.FiltersAppliedEvent<C extends com.vaadin.data.Container & AdvancedFilterable>
 
Nested classes/interfaces inherited from interface com.vaadin.data.Buffered
com.vaadin.data.Buffered.SourceException
 
Method Summary
 String getParentProperty()
          Gets the name of the persistent property that contains the reference to the parent entity.
 void setParentProperty(String parentProperty)
          Sets the persistent property (may be nested) that contains the reference to the parent entity.
 
Methods inherited from interface com.vaadin.addon.jpacontainer.EntityContainer
addContainerFilter, addEntity, addNestedContainerProperty, createEntityItem, getEntityClass, getEntityProvider, getItem, getPropertyKind, getQueryModifierDelegate, isAutoCommit, isReadOnly, refresh, refreshItem, removeContainerFilters, setAutoCommit, setEntityProvider, setReadOnly
 
Methods inherited from interface com.vaadin.data.Container.Sortable
getSortableContainerPropertyIds, sort
 
Methods inherited from interface com.vaadin.data.Container.Ordered
addItemAfter, addItemAfter, firstItemId, isFirstId, isLastId, lastItemId, nextItemId, prevItemId
 
Methods inherited from interface com.vaadin.data.Container
addContainerProperty, addItem, addItem, containsId, getContainerProperty, getContainerPropertyIds, getItemIds, getType, removeAllItems, removeContainerProperty, removeItem, size
 
Methods inherited from interface com.vaadin.addon.jpacontainer.AdvancedFilterable
applyFilters, getAppliedFilters, getFilterablePropertyIds, getFilters, hasUnappliedFilters, isApplyFiltersImmediately, isFilterable, setApplyFiltersImmediately
 
Methods inherited from interface com.vaadin.data.Container.ItemSetChangeNotifier
addItemSetChangeListener, addListener, removeItemSetChangeListener, removeListener
 
Methods inherited from interface com.vaadin.data.Buffered
commit, discard, isBuffered, isModified, setBuffered
 
Methods inherited from interface com.vaadin.data.Container.Filterable
addContainerFilter, getContainerFilters, removeAllContainerFilters, removeContainerFilter
 
Methods inherited from interface com.vaadin.data.Container.Hierarchical
areChildrenAllowed, getChildren, getParent, hasChildren, isRoot, removeItem, rootItemIds, setChildrenAllowed, setParent
 

Method Detail

setParentProperty

void setParentProperty(String parentProperty)
Sets the persistent property (may be nested) that contains the reference to the parent entity. The parent entity is expected to be of the same type as the child entity.

Parameters:
parentProperty - the name of the parent property.

getParentProperty

String getParentProperty()
Gets the name of the persistent property that contains the reference to the parent entity.

Returns:
the name of the parent property, or null if not specified.


Copyright © 2013 Vaadin Ltd. All rights reserved.