com.netflix.astyanax.mapping
Class DefaultAnnotationSet

java.lang.Object
  extended by 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


Constructor Summary
DefaultAnnotationSet()
           
 
Method Summary
 Class<Column> getColumnAnnotation()
           
 String getColumnName(Field field, Column annotation)
          Return the column name to use for the given field.
 Class<Id> getIdAnnotation()
           
 String getIdName(Field field, Id annotation)
          Return the ID/Key name to use
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultAnnotationSet

public DefaultAnnotationSet()
Method Detail

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 bean
annotation - 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 bean
annotation - the column annotation
Returns:
name to use for the field or null


Copyright © 2012. All Rights Reserved.