@Test public void testCreateEntityItem() { assertNull(container.getEntityProvider()); Person tmp = new Person(); EntityItem<Person> tmpItem = container.createEntityItem(tmp); assertSame(container, tmpItem.getContainer()); assertSame(tmp, tmpItem.getEntity()); assertNull(tmpItem.getItemId()); }
public EntityItem<T> createEntityItem(T entity) { return new JPAContainerItem<T>(this, entity, null, false); }
JPAContainer implements EntityContainer<T>,
        EntityProviderChangeListener<T>, HierarchicalEntityContainer<T>,
        Container.Indexed { public EntityItem<T> createEntityItem(T entity) { return new JPAContainerItem<T>(this, entity, null, false); } }
JPAContainer implements EntityContainer<T>,
        EntityProviderChangeListener<T>, HierarchicalEntityContainer<T>,
        Container.Indexed { public EntityItem<T> createEntityItem(T entity) { return new JPAContainerItem<T>(this, entity, null, false); } JPAContainer(Class<T> entityClass); }
JPAContainer implements EntityContainer<T>,
        EntityProviderChangeListener<T>, HierarchicalEntityContainer<T>,
        Container.Indexed { public EntityItem<T> createEntityItem(T entity) { return new JPAContainerItem<T>(this, entity, null, false); } JPAContainer(Class<T> entityClass); void setAdditionalFilterablePropertyIds(String... propertyIds); void addListener(ItemSetChangeListener listener); void removeListener(ItemSetChangeListener listener); void setFireContainerItemSetChangeEvents(boolean value); boolean isFireContainerItemSetChangeEvents(); void addNestedContainerProperty(String nestedProperty); Class<T> getEntityClass(); EntityProvider<T> getEntityProvider(); boolean isReadOnly(); @SuppressWarnings("unchecked") void setEntityProvider(EntityProvider<T> entityProvider); void entityProviderChange(EntityProviderChangeEvent<T> event); void setReadOnly(boolean readOnly); void setSortProperty(String propertyId, String sortProperty); Collection<String> getSortableContainerPropertyIds(); void sort(Object[] propertyId, boolean[] ascending); Object addItemAfter(Object previousItemId); Item addItemAfter(Object previousItemId, Object newItemId); Object firstItemId(); boolean isFirstId(Object itemId); boolean isLastId(Object itemId); Object lastItemId(); Object nextItemId(Object itemId); Object prevItemId(Object itemId); boolean addContainerProperty(Object propertyId, Class<?> type,
            Object defaultValue); Item addItem(Object itemId); Object addItem(); boolean containsId(Object itemId); boolean isContainsIdFiresItemSetChangeIfNotFound(); void setContainsIdFiresItemSetChangeIfNotFound(boolean value); Property getContainerProperty(Object itemId, Object propertyId); Collection<String> getContainerPropertyIds(); EntityItem<T> getItem(Object itemId); Collection<Object> getItemIds(); EntityItem<T> createEntityItem(T entity); Class<?> getType(Object propertyId); boolean removeContainerProperty(Object propertyId); int size(); Collection<Object> getFilterablePropertyIds(); boolean isFilterable(Object propertyId); List<Filter> getFilters(); List<Filter> getAppliedFilters(); void setApplyFiltersImmediately(boolean applyFiltersImmediately); boolean isApplyFiltersImmediately(); void applyFilters(); boolean hasUnappliedFilters(); void addContainerFilter(Object propertyId, String filterString,
            boolean ignoreCase, boolean onlyMatchPrefix); void removeAllContainerFilters(); void removeContainerFilters(Object propertyId); void addContainerFilter(Filter filter); void removeContainerFilter(Filter filter); Object addItemAt(int index); Item addItemAt(int index, Object newItemId); Object getIdByIndex(int index); int indexOfId(Object itemId); Object addEntity(T entity); boolean removeAllItems(); boolean removeItem(Object itemId); void commit(); void discard(); boolean isModified(); boolean isReadThrough(); boolean isWriteThrough(); void setReadThrough(boolean readThrough); void setWriteThrough(boolean writeThrough); void setAutoCommit(boolean autoCommit); boolean isAutoCommit(); String getParentProperty(); void setParentProperty(String parentProperty); boolean areChildrenAllowed(Object itemId); Collection<?> getChildren(Object itemId); Object getParent(Object itemId); boolean hasChildren(Object itemId); boolean isRoot(Object itemId); Collection<?> rootItemIds(); boolean setChildrenAllowed(Object itemId, boolean areChildrenAllowed); boolean setParent(Object itemId, Object newParentId); PropertyKind getPropertyKind(Object propertyId); @SuppressWarnings("unchecked") void refreshItem(Object itemId); void refresh(); QueryModifierDelegate getQueryModifierDelegate(); void setQueryModifierDelegate(
            QueryModifierDelegate queryModifierDelegate); void setBuffered(boolean buffered); boolean isBuffered(); void addItemSetChangeListener(ItemSetChangeListener listener); void removeItemSetChangeListener(ItemSetChangeListener listener); List<?> getItemIds(int startIndex, int numberOfItems); @Override Collection<Filter> getContainerFilters(); }
