public class TdbComponent
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
TdbField |
createField(java.lang.String name,
TdbFieldType type)
Create a new field instance
This factory method creates a TdbField-derived object of the appropriate class and associates the new instance with this component. |
TdbField |
createField(TdbFieldDesign design)
Create a new field instance
This factory method creates a TdbField-derived object of the appropriate class and associates the new instance with this component. |
void |
deleteField(java.lang.String name)
Delete the value of a named field
Note that after a successful use of this method, the component still contains the named field, but the value of the field is empty. |
java.util.Collection<java.lang.String> |
fieldNames()
Retrieve a collection of field names from within the component.
|
java.util.Collection<TdbField> |
fields()
Retrieve a collection of fields from within the component.
|
boolean |
getClearOnCommit()
Check whether the component should be cleared during a commit.
|
TdbField |
getField(java.lang.String name)
Retrieve the value of a named field
|
int |
getId()
Retrieve the component's ID; this is zero for the head component.
|
java.lang.String |
getName()
Retrieve the current value of the part name field (only valid for
part components, obviously).
|
TdbRecord |
getOwnerRecord()
Retrieve a reference to the TdbRecord within which this component exists
|
void |
setClearOnCommit(boolean clear)
Establish whether the component should be cleared during a commit.
|
void |
setField(java.lang.String name,
TdbField field)
Set the value of a named field
|
void |
setName(java.lang.String name)
Establish, or modify, the value of the part name field (only valid for
part components, obviously).
|
public int getId()
public java.util.Collection<TdbField> fields()
public java.util.Collection<java.lang.String> fieldNames()
public TdbRecord getOwnerRecord()
public java.lang.String getName() throws TdbException
TdbException
public void setName(java.lang.String name) throws TdbException
name
- The new value of the part name fieldTdbException
public boolean getClearOnCommit()
public void setClearOnCommit(boolean clear)
clear
- The new value of the clear-on-commit flagpublic TdbField getField(java.lang.String name)
name
- Name of field to retrievepublic void setField(java.lang.String name, TdbField field)
name
- Name of field to store/overwritefield
- Field instancepublic void deleteField(java.lang.String name)
name
- Name of field to deletepublic TdbField createField(TdbFieldDesign design) throws TdbException
design
- The design of the field to createTdbException
public TdbField createField(java.lang.String name, TdbFieldType type) throws TdbException
name
- Name of field to createtype
- Type of field to createTdbException