/** * A Save the bean * * @param * @return */ @Override public Integer saveBean( ISerializableLabelBean serializableLabelBean, Map<String, Map<Integer, Integer>> matchesMap) { TScreenPanelBean screenPanelBean = (TScreenPanelBean) serializableLabelBean; Integer externalParent = screenPanelBean.getParent(); Map<Integer, Integer> parentMatches = matchesMap.get(ExchangeFieldNames.SCREENTAB); if (externalParent != null && parentMatches.get(externalParent) != null) { screenPanelBean.setParent(parentMatches.get(externalParent)); } return screenPanelDAO.save(screenPanelBean); }
/** * A Check if we should consider two beans the same * * @param * @return */ @Override public boolean considerAsSame( ISerializableLabelBean serializableLabelBean, Map<String, Map<Integer, Integer>> matchesMap) { if (serializableLabelBean == null) { return false; } TScreenPanelBean screenPanelBean = (TScreenPanelBean) serializableLabelBean; String externalUuid = getUuid(); String internalUuid = screenPanelBean.getUuid(); if (EqualUtils.equalStrict(externalUuid, internalUuid)) { return true; } /// return false; }
/** * sets an associated TScreenPanelBean object * * @param v TScreenPanelBean */ public void setTScreenPanelBean(TScreenPanelBean v) { if (v == null) { setParent((Integer) null); } else { setParent(v.getObjectID()); } aTScreenPanelBean = v; }
@Override public IPanel cloneMe() { TScreenPanelBean panelBean = new TScreenPanelBean(); panelBean.setColsNo(this.getColsNo()); panelBean.setDescription(this.getDescription()); panelBean.setIndex(this.getIndex()); panelBean.setLabel(this.getLabel()); panelBean.setName(this.getName()); panelBean.setParent(this.getParent()); panelBean.setRowsNo(this.getRowsNo()); List<IField> fieldsClone = new ArrayList<IField>(); List<IField> fields = this.getFields(); if (fields != null) { for (IField field : fields) { fieldsClone.add(field.cloneMe()); } } panelBean.setFields(fieldsClone); return panelBean; }