Examples of JDBQuery


Examples of com.commander4j.db.JDBQuery

    JDBQuery.closeStatement(listStatement);
   
    String temp = "";

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

    temp = Common.hostList.getHost(Common.selectedHostID).getSqlstatements().getSQL("JDBProcessOrder.selectWithLimit");

    query.addText(temp);

    if (lprocessOrder.equals("") == false)
    {
      query.addParamtoSQL("process_order = ", lprocessOrder);
    }
    query.applyRestriction(false, "none", 0);
    query.bindParams();
    listStatement =  query.getPreparedStatement();
 
View Full Code Here

Examples of com.commander4j.db.JDBQuery

  }

  private PreparedStatement buildSQLr() {
   
    PreparedStatement result;
    JDBQuery query = new JDBQuery(Common.selectedHostID, Common.sessionID);
    query.clear();
    query.addText(JUtility.substSchemaName(schemaName, "select * from {schema}APP_MATERIAL"));
    query.addParamtoSQL("material=", jTextFieldMaterial.getText());
    query.addParamtoSQL("inspection_id=", textFieldInspectionID.getText());

    if (jTextFieldDescription.getText().equals("") == false)
    {
      query.addParamtoSQL("upper(description) LIKE ", "%" + jTextFieldDescription.getText().toUpperCase() + "%");
    }
    query.addParamtoSQL("base_uom=", ((JDBUom) jComboBoxBaseUOM.getSelectedItem()).getInternalUom());
    query.addParamtoSQL("material_type=", ((JDBMaterialType) jComboBoxMaterialType.getSelectedItem()).getType());
    query.addParamtoSQL("shelf_life_uom=", ((JShelfLifeUom) jComboBoxShelfLifeUOM.getSelectedItem()).getUom());
    query.addParamtoSQL("shelf_life_rule=", ((JShelfLifeRoundingRule) jComboBoxRoundingRule.getSelectedItem()).getRule());
    query.addParamtoSQL("default_batch_status=", ((String) jComboBoxDefaultBatchStatus.getSelectedItem()).toString());

    Integer i;

    try
    {
      i = Integer.valueOf(jTextFieldShelfLife.getText());
      query.addParamtoSQL("shelf_life=", i);
    }
    catch (Exception e)
    {
    }

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

Examples of com.commander4j.db.JDBQuery

    typeList.add(new JDBMaterialType(Common.selectedHostID, Common.sessionID));
    typeList.addAll(materialType.getMaterialTypes());

    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_MATERIALS"));

View Full Code Here

Examples of com.commander4j.db.JDBQuery

    JDBQuery.closeStatement(listStatement);

    String temp = "";

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

    temp = Common.hostList.getHost(Common.selectedHostID).getSqlstatements().getSQL("JDBQMSample.selectWithLimit");

    query.addText(temp);

    query.addParamtoSQL("sample_id = ", sampleID);

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

Examples of com.commander4j.db.JDBQuery

    uomList.add(new JDBUom(Common.selectedHostID, Common.sessionID));
    uomList.addAll(u.getInternalUoms());

    initGUI();

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

    JLabel4j_std label = new JLabel4j_std();
    label.setText(lang.get("lbl_Process_Order_Required_Resource"));
    label.setHorizontalAlignment(SwingConstants.TRAILING);
View Full Code Here

Examples of com.commander4j.db.JDBQuery

    PreparedStatement result;
   
    String temp = "";

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

    temp = Common.hostList.getHost(Common.selectedHostID).getSqlstatements().getSQL("JDBProcessOrder.selectWithLimit");

    query.addText(temp);

    query.addParamtoSQL("process_order=", jTextFieldProcessOrder.getText());
    query.addParamtoSQL("material=", jTextFieldMaterial.getText());
    query.addParamtoSQL("status=", jComboBoxStatus.getSelectedItem());
    query.addParamtoSQL("location_id=", jTextFieldLocation.getText());
    query.addParamtoSQL("recipe_id=", jTextFieldRecipe.getText());
    query.addParamtoSQL("description like ", "%" + jTextFieldDescription.getText() + "%");
    query.addParamtoSQL("required_resource = ", jTextFieldRequiredResource.getText());
    query.addParamtoSQL("customer_id=", jTextFieldCustomer.getText());
    query.addParamtoSQL("customer_id=",jTextFieldCustomerID.getText());
   
    query.addParamtoSQL("required_uom=", ((JDBUom) jComboBoxUOM.getSelectedItem()).getInternalUom());

    if (jCheckBoxDueDateFrom.isSelected())
    {
      query.addParamtoSQL("due_date>=", JUtility.getTimestampFromDate(dueDateFrom.getDate()));
    }
    if (jCheckBoxDueDateTo.isSelected())
    {
      query.addParamtoSQL("due_date<=", JUtility.getTimestampFromDate(dueDateTo.getDate()));
    }


    if (jCheckBoxQuantity.isSelected())
    {
      if (jFormattedTextFieldQuantity.getText().equals("") == false)
      {
        query.addParamtoSQL("required_quantity=", JUtility.stringToBigDecimal(jFormattedTextFieldQuantity.getText().toString()));
      }
    }


    query.appendSort(jComboBoxSortBy.getSelectedItem().toString(), jToggleButtonSequence.isSelected());
    query.applyRestriction(jCheckBoxLimit.isSelected(),Common.hostList.getHost(Common.selectedHostID).getDatabaseParameters().getjdbcDatabaseSelectLimit(), jSpinnerLimit.getValue());
    query.bindParams();
    result = query.getPreparedStatement();
    return result;
  }
