com.netflix.astyanax.mapping
Interface AnnotationSet<ID extends Annotation,COLUMN extends Annotation>

All Known Implementing Classes:
DefaultAnnotationSet

public interface AnnotationSet<ID extends Annotation,COLUMN extends Annotation>

Allows for any annotations to be used to mark columns in a bean


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
 

Method Detail

getIdAnnotation

Class<ID> getIdAnnotation()
Returns:
the Annotation class that marks a bean field as being the ID/Key

getColumnAnnotation

Class<COLUMN> getColumnAnnotation()
Returns:
the Annotation class that marks a bean field as being persist-able.

getIdName

String getIdName(Field field,
                 ID annotation)
Return the ID/Key name to use

Parameters:
field - the field from the bean
annotation - the id annotation
Returns:
name to use for the field (cannot be null)

getColumnName

String getColumnName(Field field,
                     COLUMN annotation)
Return the column name to use for the given field. NOTE: if the field should not be persisted, return null.

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.