Esempio n. 1
0
  /**
   * 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);
  }
Esempio n. 2
0
 /**
  * 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;
 }
Esempio n. 3
0
  @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;
  }