Search in sources :

Example 31 with EzyObject

use of com.tvd12.ezyfoxserver.client.entity.EzyObject in project dahlia by youngmonkeys.

the class SettingObjectToArrayField method newSetting.

@Override
protected FieldArraySetting newSetting(SettingObjectToFields mappers, EzyObject object) {
    FieldArraySetting setting = new FieldArraySetting();
    setting.setMaxSize(object.get(SettingFields.MAX_SIZE, int.class));
    EzyObject itemSetting = object.get(SettingFields.ITEM, EzyObject.class);
    FieldSetting item = mappers.toSetting(itemSetting);
    setting.setItem(item);
    return setting;
}
Also used : FieldSetting(com.tvd12.dahlia.core.setting.FieldSetting) FieldArraySetting(com.tvd12.dahlia.core.setting.FieldArraySetting) EzyObject(com.tvd12.ezyfox.entity.EzyObject)

Example 32 with EzyObject

use of com.tvd12.ezyfoxserver.client.entity.EzyObject in project dahlia by youngmonkeys.

the class SettingObjectToBigDecimalField method newSetting.

@Override
protected FieldBigDecimalSetting newSetting(SettingObjectToFields mappers, EzyObject object) {
    FieldBigDecimalSetting setting = new FieldBigDecimalSetting();
    setting.setDefaultValue(object.get(SettingFields.DEFAULT, BigDecimal.class));
    return setting;
}
Also used : FieldBigDecimalSetting(com.tvd12.dahlia.core.setting.FieldBigDecimalSetting) BigDecimal(java.math.BigDecimal)

Example 33 with EzyObject

use of com.tvd12.ezyfoxserver.client.entity.EzyObject in project dahlia by youngmonkeys.

the class SettingObjectToByteField method newSetting.

@Override
protected FieldByteSetting newSetting(SettingObjectToFields mappers, EzyObject object) {
    FieldByteSetting setting = new FieldByteSetting();
    setting.setDefaultValue(object.get(SettingFields.DEFAULT, byte.class));
    return setting;
}
Also used : FieldByteSetting(com.tvd12.dahlia.core.setting.FieldByteSetting)

Example 34 with EzyObject

use of com.tvd12.ezyfoxserver.client.entity.EzyObject in project dahlia by youngmonkeys.

the class SettingRuntimeDeserializer method deserialize.

@Override
public RuntimeSetting deserialize(byte[] bytes) {
    EzyObject object = objectDeserializer.deserialize(bytes);
    RuntimeSetting setting = new RuntimeSetting();
    setting.setMaxDatabaseId(object.get(SettingFields.MAX_DATABASE_ID, int.class));
    setting.setMaxCollectionId(object.get(SettingFields.MAX_COLLECTION_ID, int.class));
    return setting;
}
Also used : EzyObject(com.tvd12.ezyfox.entity.EzyObject) RuntimeSetting(com.tvd12.dahlia.core.setting.RuntimeSetting)

Example 35 with EzyObject

use of com.tvd12.ezyfoxserver.client.entity.EzyObject in project dahlia by youngmonkeys.

the class SettingObjectToDoubleField method newSetting.

@Override
protected FieldDoubleSetting newSetting(SettingObjectToFields mappers, EzyObject object) {
    FieldDoubleSetting setting = new FieldDoubleSetting();
    setting.setDefaultValue(object.get(SettingFields.DEFAULT, double.class));
    return setting;
}
Also used : FieldDoubleSetting(com.tvd12.dahlia.core.setting.FieldDoubleSetting)

Aggregations

EzyObject (com.tvd12.ezyfox.entity.EzyObject)37 FieldSetting (com.tvd12.dahlia.core.setting.FieldSetting)19 EzyArray (com.tvd12.ezyfox.entity.EzyArray)17 CollectionSetting (com.tvd12.dahlia.core.setting.CollectionSetting)12 Collection (com.tvd12.dahlia.core.entity.Collection)11 Record (com.tvd12.dahlia.core.entity.Record)9 CollectionStorage (com.tvd12.dahlia.core.storage.CollectionStorage)9 HashMap (java.util.HashMap)6 RecordConsumer (com.tvd12.dahlia.core.function.RecordConsumer)5 DatabaseSetting (com.tvd12.dahlia.core.setting.DatabaseSetting)5 CollectionNotFoundException (com.tvd12.dahlia.exception.CollectionNotFoundException)5 DuplicatedIdException (com.tvd12.dahlia.exception.DuplicatedIdException)5 ArrayList (java.util.ArrayList)5 CollectionExistedException (com.tvd12.dahlia.exception.CollectionExistedException)4 DatabaseExistedException (com.tvd12.dahlia.exception.DatabaseExistedException)4 FindOptions (com.tvd12.dahlia.query.FindOptions)4 CommandCount (com.tvd12.dahlia.core.command.CommandCount)3 CommandFind (com.tvd12.dahlia.core.command.CommandFind)3 CommandInsertOne (com.tvd12.dahlia.core.command.CommandInsertOne)3 FieldLongSetting (com.tvd12.dahlia.core.setting.FieldLongSetting)3