use of com.tvd12.ezyfoxserver.client.entity.EzyArray in project ezyfox-server-android-client by youngmonkeys.
the class EzySocketClient method processReceivedMessage.
protected void processReceivedMessage(EzyArray message) {
int cmdId = message.get(0, int.class);
EzyArray data = message.get(1, EzyArray.class, null);
EzyCommand cmd = EzyCommand.valueOf(cmdId);
printReceivedData(cmd, data);
if (cmd == EzyCommand.DISCONNECT) {
int reasonId = data.get(0, int.class);
disconnectReason = reasonId;
socketStatuses.push(EzySocketStatus.DISCONNECTING);
} else {
dataHandlers.handle(cmd, data);
}
}
use of com.tvd12.ezyfoxserver.client.entity.EzyArray in project ezyfox-server-android-client by youngmonkeys.
the class EzyObjectToMap method toMap.
@SuppressWarnings({ "rawtypes", "unchecked" })
public Map toMap(EzyObject object) {
Map answer = new HashMap<>();
for (Object key : object.keySet()) {
Object value = object.get(key);
Object skey = key;
EzyArrayToList arrayToList = EzyArrayToList.getInstance();
if (key instanceof EzyArray)
skey = arrayToList.toList((EzyArray) key);
else if (key instanceof EzyObject)
skey = toMap((EzyObject) key);
Object svalue = value;
if (value != null) {
if (value instanceof EzyArray)
svalue = arrayToList.toList((EzyArray) value);
if (value instanceof EzyObject)
svalue = toMap((EzyObject) value);
}
answer.put(skey, svalue);
}
return answer;
}
use of com.tvd12.ezyfoxserver.client.entity.EzyArray in project ezyfox-server-android-client by youngmonkeys.
the class EzyEntityArrays method newArray.
public static EzyArray newArray(Object... args) {
EzyArray array = EzyEntityFactory.newArray();
array.add(args);
return array;
}
use of com.tvd12.ezyfoxserver.client.entity.EzyArray in project ezyfox-server-android-client by youngmonkeys.
the class EzyEntityArrays method newArray.
public static EzyArray newArray(List list) {
EzyArray array = EzyEntityFactory.newArray();
array.add(list);
return array;
}
use of com.tvd12.ezyfoxserver.client.entity.EzyArray in project dahlia by youngmonkeys.
the class LocalCollection method find.
@Override
public EzyArray find(EzyObject query, FindOptions options) {
CommandFind command = new CommandFind(store.getId(), query, options.toObject());
EzyArray result = commandExecutor.execute(command);
return result;
}
Aggregations