# Class default

Attribute is an abstract concept which has two real uses - label (key - value pair) and relation (representing named relationship between source and target note)

#### Hierarchy (View Summary)

- default < default >
  - default

- Defined in becca/entities/battribute.ts:18

#####
Index

### Constructors

constructor

### Properties

attributeId
blobId?
dateCreated?
dateModified?
isInheritable
isProtected?
isSynced?
name
noteId
position
type
utcDateCreated
utcDateModified?
value

### Accessors

becca
isAffectingSubtree
isDeleted
note
targetNote
targetNoteId
entityName
hashedProperties
primaryKeyName

### Methods

_getContent
_setContent
beforeSaving
createClone
generateHash
getDefinedName
getDefinition
getNote
getPojo
getPojoToSave
getTargetNote
getUtcDateChanged
hasStringContent
init
isAutoLink
isDefinition
markAsDeleted
markAsDeletedSimple
putEntityChange
save
update
updateFromRow
validate

##
Constructors

### constructor

- new default(row?: AttributeRow ): default

- #### Parameters

  - `Optional` row: AttributeRow

  #### Returns default

  Overrides default.constructor

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

##
Properties

### attributeId

attributeId: string

- Defined in becca/entities/battribute.ts:23

### `Optional` blobId

blobId?: string

Inherited from default.blobId

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

### `Optional` dateCreated

dateCreated?: string

Inherited from default.dateCreated

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

### `Optional` dateModified

dateModified?: string

Inherited from default.dateModified

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

### isInheritable

isInheritable: boolean

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

### `Optional` isProtected

isProtected?: boolean

Inherited from default.isProtected

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

### `Optional` isSynced

isSynced?: boolean

Inherited from default.isSynced

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

### name

name: string

- Defined in becca/entities/battribute.ts:26

### noteId

noteId: string

- Defined in becca/entities/battribute.ts:24

### position

position: number

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

### type

type: AttributeType

- Defined in becca/entities/battribute.ts:25

### utcDateCreated

utcDateCreated: string

Inherited from default.utcDateCreated

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

### `Optional` utcDateModified

utcDateModified?: string

Inherited from default.utcDateModified

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

### value

value: string

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

##
Accessors

### `Protected` becca

- get becca(): Becca

- #### Returns Becca

  Inherited from AbstractBeccaEntity.becca

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

### isAffectingSubtree

- get isAffectingSubtree(): boolean

- #### Returns boolean

  - Defined in becca/entities/battribute.ts:105

### isDeleted

- get isDeleted(): boolean

- #### Returns boolean

  Overrides AbstractBeccaEntity.isDeleted

  - Defined in becca/entities/battribute.ts:168

### note

- get note(): default

- #### Returns default

  - Defined in becca/entities/battribute.ts:118

### targetNote

- get targetNote(): undefined | default

- #### Returns undefined | default

  - Defined in becca/entities/battribute.ts:122

### targetNoteId

- get targetNoteId(): undefined | string

- #### Returns undefined | string

  - Defined in becca/entities/battribute.ts:110

### `Static` entityName

- get entityName(): string

- #### Returns string

  - Defined in becca/entities/battribute.ts:19

### `Static` hashedProperties

- get hashedProperties(): string[]

- #### Returns string[]

  - Defined in becca/entities/battribute.ts:21

### `Static` primaryKeyName

- get primaryKeyName(): string

- #### Returns string

  - Defined in becca/entities/battribute.ts:20

##
Methods

### `Protected`_getContent

- _getContent(): string | Buffer<ArrayBufferLike>

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

  Inherited from default._getContent

  - 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

  Inherited from default._setContent

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

### beforeSaving

- beforeSaving(opts?: SavingOpts): void

- #### Parameters

  - opts: SavingOpts = {}

  #### Returns void

  Overrides default.beforeSaving

  - Defined in becca/entities/battribute.ts:172

### createClone

- createClone(
  type: AttributeType ,
  name: string,
  value: string,
  isInheritable?: boolean,
  ): default

- #### Parameters

  - type: AttributeType
  - name: string
  - value: string
  - `Optional` isInheritable: boolean

  #### Returns default

  - Defined in becca/entities/battribute.ts:216

### generateHash

- generateHash(isDeleted?: boolean): string

- #### Parameters

  - `Optional` isDeleted: boolean

  #### Returns string

  Inherited from default.generateHash

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

### getDefinedName

- getDefinedName(): string

- #### Returns string

  - Defined in becca/entities/battribute.ts:158

### getDefinition

- getDefinition(): DefinitionObject

- #### Returns DefinitionObject

  - Defined in becca/entities/battribute.ts:154

### getNote

- getNote(): default

- #### Returns default

  - Defined in becca/entities/battribute.ts:128

### getPojo

- getPojo(): {
  attributeId: string;
  isDeleted: boolean;
  isInheritable: boolean;
  name: string;
  noteId: string;
  position: number;
  type: AttributeType ;
  utcDateModified: undefined
  | string;
  value: string;
  }

- #### Returns {
  attributeId: string;
  isDeleted: boolean;
  isInheritable: boolean;
  name: string;
  noteId: string;
  position: number;
  type: AttributeType ;
  utcDateModified: undefined | string;
  value: string;
  }

  Overrides default.getPojo

  - Defined in becca/entities/battribute.ts:202

### `Protected` getPojoToSave

- getPojoToSave(): {}

- #### Returns {}

  Inherited from default.getPojoToSave

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

### getTargetNote

- getTargetNote(): null | default

- #### Returns null | default

  - Defined in becca/entities/battribute.ts:138

### getUtcDateChanged

- getUtcDateChanged(): string

- #### Returns string

  Inherited from default.getUtcDateChanged

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

### hasStringContent

- hasStringContent(): boolean

- #### Returns boolean

  Inherited from default.hasStringContent

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

### init

- init(): void

- #### Returns void

  Overrides default.init

  - Defined in becca/entities/battribute.ts:68

### isAutoLink

- isAutoLink(): boolean

- #### Returns boolean

  - Defined in becca/entities/battribute.ts:114

### isDefinition

- isDefinition(): boolean

- #### Returns boolean

  - Defined in becca/entities/battribute.ts:150

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

  Inherited from default.markAsDeleted

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

### markAsDeletedSimple

- markAsDeletedSimple(): void

- #### Returns void

  Inherited from default.markAsDeletedSimple

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

### `Protected` putEntityChange

- putEntityChange(isDeleted: boolean): void

- #### Parameters

  - isDeleted: boolean

  #### Returns void

  Inherited from default.putEntityChange

  - 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

  Inherited from default.save

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

### update

- update(__namedParameters: any): default

- #### Parameters

  - __namedParameters: any

  #### Returns default

  - Defined in becca/entities/battribute.ts:55

### updateFromRow

- updateFromRow(row: AttributeRow ): void

- #### Parameters

  - row: AttributeRow

  #### Returns void

  Overrides default.updateFromRow

  - Defined in becca/entities/battribute.ts:42

### validate

- validate(): void

- #### Returns void

  - Defined in becca/entities/battribute.ts:91