示例#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
 /**
  * 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;
 }
示例#3
0
 /**
  * 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;
 }
示例#4
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;
  }