public interface MRecord extends MNode
Modifier and Type | Method and Description |
---|---|
MField |
addCustomField(String name,
Multiplicity multiplicity,
CustomFieldHandler handler)
Adds a new child field with custom data type.
|
MField |
addCustomField(String name,
Multiplicity multiplicity,
String handler)
Adds a new child field with custom data type.
|
MField |
addField(String name)
Adds a new child field with default multiplicity and data type.
|
MField |
addField(String name,
MDataType dataType)
Adds a new child field with default multiplicity.
|
MField |
addField(String name,
MDataType dataType,
Multiplicity multiplicity)
Adds a new child field.
|
MField |
addField(String name,
Multiplicity multiplicity)
Adds a new child field with default data type.
|
MField |
addField(String name,
Multiplicity multiplicity,
CustomFieldHandler handler)
Deprecated.
|
MRecord |
addRecord(String name)
Adds a new child record with default multiplicity.
|
MRecord |
addRecord(String name,
Multiplicity multiplicity)
Adds a new child record.
|
int |
childCount()
Returns the number of child nodes defined.
|
List<MNode> |
childNodes()
Returns a list of the children of the record.
|
MNode |
getChild(int index)
Gets the child at a given index.
|
MField |
getField(String name)
Gets a child field by name.
|
MRecord |
getRecord(String name)
Gets a child record by name.
|
getFullName, getMessage, getMultiplicity, getName, getParent, isField, isMessage, isRecord
List<MNode> childNodes()
int childCount()
MRecord addRecord(String name) throws APIException
Default multiplicity may vary by implementation but is typically
Multiplicity.SINGLE_REQUIRED
.
name
- the name of the child record.APIException
- if unable to add a new child record, possibly
because a child of the same name already exists.MRecord addRecord(String name, Multiplicity multiplicity) throws APIException
name
- the name of the child record.multiplicity
- the multiplicity of the child record within this
record.APIException
- if unable to add a new child record, possibly
because a child of the same name already exists or the specified
multiplicity is not valid for the implementation.MField addField(String name) throws APIException
Default multiplicity may vary by implementation but is typically
Multiplicity.SINGLE_REQUIRED
.
name
- the name of the child field.APIException
- if unable to add the new child field, possibly
because a child of the same name already exists.MField addField(String name, Multiplicity multiplicity) throws APIException
name
- the name of the child field.multiplicity
- the multiplicity of the child field within this
record.APIException
- if unable to add the new child field, possibly
because a child of the same name already exists or because the
specified multiplicity is invalid.MField addField(String name, MDataType dataType) throws APIException
Default multiplicity may vary by implementation but is typically
Multiplicity.SINGLE_REQUIRED
.
name
- the name of the child field.dataType
- the data type of the child field.APIException
- if unable to add the new child field, possibly
because a child of the same name already exists or the specified data
type is not supported by the implementation.MField addField(String name, MDataType dataType, Multiplicity multiplicity) throws APIException
name
- the name of the child field.dataType
- the data type of the child field.multiplicity
- the multiplicity of the child field within this
record.APIException
- if unable to add the new child field, possibly
because a child of the same name already exists or the specified data
type is not supported by the implementation or the specified multiplicity
is invalid for the implementation.@Deprecated MField addField(String name, Multiplicity multiplicity, CustomFieldHandler handler) throws APIException
addCustomField(String, Multiplicity, CustomFieldHandler)
.name
- the name of the child field.multiplicity
- the multiplicity of the child field within this
record.handler
- a custom field handler that defines the behaviour of the
custom data type.APIException
- if unable to add the new child field, possibly
because a child of the same name already exists or because the
specified multiplicity is invalid.MField addCustomField(String name, Multiplicity multiplicity, CustomFieldHandler handler) throws APIException
name
- the name of the child field.multiplicity
- the multiplicity of the child field within this
record.handler
- a custom field handler that defines the behaviour of the
custom data type.APIException
- if unable to add the new child field, possibly
because a child of the same name already exists or because the
specified multiplicity is invalid.MField addCustomField(String name, Multiplicity multiplicity, String handler) throws APIException
name
- the name of the child field.multiplicity
- the multiplicity of the child field within this
record.handler
- the class name of a custom field handler that defines the
behaviour of the custom data type.APIException
- if unable to add the new child field, possibly
because a child of the same name already exists or because the
specified multiplicity is invalid.MRecord getRecord(String name)
name
- the record name.MField getField(String name)
name
- the field name.MNode getChild(int index) throws APIException
index
- the index.APIException
- if the index is out of bounds.Copyright © 2016 Push Technology Ltd. All Rights Reserved.