jdbreport.design.model
Class TemplateReportCell

java.lang.Object
  extended by jdbreport.model.ReportCell
      extended by jdbreport.design.model.TemplateReportCell
All Implemented Interfaces:
Serializable, Cloneable, CellObject, Cell

public class TemplateReportCell
extends ReportCell
implements CellObject

Version:
2.0 30.01.2012
Author:
Andrey Kholmanskih
See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from interface jdbreport.model.Cell
Cell.Type
 
Field Summary
 
Fields inherited from class jdbreport.model.ReportCell
defaultValuesByClass
 
Fields inherited from interface jdbreport.design.model.CellObject
AF_AVG, AF_MAX, AF_MIN, AF_NONE, AF_SUM, AGR_FUNC_NAME, TYPE_FIELD, TYPE_NONE, TYPE_VAR
 
Fields inherited from interface jdbreport.model.Cell
EMPTY_STRING, TEXT_HTML, TEXT_PLAIN
 
Constructor Summary
TemplateReportCell()
           
 
Method Summary
 void clear()
          Sets all properties by default
 Cell createCellItem()
          Creates the Cell object and copies its properties there
 byte[] getCompiledFunction()
           
 String getDataSetId()
           
 String[] getDataSetIds()
          A list of DataSet aliases contained in the cell
 Expression[] getExpressions()
          A list of expressions contained in cells
 String getFieldName()
           
 String[] getFieldNames(String dsId)
          A list of field items contained in the cell for DataSet named dsId
 String getFunctionName()
          Name of the CellFunction object
 String getFunctionText()
           
 int getTotalFunction()
           
 int getType()
           
 boolean isNotRepeate()
           
 boolean isOldEquals(Object value)
          Compares the meaning of the new generated cell with saved meaning
 boolean isReplacement()
           
 void setCompiledFunction(byte[] classBuf)
           
 void setDataSetId(String tableId)
           
 void setExpressions(Expression[] expr)
           
 void setFieldName(String name)
           
 void setFunctionName(String functionName)
          Sets the name of the CellFunction object
 void setFunctionText(String text)
           
 void setNotRepeate(boolean noRepeate)
           
 void setOldValue(Object oldValue)
          Remembers the current meaning of the generated cell
 void setReplacement(boolean b)
          Sets the sign of the replacement value of the cell
 void setTotalFunction(int func)
           
 void setType(int type)
           
 
Methods inherited from class jdbreport.model.ReportCell
clone, getColSpan, getContentType, getExtFlags, getIcon, getImageFormat, getOwner, getPicture, getRowSpan, getStyleId, getText, getValue, getValueType, isChild, isEditable, isNotPrint, isNull, isScaleIcon, isSpan, setColSpan, setDefaultCellValueClass, setEditable, setExtFlags, setIcon, setImage, setImageFormat, setNotPrint, setOwner, setPicture, setRowSpan, setScaleIcon, setStyleId, setValue, setValueType, toString
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface jdbreport.design.model.CellObject
clone
 
Methods inherited from interface jdbreport.model.Cell
getColSpan, getContentType, getExtFlags, getIcon, getImageFormat, getOwner, getPicture, getRowSpan, getStyleId, getText, getValue, getValueType, isChild, isEditable, isNotPrint, isNull, isScaleIcon, isSpan, setColSpan, setEditable, setExtFlags, setIcon, setImage, setImageFormat, setNotPrint, setOwner, setPicture, setRowSpan, setScaleIcon, setStyleId, setValue, setValueType
 

Constructor Detail

TemplateReportCell

public TemplateReportCell()
Method Detail

getFieldName

public String getFieldName()
Specified by:
getFieldName in interface CellObject
Returns:
the field's name

setFieldName

public void setFieldName(String name)
Specified by:
setFieldName in interface CellObject
Parameters:
name - the field's name

getDataSetId

public String getDataSetId()
Specified by:
getDataSetId in interface CellObject
Returns:
the DataSet's alias

setDataSetId

public void setDataSetId(String tableId)
Specified by:
setDataSetId in interface CellObject
Parameters:
tableId - the DataSet's alias

getType

public int getType()
Specified by:
getType in interface CellObject
Returns:
Data type (TYPE_VAR, TYPE_FIELD or TYPE_NONE)

setType

public void setType(int type)
Specified by:
setType in interface CellObject
Parameters:
type - Data type (TYPE_VAR, TYPE_FIELD or TYPE_NONE)

createCellItem

public Cell createCellItem()
Description copied from interface: CellObject
Creates the Cell object and copies its properties there

Specified by:
createCellItem in interface CellObject
Returns:
the Cell object

isNotRepeate

public boolean isNotRepeate()
Specified by:
isNotRepeate in interface CellObject
Returns:
Not repeated value for column

setNotRepeate

public void setNotRepeate(boolean noRepeate)
Specified by:
setNotRepeate in interface CellObject
Parameters:
noRepeate - not repeated value for column

getFunctionText

public String getFunctionText()

setFunctionText

public void setFunctionText(String text)

getCompiledFunction

public byte[] getCompiledFunction()

setCompiledFunction

public void setCompiledFunction(byte[] classBuf)

getFunctionName

public String getFunctionName()
Description copied from interface: CellObject
Name of the CellFunction object

Specified by:
getFunctionName in interface CellObject
Returns:
name of the CellFunction object

setFunctionName

public void setFunctionName(String functionName)
Description copied from interface: CellObject
Sets the name of the CellFunction object

Specified by:
setFunctionName in interface CellObject
Parameters:
functionName - name of the CellFunction object

getTotalFunction

public int getTotalFunction()
Specified by:
getTotalFunction in interface CellObject
Returns:
the total function: Sum, Max, Min or Avg

setTotalFunction

public void setTotalFunction(int func)
Specified by:
setTotalFunction in interface CellObject
Parameters:
func - the total function: Sum, Max, Min or Avg

clear

public void clear()
Description copied from interface: Cell
Sets all properties by default

Specified by:
clear in interface Cell
Overrides:
clear in class ReportCell

isOldEquals

public boolean isOldEquals(Object value)
Description copied from interface: CellObject
Compares the meaning of the new generated cell with saved meaning

Specified by:
isOldEquals in interface CellObject
Parameters:
value - the new meaning
Returns:
true if equal

setOldValue

public void setOldValue(Object oldValue)
Description copied from interface: CellObject
Remembers the current meaning of the generated cell

Specified by:
setOldValue in interface CellObject
Parameters:
oldValue - the current meaning

getExpressions

public Expression[] getExpressions()
Description copied from interface: CellObject
A list of expressions contained in cells

Specified by:
getExpressions in interface CellObject
Returns:
a list of expressions contained in cells

setExpressions

public void setExpressions(Expression[] expr)
Specified by:
setExpressions in interface CellObject
Parameters:
expr - a list of expressions

getDataSetIds

public String[] getDataSetIds()
Description copied from interface: CellObject
A list of DataSet aliases contained in the cell

Specified by:
getDataSetIds in interface CellObject
Returns:
the aliases of DataSet

getFieldNames

public String[] getFieldNames(String dsId)
Description copied from interface: CellObject
A list of field items contained in the cell for DataSet named dsId

Specified by:
getFieldNames in interface CellObject
Parameters:
dsId - the dataset's alias
Returns:
a list of field items

isReplacement

public boolean isReplacement()
Specified by:
isReplacement in interface CellObject
Returns:
true if the cell is set to change

setReplacement

public void setReplacement(boolean b)
Description copied from interface: CellObject
Sets the sign of the replacement value of the cell

Specified by:
setReplacement in interface CellObject
Parameters:
b - sign of the replacement