ModelSchema
Example
// to fetch a ModelSchema from a app var entity = insight .getView() .getApp() .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. |
getAppId | The app id of this model schema. |
getEntity | Gets an entity by name. |
getProjectId | Use ModelSchema#getAppId instead. |
Methods
- 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:
paramsName Type Description entityNames typeArray.<string>the list of entity names expected in the index set detailsReturns:returns tableType Description typeArray.<object>The array of entities that are indexed by the required index sets, empty if none are found Example
examples
Back to Topvar entityNameList = modelSchema.findArraysIndexedBy(['INDEX_SET1', 'INDEX_SET2']);
- getAllEntities ( ) → {Object.<string, ModelEntity>}
-
All the entities in this schema.
detailsReturns:returns tableType Description typeObject.<string, ModelEntity>an array of all the entities in this schema Example
examples
Back to Topvar allEntities = modelSchema.getAllEntities();
- getAppId ( ) → {string}
-
The app id of this model schema.
detailsReturns:returns tableType Description typestringThe app id of this model schema Example
examples
Back to TopmodelSchema.getAppId();
- getEntity ( entityName ) → {ModelEntity}
-
Gets an entity by name.
Parameters:
paramsName Type Description entityName typestringthe name of the entity detailsReturns:returns tableType Description typeModelEntitythe entity or undefined if no entity exists with that name Example
examples
Back to Topvar entity = modelSchema.getEntity('ENTITY_NAME');
- getProjectId ( )
-
Use ModelSchema#getAppId instead.
details- Deprecated since Js Api 4.5
© 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.