if(year > 0 || month > 0 || date > 0){
Calendar[] cals = genTimeParams(year,month,date);
q.setTimestamp("beginTime", cals[0].getTime());
q.setTimestamp("endTime", cals[1].getTime());
}
return ((Number) q.uniqueResult()).intValue();
} finally {
hql = null;
}
}