public boolean esUsuarioCorrecto(UsuarioDTO u) {
		Connection co = null;
		PreparedStatement pst = null;
		ResultSet rs = null;
		String passwordEncriptado = null;
		String sql = null;

		try {
			co = EscolarConnectionFactory
					.getInstance().getConnection();
					

			sql = "SELECT usuario_id, link_id, usuario, contrasena FROM usuarios where usuario=?";

			pst = co.prepareStatement(sql);
			pst.setString(1, u.getUsuario());
			rs = pst.executeQuery();
			passwordEncriptado = getDescifraPassword(u);
			

			if (rs.next()) {
				if (passwordEncriptado.equals(rs.getString("contrasena"))) {
					return true;
				}
			}

		} catch (SQLException e) {
			e.printStackTrace();
		} finally {
			try {
				if (co != null)
					co.close();
				if (pst != null)
					pst.close();
				if (rs != null)
					rs.close();
			} catch (SQLException e) {
				
				e.printStackTrace();
			}
		}

		return false;
	}