Package com.commander4j.db

Examples of com.commander4j.db.JDBQuery


  private void buildSQL1Record(String lsscc)
  {

    String temp = "";

    JDBQuery query = new JDBQuery(Common.selectedHostID, Common.sessionID);
    query.clear();

    temp = Common.hostList.getHost(Common.selectedHostID).getSqlstatements().getSQL("JDBPallet.selectWithExpiry");

    query.addText(temp);

    if (lsscc.equals("") == false)
    {
      query.addParamtoSQL("sscc = ", lsscc);
    }

    query.bindParams();
    query.applyRestriction(false, "none", 0);
    listStatement = query.getPreparedStatement();
  }
View Full Code Here


  }

  private PreparedStatement buildSQLr()
  {
    PreparedStatement result;
    JDBQuery query = new JDBQuery(Common.selectedHostID, Common.sessionID);
    query.clear();
    query.addText(JUtility.substSchemaName(schemaName, "select * from {schema}APP_PALLET"));
    query.addParamtoSQL("MHN_Number=", masterHoldNoticeNumber);
    query.appendSort(jComboBoxSortBy.getSelectedItem().toString(), jToggleButtonSequence.isSelected());
    query.applyRestriction(false, "none", 0);
    query.bindParams();
    result = query.getPreparedStatement();
    return result;
  }
View Full Code Here

    lang = new JDBLanguage(Common.selectedHostID, Common.sessionID);

    initGUI();
   
    JDBQuery query = new JDBQuery(Common.selectedHostID, Common.sessionID);
    query.clear();
    query.addText(JUtility.substSchemaName(schemaName, "select * from {schema}APP_PALLET where 1=2"));
    query.applyRestriction(true, "none", 1);
    query.bindParams();
    listStatement = query.getPreparedStatement();
    populateList();

    jTextFieldMHN.setText(mhnNumber);

    JScrollPane scrollPane = new JScrollPane();
View Full Code Here

    setIconifiable(true);
    lang = new JDBLanguage(Common.selectedHostID, Common.sessionID);

    initGUI();

    JDBQuery query = new JDBQuery(Common.selectedHostID, Common.sessionID);
    query.clear();
    query.addText(JUtility.substSchemaName(schemaName, "select * from {schema}APP_MATERIAL where 1=2"));
    query.applyRestriction(false, "none", 0);
    query.bindParams();
    listStatement = query.getPreparedStatement();
    populateList();

    final JHelp help = new JHelp();
    help.enableHelpOnButton(jButtonHelp, JUtility.getHelpSetIDforModule("FRM_ADMIN_MATERIAL_LOCATION"));

View Full Code Here

  private void buildSQL()
  {
   

    JDBQuery.closeStatement(listStatement);
    JDBQuery query = new JDBQuery(Common.selectedHostID, Common.sessionID);
    query.clear();

    query.addText(JUtility.substSchemaName(schemaName, "select * from {schema}APP_MATERIAL_LOCATION"));
    query.addParamtoSQL("material=", jTextFieldMaterial.getText());
    query.addParamtoSQL("location_id=", jTextFieldLocation.getText());
    query.addParamtoSQL("status=", jComboBoxStatus.getSelectedItem().toString());

    query.appendSort(jComboBoxSortBy.getSelectedItem().toString(), jToggleButtonSequence.isSelected());
    query.applyRestriction(false,"none",0);
    query.bindParams();
    listStatement = query.getPreparedStatement();
  }
View Full Code Here

  {
    JDBQuery.closeStatement(listStatement);

    String temp = "";

    JDBQuery query = new JDBQuery(Common.selectedHostID, Common.sessionID);
    query.clear();

    temp = Common.hostList.getHost(Common.selectedHostID).getSqlstatements().getSQL("JDBLabelData.select");

    query.addText(temp);

    query.addParameter(key);

    query.applyRestriction(false, "none", 0);
    query.bindParams();

    listStatement = query.getPreparedStatement();
  }