View Full Code Here

Examples of com.commander4j.db.JDBQuery

    catch (SQLException e)
    {
      e.printStackTrace();
    }
   
    JDBQuery query = new JDBQuery(Common.selectedHostID, Common.sessionID);

    query.clear();

    if (dlg_table.getTableName().toUpperCase().endsWith("SYS_USERS"))
    {
      query.addText("select user_id,user_comment from " + dlg_table.getTableName());
    }
    else
    {
    query.addText("select * from " + dlg_table.getTableName());
    }

    if (((String) jComboBoxCriteria.getSelectedItem()).equals("") == false)
    {
      if (jTextFieldCriteria.getText().equals("") == false)
      {
        String type = "";
        type = dlg_table.getColumnTypeForField((String) jComboBoxCriteria.getSelectedItem());

        if (type.equals("java.math.BigDecimal"))
        {
          query.addParamtoSQL((String) jComboBoxCriteria.getSelectedItem() + " = ", JUtility.stringToBigDecimal(jTextFieldCriteria.getText().toString()));
        }
        if (type.equals("java.lang.String"))
        {
          query.addParamtoSQL((String) jComboBoxCriteria.getSelectedItem() + " LIKE ", "%" + jTextFieldCriteria.getText() + "%");
        }
        if (type.equals("java.sql.Timestamp"))
        {
          query.addParamtoSQL((String) jComboBoxCriteria.getSelectedItem() + " LIKE ", "%" + jTextFieldCriteria.getText() + "%");
        }

      }
    }
   
    if (hideInactive)
    {
      query.addParamtoSQL("ACTIVE = ", "Y");
    }


    query.appendSort(jComboBoxOrderBy.getSelectedItem().toString(), jToggleButtonSequence.isSelected());
    query.applyRestriction(false,"none", 0);

    query.bindParams();

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

Examples of com.commander4j.db.JDBQuery

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

    setSequence(dlg_sort_descending);

    JDBQuery query = new JDBQuery(Common.selectedHostID, Common.sessionID);
    query.clear();
    query.addText(JUtility.substSchemaName(schemaName, "select * from {schema}"+dlg_table.getTableName()+" where 1=2"));
    query.bindParams();
    listStatement = query.getPreparedStatement();
    buildSQL();
    populateList();
   
    if (JLaunchLookup.dlgAutoExec)
    {
View Full Code Here

Examples of com.commander4j.db.JDBQuery

  }

  private void buildSQL() {
   
    JDBQuery.closeStatement(listStatement);
    JDBQuery query = new JDBQuery(Common.selectedHostID, Common.sessionID);

    query.clear();
    String schemaName = Common.hostList.getHost(Common.selectedHostID).getDatabaseParameters().getjdbcDatabaseSchema();
    query.addText(JUtility.substSchemaName(schemaName, "select * from {schema}SYS_CONTROL order by system_key"));
    query.applyRestriction(false, "none", 0);
    query.bindParams();

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

Examples of com.commander4j.db.JDBQuery

    super();
    setIconifiable(true);
    getContentPane().setBackground(Color.WHITE);
    initGUI();

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

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

View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.