use of com.tvd12.ezyfox.entity.EzyObject in project dahlia by youngmonkeys.
the class SettingObjectToField method toSetting.
public final FieldSetting toSetting(SettingObjectToFields mappers, EzyObject object) {
FieldSetting setting = newSetting(mappers, object);
setting.setNullable(object.get(SettingFields.NULLABLE));
return setting;
}
use of com.tvd12.ezyfox.entity.EzyObject in project dahlia by youngmonkeys.
the class SettingObjectToLongField method newSetting.
@Override
protected FieldLongSetting newSetting(SettingObjectToFields mappers, EzyObject object) {
FieldLongSetting setting = new FieldLongSetting();
setting.setDefaultValue(object.get(SettingFields.DEFAULT, long.class));
return setting;
}
use of com.tvd12.ezyfox.entity.EzyObject in project dahlia by youngmonkeys.
the class SettingObjectToShortField method newSetting.
@Override
protected FieldShortSetting newSetting(SettingObjectToFields mappers, EzyObject object) {
FieldShortSetting setting = new FieldShortSetting();
setting.setDefaultValue(object.get(SettingFields.DEFAULT, short.class));
return setting;
}
use of com.tvd12.ezyfox.entity.EzyObject in project dahlia by youngmonkeys.
the class SettingRuntimeSerializer method serialize.
@Override
public byte[] serialize(RuntimeSetting setting) {
EzyObject object = settingToObject(setting);
byte[] bytes = objectSerializer.serialize(object);
return bytes;
}
use of com.tvd12.ezyfox.entity.EzyObject in project dahlia by youngmonkeys.
the class FindOptions method toObject.
public EzyObject toObject() {
EzyObject obj = EzyEntityFactory.newObject();
obj.put(OptionFields.SKIP, skip);
obj.put(OptionFields.LIMIT, limit);
EzyObject sort = EzyEntityFactory.newObject();
for (Entry<String, Boolean> field : sortBy.entrySet()) sort.put(field.getKey(), field.getValue());
obj.put(OptionFields.SORT, sort);
return obj;
}
Aggregations