@groovy.transform.CompileStatic trait RxRestEntity
Represents an entity that is mapped as a REST entity in RxGORM
Type | Name and description |
---|---|
java.util.Observable<java.lang.Boolean> |
delete(groovy.lang.Closure callable) Delete an entity using the given closure to customize the request |
java.util.Observable<java.lang.Boolean> |
delete(java.util.Map arguments, groovy.lang.Closure callable) Deletes an entity using the given closure to customize the request |
static java.util.Observable<D> |
findAll(groovy.lang.Closure callable) Finds all entities and return an observable |
static java.util.Observable<D> |
findAll(java.util.Map args, groovy.lang.Closure callable) Finds all entities and return an observable |
static java.util.Observable<D> |
fromJson(java.lang.String json) Construct and object from JSON |
static java.util.Observable<D> |
fromJson(java.io.Reader reader) Construct and object from JSON |
static java.util.Observable<D> |
get(java.io.Serializable id, groovy.lang.Closure callable) Retrieve an instance by id |
static java.util.Observable<D> |
get(java.io.Serializable id, java.util.Map arguments, groovy.lang.Closure callable) Retrieve an instance by id |
java.util.Observable<D> |
insert(groovy.lang.Closure callable) Inserts an entity using the given closure to customize the request |
java.util.Observable<D> |
insert(java.util.Map arguments, groovy.lang.Closure callable) Inserts an entity using the given closure to customize the request |
static java.util.Observable<java.util.List<D>> |
list(groovy.lang.Closure callable) List all entities and return an observable |
static java.util.Observable<java.util.List<D>> |
list(java.util.Map args, groovy.lang.Closure callable) List all entities and return an observable |
java.util.Observable<D> |
patch(groovy.lang.Closure callable = null) Save an entity using the given closure to customize the request |
java.util.Observable<D> |
patch(java.util.Map arguments, groovy.lang.Closure callable = null) Save an entity using the given closure to customize the request |
java.util.Observable<D> |
post(groovy.lang.Closure callable = null) Save an entity using the given closure to customize the request |
java.util.Observable<D> |
post(java.util.Map arguments, groovy.lang.Closure callable = null) Save an entity using the given closure to customize the request |
java.util.Observable<D> |
save(groovy.lang.Closure callable) Save an entity using the given closure to customize the request |
java.util.Observable<D> |
save(java.util.Map arguments, groovy.lang.Closure callable) Saves an entity using the given closure to customize the request |
java.lang.String |
toJson() @return Convert this object to a JSON string |
void |
toJson(java.io.Writer writer) Convert this object to JSON |
static RestDetachedCriteria<D> |
where(groovy.lang.Closure callable) @param callable Callable closure containing detached criteria definition |
static RestDetachedCriteria<D> |
whereAny(groovy.lang.Closure callable) @param callable Callable closure containing detached criteria definition |
static RestDetachedCriteria<D> |
whereLazy(groovy.lang.Closure callable) @param callable Callable closure containing detached criteria definition |
static T |
withConnection(java.lang.String connectionName, groovy.lang.Closure<T> callable) Switches to given named connection within the context of the closure. |
Delete an entity using the given closure to customize the request
callable
- The callableDeletes an entity using the given closure to customize the request
callable
- The callableFinds all entities and return an observable
Finds all entities and return an observable
Construct and object from JSON
json
- The JSON stringConstruct and object from JSON
reader
- The readerRetrieve an instance by id
id
- The id of the instanceRetrieve an instance by id
id
- The id of the instanceInserts an entity using the given closure to customize the request
callable
- The callableInserts an entity using the given closure to customize the request
callable
- The callableList all entities and return an observable
List all entities and return an observable
Save an entity using the given closure to customize the request
callable
- The callableSave an entity using the given closure to customize the request
callable
- The callableSave an entity using the given closure to customize the request
callable
- The callableSave an entity using the given closure to customize the request
callable
- The callableSave an entity using the given closure to customize the request
callable
- The callableSaves an entity using the given closure to customize the request
callable
- The callable
Convert this object to JSON
writer
- The target writer
callable
- Callable closure containing detached criteria definition
callable
- Callable closure containing detached criteria definition
callable
- Callable closure containing detached criteria definitionSwitches to given named connection within the context of the closure. The delegate of the closure is used to resolve operations against the connection.
connectionName
- The name of the connectioncallable
- The closure