JPAContainer implements EntityContainer<T>,
        EntityProviderChangeListener<T>, HierarchicalEntityContainer<T>,
        Container.Indexed { public EntityItem<T> createEntityItem(T entity) { return new JPAContainerItem<T>(this, entity, null, false); } JPAContainer(Class<T> entityClass); void setAdditionalFilterablePropertyIds(String... propertyIds); void addListener(ItemSetChangeListener listener); void removeListener(ItemSetChangeListener listener); void setFireContainerItemSetChangeEvents(boolean value); boolean isFireContainerItemSetChangeEvents(); void addNestedContainerProperty(String nestedProperty); Class<T> getEntityClass(); EntityProvider<T> getEntityProvider(); boolean isReadOnly(); @SuppressWarnings("unchecked") void setEntityProvider(EntityProvider<T> entityProvider); void entityProviderChange(EntityProviderChangeEvent<T> event); void setReadOnly(boolean readOnly); void setSortProperty(String propertyId, String sortProperty); Collection<String> getSortableContainerPropertyIds(); void sort(Object[] propertyId, boolean[] ascending); Object addItemAfter(Object previousItemId); Item addItemAfter(Object previousItemId, Object newItemId); Object firstItemId(); boolean isFirstId(Object itemId); boolean isLastId(Object itemId); Object lastItemId(); Object nextItemId(Object itemId); Object prevItemId(Object itemId); boolean addContainerProperty(Object propertyId, Class<?> type,
            Object defaultValue); Item addItem(Object itemId); Object addItem(); boolean containsId(Object itemId); boolean isContainsIdFiresItemSetChangeIfNotFound(); void setContainsIdFiresItemSetChangeIfNotFound(boolean value); Property getContainerProperty(Object itemId, Object propertyId); Collection<String> getContainerPropertyIds(); EntityItem<T> getItem(Object itemId); Collection<Object> getItemIds(); EntityItem<T> createEntityItem(T entity); Class<?> getType(Object propertyId); boolean removeContainerProperty(Object propertyId); int size(); Collection<Object> getFilterablePropertyIds(); boolean isFilterable(Object propertyId); List<Filter> getFilters(); List<Filter> getAppliedFilters(); void setApplyFiltersImmediately(boolean applyFiltersImmediately); boolean isApplyFiltersImmediately(); void applyFilters(); boolean hasUnappliedFilters(); void addContainerFilter(Object propertyId, String filterString,
            boolean ignoreCase, boolean onlyMatchPrefix); void removeAllContainerFilters(); void removeContainerFilters(Object propertyId); void addContainerFilter(Filter filter); void removeContainerFilter(Filter filter); Object addItemAt(int index); Item addItemAt(int index, Object newItemId); Object getIdByIndex(int index); int indexOfId(Object itemId); Object addEntity(T entity); boolean removeAllItems(); boolean removeItem(Object itemId); void commit(); void discard(); boolean isModified(); boolean isReadThrough(); boolean isWriteThrough(); void setReadThrough(boolean readThrough); void setWriteThrough(boolean writeThrough); void setAutoCommit(boolean autoCommit); boolean isAutoCommit(); String getParentProperty(); void setParentProperty(String parentProperty); boolean areChildrenAllowed(Object itemId); Collection<?> getChildren(Object itemId); Object getParent(Object itemId); boolean hasChildren(Object itemId); boolean isRoot(Object itemId); Collection<?> rootItemIds(); boolean setChildrenAllowed(Object itemId, boolean areChildrenAllowed); boolean setParent(Object itemId, Object newParentId); PropertyKind getPropertyKind(Object propertyId); @SuppressWarnings("unchecked") void refreshItem(Object itemId); void refresh(); QueryModifierDelegate getQueryModifierDelegate(); void setQueryModifierDelegate(
            QueryModifierDelegate queryModifierDelegate); void setBuffered(boolean buffered); boolean isBuffered(); void addItemSetChangeListener(ItemSetChangeListener listener); void removeItemSetChangeListener(ItemSetChangeListener listener); List<?> getItemIds(int startIndex, int numberOfItems); @Override Collection<Filter> getContainerFilters();  }