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