Package com.github.zhongl.hs4j.kit.annotations

Examples of com.github.zhongl.hs4j.kit.annotations.Repository


  }

  protected abstract InvocationHandler createInvocationHandlerWith(Method method, String database, String table);

  private void scanAndMapMethodToInvacationHandlerWith(Class<?> clazz) {
    final Repository repository = clazz.getAnnotation(Repository.class);
    if (repository == null)
      throw new IllegalArgumentException(Repository.class + " should be annotated to class: " + clazz);
    final String database = repository.database();
    final String table = repository.table();
    Method[] methods = clazz.getMethods();
    for (Method method : methods) {
      InvocationHandler handler = createInvocationHandlerWith(method, database, table);
      if ((handler == null)) continue; // no need to map, so skip.
      invocationMap.put(method, handler);
View Full Code Here

TOP

Related Classes of com.github.zhongl.hs4j.kit.annotations.Repository

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.