Skip to main content
Version: 2.5


An EnumValue is a single value part of an Enum. It has a string name, a rank (its position in the Enum list).

The values for EnumValue are always stringified.





  • Returns EnumValue



Relation between a container (a CloudObject) that has children (other CloudObjects)

For example, from a folder to the contained elements or from a function to the elements needed for that function to run.


Model CloudObjects can inherit relations and properties from another CloudObject model to mimic their behaviour.

Relation from a model to the CloudObject model it extends. A --extendRel-> B A inherits B’s properties and relations.


Inverse relation of extendRel


Inverse relation of modelRel between a model and its instances Equivalent to modelRel.getInverse()


Relation between a CloudObjectand its model instance --modelRel-> model


nameProp: Property<string>

Name property for an EnumValue


Relation between a model and the properties it defines.


rankProp: Property<number>

Rank property for an EnumValue


valueProp: Property<string>

Value property for an EnumValue



  • equals(object: any): boolean
  • Compare this CloudObject and the given one and return whether they are identical or not.


    • object: any

      the object to compare

    Returns boolean

    true if the specified object is the same CloudObject


  • Start a query from this instance and follow the relation given as argument. The query starts from this single instance, and follows a relation to an arbitrary number of destination instances. See Query.follow(relation)

    The following are equivalent:


    Type parameters


    • relation: Relation<EnumValue, D>

      the relation to follow from the starting instance (this)

    Returns Query<D, never>

    query starting from this and following the relation relation as first step of the query


  • Start a querySingle from this instance that follows 0..1 relations

    The query starts from this instance, and follow the relation to a single destination instance. It is equivalent to QuerySingle.from(this).follow(relation).

    Type parameters


    Returns QuerySingle<D>

    a query following 0-1 relations


  • Get the current value of the specified property for this CloudObject instance

    Type parameters

    • T


    Returns T

    property value


  • Every CloudObject has a model which defines relations and properties its instances may have.

    Returns CloudObject

    the model of this CloudObject instance as a CloudObject instance


  • getModelTag(): string
  • Every CloudObject has a model which defines relations and properties its instances may have.

    Returns string

    the tag of the model of this CloudObject instance


  • getSource(): string
  • Return the source id that owns this cloud object.

    Returns string


  • getTag(): string
  • Every CloudObject has a unique tag.

    Returns string

    tag of the CloudObject


  • isPersisted(): boolean
  • Return the persistence state of this instance.

    CloudObjects can either be volatile, and only live in the local cache. In this case, the CloudObject instance is not persisted. If a CloudObjectis persisted, it is stored in an external data store. This means that the instance can be accessible through other Olympe VMs in the same environment.

    Returns boolean

    a boolean indicating if this object is persisted in a non-volatile way.


  • name(): string
  • Every CloudObject can define a value for its nameProperty. This method returns the current value of that property for this instance.

    Returns string

    the value of the name property of this


  • Get an observable to the current value of the specified property for this CloudObject instance.

    The observable gets the new value each time the property gets updated in the datacloud. The observable gets completed automatically once the specified context is cleared. If waitForValue is set to FALSE (TRUE by default), the first value received by the observable is null if there is no value at call time.

    Type parameters

    • T


    • context: Context

      context to which the Observable is attached

    • property: InstanceOrTag | Property<T>

      property or property’s tag to observe

    • optionalwaitForValue: boolean

      whether the observable wait for a first value to get a value. (Default = true)

    Returns Observable<T>

    Observable of property values


  • Get an observable to pair [property, value] for this CloudObject instance.

    The observable gets the new value each time any property gets updated in the datacloud. The observable gets completed automatically once the specified context is cleared.

    Type parameters

    • T


    • context: Context

      Context to which the Observable will be attached

    Returns Observable<[Property<T>, T]>

    Observable of property values


  • Create and return a query starting from this instance

    Returns Query<EnumValue, never>

    a query starting at this CloudObject instance


  • toObject(namesAsKey?: boolean, inheritedProperties?: boolean): Object
  • Create a Javascript object from this CloudObject current state.


    • optionalnamesAsKey: boolean

      If true, use the property name instead of the property tag as keys of the generated object.

    • optionalinheritedProperties: boolean

      If false, do not including inherited property. By default, it includes them.

    Returns Object


  • asInstance<T>(this: Class<T>): T
  • Get this CloudObject class as a CloudObject instance.

    Type parameters

    • T


    Returns T

    the current data type class as a CloudObject instance.


  • Add a EnumValue to a specified Enum


    • transaction: Transaction

      transaction in which to add the EnumValue to the Enum

    • enumModel: InstanceOrTag

      EnumModel containing the specified EnumValue

    • value: string

      value of the EnumValue

    • optionalname: string

      name of the EnumValue

    • optionalrank: number

      position of the EnumValue in the Enum

    Returns string


  • Create an instance of the specified data type (or model) in the local datacloud (not persisted) with the specified property values.

    If the model is not specified, it uses this DataType.

    Type parameters

    • T


    • this: Class<T>
    • properties: Map<InstanceOrTag, any>

      mappings of (propertyTag -&gt; propertyValue)

    • optionalmodel: InstanceOrTag

      tag of the model of the CloudObject you want to create.

    • optionalsource: string

    Returns T

    newly created CloudObject


  • Checks whether a CloudObject exists or not.



    Returns boolean

    true if tag is valid and references a CloudObject.


  • Get the CloudObject whose tag is specified.

    This only works if the CloudObject is already present in the local datacloud cache. (NB: you can use a Query to retrieve a distant CloudObject)


    Type parameters


    Returns T

    CloudObject specified by the tag


  • The attributes of a CloudObject are called properties. Properties can be of different types, e.g. Property<string>, Property<number>, Property<Date>.

    If a Person CloudObject has an age property, all the instances of Person can access the age property using the same tag, the tag of the age property. This method returns all properties defined by the Data Type associated to this class.

    Returns Property<any>[]

    All properties defined for a data type


  • Return all the relations whose origin OR destination is the CloudObject associated to this class.

    Type parameters


    Returns (Relation<O, D> | Relation<D, O>)[]

    All relations defined on the current data type. It can be the destination or the origin of the relations.


  • Return a query starting from all instances of this Data Type.

    Type parameters


    Returns Query<T, never>

    A query starting from the instances of the specified model.