i-net Clear Reports

com.inet.report
Class GroupField

java.lang.Object
  extended by com.inet.report.Field
      extended by com.inet.report.GroupField
All Implemented Interfaces:
NodeParser, com.inet.report.ReferencedObject, com.inet.report.ReferenceHolder, Validatable, java.io.Serializable

public class GroupField
extends Field
implements com.inet.report.ReferenceHolder, Validatable

The GroupField represents a group name field, which is automatically created with the creation of a Group object. When evaluating a GroupField the name of the group will returned. So if you have a group then you can print out the name with a FieldElement containing the GroupField.
You can get the GroupField of each group with Fields.getGroupNameField(int) in class Fields.

This class is part of the RDC.

See Also:
Fields.getGroupNameField(int), Fields.getGroupNameFieldsCount(), FieldElement, FieldPart, Serialized Form

Field Summary
 
Fields inherited from class com.inet.report.Field
BINARY, BOOLEAN, CURRENCY, CURSOR, DATABASE_FIELD, DATE, DATETIME, FORMULA_FIELD, GROUP_NAME_FIELD, NUMBER, PARAMETER_FIELD, SORT_FIELD, SPECIAL_FIELD, SQL_FIELD, STRING, SUMMARY_FIELD, TIME, UNKNOWN
 
Method Summary
 Field getField()
          Gets the field definition element (for example, database field element, prompt field element).
 Group getGroup()
          Returns the group this field is associated with.
 int getGroupType()
          Returns the type of the group, which is associated with this group name field.
 java.lang.String getName()
          Returns a string which represents the name of the group field.
 int getValueType()
          The return value type of a GroupField is always Field.String, but for formatting the return value type of the group the field is based on is needed.
 void setField(Field newField)
          Sets the field definition element (for example, DatabaseField element, prompt field element).
 void setName(java.lang.String name)
          Setting the name of a GroupField is not allowed.
 Validity validate()
          Check if the object is valid and returns the state and details of possible errors.
 
Methods inherited from class com.inet.report.Field
checkNameExists, duplicate, extractReference, getPlaceholderName, getRefName, getType, indexOf, paramString, setGroup, setValueType, trimAwayBrackets
 
Methods inherited from interface com.inet.report.parser.NodeParser
isDOMParser, parseDOM, parseElement, parseEndElement, parseText
 

Method Detail

setName

public void setName(java.lang.String name)
             throws ReportException
Setting the name of a GroupField is not allowed. If you want to customize the name of the GroupField use:
Otherwise an exception will be thrown.

Specified by:
setName in class Field
Parameters:
name - a name.
Throws:
ReportException - will be thrown when you use this method to set the name of a GroupField.
See Also:
getName()

getGroup

public Group getGroup()
Returns the group this field is associated with.

Overrides:
getGroup in class Field
Returns:
the group this field belongs to.
See Also:
Field.setGroup(Group)

getGroupType

public int getGroupType()
Returns the type of the group, which is associated with this group name field. The following values possible: That means this group name field is associated with a standard group if the type is 0. In this case eng.getGroup(getGroupNumber()+1) results the Group object which is associated with this field. Otherwise a null is returned by getGroup.

Returns:
the group type.

getField

public Field getField()
Gets the field definition element (for example, database field element, prompt field element).

Overrides:
getField in class Field
Returns:
Field The current value of the 'field' property.

setField

public void setField(Field newField)
Sets the field definition element (for example, DatabaseField element, prompt field element).

Overrides:
setField in class Field
Parameters:
newField - The new field element of the property 'field'.

getValueType

public int getValueType()
The return value type of a GroupField is always Field.String, but for formatting the return value type of the group the field is based on is needed.

Overrides:
getValueType in class Field
Returns:
The value of the property 'value type'.
See Also:
Field.NUMBER, Field.CURRENCY, Field.BOOLEAN, Field.DATE, Field.TIME, Field.STRING, Field.DATETIME

getName

public java.lang.String getName()
Returns a string which represents the name of the group field. The string returned depends on the settings of Group.getCustomizeGroupNameField().

Overrides:
getName in class Field
Returns:
name of the groupfield
See Also:
setName(String), Group.getCustomizeGroupNameField()

validate

public Validity validate()
Check if the object is valid and returns the state and details of possible errors.

Specified by:
validate in interface Validatable
Returns:
the current state, never null.

i-net Clear Reports

Copyright © 1999-2011 by i-net software GmbH