jet.api
Class GroupInfo

java.lang.Object
  extended by jet.api.GroupInfo

public class GroupInfo
extends java.lang.Object

A infomation package of group and sort


Field Summary
static int ASCENDING
          sort type of group
static int DESCENDING
          sort type of group
static int NOTSORTED
          sort type of group
static int SELECTE_TYPE_All
          select N type
static int SELECTE_TYPE_BOTTOM_N
          select N type
static int SELECTE_TYPE_NONE
          select N type
static int SELECTE_TYPE_TOP_N
          select N type
 
Constructor Summary
GroupInfo(java.lang.String groupBy, int groupOrder)
          Constructor.
GroupInfo(java.lang.String groupBy, int groupOrder, boolean needTopN, int topN, boolean keepOthers, java.lang.String otherName, SortInfo[] sortInfo)
          Constructor.
GroupInfo(java.lang.String groupBy, int groupOrder, boolean needTopN, int topN, boolean keepOthers, java.lang.String otherName, SortInfo[] sortInfo, java.lang.String report)
          Constructor.
GroupInfo(java.lang.String groupBy, int groupOrder, java.lang.String report)
          Constructor.
 
Method Summary
 void addSortInfo(SortInfo info)
          add sort information of this group
 void downSortInfo(int index)
          move down sort information with specified index
 java.lang.String getBLName()
          Gets business logic field name
 java.lang.String getGroupBy()
          get groupby column name
 int getGroupOrder()
          get group order
 boolean getKeepOthers()
          get keepOthers status
 boolean getNeedTopN()
          get topN status
 java.lang.String getOtherName()
          get "Others" group name
 java.lang.String getReport()
          get report handle
 int getSelectN()
           
 int getSelectType()
           
 SortInfo[] getSortInfo()
          get all sort information of this group
 SpecGroupInfo getSpecGroupInfo()
          get special group infomation
 int getTopN()
          get topN number
 int indexOfSortInfo(SortInfo info)
          get index number of specified sort infomation
 int indexOfSortInfo(java.lang.String sortBy)
          get index number of sort infomation with specified column name
 boolean insertSortInfo(SortInfo sinfo, int index)
          add sort information at specified index
 boolean isSortIn(java.lang.String sortBy)
          find sort information which is sorted by specified sortBy column
 void removeSortInfo(int index)
          remove sort information at specified index
 void removeSortInfo(SortInfo info)
          add remove information of this group
 void removeSortInfo(java.lang.String sortBy)
          remove sort information with specified column name
 void setBLName(java.lang.String blName)
          Sets business logic field name
 void setGroupOrder(int groupOrder)
          set group order
 void setKeepOthers(boolean keepOthers)
          set keepOthers status
 void setNeedTopN(boolean needTopN)
          set needTopN status
 void setOtherName(java.lang.String otherName)
          set "Others" group name
 void setReport(java.lang.String report)
          set report handle
 void setSelectN(int selectN)
           
 void setSelectType(int selectType)
           
 void setSortInfo(SortInfo[] sInfo)
          set sort information of this group
 void setSpecGroupInfo(SpecGroupInfo info)
          set special group infomation
 void setTopN(int topN)
          set topN number
 java.lang.String toString()
           
 void upSortInfo(int index)
          move up sort information with specified index
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ASCENDING

public static final int ASCENDING
sort type of group


DESCENDING

public static final int DESCENDING
sort type of group


NOTSORTED

public static final int NOTSORTED
sort type of group


SELECTE_TYPE_All

public static final int SELECTE_TYPE_All
select N type

See Also:
Constant Field Values

SELECTE_TYPE_NONE

public static final int SELECTE_TYPE_NONE
select N type

See Also:
Constant Field Values

SELECTE_TYPE_TOP_N

public static final int SELECTE_TYPE_TOP_N
select N type

See Also:
Constant Field Values

SELECTE_TYPE_BOTTOM_N

public static final int SELECTE_TYPE_BOTTOM_N
select N type

See Also:
Constant Field Values
Constructor Detail

GroupInfo

public GroupInfo(java.lang.String groupBy,
                 int groupOrder)
Constructor. Create group information.

Parameters:
groupBy - the mapping name of the groupBy field.
groupOrder - the order of the group.

GroupInfo

public GroupInfo(java.lang.String groupBy,
                 int groupOrder,
                 java.lang.String report)
Constructor. Create group information.

Parameters:
groupBy - the mapping name of the groupBy field.
groupOrder - the order of the group.
report - the handle of the report.

GroupInfo

public GroupInfo(java.lang.String groupBy,
                 int groupOrder,
                 boolean needTopN,
                 int topN,
                 boolean keepOthers,
                 java.lang.String otherName,
                 SortInfo[] sortInfo)
