Class: PluralAttribute

(abstract) metamodel.PluralAttribute(name, elementType)

(abstract) new PluralAttribute(name, elementType)

Parameters:
Name Type Description
name string
elementType metamodel.Type
Source:

Extends

Members

(static) CollectionType :number

Type:
  • number
Properties:
Name Type Description
COLLECTION number
LIST number
MAP number
SET number
Source:

accessor :binding.Accessor

Type:
Inherited From:
Source:

(readonly) collectionType :PluralAttribute.CollectionType

Returns the collection attribute type

Type:
  • PluralAttribute.CollectionType
Source:

declaringType :metamodel.ManagedType

Type:
Inherited From:
Source:

elementType :metamodel.Type

Type:
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:

typeConstructor :Class.<*>

Type:
  • Class.<*>
Source:

Methods

(static) attachSize(collection, size) → {void}

Attach the the given size on the collection, in a meaner that it isn't enumerable

Parameters:
Name Type Description
collection Set.<*> | Map.<*, *>

The collection where the size should be attached on

size Array.<*> | Object

The size which should be attached

Source:
Returns:
Type
void

(static) attachState(collection, state) → {void}

Attach the the given state on the collection, in a meaner that it isn't enumerable

Parameters:
Name Type Description
collection Array.<*> | Set.<*> | Map.<*, *>

The collection where the state should be attached on

state Array.<*> | Object

The state which should be attached

Source:
Returns:
Type
void

(static) getAttachedSize(collection) → {number}

Returns the previously attached size of the given collection

Parameters:
Name Type Description
collection Set.<*> | Map.<*, *>

The collection on which the size was attached

Source:
Returns:

The actual attached state or -1 if no size was previously attached

Type
number

(static) getAttachedState(collection) → {Array.<*>|Object|null}

Returns the previously attached state of the given collection

Parameters:
Name Type Description
collection Array.<*> | Set.<*> | Map.<*, *>

The collection on which the state was attached

Source:
Returns:

The actual attached state or null if no state was previously attached

Type
Array.<*> | Object | null

(abstract) 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

Inherited From:
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

(abstract) 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

Inherited From:
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

Inherited From:
Source:
Returns:

The attribute description as json

Type
json