Package org.jallinone.hierarchies.java

Examples of org.jallinone.hierarchies.java.CompanyHierarchyLevelVO


  /**
   * Callback method invoked when the user has clicked the left mouse button.
   * @param node selected node
   */
  public void leftClick(DefaultMutableTreeNode node) {
    CompanyHierarchyLevelVO vo = (CompanyHierarchyLevelVO)node.getUserObject();
    CompanyHierarchyLevelVO root = (CompanyHierarchyLevelVO)((DefaultMutableTreeNode)node.getRoot()).getUserObject();
    frame.getGrid().getOtherGridParams().put(ApplicationConsts.PROGRESSIVE_HIE02,vo.getProgressiveHie02HIE01());
    frame.getGrid().getOtherGridParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanySys01HIE01());
    frame.getGrid().getOtherGridParams().put(ApplicationConsts.PROGRESSIVE_HIE01,vo.getProgressiveHIE01());
    frame.getGrid().getOtherGridParams().put(ApplicationConsts.ROOT_PROGRESSIVE_HIE01,root.getProgressiveHIE01());
    frame.getGrid().reloadData();
  }
View Full Code Here


      BigDecimal rootProgressiveHIE01 = (BigDecimal)pars.getOtherGridParams().get(ApplicationConsts.ROOT_PROGRESSIVE_HIE01);
      BigDecimal progressiveHIE01 = (BigDecimal)pars.getOtherGridParams().get(ApplicationConsts.PROGRESSIVE_HIE01);
      BigDecimal progressiveHIE02 = (BigDecimal)pars.getOtherGridParams().get(ApplicationConsts.PROGRESSIVE_HIE02);

      CompanyHierarchyLevelVO vo = (CompanyHierarchyLevelVO)pars.getOtherGridParams().get(ApplicationConsts.TREE_FILTER);
      if (vo!=null) {
        progressiveHIE01 = vo.getProgressiveHIE01();
        progressiveHIE02 = vo.getProgressiveHie02HIE01();
      }

      // retrieve companies list...
      String companies = "";
      for(int i=0;i<companiesList.size();i++)
        companies += "'"+companiesList.get(i).toString()+"',";
      companies = companies.substring(0,companies.length()-1);

      String sql =
          "select SCH10_CALL_OUTS.COMPANY_CODE_SYS01,SCH10_CALL_OUTS.CALL_OUT_CODE,A.DESCRIPTION,B.DESCRIPTION,"+
          "SCH10_CALL_OUTS.PROGRESSIVE_HIE02,SCH10_CALL_OUTS.PROGRESSIVE_HIE01,SCH10_CALL_OUTS.PROGRESSIVE_SYS10"+
          " from SCH10_CALL_OUTS,SYS10_COMPANY_TRANSLATIONS A,SYS10_COMPANY_TRANSLATIONS B,HIE01_COMPANY_LEVELS where "+
          "SCH10_CALL_OUTS.PROGRESSIVE_HIE02=? and "+
          "SCH10_CALL_OUTS.COMPANY_CODE_SYS01=A.COMPANY_CODE_SYS01 and "+
          "SCH10_CALL_OUTS.PROGRESSIVE_SYS10=A.PROGRESSIVE and "+
          "A.LANGUAGE_CODE=? and "+
          "HIE01_COMPANY_LEVELS.COMPANY_CODE_SYS01=SCH10_CALL_OUTS.COMPANY_CODE_SYS01 and "+
          "HIE01_COMPANY_LEVELS.PROGRESSIVE=SCH10_CALL_OUTS.PROGRESSIVE_HIE01 and "+
          "HIE01_COMPANY_LEVELS.COMPANY_CODE_SYS01=B.COMPANY_CODE_SYS01 and "+
          "HIE01_COMPANY_LEVELS.PROGRESSIVE=B.PROGRESSIVE and B.LANGUAGE_CODE=? and "+
          "SCH10_CALL_OUTS.COMPANY_CODE_SYS01 in ("+companies+") and "+
          "SCH10_CALL_OUTS.ENABLED='Y' ";

      if (rootProgressiveHIE01==null || !rootProgressiveHIE01.equals(progressiveHIE01)) {
        // retrieve all subnodes of the specified node...
        pstmt = conn.prepareStatement(
            "select HIE01_COMPANY_LEVELS.PROGRESSIVE,HIE01_COMPANY_LEVELS.PROGRESSIVE_HIE01,HIE01_COMPANY_LEVELS.LEV from HIE01_COMPANY_LEVELS "+
            "where COMPANY_CODE_SYS01='"+vo.getCompanySys01HIE01()+"' and ENABLED='Y' and PROGRESSIVE_HIE02=? and PROGRESSIVE>=? "+
            "order by LEV,PROGRESSIVE_HIE01,PROGRESSIVE"
        );
        pstmt.setBigDecimal(1,progressiveHIE02);
        pstmt.setBigDecimal(2,progressiveHIE01);
        ResultSet rset = pstmt.executeQuery();
View Full Code Here

        setVariants(controller.getPK().getCompanyCodeSys01ITM01());
      }


      if (controller.getParentFrame()!=null) {
        CompanyHierarchyLevelVO levelVO = (CompanyHierarchyLevelVO) controller.getParentFrame().getHierarTreePanel().getSelectedNode().getUserObject();
        customizedControls = new CustomizedControls(tab, formPanel, levelVO.getProgressiveHie01HIE02());
      }

    } catch (Exception e) {
      e.printStackTrace();
    }
