updated API docs

This commit is contained in:
zadam
2020-09-30 22:48:30 +02:00
parent dd020baee5
commit 4f92fbf8a5
33 changed files with 2391 additions and 2833 deletions

View File

@@ -29,6 +29,7 @@
<pre class="prettyprint source linenums"><code>"use strict";
const utils = require('../services/utils');
let repo = null;
class Entity {
/**
@@ -53,14 +54,7 @@ class Entity {
const origHash = this.hash;
this.hash = this.generateHash();
if (this.forcedChange) {
this.isChanged = true;
delete this.forcedChange;
}
else {
this.isChanged = origHash !== this.hash;
}
this.isChanged = origHash !== this.hash;
}
generateIdIfNecessary() {
@@ -79,14 +73,23 @@ class Entity {
return utils.hash(contentToHash).substr(0, 10);
}
async save() {
await require('../services/repository').updateEntity(this);
get repository() {
if (!repo) {
repo = require('../services/repository');
}
return repo;
}
save() {
this.repository.updateEntity(this);
return this;
}
}
module.exports = Entity;</code></pre>
module.exports = Entity;
</code></pre>
</article>
</section>
@@ -102,7 +105,7 @@ module.exports = Entity;</code></pre>
<br class="clear">
<footer>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.4</a>
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a>
</footer>
<script> prettyPrint(); </script>