| 
									
										
										
										
											2018-12-22 22:16:32 +01:00
										 |  |  | class Attribute { | 
					
						
							|  |  |  |     constructor(treeCache, row) { | 
					
						
							|  |  |  |         this.treeCache = treeCache; | 
					
						
							|  |  |  |         /** @param {string} attributeId */ | 
					
						
							|  |  |  |         this.attributeId = row.attributeId; | 
					
						
							|  |  |  |         /** @param {string} noteId */ | 
					
						
							|  |  |  |         this.noteId = row.noteId; | 
					
						
							|  |  |  |         /** @param {string} type */ | 
					
						
							|  |  |  |         this.type = row.type; | 
					
						
							|  |  |  |         /** @param {string} name */ | 
					
						
							|  |  |  |         this.name = row.name; | 
					
						
							|  |  |  |         /** @param {string} value */ | 
					
						
							|  |  |  |         this.value = row.value; | 
					
						
							|  |  |  |         /** @param {int} position */ | 
					
						
							|  |  |  |         this.position = row.position; | 
					
						
							|  |  |  |         /** @param {boolean} isInheritable */ | 
					
						
							|  |  |  |         this.isInheritable = row.isInheritable; | 
					
						
							|  |  |  |         /** @param {boolean} isDeleted */ | 
					
						
							|  |  |  |         this.isDeleted = row.isDeleted; | 
					
						
							|  |  |  |         /** @param {string} dateCreated */ | 
					
						
							|  |  |  |         this.dateCreated = row.dateCreated; | 
					
						
							|  |  |  |         /** @param {string} dateModified */ | 
					
						
							|  |  |  |         this.dateModified = row.dateModified; | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     /** @returns {NoteShort} */ | 
					
						
							|  |  |  |     async getNote() { | 
					
						
							|  |  |  |         return await this.treeCache.getNote(this.noteId); | 
					
						
							|  |  |  |     } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     get toString() { | 
					
						
							|  |  |  |         return `Attribute(attributeId=${this.attributeId}, type=${this.type}, name=${this.name})`; | 
					
						
							|  |  |  |     } | 
					
						
							| 
									
										
										
										
											2018-12-28 22:05:04 +01:00
										 |  |  | } | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | export default Attribute; |