View Full Code Here

  /**
   * Callback method invoked when the user has clicked the left mouse button.
   * @param node selected node
   */
  public void leftClick(DefaultMutableTreeNode node) {
    CompanyHierarchyLevelVO vo = (CompanyHierarchyLevelVO)node.getUserObject();
    CompanyHierarchyLevelVO root = (CompanyHierarchyLevelVO)((DefaultMutableTreeNode)node.getRoot()).getUserObject();
    String subjectType = (String)frame.getTreePanel().getTreeDataLocator().getTreeNodeParams().get(ApplicationConsts.SUBJECT_TYPE);

    frame.getSubjectsGrid().getOtherGridParams().put(ApplicationConsts.PROGRESSIVE_HIE02,vo.getProgressiveHie02HIE01());
    frame.getSubjectsGrid().getOtherGridParams().put(ApplicationConsts.PROGRESSIVE_HIE01,vo.getProgressiveHIE01());
    frame.getSubjectsGrid().getOtherGridParams().put(ApplicationConsts.ROOT_PROGRESSIVE_HIE01,root.getProgressiveHIE01());
    frame.getSubjectsGrid().getOtherGridParams().put(ApplicationConsts.COMPANY_CODE_SYS01,frame.getTreePanel().getCompanyCode());
    frame.getSubjectsGrid().getOtherGridParams().put(ApplicationConsts.SUBJECT_TYPE,subjectType);
    frame.getSubjectsGrid().reloadData();
  }
