@Override protected void doSort() { if (hasGroups()) { groupDelegate.doGroupSort(sortInfos); } else { super.doSort(); } }
@Override protected void doSort() { if (hasGroups()) { groupDelegate.doGroupSort(sortInfos); } else { super.doSort(); } }
protected void reattachListeners(Entity prevItem, Entity item) { if (prevItem != item) { detachListener(prevItem); attachListener(item); } }
@SuppressWarnings("unchecked") public void bind(CollectionDatasource ds) { weakItemChangeListener = new WeakItemChangeListener(ds, this); ds.addItemChangeListener(weakItemChangeListener); weakItemPropertyChangeListener = new WeakItemPropertyChangeListener(ds, this); ds.addItemPropertyChangeListener(weakItemPropertyChangeListener); weakStateChangeListener = new WeakStateChangeListener(ds, this); ds.addStateChangeListener(weakStateChangeListener); weakCollectionChangeListener = new WeakCollectionChangeListener(ds, this); ds.addCollectionChangeListener(weakCollectionChangeListener); }
protected void reattachListeners(Collection prevColl, Collection coll) { if (prevColl != null) for (Object entity : prevColl) { if (entity instanceof Instance) detachListener((Instance) entity); } if (coll != null) for (Object entity : coll) { if (entity instanceof Instance) attachListener((Instance) entity); } }
@Override public void invalidate() { if (state != State.NOT_INITIALIZED && state != State.INVALID) { State prevState = state; state = State.INVALID; fireStateChanged(prevState); } modified = false; clearCommitLists(); }
@Override public void invalidate() { if (State.NOT_INITIALIZED != this.state) { final State prevStatus = this.state; this.state = State.INVALID; fireStateChanged(prevStatus); } modified = false; clearCommitLists(); }
protected void reattachListeners(Entity prevItem, Entity item) { if (prevItem != item) { detachListener(prevItem); attachListener(item); } }
@Override public void valid() { final State prev = state; state = State.VALID; fireStateChanged(prev); }
@Override public Object getItemValue(MetaPropertyPath property, K itemId) { return CollectionDatasourceImpl.this.getItemValue(property, itemId); } };
@Override public void executeLazyTasks() { for (LazyTask lazyTask : lazyTasks) { lazyTask.execute(this); } }
@Override public ValueGroupDatasourceImpl setIdName(String name) { delegate.setIdName(name); return this; }
@Override public void commit() { if (!allowCommit) { return; } clearCommitLists(); modified = false; }
@Override public Object getItemValue(MetaPropertyPath property, K itemId) { return CollectionPropertyDatasourceImpl.this.getItemValue(property, itemId); } };
@Override @SuppressWarnings("unchecked") public Map<AggregationInfo, String> aggregate(AggregationInfo[] aggregationInfos, Collection itemIds) { return aggregatableDelegate.aggregate(aggregationInfos, itemIds); }
private void registerDatasource(Datasource datasource) { if (dsContext != null && id != null) { ((DsContextImplementation) dsContext).register(datasource); } } }
@Override protected void loadData(Map<String, Object> params) { super.loadData(params); } }
@SuppressWarnings("unchecked") public void bind(CollectionDatasource ds) { ds.addItemChangeListener(new WeakItemChangeListener(ds, this)); ds.addItemPropertyChangeListener(new WeakItemPropertyChangeListener(ds, this)); ds.addStateChangeListener(new WeakStateChangeListener(ds, this)); ds.addCollectionChangeListener(new WeakCollectionChangeListener(ds, this)); } }
@Override public void initialized() { final State prev = state; state = State.INVALID; fireStateChanged(prev); }