use of com.tvd12.ezyfox.entity.EzyObject in project dahlia by youngmonkeys.
the class SettingObjectToIntegerField method newSetting.
@Override
protected FieldIntegerSetting newSetting(SettingObjectToFields mappers, EzyObject object) {
FieldIntegerSetting setting = new FieldIntegerSetting();
setting.setDefaultValue(object.get(SettingFields.DEFAULT, int.class));
setting.setMaxValue(object.get(SettingFields.MAX_VALUE, int.class));
return setting;
}
use of com.tvd12.ezyfox.entity.EzyObject in project dahlia by youngmonkeys.
the class SettingObjectToObjectField method newSetting.
@Override
protected FieldObjectSetting newSetting(SettingObjectToFields mappers, EzyObject object) {
FieldObjectSetting setting = new FieldObjectSetting();
EzyArray fieldSettings = object.get(SettingFields.FIELDS, EzyArray.class);
Map<String, FieldSetting> fields = mappers.toFieldSettings(fieldSettings);
setting.setFields(fields);
return setting;
}
use of com.tvd12.ezyfox.entity.EzyObject in project dahlia by youngmonkeys.
the class SettingObjectToTextField method newSetting.
@Override
protected FieldTextSetting newSetting(SettingObjectToFields mappers, EzyObject object) {
FieldTextSetting setting = new FieldTextSetting();
setting.setMaxSize(object.get(SettingFields.MAX_SIZE, int.class));
setting.setDefaultValue(object.get(SettingFields.DEFAULT, String.class));
return setting;
}
use of com.tvd12.ezyfox.entity.EzyObject in project dahlia by youngmonkeys.
the class SettingFieldToObjects method toObject.
public EzyObject toObject(FieldSetting setting) {
SettingFieldToObject mapper = mappers.get(setting.getType());
EzyObject answer = mapper.toObject(this, setting);
return answer;
}
use of com.tvd12.ezyfox.entity.EzyObject in project dahlia by youngmonkeys.
the class SettingFieldToObjects method toObject.
public EzyObject toObject(String name, FieldSetting setting) {
EzyObject answer = toObject(setting);
answer.put(SettingFields.NAME, name);
return answer;
}
Aggregations