Initializing help system before first use

ModelSchema

Describes the schema of an Insight model.
Example
// to fetch a ModelSchema from a project
var entity = insight
     .getView()
     .getProject()
     .getModelSchema();

// to fetch a ModelSchema from a scenario instance
var entity = scenario
     .getModelSchema();

Method summary

name description
findArraysIndexedBy Finds the names of all array entities that are indexed by the given list of entity names.
getAllEntities All the entities in this schema.
getEntity Gets an entity by name.
getProjectId The project id of this model schema.

Methods

method
findArraysIndexedBy ( entityNames ) → {Array.<object>}

Finds all array entities that are indexed by the given list of entity names.

The match is exact and the order of the index names is significant.

Parameters:
params
Name Type Description
entityNames
type
Array.<string>
the list of entity names expected in the index set
details
Returns:
returns table
Type Description
type
Array.<object>
The array of entities that are indexed by the required index sets, empty if none are found
Example
examples
var entityNameList = modelSchema.findArraysIndexedBy(['INDEX_SET1', 'INDEX_SET2']);
Back to Top
method
getAllEntities ( ) → {Object.<string, ModelEntity>}

All the entities in this schema.

details
Returns:
returns table
Type Description
type
Object.<string, ModelEntity>
an array of all the entities in this schema
Example
examples
var allEntities = modelSchema.getAllEntities();
Back to Top
method
getEntity ( entityName ) → {ModelEntity}

Gets an entity by name.

Parameters:
params
Name Type Description
entityName
type
string
the name of the entity
details
Returns:
returns table
Type Description
type
ModelEntity
the entity or undefined if no entity exists with that name
Example
examples
var entity = modelSchema.getEntity('ENTITY_NAME');
Back to Top
method
getProjectId ( ) → {string}

The project id of this model schema.

details
Returns:
returns table
Type Description
type
string
The project id of this model schema
Example
examples
modelSchema.getProjectId();
Back to Top

© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.