Class ListAttribute<E>

Type Parameters

  • E

Hierarchy

Constructors

Properties

accessor: null | Accessor = null
declaringType: null | ManagedType<any> = null
elementType: Type<E>
isAcl: boolean = false
isId: boolean = false
isMetadata: boolean
isVersion: boolean = false
metadata: null | {
    [name: string]: string;
} = null
name: string
order: null | number = null
typeConstructor: Class<(null | E)[]>
CollectionType: typeof CollectionType = CollectionType
PersistentAttributeType: typeof PersistentAttributeType = PersistentAttributeType

Accessors

  • get collectionType(): CollectionType
  • Returns the collection attribute type

    Returns CollectionType

  • get isAssociation(): boolean
  • Returns boolean

  • get isCollection(): boolean
  • Returns boolean

  • get ref(): string
  • Get the type id for this list type

    Returns string

Methods

  • Gets this attribute value form the object as json

    Returns

    The converted json value

    Parameters

    • state: ManagedState

      The root object state

    • object: Managed

      The object which contains the value of this attribute

    • options: {
          depth?: number | boolean;
          excludeMetadata?: boolean;
          persisting: boolean;
      }

      additional options which are applied through the conversion

      • Optional depth?: number | boolean
      • Optional excludeMetadata?: boolean
      • persisting: boolean

    Returns null | JsonArray

  • Gets some metadata of this type

    Returns

    Parameters

    • key: string

    Returns null | string

  • Returns

    Parameters

    Returns null | (null | E)[]

  • Retrieves whether this type has specific metadata

    Returns

    Parameters

    • key: string

    Returns boolean

  • Returns

    Parameters

    • declaringType: ManagedType<any>

      The type that owns this attribute

    • order: number

      Position of the attribute

    Returns void

  • Retrieves a serialized string value of the given json which can be used as object keys

    Returns

    A serialized version of the json

    Parameters

    • json: Json

      The json of which the key should be retrieved

    Returns string

  • Sets this attribute value from json to the object

    Returns

    Parameters

    • state: ManagedState

      The root state

    • object: Managed

      The object which contains the attribute

    • json: JsonArray

      The json value to convert an set

    • options: {
          onlyMetadata?: boolean;
          persisting: boolean;
      }

      additional options which are applied through the conversion

      • Optional onlyMetadata?: boolean
      • persisting: boolean

    Returns void

  • Parameters

    • entity: Managed
    • value: null | (null | E)[]

    Returns void

  • Converts this attribute field to json

    Returns

    The attribute description as json

    Returns {
        type: string;
    }

    • type: string
  • Attach and returns the the given size on the collection, in a meaner that it isn't enumerable

    Returns

    The actual or new attached size whenever a new size was provided or not

    Parameters

    • collection: Map<any, any> | Set<any>

      The collection where the size is attached on

    • Optional size: number

      The size which should be attached, the previously attached size will be returned if omitted

    Returns number

  • Attach and returns the attached state of the given object or collection

    Returns

    The actual or new attached state whenever an existing state was found

    Type Parameters

    • T

    Parameters

    • obj: any[] | Map<any, any> | Set<any> | Managed

      The object or collection on which the state is attached

    • state: T

      The new state which should be attached to the object

    • Optional overwriteExistingValue: boolean

      If true, overwrites any existing attached state with the given new state, if false any previously attached state will kept and will be returned instead

    Returns T

  • Retrieves the attached state of the given object or collection

    Returns

    The actual attached state or undefined if no previous state was attached

    Type Parameters

    • T

    Parameters

    • obj: any[] | Map<any, any> | Set<any> | Managed

      The object or collection on which the state is attached

    Returns undefined | T

Generated using TypeDoc