Package org.nutz.dao.impl.entity.macro

Examples of org.nutz.dao.impl.entity.macro.SqlFieldMacro


        return true;
    }
   
    public Pojo fetchPojoId(Entity<?> en, MappingField idField) {
      String autoSql = "SELECT MAX($field) AS $field FROM $view";
        Pojo autoInfo = new SqlFieldMacro(idField, autoSql);
        autoInfo.setEntity(en);
        return autoInfo;
    }
View Full Code Here


    return "SELECT * FROM " + en.getViewName() + " LIMIT 1";
  }

  public Pojo fetchPojoId(Entity<?> en, MappingField idField) {
    String autoSql = "SELECT @@@@IDENTITY";
    Pojo autoInfo = new SqlFieldMacro(idField, autoSql);
    autoInfo.setEntity(en);
    return autoInfo;
  }
View Full Code Here

        throw Lang.noImplement();
    }
   
    public Pojo fetchPojoId(Entity<?> en, MappingField idField) {
        String autoSql = "SELECT MAX($field) AS $field FROM $view";
        Pojo autoInfo = new SqlFieldMacro(idField, autoSql);
        autoInfo.setEntity(en);
        return autoInfo;
    }
View Full Code Here

        // 如果找到,增加
        if (null != theInfo) {
            if (theInfo.isEl())
                return new ElFieldMacro(ef, theInfo.getValue());
            else
                return new SqlFieldMacro(ef, theInfo.getValue());
        }
        return null;
    }
View Full Code Here

TOP

Related Classes of org.nutz.dao.impl.entity.macro.SqlFieldMacro

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.