public class RecordField extends Field implements RecordProperty, LangElement
Constructor and Description |
---|
RecordField(java.lang.String name,
Type type)
Constructs a public record field with no metadata, no XML mapping, read/write
and not used for equals.
|
RecordField(java.lang.String name,
Type type,
java.util.Map<java.lang.String,java.lang.String> metadata) |
RecordField(java.lang.String name,
Type type,
java.util.Map<java.lang.String,java.lang.String> metadata,
RecordFieldXmlMapping xmlMapping,
boolean readonly,
boolean usedForEquals) |
RecordField(java.lang.String name,
Type type,
Visibility visibility)
Constructs a record field with a given visibility, no metadata, no XML mapping, read/write
and not used for equals.
|
RecordField(java.lang.String name,
Type type,
Visibility visibility,
java.util.Map<java.lang.String,java.lang.String> metadata,
RecordFieldXmlMapping xmlMapping,
boolean readonly,
boolean usedForEquals)
Constructs a record field.
|
Modifier and Type | Method and Description |
---|---|
java.lang.Object |
getData()
Returns the data.
|
java.lang.String |
getEntityFieldName()
Returns the entity field name.
|
<T extends RecordPropertyExtension> |
getExtension(java.lang.Class<T> cls)
Returns extension of given type.
|
RecordField |
getField()
Returns the field.
|
JavaMapping |
getJavaMapping()
Returns java mapping.
|
java.util.Map<java.lang.String,java.lang.String> |
getMetadata()
Returns the metadata of the field
|
java.lang.String |
getMetadata(java.lang.String key)
Returns the metadata stored under a given key.
|
RecordType |
getRecordType()
Returns the record type.
|
Visibility |
getVisibility()
Returns the property visibility.
|
RecordFieldXmlMapping |
getXmlMapping() |
boolean |
hasMetadata(java.lang.String key)
Returns
true if the metadata contain the given key. |
boolean |
isAssociation()
Returns true if this is association.
|
boolean |
isField()
Returns true if this is field.
|
boolean |
isUsedForEquals()
Returns
true if the field is used for equals. |
void |
setData(java.lang.Object data)
Sets the data.
|
void |
setExtension(RecordFieldExtension extension)
Sets the record field extension.
|
getName, getType, isReadonly, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getName, getType, isReadonly
getName
public RecordField(java.lang.String name, Type type, java.util.Map<java.lang.String,java.lang.String> metadata, RecordFieldXmlMapping xmlMapping, boolean readonly, boolean usedForEquals)
name
- type
- metadata
- xmlMapping
- readonly
- usedForEquals
- public RecordField(java.lang.String name, Type type, Visibility visibility, java.util.Map<java.lang.String,java.lang.String> metadata, RecordFieldXmlMapping xmlMapping, boolean readonly, boolean usedForEquals)
name
- type
- visibility
- metadata
- xmlMapping
- readonly
- usedForEquals
- public RecordField(java.lang.String name, Type type, Visibility visibility)
name
- type
- visibility
- public RecordField(java.lang.String name, Type type)
name
- type
- public RecordField(java.lang.String name, Type type, java.util.Map<java.lang.String,java.lang.String> metadata)
public Visibility getVisibility()
RecordProperty
getVisibility
in interface RecordProperty
public <T extends RecordPropertyExtension> T getExtension(java.lang.Class<T> cls)
RecordProperty
getExtension
in interface RecordProperty
public void setExtension(RecordFieldExtension extension)
extension
- public RecordType getRecordType()
RecordProperty
getRecordType
in interface RecordProperty
public RecordField getField()
RecordProperty
getField
in interface RecordProperty
public java.lang.String getEntityFieldName()
RecordProperty
getEntityFieldName
in interface RecordProperty
public boolean isAssociation()
RecordProperty
isAssociation
in interface RecordProperty
public boolean isField()
RecordProperty
isField
in interface RecordProperty
public java.util.Map<java.lang.String,java.lang.String> getMetadata()
getMetadata
in interface LangElement
getMetadata
in interface RecordProperty
public java.lang.String getMetadata(java.lang.String key)
LangElement
getMetadata
in interface LangElement
public boolean hasMetadata(java.lang.String key)
LangElement
true
if the metadata contain the given key.hasMetadata
in interface LangElement
true
if the metadata contain the given keypublic JavaMapping getJavaMapping()
RecordProperty
getJavaMapping
in interface RecordProperty
public RecordFieldXmlMapping getXmlMapping()
public void setData(java.lang.Object data)
data
- public java.lang.Object getData()
getData
in interface LangElement
public boolean isUsedForEquals()
true
if the field is used for equals.true
if the field is used for equalsCopyright © 2007-2020 Whitestein Technologies. All Rights Reserved.