Package org.jallinone.variants.java

Examples of org.jallinone.variants.java.VariantVO


      Variants vBean = (Variants)JAIOBeanFactory.getInstance().getBean(Variants.class);

      String tableName = "ITM11_VARIANTS_1";
      String variantTypeJoin = "VARIANT_TYPE_ITM06";
      java.util.List rows = vBean.loadAllVariants(tableName,variantTypeJoin,langId,username).getRows();
      VariantVO vo = null;
      VariantDescriptionsVO d = null;
      for(int i=0;i<rows.size();i++) {
        vo = (VariantVO)rows.get(i);
        d = (VariantDescriptionsVO)((JAIOUserSessionParameters)userSessionPars).getVariantDescriptionsVO().get(vo.getCompanyCodeSys01());
        if (d==null) {
          d = new VariantDescriptionsVO();
          ((JAIOUserSessionParameters)userSessionPars).getVariantDescriptionsVO().put(vo.getCompanyCodeSys01(),d);
        }
        d.getVariant1Descriptions().put(
          vo.getVariantType()+"_"+vo.getVariantCode(),
          vo.getDescriptionSys10()
        );
      }

      tableName = "ITM12_VARIANTS_2";
      variantTypeJoin = "VARIANT_TYPE_ITM07";
      rows = vBean.loadAllVariants(tableName,variantTypeJoin,langId,username).getRows();
      for(int i=0;i<rows.size();i++) {
        vo = (VariantVO)rows.get(i);
        d = (VariantDescriptionsVO)((JAIOUserSessionParameters)userSessionPars).getVariantDescriptionsVO().get(vo.getCompanyCodeSys01());
        if (d==null) {
          d = new VariantDescriptionsVO();
          ((JAIOUserSessionParameters)userSessionPars).getVariantDescriptionsVO().put(vo.getCompanyCodeSys01(),d);
        }
        d.getVariant2Descriptions().put(
          vo.getVariantType()+"_"+vo.getVariantCode(),
          vo.getDescriptionSys10()
        );
      }

      tableName = "ITM13_VARIANTS_3";
      variantTypeJoin = "VARIANT_TYPE_ITM08";
      rows = vBean.loadAllVariants(tableName,variantTypeJoin,langId,username).getRows();
      for(int i=0;i<rows.size();i++) {
        vo = (VariantVO)rows.get(i);
        d = (VariantDescriptionsVO)((JAIOUserSessionParameters)userSessionPars).getVariantDescriptionsVO().get(vo.getCompanyCodeSys01());
        if (d==null) {
          d = new VariantDescriptionsVO();
          ((JAIOUserSessionParameters)userSessionPars).getVariantDescriptionsVO().put(vo.getCompanyCodeSys01(),d);
        }
        d.getVariant3Descriptions().put(
          vo.getVariantType()+"_"+vo.getVariantCode(),
          vo.getDescriptionSys10()
        );
      }

      tableName = "ITM14_VARIANTS_4";
      variantTypeJoin = "VARIANT_TYPE_ITM09";
      rows = vBean.loadAllVariants(tableName,variantTypeJoin,langId,username).getRows();
      for(int i=0;i<rows.size();i++) {
        vo = (VariantVO)rows.get(i);
        d = (VariantDescriptionsVO)((JAIOUserSessionParameters)userSessionPars).getVariantDescriptionsVO().get(vo.getCompanyCodeSys01());
        if (d==null) {
          d = new VariantDescriptionsVO();
          ((JAIOUserSessionParameters)userSessionPars).getVariantDescriptionsVO().put(vo.getCompanyCodeSys01(),d);
        }
        d.getVariant4Descriptions().put(
          vo.getVariantType()+"_"+vo.getVariantCode(),
          vo.getDescriptionSys10()
        );
      }

      tableName = "ITM15_VARIANTS_5";
      variantTypeJoin = "VARIANT_TYPE_ITM10";
      rows = vBean.loadAllVariants(tableName,variantTypeJoin,langId,username).getRows();
      for(int i=0;i<rows.size();i++) {
        vo = (VariantVO)rows.get(i);
        d = (VariantDescriptionsVO)((JAIOUserSessionParameters)userSessionPars).getVariantDescriptionsVO().get(vo.getCompanyCodeSys01());
        if (d==null) {
          d = new VariantDescriptionsVO();
          ((JAIOUserSessionParameters)userSessionPars).getVariantDescriptionsVO().put(vo.getCompanyCodeSys01(),d);
        }
        d.getVariant5Descriptions().put(
          vo.getVariantType()+"_"+vo.getVariantCode(),
          vo.getDescriptionSys10()
        );
      }

      // check if there exists an entry in ((JAIOUserSessionParameters)userSessionPars).getVariantDescriptionsVO()
      // for each supported company code...
View Full Code Here


  /**
   * Callback method invoked when the user has clicked on the insert button
   * @param valueObject empty value object just created: the user can manage it to fill some attribute values
   */
  public void createValueObject(ValueObject valueObject) throws Exception {
    VariantVO vo = (VariantVO)valueObject;
    vo.setVariantType((String)gridFrame.getVariantType());
    vo.setCodeOrder(new BigDecimal(gridFrame.getGrid().getVOListTableModel().getRowCount()));
  }
View Full Code Here

   * @param oldValue old cell value (before cell editing)
   * @param newValue new cell value (just edited)
   * @return <code>true</code> if cell value is valid, <code>false</code> otherwise
   */
  public boolean validateCell(int rowNumber,String attributeName,Object oldValue,Object newValue) {
    VariantVO vo = (VariantVO)gridFrame.getGrid().getVOListTableModel().getObjectForRow(rowNumber);
    if (attributeName.equals("variantCode") && newValue!=null && (vo.getDescriptionSys10()==null || vo.getDescriptionSys10().equals("")))
      vo.setDescriptionSys10(newValue.toString());
    return true;
  }
View Full Code Here

TOP

Related Classes of org.jallinone.variants.java.VariantVO

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.