# Class: BAttribute

## BAttribute()

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

## Constructor

#### new BAttribute()

Source:
  - becca/entities/battribute.js, line 16

### Extends

- AbstractBeccaEntity

### Members

#### attributeId :string

##### Type:

- string

Source:
  - becca/entities/battribute.js, line 47

#### (protected) becca

Overrides:
  - AbstractBeccaEntity#becca
Source:
  - becca/entities/abstract_becca_entity.js, line 55

#### isInheritable :boolean

##### Type:

- boolean

Source:
  - becca/entities/battribute.js, line 59

#### name :string

##### Type:

- string

Source:
  - becca/entities/battribute.js, line 53

#### noteId :string

##### Type:

- string

Source:
  - becca/entities/battribute.js, line 49

#### position :int

##### Type:

- int

Source:
  - becca/entities/battribute.js, line 55

#### type :string

##### Type:

- string

Source:
  - becca/entities/battribute.js, line 51

#### utcDateModified :string

##### Type:

- string

Source:
  - becca/entities/battribute.js, line 61

#### value :string

##### Type:

- string

Source:
  - becca/entities/battribute.js, line 57

### Methods

#### (protected) _getContent() → {string|Buffer}

Overrides:
  - AbstractBeccaEntity#_getContent
Source:
  - becca/entities/abstract_becca_entity.js, line 246

##### Returns:

Type
  string | Buffer

#### (protected) _setContent()

Overrides:
  - AbstractBeccaEntity#_setContent
Source:
  - becca/entities/abstract_becca_entity.js, line 124

#### (protected) beforeSaving()

Overrides:
  - AbstractBeccaEntity#beforeSaving
Source:
  - becca/entities/abstract_becca_entity.js, line 20

#### (protected) generateHash()

Overrides:
  - AbstractBeccaEntity#generateHash
Source:
  - becca/entities/abstract_becca_entity.js, line 32

#### (protected) generateIdIfNecessary()

Overrides:
  - AbstractBeccaEntity#generateIdIfNecessary
Source:
  - becca/entities/abstract_becca_entity.js, line 25

#### getNote() → {BNote|null}

Source:
  - becca/entities/battribute.js, line 129

##### Returns:

Type
  BNote | null

#### (protected) getPojoToSave()

Overrides:
  - AbstractBeccaEntity#getPojoToSave
Source:
  - becca/entities/abstract_becca_entity.js, line 76

#### getTargetNote() → {BNote|null}

Source:
  - becca/entities/battribute.js, line 142

##### Returns:

Type
  BNote | null

#### (protected) getUtcDateChanged()

Overrides:
  - AbstractBeccaEntity#getUtcDateChanged
Source:
  - becca/entities/abstract_becca_entity.js, line 47

#### isDefinition() → {boolean}

Source:
  - becca/entities/battribute.js, line 157

##### Returns:

Type
  boolean

#### markAsDeleted(deleteIdopt)

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:

Name | Type | Attributes | Default | Description
--- | --- | --- | --- | ---
`deleteId` |  | <optional> | null |

Overrides:
  - AbstractBeccaEntity#markAsDeleted
Source:
  - becca/entities/abstract_becca_entity.js, line 263

#### (protected) putEntityChange()

Overrides:
  - AbstractBeccaEntity#putEntityChange
Source:
  - becca/entities/abstract_becca_entity.js, line 64

#### save() → {this}

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

Overrides:
  - AbstractBeccaEntity#save
Source:
  - becca/entities/abstract_becca_entity.js, line 85

##### Returns:

Type
  this