use of org.jowidgets.cap.common.tools.bean.BeanKey in project jo-client-platform by jo-source.
the class BeanRelationNodeModelImpl method getParentBeanKeys.
private List<IBeanKey> getParentBeanKeys() {
if (parentBean != null && !parentBean.isTransient() && !parentBean.isDummy()) {
final List<IBeanKey> result = new LinkedList<IBeanKey>();
result.add(new BeanKey(parentBean.getId(), parentBean.getVersion()));
return result;
} else {
return Collections.emptyList();
}
}
use of org.jowidgets.cap.common.tools.bean.BeanKey in project jo-client-platform by jo-source.
the class BeanTableModelImpl method getParentBeanKeys.
@Override
public List<IBeanKey> getParentBeanKeys() {
if (parent == null) {
return null;
}
final IBeanSelection<Object> beanSelection = parent.getBeanSelection();
List<IBeanProxy<Object>> selection = beanSelection.getSelection();
if (EmptyCheck.isEmpty(selection)) {
return null;
} else if (linkType == LinkType.SELECTION_FIRST) {
selection = selection.subList(0, 1);
}
final List<IBeanKey> beanKeys = new LinkedList<IBeanKey>();
for (final IBeanProxy<Object> proxy : selection) {
if (proxy != null && !proxy.isDummy() && !proxy.isTransient() && !proxy.isLastRowDummy()) {
beanKeys.add(new BeanKey(proxy.getId(), proxy.getVersion()));
}
}
return beanKeys;
}
use of org.jowidgets.cap.common.tools.bean.BeanKey in project jo-client-platform by jo-source.
the class SingleBeanModelImpl method getParentBeanKeys.
private List<IBeanKey> getParentBeanKeys() {
if (parent == null) {
return null;
}
final IBeanSelection<Object> beanSelection = parent.getBeanSelection();
List<IBeanProxy<Object>> selection = beanSelection.getSelection();
if (EmptyCheck.isEmpty(selection)) {
return null;
} else if (linkType == LinkType.SELECTION_FIRST) {
selection = selection.subList(0, 1);
}
final List<IBeanKey> beanKeys = new LinkedList<IBeanKey>();
for (final IBeanProxy<Object> proxy : selection) {
if (proxy != null && !proxy.isDummy() && !proxy.isTransient()) {
beanKeys.add(new BeanKey(proxy.getId(), proxy.getVersion()));
}
}
return beanKeys;
}
Aggregations