class DBUserInfoImpl extends AbstractUserGroupInfo implements UserInfo {

	@Override
	public boolean hasEmail(Group group) {
		boolean result = false;
		if (config.containsKey(HAS_EMAIL_QUERY)) {
			Connection conn = null;
			PreparedStatement ps = null;
			ResultSet rs = null;
			
			try {
				conn = ds.getConnection();

				ps = conn.prepareStatement(this.config.getProperty(HAS_EMAIL_QUERY));

				ps.setString(1, group.getId());
				rs = ps.executeQuery();
				if (rs.next()) {
					result = true;
				}
			} catch (Exception e) {
				logger.error("Error when checking roles in db, parameter: " + group.getId(), e);
			} finally {
				if (rs != null) {
					try {
						rs.close();
					} catch (SQLException e) {
					}
				}
				if (ps != null) {
					try {
						ps.close();
					} catch (SQLException e) {
					}
				}
				if (conn != null) {
					try {
						conn.close();
					} catch (Exception ex) {
					}
				}
			}
		} else {
			String email = getEmailForEntity(group);
			if (email != null) {
				return true;
			}
		}
		return result;
	}

	public  DBUserInfoImpl(boolean activate);
	public  DBUserInfoImpl(Properties config);

}