Package org.apache.hadoop.hbase.hbql.client

Examples of org.apache.hadoop.hbase.hbql.client.Mapping


    }

    public static AnnotationResultAccessor newAnnotationMapping(final HConnectionImpl conn,
                                                                final Class<?> clazz) throws HBqlException {

        final Mapping mappingAnnotation = clazz.getAnnotation(Mapping.class);

        if (mappingAnnotation == null)
            throw new HBqlException("Class " + clazz.getName() + " is missing @Mapping annotation");

        if (mappingAnnotation.name() == null || mappingAnnotation.name().length() == 0)
            throw new HBqlException("@Mapping annotation for class " + clazz.getName() + " is missing a name");

        final TableMapping tableMapping = conn.getMapping(mappingAnnotation.name());
        return new AnnotationResultAccessor(tableMapping, clazz);
    }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.hbase.hbql.client.Mapping

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.