# Class default<T>`Abstract`

Base class for all backend entities.

#### Type Parameters

- T extends default<T>

#### Hierarchy (View Summary)

- default
  - default
  - default
  - default
  - default
  - default
  - default
  - default
  - default
  - default

- Defined in 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 default<T extends default<T>>(): default<T>

- #### Type Parameters

  - T extends default<T>

  #### Returns default<T>

##
Properties

### `Optional` blobId

blobId?: string

- Defined in becca/entities/abstract_becca_entity.ts:35

### `Optional` dateCreated

dateCreated?: string

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

### `Optional` dateModified

dateModified?: string

- Defined in becca/entities/abstract_becca_entity.ts:29

### `Optional` isProtected

isProtected?: boolean

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

### `Optional` isSynced

isSynced?: boolean

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

### utcDateCreated

utcDateCreated: string

- Defined in becca/entities/abstract_becca_entity.ts:31

### `Optional` utcDateModified

utcDateModified?: string

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

##
Accessors

### `Protected` becca

- get becca(): Becca

- #### Returns Becca

  - Defined in becca/entities/abstract_becca_entity.ts:48

### isDeleted

- get isDeleted(): boolean

- #### Returns boolean

  - Defined in becca/entities/abstract_becca_entity.ts:96

##
Methods

### `Protected`_getContent

- _getContent(): string | Buffer<ArrayBufferLike>

- #### Returns string | Buffer<ArrayBufferLike>

  - Defined in becca/entities/abstract_becca_entity.ts:264

### `Protected`_setContent

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

- #### Parameters

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

  #### Returns void

  - Defined in becca/entities/abstract_becca_entity.ts:141

### `Protected` beforeSaving

- beforeSaving(opts?: {}): void

- #### Parameters

  - `Optional` opts: {}

  #### Returns void

  - Defined in becca/entities/abstract_becca_entity.ts:37

### generateHash

- generateHash(isDeleted?: boolean): string

- #### Parameters

  - `Optional` isDeleted: boolean

  #### Returns string

  - Defined in becca/entities/abstract_becca_entity.ts:64

### `Abstract` getPojo

- getPojo(): {}

- #### Returns {}

  - Defined in becca/entities/abstract_becca_entity.ts:88

### `Protected` getPojoToSave

- getPojoToSave(): {}

- #### Returns {}

  - Defined in becca/entities/abstract_becca_entity.ts:79

### getUtcDateChanged

- getUtcDateChanged(): string

- #### Returns string

  - Defined in becca/entities/abstract_becca_entity.ts:44

### hasStringContent

- hasStringContent(): boolean

- #### Returns boolean

  - Defined in becca/entities/abstract_becca_entity.ts:83

### init

- init(): void

- #### Returns void

  - Defined in becca/entities/abstract_becca_entity.ts:90

### 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 becca/entities/abstract_becca_entity.ts:280

### markAsDeletedSimple

- markAsDeletedSimple(): void

- #### Returns void

  - Defined in becca/entities/abstract_becca_entity.ts:305

### `Protected` putEntityChange

- putEntityChange(isDeleted: boolean): void

- #### Parameters

  - isDeleted: boolean

  #### Returns void

  - Defined in becca/entities/abstract_becca_entity.ts:52

### save

- save(opts?: {}): this

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

  #### Parameters

  - `Optional` opts: {}

  #### Returns this

  - Defined in becca/entities/abstract_becca_entity.ts:104

### `Abstract` updateFromRow

- updateFromRow(row: unknown): void

- #### Parameters

  - row: unknown

  #### Returns void

  - Defined in becca/entities/abstract_becca_entity.ts:94