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

Class: entity/js/api/Entity

Represents an entity object.

To get an instance of an entity with a given ID, see the example below or consult methods in Entities.

Version:
  • 15.4.5
Source:
See:
Example

Gets an instance of an entity with a given ID.

var entity = Abcs.Entities().findById('my.custom.bop.Employee');

Members

Methods

getDescription() → {String}

stable API

Gets human readable description of this entity. e.g. 'List of our external customers'

Version:
  • 15.4.5
Source:
Returns:
Type
String

getId() → {String}

stable API

Returns the entity's unique identifier.

Version:
  • 15.4.5
Source:
Returns:

entity identifier

Type
String

getPluralName() → {String}

stable API

Gets human readable plural name of this entity, e.g. 'Customers'

Version:
  • 15.4.5
Source:
Returns:
Type
String

getProperties() → {Array.<entity/js/api/Property>}

stable API

Returns list of assotiated properties the entity owns.

Version:
  • 15.4.5
Source:
Returns:

list of assotiated properties

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

Prints all properties of an entity stored in variable entity.

console.log('Entity ' + entity.getId() + ' has the following properties:');
entity.getProperties().forEach(function (property) {
    console.log(property.getId() + ' with name ' + property.getSingularName());
};

getProperty(id) → {entity/js/api/Property}

stable API

Return entity's property identified by the given ID - ignoring the case.

Parameters:
Name Type Description
id String

the ID of the property

Version:
  • 15.4.5
Source:
Returns:
Type
entity/js/api/Property

getSingularName() → {String}

stable API

Gets human readable singular name of this entity, e.g. 'Customer'

Version:
  • 15.4.5
Source:
Returns:
Type
String