public class Repository<T extends VirtualObject>
extends java.lang.Object
User.findById().
| Constructor and Description |
|---|
Repository(java.lang.String className)
Creates a new Repository, associating it with the named remote class.
|
Repository(java.lang.String className,
java.lang.Class<T> objectClass)
Creates a new Repository, associating it with the named remote class.
|
| Modifier and Type | Method and Description |
|---|---|
T |
createObject(java.util.Map<java.lang.String,? extends java.lang.Object> creationParameters)
Creates a new
VirtualObject as a virtual instance of this remote
class. |
Adapter |
getAdapter()
Gets the
Adapter that should be used for invoking methods, both
for static methods on this prototype and all methods on all instances of
this prototype. |
java.lang.String |
getClassName()
Gets the name given to this prototype on the server.
|
void |
invokeStaticMethod(java.lang.String method,
java.util.Map<java.lang.String,? extends java.lang.Object> parameters,
Adapter.BinaryCallback callback)
Invokes a remotable method exposed statically within this class on the
server,
parses the response as binary data.
|
void |
invokeStaticMethod(java.lang.String method,
java.util.Map<java.lang.String,? extends java.lang.Object> parameters,
Adapter.Callback callback)
Invokes a remotable method exposed statically within this class on the
server.
|
void |
setAdapter(Adapter adapter)
Sets the
Adapter that should be used for invoking methods, both
for static methods on this prototype and all methods on all instances of
this prototype. |
public Repository(java.lang.String className)
className - The remote class name.public Repository(java.lang.String className,
java.lang.Class<T> objectClass)
className - The remote class name.public java.lang.String getClassName()
public Adapter getAdapter()
Adapter that should be used for invoking methods, both
for static methods on this prototype and all methods on all instances of
this prototype.public void setAdapter(Adapter adapter)
Adapter that should be used for invoking methods, both
for static methods on this prototype and all methods on all instances of
this prototype.adapter - The adapter.public T createObject(java.util.Map<java.lang.String,? extends java.lang.Object> creationParameters)
VirtualObject as a virtual instance of this remote
class.creationParameters - The creation parameters of the new object.VirtualObject based on this prototype.public void invokeStaticMethod(java.lang.String method,
java.util.Map<java.lang.String,? extends java.lang.Object> parameters,
Adapter.Callback callback)
method - The method to invoke (without the class name), e.g.
"doSomething".parameters - The parameters to invoke with.callback - The callback to invoke when the execution finishes.Adapter.invokeStaticMethod(String, Map,
com.strongloop.android.remoting.adapters.Adapter.Callback)public void invokeStaticMethod(java.lang.String method,
java.util.Map<java.lang.String,? extends java.lang.Object> parameters,
Adapter.BinaryCallback callback)
method - The method to invoke (without the class name), e.g.
"doSomething".parameters - The parameters to invoke with.callback - The callback to invoke when the execution finishes.Adapter.invokeStaticMethod(String, Map,
com.strongloop.android.remoting.adapters.Adapter.Callback)