|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.simantics.databoard.type.Datatype
org.simantics.databoard.type.RecordType
public class RecordType
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.simantics.databoard.type.Datatype |
---|
Datatype.Visitor<T>, Datatype.Visitor1 |
Field Summary | |
---|---|
static java.lang.String |
KEY_IDENTIFIER
|
static java.lang.String |
KEY_REFERABLE
|
static Datatype |
VOID_TYPE
|
Fields inherited from class org.simantics.databoard.type.Datatype |
---|
metadata |
Constructor Summary | |
---|---|
RecordType()
|
|
RecordType(boolean referable,
Component... components)
|
Method Summary | ||
---|---|---|
|
accept(Datatype.Visitor<T> v)
|
|
void |
accept(Datatype.Visitor1 v,
java.lang.Object obj)
|
|
void |
addComponent(java.lang.String name,
Datatype type)
|
|
Component |
getComponent(int index)
Get component by index. |
|
Component |
getComponent(java.lang.String fieldName)
Get component by name. |
|
int |
getComponentCount()
Get component type count |
|
java.lang.Integer |
getComponentIndex(java.lang.String fieldName)
Get component by name. |
|
int |
getComponentIndex2(java.lang.String fieldName)
Get component by name. |
|
Component[] |
getComponents()
|
|
Datatype |
getComponentType(ChildReference path)
Get component type |
|
Datatype |
getComponentType(int index)
Get component type by index |
|
Datatype |
getComponentType(java.lang.String fieldName)
Get component Datatype by field name |
|
int[] |
getIdentifiers()
Get an array of indices that describe which fields compose the identifier of this record |
|
Datatype |
getIdentifierType()
Get a datatype that describes the identifier of this type. |
|
int |
hashCode()
|
|
boolean |
isIdentifier(int fieldIndex)
|
|
boolean |
isReferable()
|
|
boolean |
isTupleType()
Return true if the record is a tuple. |
|
void |
removeComponent(java.lang.String name)
|
|
void |
setComponents(Component[] components)
|
|
void |
setIdentifiers(int... indices)
Set which fields compose the identifier of this record |
|
void |
setIdentifiers(java.util.List<java.lang.Integer> indices)
Set which fields compose the identifier of this record |
|
void |
setReferable(boolean referable)
|
Methods inherited from class org.simantics.databoard.type.Datatype |
---|
equals, metadataHashCode, toSingleLineString, toString |
Methods inherited from class java.lang.Object |
---|
getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final Datatype VOID_TYPE
public static final java.lang.String KEY_REFERABLE
public static final java.lang.String KEY_IDENTIFIER
Constructor Detail |
---|
public RecordType()
public RecordType(boolean referable, Component... components)
Method Detail |
---|
public boolean isReferable()
public void setReferable(boolean referable)
public void setComponents(Component[] components)
public void addComponent(java.lang.String name, Datatype type)
public void removeComponent(java.lang.String name)
public int getComponentCount()
Datatype
getComponentCount
in class Datatype
public int hashCode()
hashCode
in class Datatype
public void accept(Datatype.Visitor1 v, java.lang.Object obj)
accept
in class Datatype
public <T> T accept(Datatype.Visitor<T> v)
accept
in class Datatype
public boolean isTupleType()
public Datatype getComponentType(int index)
getComponentType
in class Datatype
index
- index
public Datatype getComponentType(ChildReference path) throws java.lang.IllegalArgumentException
Datatype
getComponentType
in class Datatype
path
- child path or null to return this.
java.lang.IllegalArgumentException
- if path cannot be applied to this typepublic java.lang.Integer getComponentIndex(java.lang.String fieldName)
fieldName
- component name
null
if one does not existpublic int getComponentIndex2(java.lang.String fieldName)
fieldName
- component name
public Datatype getComponentType(java.lang.String fieldName)
fieldName
-
null
public Component getComponent(java.lang.String fieldName)
fieldName
- component name
null
if one does not existpublic Component getComponent(int index)
index
- component index
null
if one does not existpublic Component[] getComponents()
public int[] getIdentifiers()
public void setIdentifiers(int... indices)
indices
- public void setIdentifiers(java.util.List<java.lang.Integer> indices)
indices
- public boolean isIdentifier(int fieldIndex)
public Datatype getIdentifierType()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |