An Device factory for user objects. The Device factory can be called to create new instances of devices or can be used to register, push to and check registration status of devices.
A File factory for file objects. The file factory can be called to create new instances for files. The created instances implements the File interface
Constructor for a new GeoPoint
Constructor for a new List collection
Constructor for a new Map collection
An Role factory for role objects. The Role factory can be called to create new instances of roles, later on users can be attached to roles to manage the access permissions through this role The created instances implements the model.Role interface
Constructor for a new Set collection
An User factory for user objects. The User factory can be called to create new instances of users or can be used to register/login/logout users. The created instances implements the model.User interface
The bloom filter which contains staleness information of cached objects
Bloom filter refresh Promise
Bloom filter refresh interval in seconds.
Set of object ids that were updated but are not yet included in the bloom filter. This set essentially implements revalidation by side effect which does not work in Chrome.
Set of object ids that were revalidated after the Bloom filter was loaded.
the shared connection data if this EntityManager shares the credentials with the EntityManagerFactory
The connector used for requests
The current registered device object
All managed and cached entity instances
Log messages can created by calling log directly as function, with a specific log level or with the helper methods, which a members of the log method.
Logs will be filtered by the client logger and the before they persisted. The default log level is 'info' therefore all log messages below the given message aren't persisted.
Examples:
// default log level ist info db.log('test message %s', 'my string'); // info: test message my string // pass a explicit log level as the first argument, one of ('trace', 'debug', 'info', 'warn', 'error') db.log('warn', 'test message %d', 123); // warn: test message 123 // debug log level will not be persisted by default, since the default logging level is info db.log('debug', 'test message %j', {number: 123}, {}); // debug: test message {"number":123} // data = {} // One additional json object can be provided, which will be persisted together with the log entry db.log('info', 'test message %s, %s', 'first', 'second', {number: 123}); // info: test message first, second // data = {number: 123} //use the log level helper db.log.info('test message', 'first', 'second', {number: 123}); // info: test message first second // data = {number: 123} //change the default log level to trace, i.e. all log levels will be persisted, note that the log level can be //additionally configured in the baqend db.log.level = 'trace'; //trace will be persisted now db.log.trace('test message', 'first', 'second', {number: 123}); // info: test message first second // data = {number: 123}
The current logged in user object
Returns the tokenStorage which will be used to authorize all requests.
Whether caching is disabled
Returns true if the device token is already registered, otherwise false.
Determine whether the entity manager is open. true until the entity manager has been closed
Indicates if there is currently no exclusive operation executed
true
If no exclusive lock is hold
The authentication token if the user is logged in currently
The authentication token if the user is logged in currently
Save the object state without locking
pre-safe callback
Save and lock the object state
Adds the given object id to the cacheBlackList if needed.
The id to add.
Adds the given object id to the cacheWhiteList if needed.
The id to add.
Attach the instance to this database context, if it is not already attached
The entity to attach
Clear the persistence context, causing all managed entities to become detached
Changes made to entities that have not been flushed to the database will not be persisted.
Close an application-managed entity manager
After the close method has been invoked, all methods on the EntityManager instance and any Query and TypedQuery objects obtained from it will throw the IllegalStateError except for transaction, and isOpen (which will return false). If this method is called when the entity manager is associated with an active transaction, the persistence context remains managed until the transaction completes.
Connects this entityManager, used for synchronous and asynchronous initialization
Indicates if the shared credentials should be used
Check if the instance is a managed entity instance belonging to the current persistence context
entity instance
boolean indicating if entity is in persistence context
Check if an object with the id from the given entity is already attached
entity instance
boolean indicating if entity with same id is attached
Creates an instance of {@link Builder
The query results are instances of the resultClass argument.
the type of the query result
A query builder to create one ore more queries for the specified class
Creates a absolute url for the given relative one
the relative url
indicates if authorization credentials should be generated and be attached to the url
a absolute url which is optionally signed with a resource token which authenticates the currently logged in user
Delete the entity instance.
The delete options
Remove the given entity from the persistence context, causing a managed entity to become detached
Unflushed changes made to the entity if any (including removal of the entity), will not be synchronized to the database. Entities which previously referenced the detached entity will continue to reference it.
The entity instance to detach.
Checks the freshness of the bloom filter and does a reload if necessary
To check the bloom filter
To attach the headers
To force the reload headers
Synchronize the persistence context to the underlying database.
Get an instance whose state may be lazily fetched
If the requested instance does not exist in the database, the EntityNotFoundError is thrown when the instance state is first accessed. The application should not expect that the instance state will be available upon detachment, unless it was accessed by the application while the entity manager was open.
Whether caching is enabled
Search for an entity of the specified oid
If the entity instance is contained in the persistence context, it is returned from there.
entity class
Object ID
the loaded entity or null
Checks for a given id, if revalidation is required, the resource is stale or caching was disabled
The object id to check
Indicates if the resource must be revalidated
pre-safe callback
Make an instance managed and persistent.
entity instance
Waits on the previously requested operation and calls the doneCallback if the operation is fulfilled
The callback which will be invoked when the previously operations on this object is completed.
When the lock can't be released caused by a none recoverable error
A promise which completes successfully, when the previously requested operation completes
Refresh the state of the instance from the database, overwriting changes made to the entity, if any.
entity instance
The refresh options
Resolve the depth by loading the referenced objects of the given entity
entity instance
The save options
Set true to save the entity without locking
The given entity will be checked by the validation code of the entity type.
result
Try to aquire an exclusive lock and executes the given callback.
The exclusive operation to execute
A promise
Generated using TypeDoc
The factory which of this entityManager instance