All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.netflix.astyanax.mapping.AnnotationSet Maven / Gradle / Ivy

There is a newer version: 3.10.2
Show newest version
package com.netflix.astyanax.mapping;

import java.lang.annotation.Annotation;
import java.lang.reflect.Field;

/**
 * Allows for any annotations to be used to mark columns in a bean
 */
@Deprecated
public interface AnnotationSet {
    /**
     * @return the Annotation class that marks a bean field as being the ID/Key
     */
    public Class getIdAnnotation();

    /**
     * @return the Annotation class that marks a bean field as being
     *         persist-able.
     */
    public Class getColumnAnnotation();

    /**
     * Return the ID/Key name to use
     * 
     * @param field
     *            the field from the bean
     * @param annotation
     *            the id annotation
     * @return name to use for the field (cannot be null)
     */
    public String getIdName(Field field, ID annotation);

    /**
     * Return the column name to use for the given field. NOTE: if the field
     * should not be persisted, return null.
     * 
     * @param field
     *            the field from the bean
     * @param annotation
     *            the column annotation
     * @return name to use for the field or null
     */
    public String getColumnName(Field field, COLUMN annotation);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy