private void init(Method method) throws DaoGenerateException {
configUnique(method);
configRowMapper(method);
Query query = method.getAnnotation(Query.class);
fetchSize = query.fetchSize();
Map<String, Integer> paramIndexes = new HashMap<String, Integer>(8, 1f);
Class<?>[] paramTypes = method.getParameterTypes();
Annotation[][] annotations = method.getParameterAnnotations();
for (int index = 0; index < annotations.length; index++) {
if (CommonUtils.isTypePage(paramTypes[index])) {
pageIndex = index;
break;
}
}
parseParameterAnnotations(annotations, paramIndexes, null, paramTypes);
String sql = query.value();
parseSql(sql, paramTypes, paramIndexes);
parseShardBy(method, paramIndexes, paramTypes);
}