Package net.paoding.rose.jade.annotation

Examples of net.paoding.rose.jade.annotation.ShardBy


        Object objectShardBy = runtime.getParameters().get(":" + (shardIndex + 1));
        Number value;
        if (objectShardBy instanceof Number) {
            value = (Number) objectShardBy;
        } else {
            ShardBy annotationShardBy = runtime.getMetaData().getShardBy();
            String propertyName = annotationShardBy.value();
            PropertyDescriptor propertyDescriptor = BeanUtils.getPropertyDescriptor(
                    objectShardBy.getClass(), propertyName);
            try {
                value = (Number) propertyDescriptor.getReadMethod().invoke(objectShardBy);
            } catch (Exception e) {
View Full Code Here


        Annotation[][] annotations = method.getParameterAnnotations();
        this.parameterCount = annotations.length;
        this.sqlParams = new SQLParam[annotations.length];
        int shardByIndex = -1;
        ShardBy shardBy = null;
        for (int index = 0; index < annotations.length; index++) {
            for (Annotation annotation : annotations[index]) {
                if (annotation instanceof ShardBy) {
                    if (shardByIndex >= 0) {
                        throw new IllegalArgumentException("duplicated @" + ShardBy.class.getName());
View Full Code Here

TOP

Related Classes of net.paoding.rose.jade.annotation.ShardBy

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.