Constructor
new BBranch()
Extends
Members
(protected) becca
- Overrides:
branchId :string
Type:
- string
childNote
isExpanded :boolean
Type:
- boolean
isWeak
Branch is weak when its existence should not hinder deletion of its note.
As a result, note with only weak branches should be immediately deleted.
An example is shared or bookmarked clones - they are created automatically and exist for technical reasons,
not as user-intended actions. From user perspective, they don't count as real clones and for the purpose
of deletion should not act as a clone.
noteId :string
Type:
- string
notePosition :int
Type:
- int
parentNote
parentNoteId :string
Type:
- string
prefix :string
Type:
- string
utcDateModified :string
Type:
- string
Methods
(protected) addEntityChange()
- Overrides:
(protected) beforeSaving()
- Overrides:
deleteBranch(deleteIdopt, taskContextopt) → {boolean}
Delete a branch. If this is a last note's branch, delete the note as well.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
deleteId |
string |
<optional> |
optional delete identified |
taskContext |
TaskContext |
<optional> |
Returns:
- true if note has been deleted, false otherwise
- Type
- boolean
(protected) generateHash()
- Overrides:
(protected) generateIdIfNecessary()
- Overrides:
(protected) getPojoToSave()
- Overrides:
(protected) getUtcDateChanged()
- Overrides:
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:
save() → {this}
Saves entity - executes SQL, but doesn't commit the transaction on its own
- Overrides:
Returns:
- Type
- this