@groovy.transform.Trait @groovy.transform.CompileStatic trait LogicalDelete<D> extends org.grails.datastore.gorm.GormEntity<D>
| Type | Name and description |
|---|---|
boolean |
deleted |
| Type Params | Return Type | Name and description |
|---|---|---|
|
static grails.gorm.DetachedCriteria<D> |
createCriteria()Creates a DetachedCriteria instance, excluding soft-deleted records by default. |
|
void |
delete()Marks the entity as logically deleted. |
|
void |
delete(java.util.Map params)Marks the entity as logically deleted or physically deletes it based on the parameters. |
|
static java.util.List<D> |
findAll(java.util.Map params)Finds all entities, excluding soft-deleted records by default. |
|
static D |
get(java.io.Serializable id)Retrieves an entity by its identifier, excluding soft-deleted records by default. |
|
static java.util.List<D> |
list(java.util.Map params)Lists all entities, excluding soft-deleted records by default. |
|
static D |
load(java.io.Serializable id)Loads an entity by its identifier, excluding soft-deleted records by default. |
|
static D |
proxy(java.io.Serializable id)Proxies an entity by its identifier, excluding soft-deleted records by default. |
|
static D |
read(java.io.Serializable id)Reads an entity by its identifier, excluding soft-deleted records by default. |
|
void |
undelete()Undeletes the entity by marking it as not deleted. |
|
void |
undelete(java.util.Map params)Undeletes the entity by marking it as not deleted with additional parameters. |
|
static java.lang.Object |
withDeleted(groovy.lang.Closure closure)Executes the given closure with soft-deleted records included in queries. |
Creates a DetachedCriteria instance, excluding soft-deleted records by default.
Marks the entity as logically deleted.
Marks the entity as logically deleted or physically deletes it based on the parameters.
params - The parameters to control saving and deletion behavior.
Use 'hard: true' to physically delete the entity.Finds all entities, excluding soft-deleted records by default.
params - The query parametersRetrieves an entity by its identifier, excluding soft-deleted records by default.
id - The identifier of the entityLists all entities, excluding soft-deleted records by default.
params - The query parametersLoads an entity by its identifier, excluding soft-deleted records by default.
id - The identifier of the entityProxies an entity by its identifier, excluding soft-deleted records by default.
id - The identifier of the entityReads an entity by its identifier, excluding soft-deleted records by default.
id - The identifier of the entityUndeletes the entity by marking it as not deleted.
Undeletes the entity by marking it as not deleted with additional parameters.
params - The parameters for saving the entity.Executes the given closure with soft-deleted records included in queries.
closure - The closure to execute