1 14 package org.compiere.report; 15 16 import java.util.*; 17 import java.sql.*; 18 import java.math.*; 19 import java.io.Serializable ; 20 21 import org.compiere.model.*; 22 import org.compiere.util.*; 23 24 25 31 public class MReport extends X_PA_Report 32 { 33 38 public MReport (Properties ctx, int PA_Report_ID) 39 { 40 super (ctx, PA_Report_ID); 41 if (PA_Report_ID == 0) 42 { 43 setName (null); 44 setPA_ReportLineSet_ID (0); 45 setPA_ReportColumnSet_ID (0); 46 setListSources(false); 47 setListTrx(false); 48 } 49 else 50 { 51 m_columnSet = new MReportColumnSet (ctx, getPA_ReportColumnSet_ID()); 52 m_lineSet = new MReportLineSet (ctx, getPA_ReportLineSet_ID()); 53 } 54 } 56 private MReportColumnSet m_columnSet = null; 57 private MReportLineSet m_lineSet = null; 58 59 62 public void list() 63 { 64 System.out.println(toString()); 65 if (m_columnSet != null) 66 m_columnSet.list(); 67 System.out.println(); 68 if (m_lineSet != null) 69 m_lineSet.list(); 70 } 72 76 public String getWhereClause() 77 { 78 StringBuffer sb = new StringBuffer (); 80 sb.append("C_AcctSchema_ID=").append(getC_AcctSchema_ID()); 82 return sb.toString(); 84 } 86 87 88 92 public String toString () 93 { 94 StringBuffer sb = new StringBuffer ("MReport[") 95 .append(getID()).append(" - ").append(getName()); 96 if (getDescription() != null) 97 sb.append("(").append(getDescription()).append(")"); 98 sb.append(" - C_AcctSchema_ID=").append(getC_AcctSchema_ID()) 99 .append(", C_Calendar_ID=").append(getC_Calendar_ID()); 100 sb.append ("]"); 101 return sb.toString (); 102 } 104 105 public MReportColumnSet getColumnSet() 106 { 107 return m_columnSet; 108 } 109 110 public MReportLineSet getLineSet() 111 { 112 return m_lineSet; 113 } 114 115 } | Popular Tags |