public class TdbFieldGroupDesign extends java.lang.Object implements com.tietoenator.trip.jxp.internal.utils.DOMSink, java.lang.Comparable<TdbFieldGroupDesign>
Constructor and Description |
---|
TdbFieldGroupDesign()
Constructor, creates a blank field group design
|
TdbFieldGroupDesign(TdbFieldGroupDesign src)
Copy constructor, performs a deep copy from a provided source.
|
Modifier and Type | Method and Description |
---|---|
void |
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 |
equals(java.lang.Object o)
Compares to another object; equality is defined by field group number only
|
java.lang.String |
getDescription()
Get the description of the field group.
|
java.lang.String |
getFieldByIndex(int index)
Retrieve the n'th field within the field group design.
|
int |
getFieldCount()
The number of fields in this group.
|
java.util.List<java.lang.String> |
getFields()
Get the names of the fields in the field group.
|
java.lang.String |
getGroupName()
Get the name of the field group.
|
int |
getGroupNumber()
Get the field group's unique ID.
|
TdbFieldGroupType |
getGroupType()
Get the type of the field group
|
void |
setDescription(java.lang.String comment)
Set the description of the field group.
|
void |
setFields(java.util.List<java.lang.String> fields)
Set the names of the fields in the field group.
|
void |
setFields(java.lang.String[] fields)
Set the names of the fields in the field group.
|
void |
setGroupName(java.lang.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 |
sinkNode(org.w3c.dom.Node node,
java.lang.Object arg)
Deserialization support.
|
public TdbFieldGroupDesign()
public TdbFieldGroupDesign(TdbFieldGroupDesign src)
src
- The source from which to copy.public void clear()
public java.lang.String getGroupName()
public void setGroupName(java.lang.String name)
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.public java.lang.String getDescription()
public void setDescription(java.lang.String comment)
public int getGroupNumber()
public void setGroupNumber(int nr)
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.public TdbFieldGroupType getGroupType()
All 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.
public void setGroupType(TdbFieldGroupType groupType)
groupType
- Field group type
All 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:
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.
public int getFieldCount()
public java.lang.String getFieldByIndex(int index) throws TdbException
index
- The zero-based index of the field in the group.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.public java.util.List<java.lang.String> getFields()
public void setFields(java.util.List<java.lang.String> fields)
fields
- List of field names to assign to the grouppublic void setFields(java.lang.String[] fields)
fields
- List of field names to assign to the grouppublic void sinkNode(org.w3c.dom.Node node, java.lang.Object arg)
sinkNode
in interface com.tietoenator.trip.jxp.internal.utils.DOMSink
node
- The nodearg
- An optional argumentpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- Object with which to comparepublic int compareTo(TdbFieldGroupDesign fgroup)
compareTo
in interface java.lang.Comparable<TdbFieldGroupDesign>
fgroup
- The field to compare to the current; ordering is performed
using the field group number only