Skip to main content

Pentaho+ documentation has moved!

The new product documentation portal is here. Check it out now at docs.hitachivantara.com

 

Hitachi Vantara Lumada and Pentaho Documentation

DiscreteDomain

pentaho.type.mixins. DiscreteDomain

A mixin type that adds to properties the ability to specify a discrete set of values that are valid as property values.

When the property's value type is an enumeration, and the property also specifies a domain, the combined domain is the intersection of both.

A domain can be specified by using the domain attribute. The effective, resulting domain is obtained by calling the domainOn method.

AMD Module

require(["pentaho/type/mixins/DiscreteDomain"], function(DiscreteDomain) { /* code goes here */ });

Extends

Constructor

Name Description
new DiscreteDomain()
Abstract

This class was not designed to be constructed directly.

Members

Name Description
$type : pentaho.type.Type

Gets the type of this instance.

Methods

Name Description
toJSON() : JsonValue

Creates a top-level JSON specification that describes this instance.

toSpec(keyArgs) : *

Creates a top-level specification that describes this instance.

toSpecInContext(keyArgs) : *
Abstract

Creates a specification that describes this instance.

Constructor Details

new DiscreteDomain()
Abstract

This class was not designed to be constructed directly.

Source: javascript/web/pentaho/type/mixins/DiscreteDomain.js, line 39

Members Details

$type: pentaho.type.Type

Gets the type of this instance.

Source: javascript/web/pentaho/type/Instance.js, line 116

Overrides: pentaho.type.Instance#$type

See also: pentaho.type.Instance.type , pentaho.type.Type#instance

Methods Details

toJSON() : JsonValue

Creates a top-level JSON specification that describes this instance.

Attributes which do not have a JSON-compatible specification are omitted. Specifically, for inline types, attributes with a function value are not supported.

This method simply calls pentaho.type.Instance#toSpec with argument keyArgs.isJson as true and exists for seamless integration with JavaScript's JSON.stringify method.

Source: javascript/web/pentaho/type/Instance.js, line 198

Inherited From: pentaho.type.Instance#toJSON

Returns:
Name Description
JsonValue | null

A JSON-compatible specification.

See also: pentaho.type.Instance#toSpec

toSpec(keyArgs) : *

Creates a top-level specification that describes this instance.

If an ambient specification context currently exists, it is used to manage the serialization process. Otherwise, one is created and set as current. Then, the actual work is delegated to pentaho.type.Instance#toSpecInContext.

Source: javascript/web/pentaho/type/Instance.js, line 160

Inherited From: pentaho.type.Instance#toSpec

Parameters:
Name Default Value Summary
keyArgs : object
Optional

The keyword arguments' object. Passed to every instance and type serialized within this scope.

Please see the documentation of subclasses for information on additional, supported keyword arguments.

Parameters:
Name Default Value Summary
isJson : boolean
Optional
false

Generates a JSON-compatible specification. Attributes that do not have a JSON-compatible specification are omitted.

declaredType : pentaho.type.Type
Optional

The base type of this value's storage location. If the value does not have this exact type, its inline type property must be included in the specification. Otherwise, it can be omitted. When unspecified, the inline type property is only included if forceType is true.

forceType : boolean
Optional
false

In the specification, forces inclusion of the inline type property: _.

Returns:
Name Description
*

A specification of this instance.

toSpecInContext(keyArgs) : *
Abstract

Creates a specification that describes this instance.

Source: javascript/web/pentaho/type/Instance.js, line 178

Inherited From: pentaho.type.Instance#toSpecInContext

Parameters:
Name Default Value Summary
keyArgs : object
Optional

The keyword arguments' object. Passed to every instance and type serialized within this scope.

Please see the documentation of subclasses for information on additional, supported keyword arguments.

Returns:
Name Description
*

A specification of this instance.

See also: pentaho.type.Instance#toSpec