Class: Constant

olympe.dc.valuedefs. Constant

A ValueDef that references a constant value.


new Constant(value)

Creates a constant ValueDef.

Parameters:
Name Type Description
value olympe.df.Proxy.<T> | T

The constant value.

Implements:

Methods


getConstant()

Gets the constant value.

Returns:

The value.

Type
olympe.df.Proxy.<T> | T

getInternalPath()

Returns the path in the graph followed by this valuedef to be evaluated.

Implements:
Returns:
Type
Array.<!olympe.dc.query.Relation>

getName()

Gets the name of this ValueDef.

Implements:
Returns:

The name of this ValueDef.

Type
string

getValue(manager, tag)

Gets the value defined by this ValueDef.

Parameters:
Name Type Description
manager olympe.dc.Manager

The DC manager.

tag string

The tag of the instance holding the value, if any.

Implements:
Returns:

The value referenced by this ValueDef.

Type
olympe.df.Proxy.<T> | T

serialize(parameters)

Serializes this ValueDef.

Parameters:
Name Type Description
parameters olympe.dc.query.Parameters

Serialization parameters.

Implements:
Throws:

If the value def is not serializable.

Type
Error
Returns:

The string containing the serialized representation of the ValueDef.

Type
string

toString()

Gets a string representation of the value def

Implements:
Returns:

The string representation of this ValueDef.

Type
string