Package org.compiere.model

Examples of org.compiere.model.MQuery.addRestriction()


    if (M_Product_ID == null)
      return;
  //  AEnv.zoom(MProduct.Table_ID, M_Product_ID.intValue(), true);  //  SO
   
    MQuery query = new MQuery("M_Product");
    query.addRestriction("M_Product_ID", MQuery.EQUAL, M_Product_ID);
    query.setRecordCount(1);
    int AD_WindowNo = getAD_Window_ID("M_Product", true)//  SO
    zoom (AD_WindowNo, query);
  //  zoom
View Full Code Here


  static public void main (String[] args)
  {
    Login.initTest(true);

    MQuery q = new MQuery("C_Invoice");
    q.addRestriction("C_Invoice_ID", MQuery.EQUAL, new Integer(103));

    //  102 = Invoice - 100 = Order
    PrintInfo i = new PrintInfo("test", X_C_Invoice.Table_ID, 102, 0);
    MPrintFormat f = MPrintFormat.get (Env.getCtx(), 102, false);
    ReportEngine re = new ReportEngine(Env.getCtx(), f, q, i);
View Full Code Here

        break;
    }
    if (queryColumn.length() != 0)
    {
      if (queryColumn.endsWith("_ID"))
        query.addRestriction(queryColumn, MQuery.EQUAL,
          new Integer(Env.getContextAsInt(m_ctx, m_curWindowNo, queryColumn)),
          infoName, infoDisplay);
      else
        query.addRestriction(queryColumn, MQuery.EQUAL,
          Env.getContext(m_ctx, m_curWindowNo, queryColumn),
View Full Code Here

      if (queryColumn.endsWith("_ID"))
        query.addRestriction(queryColumn, MQuery.EQUAL,
          new Integer(Env.getContextAsInt(m_ctx, m_curWindowNo, queryColumn)),
          infoName, infoDisplay);
      else
        query.addRestriction(queryColumn, MQuery.EQUAL,
          Env.getContext(m_ctx, m_curWindowNo, queryColumn),
          infoName, infoDisplay);
    }

    new AReport (m_curTab.getAD_Table_ID(), aReport.getButton(), query, this, m_curWindowNo, m_curTab.getWhereExtended());
View Full Code Here

    if (link.length() == 0)
      link = m_curTab.getLinkColumnName();
    if (link.length() != 0)
    {
      if (link.endsWith("_ID"))
        query.addRestriction(link, MQuery.EQUAL,
          new Integer(Env.getContextAsInt(m_ctx, m_curWindowNo, link)));
      else
        query.addRestriction(link, MQuery.EQUAL,
          Env.getContext(m_ctx, m_curWindowNo, link));
    }
View Full Code Here

    {
      if (link.endsWith("_ID"))
        query.addRestriction(link, MQuery.EQUAL,
          new Integer(Env.getContextAsInt(m_ctx, m_curWindowNo, link)));
      else
        query.addRestriction(link, MQuery.EQUAL,
          Env.getContext(m_ctx, m_curWindowNo, link));
    }
    new AZoomAcross (aZoomAcross.getButton(),
      m_curTab.getTableName(), query);
  //  cmd_zoom
View Full Code Here

        }
        format.setLanguage(language);
        format.setTranslationLanguage(language);
        //  query
        MQuery query = new MQuery("C_Invoice_Header_v");
        query.addRestriction("C_Invoice_ID", MQuery.EQUAL, new Integer(C_Invoice_ID));

        //  Engine
        PrintInfo info = new PrintInfo(
          DocumentNo,
          X_C_Invoice.Table_ID,
View Full Code Here

      query = MQuery.get (ctx, pi.getAD_PInstance_ID(), TableName);
    }
   
    //  Add to static where clause from ReportView
    if (whereClause.length() != 0)
      query.addRestriction(whereClause);

    //  Get Print Format
    MPrintFormat format = null;
    Object so = pi.getSerializableObject();
    if (so instanceof MPrintFormat)
View Full Code Here

    format.setLanguage(language);    //  BP Language if Multi-Lingual
  //  if (!Env.isBaseLanguage(language, DOC_TABLES[type]))
      format.setTranslationLanguage(language);
    //  query
    MQuery query = new MQuery(format.getAD_Table_ID());
    query.addRestriction(DOC_IDS[type], MQuery.EQUAL, Record_ID);
  //  log.config( "ReportCtrl.startDocumentPrint - " + format, query + " - " + language.getAD_Language());
    //
    if (DocumentNo == null || DocumentNo.length() == 0)
      DocumentNo = "DocPrint";
    PrintInfo info = new PrintInfo(
View Full Code Here

  {
    org.compiere.Adempiere.startupEnvironment(true);
    //
    int AD_Table_ID = 100;
    MQuery q = new MQuery("AD_Table");
    q.addRestriction("AD_Table_ID", "<", 108);
    //
    MPrintFormat f = MPrintFormat.createFromTable(Env.getCtx(), AD_Table_ID);
    PrintInfo i = new PrintInfo("test", AD_Table_ID, 108, 0);
    i.setAD_Table_ID(AD_Table_ID);
    ReportEngine re = new ReportEngine(Env.getCtx(), f, q, i);
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.