    import BidEntity from 'pvbid-sdk/src/domain/BidEntity.js'

public class | source

# BidEntity

#### Extends:

eventemitter3~EventEmitter → AdvanceEventEmitter → BidEntity

#### Direct Subclass:

Assembly, Bid, BidVariable, Component, ComponentGroup, Datatable, Field, FieldGroup, LineItem, Metric, Project

A base class for all other bid entities to extend.

## Constructor Summary

Public Constructor
public | constructor() |

## Member Summary

Public Members
public get | id: number Gets the id of the bid entity. |
public get | title: string Gets the bid entity title. |
public set | title: string Sets the bid entity title. |
public get | type: string Gets the bid entity type. |

## Method Summary

Public Methods
public abstract | assess(dependency: BidEntity) Assesses bid entity. |
public | dependants(): BidEntity[] Gets an array of depndants that rely on the bid entity. |
public | dependencies(): BidEntity[] Gets all the dependencies that the bid entity relies on. |
public | dirty() Flags the bid entity as dirty and to be saved. |
public | exportData(): object Exports the internal data for the bid entity. |
public | hasNullDependency(field: string): boolean Determines if bid entity relies on a null or undefined dependency value |
public | isDirty(): boolean Determines of bid entity is dirty. |
public | pristine() Marks the bid entity as clean. |

## Inherited Summary

From class AdvanceEventEmitter
public | maxEvents: number 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 id: number source

Gets the id of the bid entity. NOTE: Esculding 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:

Name | Type | Attribute | Description

dependency

BidEntity

- 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:

Name | Type | Attribute | Description

field

string

- optional

Field property if other than 'value'

#### Return:

boolean

### public isDirty(): boolean source

Determines of bid entity is dirty.

#### Return:

boolean

### public pristine() source

Marks the bid entity as clean.