Package org.compiere.print
Class PrintData
java.lang.Object
org.compiere.print.PrintData
- All Implemented Interfaces:
Serializable
Print Data Structure.
Created by DataEngine.
A Structure has rows, which contain elements.
Elements can be end nodes (PrintDataElements) or data structures (PrintData).
The row data is sparse - i.e. null if not existing.
A Structure has optional meta info about content (PrintDataColumn).
Created by DataEngine.
A Structure has rows, which contain elements.
Elements can be end nodes (PrintDataElements) or data structures (PrintData).
The row data is sparse - i.e. null if not existing.
A Structure has optional meta info about content (PrintDataColumn).
- Version:
- $Id: PrintData.java,v 1.3 2006/07/30 00:53:02 jjanke Exp $
- Author:
- Jorg Janke
- See Also:
-
Field Summary
-
Constructor Summary
ConstructorDescriptionPrintData
(Properties ctx, String name) PrintData
(Properties ctx, String name, ArrayList<Serializable> nodes) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Add parent node to current rowvoid
addNode
(PrintDataElement node) Add node to current rowvoid
addRow
(boolean functionRow, int levelNo) Add data rowvoid
addRow
(boolean functionRow, int levelNo, int reportLineID) Add rowvoid
addRow
(boolean functionRow, int levelNo, List<Serializable> nodes) Add Data Rowboolean
Create XML representation to Fileboolean
createXML
(StreamResult result) Create XML representation to StreamResultvoid
dump()
Dump All Data - header and rowsvoid
Dump All Datavoid
Dump All DataGet optional Column InfogetCtx()
Get ContextGet XML Document representationint
getIndex
(int AD_Column_ID) Deprecated.int
Get Index of Node in current rowint
getIndexOfPrintFormatItem
(int AD_PrintFormatItem_ID) Get Index of Node in current rowint
Get Line Level Number for current rowGet MReportLine for current rowgetName()
Get NamegetNode
(int index) Get node with index in current rowDeprecated.Get node with name in current rowGet node with print format item id in current rowgetNodeByPrintFormatItemId
(int AD_PrintFormatItem_ID) Get Node with AD_PrintFormatItem_ID in current rowint
Get Number of nodes/columns in rowgetPKey()
Get Primary Key node in current rowint
Get Row Countint
getRowCount
(boolean includeFunctionRows) Get row countint
Get Current Row IndexgetSQL()
Get optional SQLGet optional TableNameboolean
Is PrintData has Level Noboolean
isEmpty()
Is with 0 rows or 0 nodes/columnsboolean
Is current Row a Function Rowboolean
isFunctionRow
(int row) Is the Row a Function Rowboolean
Is current Row a page break rowstatic PrintData
parseXML
(Properties ctx, File input) Create PrintData from XMLvoid
setColumnInfo
(PrintDataColumn[] newInfo) Set optional Column Infovoid
setHasLevelNo
(boolean hasLevelNo) Set PrintData has Level Noboolean
setRowIndex
(int row) Set Row Indexboolean
Set Row Index to nextvoid
Set SQL (optional)void
setTableName
(String TableName) Set TableName (optional)toString()
String representation
-
Field Details
-
XML_TAG
XML Element Name- See Also:
-
XML_ROW_TAG
XML Row Name- See Also:
-
XML_ATTRIBUTE_NAME
XML Attribute Name- See Also:
-
XML_ATTRIBUTE_COUNT
XML Attribute Count- See Also:
-
XML_ATTRIBUTE_NO
XML Attribute Number- See Also:
-
XML_ATTRIBUTE_FUNCTION_ROW
XML Attribute Function Row- See Also:
-
-
Constructor Details
-
PrintData
- Parameters:
ctx
- contextname
- data element name
-
PrintData
- Parameters:
ctx
- contextname
- data element namenodes
- ArrayList with nodes (content not checked)
-
-
Method Details
-
getCtx
Get Context- Returns:
- context
-
getName
Get Name- Returns:
- name
-
setColumnInfo
Set optional Column Info- Parameters:
newInfo
- Column Info
-
getColumnInfo
Get optional Column Info- Returns:
- Column Info
-
setSQL
Set SQL (optional)- Parameters:
sql
- SQL
-
getSQL
Get optional SQL- Returns:
- SQL
-
setTableName
Set TableName (optional)- Parameters:
TableName
- TableName
-
getTableName
Get optional TableName- Returns:
- TableName
-
toString
String representation -
isEmpty
public boolean isEmpty()Is with 0 rows or 0 nodes/columns- Returns:
- true if 0 rows or 0 nodes/columns
-
getNodeCount
public int getNodeCount()Get Number of nodes/columns in row- Returns:
- number of nodes/columns in row
-
addRow
public void addRow(boolean functionRow, int levelNo) Add data row- Parameters:
functionRow
-levelNo
-
-
addRow
Add Data Row- Parameters:
functionRow
- true if function rowlevelNo
- Line detail Level Number 0=Normal
-
setRowIndex
public boolean setRowIndex(int row) Set Row Index- Parameters:
row
- row index- Returns:
- true if success
-
setRowNext
public boolean setRowNext()Set Row Index to next- Returns:
- true if success
-
getRowCount
public int getRowCount()Get Row Count- Returns:
- row count
-
getRowCount
public int getRowCount(boolean includeFunctionRows) Get row count- Parameters:
includeFunctionRows
-- Returns:
- row count
-
getRowIndex
public int getRowIndex()Get Current Row Index- Returns:
- row index
-
isFunctionRow
public boolean isFunctionRow(int row) Is the Row a Function Row- Parameters:
row
- row no- Returns:
- true if function row
-
isFunctionRow
public boolean isFunctionRow()Is current Row a Function Row- Returns:
- true if current row is a function row
-
isPageBreak
public boolean isPageBreak()Is current Row a page break row- Returns:
- true if current row is a page break row
-
setHasLevelNo
public void setHasLevelNo(boolean hasLevelNo) Set PrintData has Level No- Parameters:
hasLevelNo
- true if sql includes LevelNo
-
hasLevelNo
public boolean hasLevelNo()Is PrintData has Level No- Returns:
- true if sql includes LevelNo
-
getLineLevelNo
public int getLineLevelNo()Get Line Level Number for current row- Returns:
- line level no, 0 = default
-
addNode
Add parent node to current row- Parameters:
parent
- parent
-
addNode
Add node to current row- Parameters:
node
- node
-
getNode
Get node with index in current row- Parameters:
index
- index- Returns:
- PrintData(Element) of index or null
-
getNode
Get node with name in current row- Parameters:
name
- node name- Returns:
- PrintData(Element) with Name or null
-
getNode
Deprecated.replace bygetNodeByPrintFormatItemId(int)
Get Node with AD_Column_ID in current row- Parameters:
AD_Column_ID
- AD_Column_ID- Returns:
- PrintData(Element) with AD_Column_ID or null
-
getNodeByPrintFormatItem
Get node with print format item id in current row- Parameters:
item
-- Returns:
- PrintData(Element) with AD_PrintFormatItem_ID or null
-
getNodeByPrintFormatItemId
Get Node with AD_PrintFormatItem_ID in current row- Parameters:
AD_PrintFormatItem_ID
- AD_PrintFormatItem_ID- Returns:
- PrintData(Element) with AD_PrintFormatItem_ID or null
-
getPKey
Get Primary Key node in current row- Returns:
- PK or null
-
getIndex
Get Index of Node in current row- Parameters:
columnName
- name- Returns:
- index or -1
-
getIndex
Deprecated.Get Index of Node in current row- Parameters:
AD_Column_ID
- AD_Column_ID- Returns:
- index or -1
-
getIndexOfPrintFormatItem
public int getIndexOfPrintFormatItem(int AD_PrintFormatItem_ID) Get Index of Node in current row- Parameters:
AD_PrintFormatItem_ID
- AD_PrintFormatItem_ID- Returns:
- index or -1
-
dump
public void dump()Dump All Data - header and rows -
dumpHeader
public void dumpHeader()Dump All Data -
dumpCurrentRow
public void dumpCurrentRow()Dump All Data -
getDocument
Get XML Document representation- Returns:
- XML document
-
createXML
Create XML representation to StreamResult- Parameters:
result
- StreamResult- Returns:
- true if success
-
createXML
Create XML representation to File- Parameters:
fileName
- file name- Returns:
- true if success
-
parseXML
Create PrintData from XML- Parameters:
ctx
- contextinput
- InputSource- Returns:
- PrintData
-
getMReportLine
Get MReportLine for current row- Returns:
- MReportLine
-
addRow
public void addRow(boolean functionRow, int levelNo, int reportLineID) Add row- Parameters:
functionRow
-levelNo
-reportLineID
-
-
getNodeByPrintFormatItemId(int)