Basic bson serializers
Same as CClassField but because defaultValue is required, it can be selected.
Same as CClassField but because defaultValue is required, it can be selected. If you don't want to provide defaultValue use CClassField but you will not be able to select that cc. To create a field like that you must overrife defaultValue, or just use CClassRequiredField.
Same as CClassField but because defaultValue is required, it can be selected.
Same as CClassField but because defaultValue is required, it can be selected. If you don't want to provide defaultValue use CClassField but you will not be able to select that cc.
Trait representing a field and all the operations on it.
Trait representing a field and all the operations on it.
the type of the owner of the field
serialize enums as names
serialize enums as integers
Sometimes it is necessary to use Enumerations that are serialized to Ints and others that serialize to Strings within the same tech.scoundrel.rogue.cc.RCcMeta.
Sometimes it is necessary to use Enumerations that are serialized to Ints and others that serialize to Strings within the same tech.scoundrel.rogue.cc.RCcMeta. It can be obtained by using EnumSerializeValue annotation
EnumAnnotationTest example:
object EName extends Enumeration { val v1 = Value("V1"); val v2 = Value("V2") } @EnumSerializeValue object EValue extends Enumeration { val v1 = Value("bla1"); val v2 = Value("bla2") } case class C(e:EName.Value, v: EValue.Value) import import BsonFormats._ ;import EnumAnnotatedFormats._ implicit val enE = EName implicit val evE = EValue val format = BsonFormat[C] println(format.write(C(EName.v1, EValue.v2)))
will produce
{ "v" : 1, "e" : "V1" }