i-net Clear Reports

com.inet.report
Class BySummaryOrder

java.lang.Object
  extended by com.inet.report.BySummaryOrder
All Implemented Interfaces:
NodeParser, java.io.Serializable

public class BySummaryOrder
extends java.lang.Object
implements java.io.Serializable, NodeParser

BySummaryOrder saves the options for the sort by aggregate function.

See Also:
Serialized Form

Field Summary
static java.lang.String DEFAULT_OTHER_NAME
          Default name for all other elements.
static int GROUP_SORT_ALL
          Display all elements sorted ascending or descending
static int GROUP_SORT_BOTTOM_N
          Display only first n elements in ascending sort order
static int GROUP_SORT_BOTTOM_N_PERCENTAGE
          Display only first n-procent elements in ascending sort order
static int GROUP_SORT_TOP_N
          Display only first n elements in descending sort order
static int GROUP_SORT_TOP_N_PERCENTAGE
          Display only first n-procent elements in descending sort order
static int OTHER_RECORDS_DISCARD
          All values with sorting number greater than n are discard and not part of the report.
static int OTHER_RECORDS_GROUP_TO_OTHERS
          All values with sorting number greater than n are group together to the group other.
static int SORT_ASCENDING_ORDER
          Constant for ascending order sort direction.
static int SORT_DESCENDING_ORDER
          Constant for descending order sort direction.
 
Method Summary
 void addSummaryField(SummaryField sField)
          Adds a summary field used for sorting.
 BySummaryOrder copy()
          Creates a copy of this.
 boolean equals(java.lang.Object object)
          Compares the other object with this.
 int getN()
          Gets the count of displayed elements
 int getOther()
          Gets the type for handling the values with sorting number greater than n.
 java.lang.String getOtherName()
          Gets the display name the other group entry.
 int getSortDirection()
          Gets the direction of the sorting
 int getSortType()
          Gets the type of sorting
 SummaryField getSummaryField(int index)
          Gets the summary field used for sorting at index position.
 int getSummaryFieldCount()
          Use this method to get the number of summary fields used for sorting.
 java.lang.String paramString()
          Returns the String representation of this object.
 void removeSummaryField(int index)
          Removes the SummaryField from this sort order.
 void setN(int n)
          Sets the count of displayed elements
 void setOther(int otherType)
          Sets the type for handling the values with sorting number greater than n.
 void setOtherName(java.lang.String otherName)
          Sets display name for the other group entry.
 void setSortDirection(int direction)
          Sets the direction of sorting
 void setSortType(int type)
          Sets the type of sorting
 
Methods inherited from interface com.inet.report.parser.NodeParser
isDOMParser, parseDOM, parseElement, parseEndElement, parseText
 

Field Detail

DEFAULT_OTHER_NAME

public static final java.lang.String DEFAULT_OTHER_NAME
Default name for all other elements.

See Also:
Constant Field Values

GROUP_SORT_ALL

public static final int GROUP_SORT_ALL
Display all elements sorted ascending or descending

See Also:
setSortType(int), Constant Field Values

GROUP_SORT_TOP_N

public static final int GROUP_SORT_TOP_N
Display only first n elements in descending sort order

See Also:
setSortType(int), Constant Field Values

GROUP_SORT_BOTTOM_N

public static final int GROUP_SORT_BOTTOM_N
Display only first n elements in ascending sort order

See Also:
setSortType(int), Constant Field Values

GROUP_SORT_TOP_N_PERCENTAGE

public static final int GROUP_SORT_TOP_N_PERCENTAGE
Display only first n-procent elements in descending sort order

See Also:
setSortType(int), Constant Field Values

GROUP_SORT_BOTTOM_N_PERCENTAGE

public static final int GROUP_SORT_BOTTOM_N_PERCENTAGE
Display only first n-procent elements in ascending sort order

See Also:
setSortType(int), Constant Field Values

SORT_ASCENDING_ORDER

public static final int SORT_ASCENDING_ORDER
Constant for ascending order sort direction.

See Also:
Constant Field Values

SORT_DESCENDING_ORDER

public static final int SORT_DESCENDING_ORDER
Constant for descending order sort direction.

See Also:
Constant Field Values

OTHER_RECORDS_GROUP_TO_OTHERS

