com.netflix.astyanax.mapping
Class DefaultAnnotationSet
java.lang.Object
com.netflix.astyanax.mapping.DefaultAnnotationSet
- All Implemented Interfaces:
- AnnotationSet<Id,Column>
public class DefaultAnnotationSet
- extends Object
- implements AnnotationSet<Id,Column>
The default annotation set. Supports Id
and Column
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DefaultAnnotationSet
public DefaultAnnotationSet()
getIdAnnotation
public Class<Id> getIdAnnotation()
- Specified by:
getIdAnnotation
in interface AnnotationSet<Id,Column>
- Returns:
- the Annotation class that marks a bean field as being the ID/Key
getColumnAnnotation
public Class<Column> getColumnAnnotation()
- Specified by:
getColumnAnnotation
in interface AnnotationSet<Id,Column>
- Returns:
- the Annoation class that marks a bean field as being persist-able.
getIdName
public String getIdName(Field field,
Id annotation)
- Description copied from interface:
AnnotationSet
- Return the ID/Key name to use
- Specified by:
getIdName
in interface AnnotationSet<Id,Column>
- Parameters:
field
- the field from the beanannotation
- the id annotation
- Returns:
- name to use for the field (cannot be null)
getColumnName
public String getColumnName(Field field,
Column annotation)
- Description copied from interface:
AnnotationSet
- Return the column name to use for the given field. NOTE: if the field should not
be persisted, return
null
.
- Specified by:
getColumnName
in interface AnnotationSet<Id,Column>
- Parameters:
field
- the field from the beanannotation
- the column annotation
- Returns:
- name to use for the field or null
Copyright © 2012. All Rights Reserved.