|
|
|
@ -25,6 +25,7 @@ import org.redisson.client.codec.Codec;
|
|
|
|
|
import org.redisson.codec.JsonJacksonCodec;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Specifies that the class is a Live Object.
|
|
|
|
|
*
|
|
|
|
|
* @author Rui Gu (https://github.com/jackygurui)
|
|
|
|
|
*/
|
|
|
|
@ -33,13 +34,28 @@ import org.redisson.codec.JsonJacksonCodec;
|
|
|
|
|
public @interface REntity {
|
|
|
|
|
|
|
|
|
|
public enum TransformationMode {
|
|
|
|
|
IMPLEMENTATION_BASED, ANNOTATION_BASED
|
|
|
|
|
|
|
|
|
|
IMPLEMENTATION_BASED,
|
|
|
|
|
|
|
|
|
|
ANNOTATION_BASED
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* (Optional) Live Object naming scheme. Defines how to assign key names for each instance of this class.
|
|
|
|
|
* Used to create a reference to an existing Live Object and materialising a new one in redis.
|
|
|
|
|
* Defaults to {@link DefaultNamingScheme} implementation.
|
|
|
|
|
*/
|
|
|
|
|
Class<? extends NamingScheme> namingScheme() default DefaultNamingScheme.class;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* (Optional) Live Object state codec. Defaults to {@link JsonJacksonCodec}.
|
|
|
|
|
*/
|
|
|
|
|
Class<? extends Codec> codec() default JsonJacksonCodec.class;
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* (Optional) Live Object field transformation.
|
|
|
|
|
* Defaults to {@link TransformationMode#ANNOTATION_BASED}
|
|
|
|
|
*/
|
|
|
|
|
TransformationMode fieldTransformation() default TransformationMode.ANNOTATION_BASED;
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
|