public static final int OTHER_RECORDS_GROUP_TO_OTHERS
All values with sorting number greater than n are group together to the group other.

See Also:
setOther(int), Constant Field Values

OTHER_RECORDS_DISCARD

public static final int OTHER_RECORDS_DISCARD
All values with sorting number greater than n are discard and not part of the report.

See Also:
setOther(int), Constant Field Values
Method Detail

setSortType

public void setSortType(int type)
Sets the type of sorting

Parameters:
type - the type of sorting by summary.
See Also:
GROUP_SORT_ALL, GROUP_SORT_TOP_N, GROUP_SORT_BOTTOM_N, GROUP_SORT_TOP_N_PERCENTAGE, GROUP_SORT_BOTTOM_N_PERCENTAGE

getSortType

public int getSortType()
Gets the type of sorting

Returns:
type of sort
See Also:
GROUP_SORT_ALL, GROUP_SORT_TOP_N, GROUP_SORT_BOTTOM_N, GROUP_SORT_TOP_N_PERCENTAGE, GROUP_SORT_BOTTOM_N_PERCENTAGE

getOtherName

public java.lang.String getOtherName()
Gets the display name the other group entry.

Returns:
the name for all other group values.
See Also:
setOtherName(String).

setN

public void setN(int n)
Sets the count of displayed elements

Parameters:
n - count of shown group values.
Throws:
java.lang.IllegalArgumentException - if n less than 0.

getN

public int getN()
Gets the count of displayed elements

Returns:
count

setOtherName

public void setOtherName(java.lang.String otherName)
Sets display name for the other group entry. This value has no effect if the sortType GROUP_SORT_ALL is set.

Parameters:
otherName - the new name.
Throws:
java.lang.IllegalArgumentException - if the name is empty or null.
See Also:
setOther(int), getOtherName()

getOther

public int getOther()
Gets the type for handling the values with sorting number greater than n.

Returns:
the type of handling for all other group values.
See Also:
setOther(int), OTHER_RECORDS_DISCARD, OTHER_RECORDS_GROUP_TO_OTHERS

setOther

public void setOther(int otherType)
Sets the type for handling the values with sorting number greater than n. This value has no effect if the sortType GROUP_SORT_ALL is set.

Parameters:
otherType - the new value.
See Also:
setOtherName(String), getOther(), OTHER_RECORDS_GROUP_TO_OTHERS, OTHER_RECORDS_DISCARD

getSummaryField

public SummaryField getSummaryField(int index)
Gets the summary field used for sorting at index position.

Parameters:
index - of the summary field.
Returns:
the summary field at index.
Throws:
java.lang.IndexOutOfBoundsException - if this index is out of bounds of the summary fields list.

getSummaryFieldCount

public int getSummaryFieldCount()
Use this method to get the number of summary fields used for sorting.

Returns:
The number of summary fields used for sorting.

addSummaryField

public void addSummaryField(SummaryField sField)
Adds a summary field used for sorting.

Parameters:
sField - SummaryField
Throws:
java.lang.IllegalArgumentException - if the SummaryField null is

removeSummaryField

public void removeSummaryField(int index)
Removes the SummaryField from this sort order.

Parameters:
index - of removed field.
Throws:
java.lang.IndexOutOfBoundsException - if this index is out of bounds of the summary fields list or the list is null.

getSortDirection

public int getSortDirection()
Gets the direction of the sorting

Returns:
direction of sort
See Also:
SORT_ASCENDING_ORDER, SORT_DESCENDING_ORDER

setSortDirection

public void setSortDirection(int direction)
Sets the direction of sorting

Parameters:
direction - the sort direction of this sort order, asc. or desc.
See Also:
SORT_ASCENDING_ORDER, SORT_DESCENDING_ORDER

paramString

public java.lang.String paramString()
Returns the String representation of this object.

Returns:
the description as String.

equals

public boolean equals(java.lang.Object object)
Compares the other object with this. Indicates whether some other object is "equal to" this one.

Overrides:
equals in class java.lang.Object
Parameters:
object - the other object
Returns:
true if this is equal to other object
Since:
8.0

copy

public BySummaryOrder copy()
Creates a copy of this. The copy has then same group, renderer and sum fields.

Returns:
the copy
Since:
11.1

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH