Examples of MapHandler


Examples of org.apache.commons.dbutils.handlers.MapHandler

      System.out.println(se.getMessage());
      return;
    }
   
    QueryRunner runner = new QueryRunner();
    ResultSetHandler rsh = new MapHandler();
    String sql = null;
    Map clientMap = null;
    Object obj = null;
   
    try {
View Full Code Here

Examples of org.apache.commons.dbutils.handlers.MapHandler

  public static Map<String, Object> getById(Connection conn,String sql,
      Object[] params) {
    Map<String, Object> map = null;
    try {
      if (params == null) {
        map = qr.query(conn, sql, new MapHandler());
      } else {
        map = qr.query(conn, sql, new MapHandler(), params);
      }
    } catch (Exception e) {
      System.err.println("��ѯ�����쳣!ԭ��:" + e);
    }
    return map;
View Full Code Here

Examples of org.apache.commons.dbutils.handlers.MapHandler

     */ 
    public Map<String, Object> findFirst(String sql, Object[] params) {  
        Map<String, Object> map = null
        try
            if (params == null) { 
                map = (Map<String, Object>) qr.query(sql, new MapHandler())
            } else
                map = (Map<String, Object>) qr.query(sql, new MapHandler(), params)
           
        } catch (SQLException e) {  
            System.err.println("findFirst.��ѯһ����¼����" + e)
       
        return map; 
View Full Code Here

Examples of org.exolab.castor.mapping.MapHandler

            }
            //-- handle all other collection types
            else if (isCollection(type)) {
                boolean processCollection = true;
                if (_saveMapKeys) {
                    MapHandler mapHandler = MapHandlers.getHandler(type);
                    if (mapHandler != null) {
                        processCollection = false;
                        MapItem item = new MapItem();
                        Enumeration keys = mapHandler.keys(obj);
                        while (keys.hasMoreElements()) {
                            item.setKey(keys.nextElement());
                            item.setValue(mapHandler.get(obj, item.getKey()));
                            marshal(item, elemDescriptor, handler, myState);
                        }
                    }

                }
View Full Code Here

Examples of org.exolab.castor.mapping.MapHandler

        //-- process Namespace nodes from Object Model,
        //-- if necessary.
        if (attDescriptor.getNodeType() == NodeType.Namespace) {
            if (!_suppressNamespaces) {
                Object map = attDescriptor.getHandler().getValue(object);
                MapHandler mapHandler = MapHandlers.getHandler(map);
                if (mapHandler != null) {
                    Enumeration keys = mapHandler.keys(map);
                    while (keys.hasMoreElements()) {
                        Object key = keys.nextElement();
                        Object val = mapHandler.get(map, key);
                        declareNamespace(key.toString(), val.toString());
                    }
                }
            }
            return;
View Full Code Here

Examples of org.exolab.castor.mapping.MapHandler

            }
            //-- handle all other collection types
            else if (isCollection(type)) {
                boolean processCollection = true;
                if (_saveMapKeys) {
                    MapHandler mapHandler = MapHandlers.getHandler(type);
                    if (mapHandler != null) {
                        processCollection = false;
                        MapItem item = new MapItem();
                        Enumeration keys = mapHandler.keys(obj);
                        while (keys.hasMoreElements()) {
                            item.setKey(keys.nextElement());
                            item.setValue(mapHandler.get(obj, item.getKey()));
                            marshal(item, elemDescriptor, handler);
                        }                       
                    }
                   
                }
View Full Code Here

Examples of org.exolab.castor.mapping.MapHandler

        //-- process Namespace nodes from Object Model,
        //-- if necessary.
        if (attDescriptor.getNodeType() == NodeType.Namespace) {
            if (!_suppressNamespaces) {
                Object map = attDescriptor.getHandler().getValue(object);
                MapHandler mapHandler = MapHandlers.getHandler(map);
                if (mapHandler != null) {
                    Enumeration keys = mapHandler.keys(map);
                    while (keys.hasMoreElements()) {
                        Object key = keys.nextElement();
                        Object val = mapHandler.get(map, key);
                        declareNamespace(key.toString(), val.toString());
                    }
                }
            }
            return;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.