Class TdbFieldGroupDesign
- All Implemented Interfaces:
com.tietoenator.trip.jxp.internal.utils.DOMSink
,Comparable<TdbFieldGroupDesign>
- Since:
- TRIPjxp 8.0-0
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor, creates a blank field group designCopy constructor, performs a deep copy from a provided source. -
Method Summary
Modifier and TypeMethodDescriptionvoid
clear()
Clear the contents of the field group design, reset all values to their default state.int
compareTo
(TdbFieldGroupDesign fgroup) Order this object with relation to another -- required to be able to sort a collection of these objects.boolean
Compares to another object; equality is defined by field group number onlyGet the description of the field group.getFieldByIndex
(int index) Retrieve the n'th field within the field group design.int
The number of fields in this group.Get the names of the fields in the field group.Get the name of the field group.int
Get the field group's unique ID.Get the type of the field groupvoid
setDescription
(String comment) Set the description of the field group.void
Set the names of the fields in the field group.void
Set the names of the fields in the field group.void
setGroupName
(String name) Set the name of the field group.void
setGroupNumber
(int nr) Assign the field group's unique ID.void
setGroupType
(TdbFieldGroupType groupType) Set the field group type.void
Deserialization support.
-
Constructor Details
-
TdbFieldGroupDesign
public TdbFieldGroupDesign()Constructor, creates a blank field group design -
TdbFieldGroupDesign
Copy constructor, performs a deep copy from a provided source.- Parameters:
src
- The source from which to copy.
-
-
Method Details
-
clear
public void clear()Clear the contents of the field group design, reset all values to their default state. -
getGroupName
Get the name of the field group. -
setGroupName
Set the name of the field group.- Parameters:
name
- Field group nanme Field groups belong to the same namespace as the fields in the database. A field group cannot therefore have the same name as a field.
-
getDescription
Get the description of the field group. -
setDescription
Set the description of the field group. -
getGroupNumber
public int getGroupNumber()Get the field group's unique ID. -
setGroupNumber
public void setGroupNumber(int nr) Assign the field group's unique ID.- Parameters:
nr
- Field group number Please note that a field group's number is set by the server and can't be modified meaningfully. This setter method is only used during serialization ' of TdbFieldGroupDesign instances.
-
getGroupType
Get the type of the field groupAll types of fields groups represent a group of two or more fields, and can be used in a VIEW-like manner, i.e. act as a field name in a search expression. Searching using a group name will search in all fields in the group.
Tuple field groups declare to TRIP that the fields in the group are tupled. When records are committed to the database, TRIP will verify that the fields in the tuple group have the same number of subfields. If not, the commit will fail.
-
setGroupType
Set the field group type.- Parameters:
groupType
- Field group typeAll types of fields groups represent a group of two or more fields, and can be used in a VIEW-like manner, i.e. act as a field name in a search expression. Searching using a group name will search in all fields in the group.
Tuple field groups declare to TRIP that the fields in the group are tupled. When records are committed to the database, TRIP will verify that the fields in the tuple group have the same number of subfields. If not, the commit will fail.
Changing a structural field group to a tuple field group will work provided that:
- None of the fields is a STRING or TEXT field.
- None of the fields belong to another tuple field group.
Note that this kind of change does not update any records in the database, which means that records with fields belonging to the tuple such that the fields that have differing number of subfields will have to be adjusted the next time the record is updated.
-
getFieldCount
public int getFieldCount()The number of fields in this group. -
getFieldByIndex
Retrieve the n'th field within the field group design.- Parameters:
index
- The zero-based index of the field in the group.- Throws:
TdbException
- If the index is outside the valid range The order of the fields in the group is not significant to TRIP and is therfore not guaranteed to always be the same.
-
getFields
Get the names of the fields in the field group. -
setFields
Set the names of the fields in the field group.- Parameters:
fields
- List of field names to assign to the group
-
setFields
Set the names of the fields in the field group.- Parameters:
fields
- List of field names to assign to the group
-
sinkNode
Deserialization support.- Specified by:
sinkNode
in interfacecom.tietoenator.trip.jxp.internal.utils.DOMSink
- Parameters:
node
- The nodearg
- An optional argument
-
equals
Compares to another object; equality is defined by field group number only -
compareTo
Order this object with relation to another -- required to be able to sort a collection of these objects.- Specified by:
compareTo
in interfaceComparable<TdbFieldGroupDesign>
- Parameters:
fgroup
- The field to compare to the current; ordering is performed using the field group number only- Returns:
- -1 if this field group's number is lower than that on the provided object; +1 if this field group's number is higher than that on the provided object; 0 if the field group numbers are the same
-