new SingularAttribute(name, type, isMetadataopt)
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
name |
string | ||
type |
metamodel.Type | ||
isMetadata |
boolean |
<optional> |
|
Extends
Members
accessor :binding.Accessor
Type:
- Inherited From:
- Source:
declaringType :metamodel.ManagedType
Type:
- Inherited From:
- Source:
isAcl :boolean
Type:
- boolean
- Inherited From:
- Source:
(readonly) isAssociation :boolean
Type:
- boolean
- Inherited From:
- Source:
(readonly) isCollection :boolean
Type:
- boolean
- Inherited From:
- Source:
isId :boolean
Type:
- boolean
- Inherited From:
- Source:
isMetadata :boolean
Type:
- boolean
- Inherited From:
- Source:
isVersion :boolean
Type:
- boolean
- Inherited From:
- Source:
metadata :Object.<string, string>|null
Type:
- Object.<string, string> | null
- Inherited From:
- Source:
name :string
Type:
- string
- Inherited From:
- Source:
order :number
Type:
- number
- Inherited From:
- Source:
(readonly) persistentAttributeType :Attribute.PersistentAttributeType
Returns the persistent attribute type
Type:
- Attribute.PersistentAttributeType
- Overrides:
- Source:
type :metamodel.Type
Type:
typeConstructor :Class.<*>
The constructor of the element type of this attribute
Type:
- Class.<*>
Methods
getJsonValue(state, object, options) → {*}
Gets this attribute value form the object as json
Parameters:
Name | Type | Description |
---|---|---|
state |
util.Metadata | The root object state |
object |
* | The object which contains the value of this attribute |
options |
Object | additional options which are applied through the conversion |
- Overrides:
- Source:
Returns:
The converted json value
- Type
- *
getMetadata(key) → {null|string}
Gets some metadata of this type
Parameters:
Name | Type | Description |
---|---|---|
key |
string |
- Inherited From:
- Source:
Returns:
- Type
- null | string
getValue(entity) → {*}
Parameters:
Name | Type | Description |
---|---|---|
entity |
Object |
- Inherited From:
- Source:
Returns:
- Type
- *
hasMetadata(key) → {boolean}
Retrieves whether this type has specific metadata
Parameters:
Name | Type | Description |
---|---|---|
key |
string |
- Inherited From:
- Source:
Returns:
- Type
- boolean
init(declaringType, order) → {void}
Parameters:
Name | Type | Description |
---|---|---|
declaringType |
metamodel.ManagedType | The type that owns this attribute |
order |
number | Position of the attribute |
- Inherited From:
- Source:
Returns:
- Type
- void
setJsonValue(state, object, jsonValue, options) → {void}
Sets this attribute value from json to the object
Parameters:
Name | Type | Description |
---|---|---|
state |
util.Metadata | The root state |
object |
* | The object which contains the attribute |
jsonValue |
* | The json value to convert an set |
options |
Object | additional options which are applied through the conversion |
- Overrides:
- Source:
Returns:
- Type
- void
setValue(entity, value) → {void}
Parameters:
Name | Type | Description |
---|---|---|
entity |
Object | |
value |
* |
- Inherited From:
- Source:
Returns:
- Type
- void
toJSON() → {json}
Converts this attribute field to json
- Overrides:
- Source:
Returns:
The attribute description as json
- Type
- json