use of com.backendless.exceptions.BackendlessFault in project Android-SDK by Backendless.
the class MapDrivenDataStore method findById.
@Override
public void findById(String id, List<String> relations, Integer relationsDepth, AsyncCallback<Map> responder) {
try {
if (id == null)
throw new IllegalArgumentException(ExceptionMessage.NULL_ID);
Object[] args = new Object[] { tableName, id, relations, relationsDepth };
Invoker.invokeAsync(Persistence.PERSISTENCE_MANAGER_SERVER_ALIAS, "findById", args, responder);
} catch (Throwable e) {
if (responder != null)
responder.handleFault(new BackendlessFault(e));
}
}
use of com.backendless.exceptions.BackendlessFault in project Android-SDK by Backendless.
the class MapDrivenDataStore method findFirst.
@Override
public void findFirst(AsyncCallback<Map> responder) {
try {
Object[] args = new Object[] { tableName };
Invoker.invokeAsync(Persistence.PERSISTENCE_MANAGER_SERVER_ALIAS, "first", args, responder);
} catch (Throwable e) {
if (responder != null)
responder.handleFault(new BackendlessFault(e));
}
}
use of com.backendless.exceptions.BackendlessFault in project Android-SDK by Backendless.
the class MapDrivenDataStore method findById.
@Override
public void findById(Map entity, DataQueryBuilder queryBuilder, AsyncCallback<Map> responder) {
try {
Object[] args = new Object[] { tableName, entity, queryBuilder.build() };
Invoker.invokeAsync(Persistence.PERSISTENCE_MANAGER_SERVER_ALIAS, "findById", args, responder);
} catch (Throwable e) {
if (responder != null)
responder.handleFault(new BackendlessFault(e));
}
}
use of com.backendless.exceptions.BackendlessFault in project Android-SDK by Backendless.
the class MapDrivenDataStore method remove.
@Override
public void remove(Map entity, final AsyncCallback<Long> responder) {
try {
if (entity == null)
throw new IllegalArgumentException(ExceptionMessage.NULL_ENTITY);
AsyncCallback<Object> removalCallback = new AsyncCallback<Object>() {
@Override
public void handleResponse(Object response) {
responder.handleResponse(((Number) response).longValue());
}
@Override
public void handleFault(BackendlessFault fault) {
if (responder != null)
responder.handleFault(fault);
}
};
Object[] args = new Object[] { tableName, entity };
Invoker.invokeAsync(Persistence.PERSISTENCE_MANAGER_SERVER_ALIAS, "remove", args, removalCallback);
} catch (Throwable e) {
if (responder != null)
responder.handleFault(new BackendlessFault(e));
}
}
use of com.backendless.exceptions.BackendlessFault in project Android-SDK by Backendless.
the class MapDrivenDataStore method findFirst.
private void findFirst(List<String> relations, Integer relationsDepth, AsyncCallback<Map> responder) {
try {
Object[] args = new Object[] { tableName, relations, relationsDepth };
Invoker.invokeAsync(Persistence.PERSISTENCE_MANAGER_SERVER_ALIAS, "first", args, responder);
} catch (Throwable e) {
if (responder != null)
responder.handleFault(new BackendlessFault(e));
}
}
Aggregations