@Override
    public MultifactorAuthenticationTrustRecord get(final long id) {
        try {
            return transactionTemplate.execute(__ -> {
                remove();
                val query = entityManager
                    .createQuery(QUERY_SELECT + " WHERE r.id >= :id", getEntityFactory().getType())
                    .setParameter("id", id)
                    .setMaxResults(1);
                return query.getSingleResult();
            });
        } catch (final NoResultException e) {
            LOGGER.debug("No trusted authentication records could be found for [{}]", id);
        }
        return null;
    }
This is {@link JpaMultifactorAuthenticationTrustStorage}.

@author Misagh Moayyed
@since 5.0.0
support/cas-server-support-trusted-mfa-jdbc/src/main/java/org/apereo/cas/trusted/authentication/storage/JpaMultifactorAuthenticationTrustStorage.java