View Full Code Here

            ClientSettings.getInstance().getResources().getResource("Attention"),
            JOptionPane.WARNING_MESSAGE
        );
        return false;
      }
      CompanyHierarchyLevelVO levelVO = (CompanyHierarchyLevelVO)frame.getTreePanel().getSelectedNode().getUserObject();
      SubjectFrame f = (SubjectFrame)MDIFrame.getSelectedFrame();
      int[] rows = f.getGrid().getSelectedRows();
      Subject vo = null;
      ArrayList list = new ArrayList();
      for(int i=0;i<rows.length;i++) {
        vo = (Subject)f.getGrid().getVOListTableModel().getObjectForRow(rows[i]);
        list.add( vo );
      }
      ClientUtils.getData("insertSubjectsLinks",new HierarSubjectsVO(
        levelVO.getProgressiveHIE01(),
        levelVO.getProgressiveHie02HIE01(),
        list
      ));
      frame.getSubjectsGrid().reloadData();
      try {
        frame.setSelected(true);
View Full Code Here

   * Method invoked when the user has clicked on delete button and the grid is in READONLY mode.
   * @param persistentObjects value objects to delete (related to the currently selected rows)
   * @return an ErrorResponse value object in case of errors, VOResponse if the operation is successfully completed
   */
  public Response deleteRecords(ArrayList persistentObjects) throws Exception {
    CompanyHierarchyLevelVO levelVO = (CompanyHierarchyLevelVO)frame.getTreePanel().getSelectedNode().getUserObject();
    return ClientUtils.getData("deleteSubjectsLinks",new HierarSubjectsVO(
        levelVO.getProgressiveHIE01(),
        levelVO.getProgressiveHie02HIE01(),
        persistentObjects
    ));
  }
View Full Code Here

    HierarItemDiscountVO vo = (HierarItemDiscountVO)valueObject;
    vo.setMinQtySAL03(new BigDecimal(1));
    vo.setMultipleQtySAL03(Boolean.FALSE);

    DefaultMutableTreeNode node = frame.getHierarTreePanel().getSelectedNode();
    CompanyHierarchyLevelVO levelVO = (CompanyHierarchyLevelVO)node.getUserObject();
    vo.setCompanyCodeSys01SAL03(levelVO.getCompanySys01HIE01());
    Response res =  ClientUtils.getData("loadCompany",vo.getCompanyCodeSys01SAL03());
    if (!res.isError()) {
      OrganizationVO compVO = (OrganizationVO)((VOResponse)res).getVo();
      if (compVO.getCurrencyCodeReg03()!=null && !compVO.getCurrencyCodeReg03().equals("")) {
        vo.setCurrencyCodeReg03SAL03(compVO.getCurrencyCodeReg03());
View Full Code Here

   * @return an ErrorResponse value object in case of errors, VOListResponse if the operation is successfully completed
   */
  public Response insertRecords(int[] rowNumbers, ArrayList newValueObjects) throws Exception {
    HierarItemDiscountVO vo = null;
    DefaultMutableTreeNode node = frame.getHierarTreePanel().getSelectedNode();
    CompanyHierarchyLevelVO levelVO = (CompanyHierarchyLevelVO)node.getUserObject();
    CompanyHierarchyLevelVO root = (CompanyHierarchyLevelVO)((DefaultMutableTreeNode)node.getRoot()).getUserObject();
    Response response = null;

    for(int i=0;i<newValueObjects.size();i++) {
      vo = (HierarItemDiscountVO)newValueObjects.get(i);
      vo.setCompanyCodeSys01SAL03(levelVO.getCompanySys01HIE01());
View Full Code Here

  /**
   * Callback method invoked when the user has clicked the left mouse button.
   * @param node selected node
   */
  public void leftClick(DefaultMutableTreeNode node) {
    CompanyHierarchyLevelVO vo = (CompanyHierarchyLevelVO)node.getUserObject();
    if (vo==null)
      return;
    CompanyHierarchyLevelVO root = (CompanyHierarchyLevelVO)((DefaultMutableTreeNode)node.getRoot()).getUserObject();
    if (root==null)
      return;
    frame.getGrid().getOtherGridParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanySys01HIE01());
    frame.getGrid().getOtherGridParams().put(ApplicationConsts.PROGRESSIVE_HIE02,vo.getProgressiveHie02HIE01());
    frame.getGrid().getOtherGridParams().put(ApplicationConsts.PROGRESSIVE_HIE01,vo.getProgressiveHIE01());
    frame.getGrid().getOtherGridParams().put(ApplicationConsts.ROOT_PROGRESSIVE_HIE01,root.getProgressiveHIE01());
    frame.getGrid().reloadData();
  }
View Full Code Here

            availPanel.setEnabled(true);
            availPanel.getGrid().getOtherGridParams().put(ApplicationConsts.COMPANY_CODE_SYS01,vo.getCompanyCodeSys01WAR01());
            availPanel.getGrid().getOtherGridParams().put(ApplicationConsts.WAREHOUSE_CODE,vo.getWarehouseCodeWAR01());
            availPanel.getGrid().getOtherGridParams().put(ApplicationConsts.PROGRESSIVE_HIE02,vo.getProgressiveHie02WAR01());
            if (hierarTreePanel.getSelectedNode()!=null) {
              CompanyHierarchyLevelVO levelVO = (CompanyHierarchyLevelVO)hierarTreePanel.getSelectedNode().getUserObject();
              availPanel.getGrid().getOtherGridParams().put(ApplicationConsts.PROGRESSIVE_HIE01,levelVO.getProgressiveHIE01());
            }

          }
        }
View Full Code Here

TOP

Related Classes of org.jallinone.hierarchies.java.CompanyHierarchyLevelVO

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.