View Full Code Here

  }

  private void populateList(String criteria) {

    JDBQuery.closeStatement(listStatement);
    JDBQuery query = new JDBQuery(Common.selectedHostID, Common.sessionID);
    query.clear();
    query.addText(JUtility.substSchemaName(schemaName, "select * from {schema}APP_MATERIAL_UOM"));
    query.addParamtoSQL("material=", criteria);
    query.appendSort("material,uom", "asc");
    query.applyRestriction(false, "none", 0);
    query.bindParams();
    listStatement = query.getPreparedStatement();
   
    JDBMaterialUom materialuom = new JDBMaterialUom(Common.selectedHostID, Common.sessionID);
    JDBMaterialUomTableModel materialuomtable = new JDBMaterialUomTableModel(materialuom.getMaterialDataResultSet(listStatement));
    TableRowSorter<JDBMaterialUomTableModel> sorter = new TableRowSorter<JDBMaterialUomTableModel>(materialuomtable);

View Full Code Here

  private PreparedStatement buildSQLr()
  {
   
    PreparedStatement result;
   
    JDBQuery query = new JDBQuery(Common.selectedHostID, Common.sessionID);
    query.clear();

    query.addText(JUtility.substSchemaName(schemaName, "select * from {schema}APP_MHN"));

    query.addParamtoSQL("MHN_Number=", jTextFieldMHN.getText());
    query.addParamtoSQL("recorder=", jTextFieldRecorder.getText());
    query.addParamtoSQL("initiator=", jTextFieldInitiator.getText());
    query.addParamtoSQL("authorisor=",jTextFieldAuthorisor.getText());

    if (jTextFieldComment.getText().equals("") == false)
    {
      query.addParamtoSQL("upper(comment) LIKE ", "%" + jTextFieldComment.getText().toUpperCase() + "%");
    }
   
    if (jTextFieldReason.getText().equals("")==false)
    {
      String sel = "";
      if (query.getCriteriaCount()==0)
      {
        sel = " where ";
      }
      else
      {
        sel = " and ";
      }
      query.setCriterialCount(query.getCriteriaCount()+3);
      query.addText(sel+"(reason1 = ? or reason2 = ? or reason3 = ?)");
      query.addParameter(jTextFieldReason.getText());
      query.addParameter(jTextFieldReason.getText());
      query.addParameter(jTextFieldReason.getText());
    }
       
    query.addParamtoSQL("status=", jTextFieldStatus.getSelectedItem().toString());
    query.addParamtoSQL("required_resource=", jTextFieldResource.getText());
   
    if (checkBoxCreatedFrom.isSelected())
    {
    query.addParamtoSQL("date_created>=", JUtility.getTimestampFromDate(dateControlCreatedFrom.getDate()));
    }

    if (checkBoxCreatedTo.isSelected())
    {
    query.addParamtoSQL("date_created<=", JUtility.getTimestampFromDate(dateControlCreatedTo.getDate()));
    }

    if (checkBoxExpectedFrom.isSelected())
    {
      query.addParamtoSQL("date_expected>=", JUtility.getTimestampFromDate(dateControlExpectedFrom.getDate()));
    }

    if (checkBoxExpectedTo.isSelected())
    {
      query.addParamtoSQL("date_expected<=", JUtility.getTimestampFromDate(dateControlExpectedTo.getDate()));
    }

    if (checkBoxResolvedFrom.isSelected())
    {
      query.addParamtoSQL("date_resolved>=", JUtility.getTimestampFromDate(dateControlResolvedFrom.getDate()));
    }

    if (checkBoxResolvedTo.isSelected())
    {
      query.addParamtoSQL("date_resolved<=", JUtility.getTimestampFromDate(dateControlResolvedTo.getDate()));
    }   
   
    query.appendSort(jComboBoxSortBy.getSelectedItem().toString(), jToggleButtonSequence.isSelected());
    query.applyRestriction(false,"none",0);
    query.bindParams();
    result = query.getPreparedStatement();
   
    return result;
  }
View Full Code Here

  private void buildSQL1Record(String lsscc)
  {

    String temp = "";

    JDBQuery query = new JDBQuery(Common.selectedHostID, Common.sessionID);
    query.clear();

    temp = Common.hostList.getHost(Common.selectedHostID).getSqlstatements().getSQL("JDBPallet.selectWithExpiry");

    query.addText(temp);

    if (lsscc.equals("") == false)
    {
      query.addParamtoSQL("sscc = ", lsscc);
    }

    query.bindParams();
    query.applyRestriction(false, "none", 0);
    listStatement = query.getPreparedStatement();
  }
View Full Code Here

    super();

    lang = new JDBLanguage(Common.selectedHostID, Common.sessionID);

    initGUI();
    JDBQuery query = new JDBQuery(Common.selectedHostID, Common.sessionID);
    query.clear();
    query.addText(JUtility.substSchemaName(schemaName, "select * from {schema}APP_MHN where 1=2"));
    query.applyRestriction(false, "none", 0);
    query.bindParams();
    listStatement = query.getPreparedStatement();
    populateList();

    final JHelp help = new JHelp();
    help.enableHelpOnButton(jButtonHelp, JUtility.getHelpSetIDforModule("FRM_ADMIN_MHN"));
    {
View Full Code Here

TOP

Related Classes of com.commander4j.db.JDBQuery

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.