public final class AnnotationUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static Map<Class<?>,org.apache.cassandra.db.marshal.AbstractType<?>> |
MAP_ABSTRACT_TYPE_CLASS_TO_ABSTRACT_TYPE
Static map of associations between cassandra marshaller Class objects and their instance.
|
static Map<String,Class> |
MAP_ABSTRACT_TYPE_CLASSNAME_TO_JAVA_TYPE
Static map of associations between a cassandra marshaller fully qualified class name and the corresponding
Java class.
|
static Map<Class,org.apache.cassandra.db.marshal.AbstractType<?>> |
MAP_JAVA_TYPE_TO_ABSTRACT_TYPE
Static map of associations between Class objects and the equivalent
Cassandra marshaller.
|
| Modifier and Type | Method and Description |
|---|---|
static String |
deepFieldName(Field field)
Returns the field name as known by the datastore.
|
static Field[] |
filterDeepFields(Class clazz)
Utility method that filters out all the fields _not_ annotated
with the
DeepField annotation. |
static Pair<Field[],Field[]> |
filterKeyFields(Class clazz)
Return a pair of Field[] whose left element is
the array of keys fields.
|
static Serializable |
getBeanFieldValue(IDeepType entity,
Field deepField)
Returns the value of the fields deepField in the instance entity of type T.
|
static Class<?>[] |
getGenericTypes(Field field)
Returns the list of generic types associated to the provided field (if any).
|
static boolean |
isKey(DeepField field)
Returns true is given field is part of the table key.
|
public static final Map<Class,org.apache.cassandra.db.marshal.AbstractType<?>> MAP_JAVA_TYPE_TO_ABSTRACT_TYPE
public static final Map<String,Class> MAP_ABSTRACT_TYPE_CLASSNAME_TO_JAVA_TYPE
public static String deepFieldName(Field field)
field - the Field object associated to the property for which we want to resolve the name.public static Field[] filterDeepFields(Class clazz)
DeepField annotation.clazz - the Class object for which we want to resolve deep fields.public static Pair<Field[],Field[]> filterKeyFields(Class clazz)
clazz - the Class objectpublic static boolean isKey(DeepField field)
field - the Field object we want to process.public static Serializable getBeanFieldValue(IDeepType entity, Field deepField)
entity - the entity to process.deepField - the Field to process belonging to entityCopyright © 2014. All rights reserved.