Package org.jrest4guice.persistence.ibatis.annotations

Examples of org.jrest4guice.persistence.ibatis.annotations.Select


  private static void processStatement(Class<?> clazz,
      StringBuffer statementSb) {
    Method[] methods = clazz.getDeclaredMethods();
    Statement statement;
    Procedure procedure;
    Select select;
    Update update;
    Insert insert;
    Delete delete;
    for (Method method : methods) {
      if (method.isAnnotationPresent(Statement.class)) {
        statement = method.getAnnotation(Statement.class);
        generateMethodSqlMapping(statementSb, "statement", method,
            statement.id(), statement.parameterMap(), statement
                .parameterClass(), statement.resltMap(),
            statement.resltClass(), statement.sql(), statement
                .cacheModel(), statement.xmlResultName());
      } else if (method.isAnnotationPresent(Procedure.class)) {
        procedure = method.getAnnotation(Procedure.class);
        generateMethodSqlMapping(statementSb, "procedure", method,
            procedure.id(), procedure.parameterMap(), procedure
                .parameterClass(), procedure.resltMap(),
            procedure.resltClass(), procedure.sql(), null,
            procedure.xmlResultName());
      } else if (method.isAnnotationPresent(Select.class)) {
        select = method.getAnnotation(Select.class);
        generateMethodSqlMapping(statementSb, "select", method, select
            .id(), select.parameterMap(), select.parameterClass(),
            select.resltMap(), select.resltClass(), select.sql(),
            select.cacheModel(), null);
      } else if (method.isAnnotationPresent(Update.class)) {
        update = method.getAnnotation(Update.class);
        generateMethodSqlMapping(statementSb, "update", method, update
            .id(), null, update.parameterClass(), null, Null.class,
            update.sql(), null, null);
View Full Code Here

TOP

Related Classes of org.jrest4guice.persistence.ibatis.annotations.Select

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.