interface GormEntityApi<D>
API for instance methods defined by a GORM entity
D
- The entity typeType Params | Return Type | Name and description |
---|---|---|
|
abstract D |
attach() Attaches an instance to an existing session. |
|
abstract void |
delete() Deletes an instance from the datastore |
|
abstract void |
delete(java.util.Map params) Deletes an instance from the datastore |
|
abstract void |
discard() Discards any pending changes. |
|
abstract java.io.Serializable |
ident() Returns the objects identifier |
|
abstract D |
insert() Forces an insert of an object to the datastore |
|
abstract D |
insert(java.util.Map params) Forces an insert of an object to the datastore |
|
abstract boolean |
instanceOf(java.lang.Class cls) Proxy aware instanceOf implementation. |
|
abstract boolean |
isAttached() No concept of session-based model so defaults to true |
|
abstract boolean |
isDirty(java.lang.String fieldName) Checks whether a field is dirty |
|
abstract boolean |
isDirty() Checks whether an entity is dirty |
|
abstract D |
lock() Upgrades an existing persistence instance to a write lock |
|
abstract D |
merge() Saves an object the datastore |
|
abstract D |
merge(java.util.Map params) Saves an object the datastore |
|
abstract java.lang.Object |
mutex(groovy.lang.Closure callable) Locks the instance for updates for the scope of the passed closure |
|
abstract D |
refresh() Refreshes the state of the current instance |
|
abstract D |
save() Saves an object the datastore |
|
abstract D |
save(boolean validate) Save method that takes a boolean which indicates whether to perform validation or not |
|
abstract D |
save(java.util.Map params) Saves an object with the given parameters |
Attaches an instance to an existing session. Requries a session-based model @return
Deletes an instance from the datastore
Deletes an instance from the datastore
Discards any pending changes. Requires a session-based model.
Returns the objects identifier
Forces an insert of an object to the datastore
Forces an insert of an object to the datastore
Proxy aware instanceOf implementation.
No concept of session-based model so defaults to true
Checks whether a field is dirty
instance
- The instancefieldName
- The name of the fieldChecks whether an entity is dirty
instance
- The instanceUpgrades an existing persistence instance to a write lock
Saves an object the datastore
Saves an object the datastore
Locks the instance for updates for the scope of the passed closure
callable
- The closureRefreshes the state of the current instance
Saves an object the datastore
Save method that takes a boolean which indicates whether to perform validation or not
validate
- Whether to perform validationSaves an object with the given parameters
instance
- The instanceparams
- The parameters