Home Manual Reference Source
import BidEntity from 'pvbid-sdk/src/domain/BidEntity.js'
public class | source

BidEntity

Extends:

eventemitter3~EventEmitterAdvanceEventEmitter → BidEntity

A base class for all other bid entities to extend.

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public get

Determine if the entity is in an assembly

public get

Gets the id of the bid entity.

public get

Gets the bid entity title.

public set

Sets the bid entity title.

public get

Gets the bid entity type.

Method Summary

Public Methods
public abstract

assess(dependency: BidEntity)

Assesses bid entity.

public

Gets an array of depndants that rely on the bid entity.

public

Gets all the dependencies that the bid entity relies on.

public

dirty()

Flags the bid entity as dirty and to be saved.

public

Exports the internal data for the bid entity.

public

Determines if bid entity relies on a null or undefined dependency value

public

async initSaveChangeLog(originalValue: *, newValue: *, valueType: *, entityProperty: *, metaData: *): *

public

Determines of bid entity is dirty.

public

Marks the bid entity as clean.

Inherited Summary

From class AdvanceEventEmitter
public

Maximum number of events fired for the requester before events stop.

public

on(eventName: string, requesterId: string, callback: function)

public

onDelay(eventName: string, ms: number, requesterId: string, callback: function)

public

removeListenerByRequester(eventName: string, requesterId: string)

Removes event listeners by event and requesterId.

Public Constructors

public constructor() source

Creates an instance of AdvanceEventEmitter.

Override:

AdvanceEventEmitter#constructor

Public Members

public get hasAssembly: boolean source

Determine if the entity is in an assembly

public get id: number | string source

Gets the id of the bid entity. NOTE: Excluding Projects, all bid entity id's will soon be in UUID format

public get title: string source

Gets the bid entity title.

public set title: string source

Sets the bid entity title. Flags bid entity as dirty.

public get type: string source

Gets the bid entity type.

Public Methods

public abstract assess(dependency: BidEntity) source

Assesses bid entity.

Params:

NameTypeAttributeDescription
dependency BidEntity
  • optional
  • nullable: true

The calling dependency.

Emit:

assessing

Fires as assessment begins.

assessed

Fires when bid entity assessement is completed

updated

Fires when the bid entity has changed.

public dependants(): BidEntity[] source

Gets an array of depndants that rely on the bid entity.

Return:

BidEntity[]

Returns an array of bid entities.

public dependencies(): BidEntity[] source

Gets all the dependencies that the bid entity relies on.

Return:

BidEntity[]

Returns an array of bid entities.

public dirty() source

Flags the bid entity as dirty and to be saved.

public exportData(): object source

Exports the internal data for the bid entity.

Return:

object

public hasNullDependency(field: string): boolean source

Determines if bid entity relies on a null or undefined dependency value

Params:

NameTypeAttributeDescription
field string
  • optional

Field property if other than 'value'

Return:

boolean

public async initSaveChangeLog(originalValue: *, newValue: *, valueType: *, entityProperty: *, metaData: *): * source

Params:

NameTypeAttributeDescription
originalValue *
newValue *
valueType *
entityProperty *
metaData *

Return:

*

public isDirty(): boolean source

Determines of bid entity is dirty.

Return:

boolean

public pristine() source

Marks the bid entity as clean.