示例#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);
  }
示例#2
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;
  }