JavaScript Application Development API for Oracle Visual Builder Cloud Service - Classic Applications

Class: module:api/js/Entities

Entity API shorthand module.

Provides various entry-point methods into the Entity API, mainly for aquiring entity instances.

Version:
  • 15.4.5
Source:

Object Literals

module:api/js/Entities.SystemInfo
module:api/js/Entities.UserEntity

Methods

(static) findById(entityId) → {entity/js/api/Entity}

stable API

Finds entity by a given ID - ignoring the case

Parameters:
Name Type Description
entityId String

ID of the entity to get

Version:
  • 15.4.5
Source:
Returns:

entity

Type
entity/js/api/Entity
Example

Gets an instance of an entity with a given ID.

var Entities = Abcs.Entities();

var entity = Entities.findById('EntityID');

(static) getAll() → {Array.<entity/js/api/Entity>}

stable API

Gets all entities.

Version:
  • 15.4.5
Source:
Returns:

array of entities

Type
Array.<entity/js/api/Entity>
Example

Gets instances of all entities known to ABCS and prints all their properties.

var Entities = Abcs.Entities();

var entityInstances = Entities.getAll();
// do something with the entities
entityInstances.forEach(function (entity) {
    // do something with the entity, such as:
    console.log('Entity ' + entity.getId() + ' has the following properties:');
    entity.getProperties().forEach(function (property) {
        console.log(property.getId());
    };
};