# Class AbstractBeccaEntity<T>`Abstract`

Base class for all backend entities.

#### Type Parameters

- T extends AbstractBeccaEntity < T >

#### Hierarchy (View Summary)

- AbstractBeccaEntity
  - BAttachment
  - BAttribute
  - BBranch
  - BEtapiToken
  - BNote
  - BOption
  - BRecentNote
  - BRevision

- Defined in src/becca/entities/abstract_becca_entity.ts:25

##### Index

### Constructors

constructor

### Properties

blobId?
dateCreated?
dateModified?
isProtected?
isSynced?
utcDateCreated
utcDateModified?

### Accessors

becca
isDeleted

### Methods

_getContent
_setContent
beforeSaving
generateHash
getPojo
getPojoToSave
getUtcDateChanged
hasStringContent
init
markAsDeleted
markAsDeletedSimple
putEntityChange
save
updateFromRow

## Constructors

### constructor

- new AbstractBeccaEntity< T extends AbstractBeccaEntity < T >>(): AbstractBeccaEntity <
  T ,
  >

  #### Type Parameters

  - T extends AbstractBeccaEntity < T >

  #### Returns AbstractBeccaEntity < T >

## Properties

### `Optional` blobId

blobId?: string

- Defined in src/becca/entities/abstract_becca_entity.ts:34

### `Optional` dateCreated

dateCreated?: string

- Defined in src/becca/entities/abstract_becca_entity.ts:27

### `Optional` dateModified

dateModified?: string

- Defined in src/becca/entities/abstract_becca_entity.ts:28

### `Optional` isProtected

isProtected?: boolean

- Defined in src/becca/entities/abstract_becca_entity.ts:32

### `Optional` isSynced

isSynced?: boolean

- Defined in src/becca/entities/abstract_becca_entity.ts:33

### utcDateCreated

utcDateCreated: string

- Defined in src/becca/entities/abstract_becca_entity.ts:30

### `Optional` utcDateModified

utcDateModified?: string

- Defined in src/becca/entities/abstract_becca_entity.ts:26

## Accessors

### `Protected` becca

- get becca(): default

  #### Returns default

  - Defined in src/becca/entities/abstract_becca_entity.ts:47

### isDeleted

- get isDeleted(): boolean

  #### Returns boolean

  - Defined in src/becca/entities/abstract_becca_entity.ts:95

## Methods

### `Protected`_getContent

- _getContent(): string | Buffer< ArrayBufferLike >

  #### Returns string | Buffer< ArrayBufferLike >

  - Defined in src/becca/entities/abstract_becca_entity.ts:261

### `Protected`_setContent

- _setContent(content: string | Buffer< ArrayBufferLike >, opts?: ContentOpts ): void

  #### Parameters

  - content: string | Buffer< ArrayBufferLike >
  - opts: ContentOpts = {}

  #### Returns void

  - Defined in src/becca/entities/abstract_becca_entity.ts:140

### `Protected` beforeSaving

- beforeSaving(opts?: {}): void

  #### Parameters

  - `Optional` opts: {}

  #### Returns void

  - Defined in src/becca/entities/abstract_becca_entity.ts:36

### generateHash

- generateHash(isDeleted?: boolean): string

  #### Parameters

  - `Optional` isDeleted: boolean

  #### Returns string

  - Defined in src/becca/entities/abstract_becca_entity.ts:63

### `Abstract` getPojo

- getPojo(): {}

  #### Returns {}

  - Defined in src/becca/entities/abstract_becca_entity.ts:87

### `Protected` getPojoToSave

- getPojoToSave(): {}

  #### Returns {}

  - Defined in src/becca/entities/abstract_becca_entity.ts:78

### getUtcDateChanged

- getUtcDateChanged(): string

  #### Returns string

  - Defined in src/becca/entities/abstract_becca_entity.ts:43

### hasStringContent

- hasStringContent(): boolean

  #### Returns boolean

  - Defined in src/becca/entities/abstract_becca_entity.ts:82

### init

- init(): void

  #### Returns void

  - Defined in src/becca/entities/abstract_becca_entity.ts:89

### markAsDeleted

- markAsDeleted(deleteId?: null | string): void

  Mark the entity as (soft) deleted. It will be completely erased later.

  This is a low-level method, for notes and branches use `note.deleteNote()` and 'branch.deleteBranch()` instead.

  #### Parameters

  - deleteId: null | string = null

  #### Returns void

  - Defined in src/becca/entities/abstract_becca_entity.ts:277

### markAsDeletedSimple

- markAsDeletedSimple(): void

  #### Returns void

  - Defined in src/becca/entities/abstract_becca_entity.ts:303

### `Protected` putEntityChange

- putEntityChange(isDeleted: boolean): void

  #### Parameters

  - isDeleted: boolean

  #### Returns void

  - Defined in src/becca/entities/abstract_becca_entity.ts:51

### save

- save(opts?: {}): this

  Saves entity - executes SQL, but doesn't commit the transaction on its own

  #### Parameters

  - `Optional` opts: {}

  #### Returns this

  - Defined in src/becca/entities/abstract_becca_entity.ts:103

### `Abstract` updateFromRow

- updateFromRow(row: unknown): void

  #### Parameters

  - row: unknown

  #### Returns void

  - Defined in src/becca/entities/abstract_becca_entity.ts:93