Package org.nutz.dao.sql

Examples of org.nutz.dao.sql.PItem


    Pager pager = pojo.getContext().getPager();
    if (pager == null)
      return;
    // -----------------------------------------------------
    // TODO XXX 这个写法灰常暴力!!But , it works!!!! 期待更好的写法
    PItem pi = pojo.getItem(0);
    StringBuilder sb = new StringBuilder();
    pi.joinSql(pojo.getEntity(), sb);
    String str = sb.toString();
    if (str.trim().toLowerCase().startsWith("select")) {
      pojo.setItem(0, Pojos.Items.wrap(str.substring(6)));
    } else
      return;// 以免出错.
View Full Code Here


    public void formatQuery(Pojo pojo) {
        Pager pager = pojo.getContext().getPager();
        if (null != pager && pager.getPageNumber() > 0) {
            // -----------------------------------------------------
            // TODO XXX 这个写法灰常暴力!!But , it works!!!! 期待更好的写法
            PItem pi = pojo.getItem(0);
            StringBuilder sb = new StringBuilder();
            pi.joinSql(pojo.getEntity(), sb);
            String str = sb.toString();
            if (str.trim().toLowerCase().startsWith("select")) {
                pojo.setItem(0, Pojos.Items.wrap(str.substring(6)));
            } else
                return;// 以免出错.
View Full Code Here

TOP

Related Classes of org.nutz.dao.sql.PItem

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.