public List<Trade> getLastestTradeOrders( Long fromTime, Long endTime ){
    	List<Trade> result = new ArrayList<Trade>();
    	
    	String sql = " select T.* from tradeOrders T where " ;
    	if( fromTime != null )
    		sql += " T.TradeTime >= "+fromTime +" and ";
    	if( endTime != null )
    		sql += " T.TradeTime <= "+endTime + " and ";
    	sql += " 1=1 order by T.TradeId desc ";
    	Connection con = null;
    	Statement st = null ;
    	try {
    		con = DbPoolUtil.getInstance().getConnection();
			st = con.createStatement();
			ResultSet rs = st.executeQuery(sql);
			for( int i = 0; i < MarketDataServlet.SIZE && rs.next(); i++ ){
				Trade to = new Trade();
				to.setBuyId(rs.getInt(2));
				to.setBuyOrderId(rs.getInt(3));
				to.setSellId(rs.getInt(4));
				to.setSellOrderId(rs.getInt(5));
				to.setTradePrice(rs.getDouble(6));
				to.setTradeVolume(rs.getInt(7));
				to.setTradeTime(rs.getLong(8));
				result.add(to);
			}
		} catch (SQLException e) {
			e.printStackTrace();
		} catch (Exception e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}finally{
			DbPoolUtil.closeStatement(st);
			DbPoolUtil.closeConnection(con);
		}
    	return result;
    }