Panache Companion Base
Defines methods to be used via the companion objects of entities.
Parameters
the entity type
Functions
Counts the number of this type of entity in the database.
Counts the number of this type of entity matching the given query, with named parameters.
Counts the number of this type of entity matching the given query, with optional indexed parameters.
Delete all entities of this type matching the given query, with named parameters.
Delete all entities of this type matching the given query, with optional indexed parameters.
Delete an entity of this type by ID.
Find entities using a query, with named parameters.
Find entities using a query, with optional indexed parameters.
Find entities using a query and the given sort options, with named parameters.
Find entities using a query and the given sort options with optional indexed parameters.
Find all entities of this type.
Find all entities of this type, in the given order.
Returns the EntityManager for the Entity for extra operations (eg. CriteriaQueries)
Find entities matching a query, with named parameters. This method is a shortcut for find(query, params).list().
Find entities matching a query, with optional indexed parameters. This method is a shortcut for find(query, params).list().
Find entities matching a query and the given sort options, with named parameters. This method is a shortcut for find(query, sort, params).list().
Find entities matching a query and the given sort options, with optional indexed parameters. This method is a shortcut for find(query, sort, params).list().
Find entities matching a query, with named parameters. This method is a shortcut for find(query, params).stream(). It requires a transaction to work. Without a transaction, the underlying cursor can be closed before the end of the stream.
Find entities matching a query, with optional indexed parameters. This method is a shortcut for find(query, params).stream(). It requires a transaction to work. Without a transaction, the underlying cursor can be closed before the end of the stream.
Find entities matching a query and the given sort options, with named parameters. This method is a shortcut for find(query, sort, params).stream(). It requires a transaction to work. Without a transaction, the underlying cursor can be closed before the end of the stream.
Find entities matching a query and the given sort options, with optional indexed parameters. This method is a shortcut for find(query, sort, params).stream(). It requires a transaction to work. Without a transaction, the underlying cursor can be closed before the end of the stream.
Find all entities of this type. This method is a shortcut for findAll().stream(). It requires a transaction to work. Without a transaction, the underlying cursor can be closed before the end of the stream.
Find all entities of this type, in the given order. This method is a shortcut for findAll(sort).stream(). It requires a transaction to work. Without a transaction, the underlying cursor can be closed before the end of the stream.
Update all entities of this type matching the given query, with named parameters.
Update all entities of this type matching the given query, with optional indexed parameters.