Constructor. Create group information.

Parameters:
groupBy - the mapping name of the groupBy field.
groupOrder - the order of the group.
needTopN - indicate need topN.
topN - indicate the topN number.
keepOthers - indicate keep others .
otherName - the name of the others group.
sortInfo - the sort infomation of group.

GroupInfo

public GroupInfo(java.lang.String groupBy,
                 int groupOrder,
                 boolean needTopN,
                 int topN,
                 boolean keepOthers,
                 java.lang.String otherName,
                 SortInfo[] sortInfo,
                 java.lang.String report)
Constructor. Create group information.

Parameters:
groupBy - the mapping name of the groupBy field.
groupOrder - the order of the group.
needTopN - indicate need topN.
topN - indicate the topN number.
keepOthers - indicate keep others .
otherName - the name of the others group.
sortInfo - the sort infomation of group.
report - handle of report
Method Detail

getReport

public java.lang.String getReport()
get report handle

Returns:
report handle String

setReport

public void setReport(java.lang.String report)
set report handle

Parameters:
report - report handle

getGroupBy

public java.lang.String getGroupBy()
get groupby column name

Returns:
groupby column name string

getBLName

public java.lang.String getBLName()
Gets business logic field name

Returns:
business logic field name string

setBLName

public void setBLName(java.lang.String blName)
Sets business logic field name

Parameters:
blName - business logic field name

getGroupOrder

public int getGroupOrder()
get group order

Returns:
group order number

setGroupOrder

public void setGroupOrder(int groupOrder)
set group order

Parameters:
groupOrder - group order number

getNeedTopN

public boolean getNeedTopN()
get topN status

Returns:
true if group need topN

getTopN

public int getTopN()
get topN number

Returns:
topN number

getKeepOthers

public boolean getKeepOthers()
get keepOthers status

Returns:
true if report keep others together

getOtherName

public java.lang.String getOtherName()
get "Others" group name

Returns:
name string of "Others"

setTopN

public void setTopN(int topN)
set topN number

Parameters:
topN - topN number

setNeedTopN

public void setNeedTopN(boolean needTopN)
set needTopN status

Parameters:
needTopN - status of needTopN

setKeepOthers

public void setKeepOthers(boolean keepOthers)
set keepOthers status

Parameters:
keepOthers - if report keep others together

setOtherName

public void setOtherName(java.lang.String otherName)
set "Others" group name

Parameters:
otherName - name string of "Others"

getSortInfo

public SortInfo[] getSortInfo()
get all sort information of this group

Returns:
SortInfo array

setSortInfo

public void setSortInfo(SortInfo[] sInfo)
set sort information of this group

Parameters:
sInfo - sort informations

addSortInfo

public void addSortInfo(SortInfo info)
add sort information of this group

Parameters:
info - sort information

insertSortInfo

public boolean insertSortInfo(SortInfo sinfo,
                              int index)
add sort information at specified index

Parameters:
sinfo - sort information
index - index number of sort informations
Returns:
true if information is inserted sucessfully

removeSortInfo

public void removeSortInfo(SortInfo info)
add remove information of this group

Parameters:
info - sort information

removeSortInfo

public void removeSortInfo(java.lang.String sortBy)
remove sort information with specified column name

Parameters:
sortBy - sortBy column of sort information

removeSortInfo

public void removeSortInfo(int index)
remove sort information at specified index

Parameters:
index - index number of sort informations

indexOfSortInfo

public int indexOfSortInfo(java.lang.String sortBy)
get index number of sort infomation with specified column name

Parameters:
sortBy - sortBy column name
Returns:
index number

indexOfSortInfo

public int indexOfSortInfo(SortInfo info)
get index number of specified sort infomation

Parameters:
info - sort infomation
Returns:
index number

upSortInfo

public void upSortInfo(int index)
move up sort information with specified index

Parameters:
index - index number

downSortInfo

public void downSortInfo(int index)
move down sort information with specified index

Parameters:
index - index number

isSortIn

public boolean isSortIn(java.lang.String sortBy)
find sort information which is sorted by specified sortBy column

Parameters:
sortBy - sortBy column name
Returns:
true if sucessful.

setSpecGroupInfo

public void setSpecGroupInfo(SpecGroupInfo info)
set special group infomation

Parameters:
info - special group infomation

getSpecGroupInfo

public SpecGroupInfo getSpecGroupInfo()
get special group infomation

Returns:
special group infomation

toString

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

setSelectType

public void setSelectType(int selectType)

getSelectType

public int getSelectType()

getSelectN

public int getSelectN()

setSelectN

public void setSelectN(int selectN)