Package com.jfinal.plugin.activerecord

Examples of com.jfinal.plugin.activerecord.TableInfo


    }
  }
 
  @SuppressWarnings("rawtypes")
  private static final void injectActiveRecordModel(Model<?> model, String modelName, HttpServletRequest request, boolean skipConvertError) {
    TableInfo tableInfo = TableInfoMapping.me().getTableInfo(model.getClass());
   
    String modelNameAndDot = modelName + ".";
   
    Map<String, String[]> parasMap = request.getParameterMap();
    for (Entry<String, String[]> e : parasMap.entrySet()) {
      String paraKey = e.getKey();
      if (paraKey.startsWith(modelNameAndDot)) {
        String paraName = paraKey.substring(modelNameAndDot.length());
        Class colType = tableInfo.getColType(paraName);
        if (colType == null)
          throw new ActiveRecordException("The model attribute " + paraKey + " is not exists.");
        String[] paraValue = e.getValue();
        try {
          // Object value = Converter.convert(colType, paraValue != null ? paraValue[0] : null);
View Full Code Here


    }
  }
 
  @SuppressWarnings({ "unchecked", "rawtypes" })
  private static final void injectActiveRecordModel(Model<?> model, String modelName, HttpServletRequest request, boolean skipConvertError) {
    TableInfo tableInfo = TableInfoMapping.me().getTableInfo(model.getClass());
   
    String modelNameAndDot = modelName + ".";
   
    Map<String, String[]> parasMap = request.getParameterMap();
    for (Entry<String, String[]> e : parasMap.entrySet()) {
      String paraKey = e.getKey();
      if (paraKey.startsWith(modelNameAndDot)) {
        String paraName = paraKey.substring(modelNameAndDot.length());
        Class colType = tableInfo.getColType(paraName);
        if (colType == null)
          throw new ActiveRecordException("The model attribute " + paraKey + " is not exists.");
        String[] paraValue = e.getValue();
        try {
          // Object value = Converter.convert(colType, paraValue != null ? paraValue[0] : null);
View Full Code Here

TOP

Related Classes of com.jfinal.plugin.activerecord.TableInfo

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.