/** * Return the attributes map of the model * @param model the model extends from class Model * @return the attributes map of the model */ public static final Map<String, Object> getAttrs(Model model) { return model._getAttrs(); }
/** * Put other model to the model without check attribute name. */ public M put(Model model) { attrs.putAll(model._getAttrs()); return (M)this; }
public SqlPara getSqlPara(String key, Model model) { return getSqlPara(key, model._getAttrs()); }
/** * Set columns value with Model object. * @param model the Model object */ public Record setColumns(Model<?> model) { getColumns().putAll(model._getAttrs()); return this; }
/** * Set attributes with other model. * @param model the Model * @return this Model */ public M _setAttrs(M model) { return (M)_setAttrs(model._getAttrs()); }
public M _setOrPut(Model model) { return (M)_setOrPut(model._getAttrs()); }
/** * Convert model to record. */ public Record toRecord() { return new Record().setColumns(_getAttrs()); }
Map<String, Object> attrs = model._getAttrs(); int index = 0; StringBuilder columns = new StringBuilder();
PreparedStatement pst = conn.prepareStatement(sql); for (int i=0; i<size; i++) { Map map = isModel ? ((Model)list.get(i))._getAttrs() : ((Record)list.get(i)).getColumns(); for (int j=0; j<columnArray.length; j++) { Object value = map.get(columnArray[j]);
while (rs.next()) { Model<?> ar = modelClass.newInstance(); Map<String, Object> attrs = ar._getAttrs(); for (int i=1; i<=columnCount; i++) { Object value;
Table table = TableMapping.me().getTable(model.getClass()); String[] pKeys = table.getPrimaryKey(); Map<String, Object> attrs = model._getAttrs(); List<String> attrNames = new ArrayList<String>();
/** * Return the attributes map of the model * @param model the model extends from class Model * @return the attributes map of the model */ public static final Map<String, Object> getAttrs(Model model) { return model._getAttrs(); }
public Map<String, Object> getAttrs() { return super._getAttrs(); }
/** * Put other model to the model without check attribute name. */ public M put(Model model) { attrs.putAll(model._getAttrs()); return (M)this; }
/** * Set columns value with Model object. * @param model the Model object */ public Record setColumns(Model<?> model) { getColumns().putAll(model._getAttrs()); return this; }
/** * Set attributes with other model. * @param model the Model * @return this Model */ public M _setAttrs(M model) { return (M)_setAttrs(model._getAttrs()); }
public M _setOrPut(Model model) { return (M)_setOrPut(model._getAttrs()); }
public SqlPara getSqlPara(String key, Model model) { return getSqlPara(key, model._getAttrs()); }
/** * Convert model to record. */ public Record toRecord() { return new Record().setColumns(_getAttrs()); }
Table table = TableMapping.me().getTable(model.getClass()); String[] pKeys = table.getPrimaryKey(); Map<String, Object> attrs = model._getAttrs(); List<String> attrNames = new ArrayList<String>();