public int deleteBrands(Long[] delBrandId){
Session session = getSession();
Transaction tx = session.beginTransaction();
StringBuffer sql = new StringBuffer();
sql.append("delete Brand where brandId in ( :brandId) ");
Query query = session.createQuery(sql.toString());
query.setParameterList("brandId",delBrandId);
int dels = query.executeUpdate();
tx.commit();
return dels;
}