Examples of MQuery


Examples of org.compiere.model.MQuery

        return null;
      }
    }

    //  Create Query from Parameters
    MQuery query = null;
    if (IsForm && pi.getRecord_ID() != 0    //  Form = one record
        && !TableName.startsWith("T_") )  //  Not temporary table - teo_sarca, BF [ 2828886 ]
    {
      query = MQuery.getEqualQuery(TableName + "_ID", pi.getRecord_ID());
    }
    else
    {
      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

Examples of org.compiere.model.MQuery

    MPrintFormat format = MPrintFormat.get (ctx, AD_PrintFormat_ID, false);
    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

Examples of org.compiere.model.MQuery

  public static void main(String[] args)
  {
    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.