天天看點

bbossgroups持久層架構查詢傳回Map對象和Map清單對象api

bbossgroups持久層架構查詢傳回Map對象和Map清單對象api:

@Test
	public void queryListMap() throws SQLException
	{
		String sql = "select * from LISTBEAN ";
		List<HashMap> dbBeans  =  SQLExecutor.queryListWithDBName(HashMap.class, "mysql", sql);
		System.out.println(dbBeans);
	}
	
	@Test
	public void queryMap() throws SQLException
	{
		String sql = "select * from LISTBEAN ";
		Map dbBeans  =  SQLExecutor.queryObject(HashMap.class, sql);
		System.out.println(dbBeans);
	}      

map對象中存放的key為查詢列的大寫名稱,value為字段的的值。