use of com.akaxin.site.storage.bean.UserGroupBean in project openzaly by akaxincom.
the class SQLiteUserGroupDao method getUserGroupSetting.
public UserGroupBean getUserGroupSetting(String siteUserId, String siteGroupId) throws SQLException {
long startTime = System.currentTimeMillis();
String sql = "SELECT mute FROM " + USER_GROUP_TABLE + " WHERE site_user_id=? AND site_group_id=?;";
PreparedStatement preStatement = SQLiteJDBCManager.getConnection().prepareStatement(sql);
preStatement.setString(1, siteUserId);
preStatement.setString(2, siteGroupId);
ResultSet rs = preStatement.executeQuery();
UserGroupBean bean = null;
if (rs.next()) {
bean = new UserGroupBean();
bean.setMute(rs.getBoolean(1));
bean.setSiteGroupId(siteGroupId);
}
LogUtils.dbDebugLog(logger, startTime, bean, sql, siteUserId, siteGroupId);
return bean;
}
Aggregations