org.zkoss.pivot.impl
Class CalculatorContextSignature

java.lang.Object
  extended by org.zkoss.pivot.impl.CalculatorContextSignature

public class CalculatorContextSignature
extends java.lang.Object

An immutable object that express the requirement of the bottom level cache of TabularPivotModel.

Author:
simonpai

Constructor Summary
CalculatorContextSignature(TabularPivotModel model)
          The default constructor, which determines the row/column fields, the data fields and the calculator context types required to build up the model cache.
CalculatorContextSignature(TabularPivotModel model, PivotField[] extraDataFields, ContextType<?>[] extraContextTypes)
          Optionally provide extra data fields and/or extra calculator context types to secure in the requirement set.
 
Method Summary
 boolean covers(CalculatorContextSignature signature)
          Return true if this cover the other signature.
 ContextType<?> getCustomContextType(int index)
           
 int getCustomContextTypeCount()
           
 ContextType<?>[] getCustomContextTypeRequirement()
           
 int getDataFieldCount()
           
 java.util.Set<PivotField> getDataFieldRequirement()
           
 int getIndexOf(ContextType<?> type)
          Return the ordinal of custom ContextType in this signature.
 java.util.Set<PivotField> getRowColumnFieldRequirement()
           
 boolean[] getStandardContextTypeRequirement()
           
 int getTotalContextTypeCount()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CalculatorContextSignature

public CalculatorContextSignature(TabularPivotModel model)
The default constructor, which determines the row/column fields, the data fields and the calculator context types required to build up the model cache.


CalculatorContextSignature

public CalculatorContextSignature(TabularPivotModel model,
                                  PivotField[] extraDataFields,
                                  ContextType<?>[] extraContextTypes)
Optionally provide extra data fields and/or extra calculator context types to secure in the requirement set.

Parameters:
extraDataFields - can be null
extraContextTypes - can be null
Method Detail

getRowColumnFieldRequirement

public java.util.Set<PivotField> getRowColumnFieldRequirement()

getDataFieldRequirement

public java.util.Set<PivotField> getDataFieldRequirement()

getStandardContextTypeRequirement

public boolean[] getStandardContextTypeRequirement()

getCustomContextTypeRequirement

public ContextType<?>[] getCustomContextTypeRequirement()

getDataFieldCount

public int getDataFieldCount()

getCustomContextTypeCount

public int getCustomContextTypeCount()

getTotalContextTypeCount

public int getTotalContextTypeCount()

getCustomContextType

public ContextType<?> getCustomContextType(int index)

covers

public boolean covers(CalculatorContextSignature signature)
Return true if this cover the other signature.


getIndexOf

public int getIndexOf(ContextType<?> type)
Return the ordinal of custom ContextType in this signature.


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2012. All Rights Reserved.