Package com.commander4j.db

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_PRINTERS order by printer_id"));
    query.applyRestriction(false, "none", 0);
    query.bindParams();

    listStatement = query.getPreparedStatement();
  }
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_BATCH"));
 
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_BATCH"));
    query.addParamtoSQL("material=", jTextFieldMaterial.getText());
    query.addParamtoSQL("batch_number=", jTextFieldBatch.getText());
    query.addParamtoSQL("status=", jComboBoxStatus.getSelectedItem().toString());

    if (jCheckBoxFrom.isSelected())
    {
      query.addParamtoSQL("expiry_date>=", JUtility.getTimestampFromDate(expiryFrom.getDate()));

    }

    if (jCheckBoxTo.isSelected())
    {
      query.addParamtoSQL("expiry_date<=", JUtility.getTimestampFromDate(expiryTo.getDate()));
    }

    query.appendSort(jComboBoxSortBy.getSelectedItem().toString(), jToggleButtonSequence.isSelected());
    query.applyRestriction(false,"none",0);
    query.bindParams();
    listStatement = query.getPreparedStatement();
  }
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

  }

  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

    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

  }
 
  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_QM_INSPECTION"));
    query.addParamtoSQL("inspection_id =", textFieldInspectionID.getText());
    query.addParamtoSQL("description like ", "%"+textFieldDescription.getText()+"%");

    query.appendSort("inspection_id", true);
   
    query.applyRestriction(chckbxLimit.isSelected(),Common.hostList.getHost(Common.selectedHostID).getDatabaseParameters().getjdbcDatabaseSelectLimit(), spinnerLimit.getValue());
   
    query.bindParams();
    listStatement = query.getPreparedStatement();
  }
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

  }

  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

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.