class LivenessRepository extends AbstractRepository {

    /**
     * Public constructor.
     */
    public LivenessRepository() {
        super(Liveness.LIVENESS);
    }

    /**
     * Remove liveness by the specified user id.
     *
     * @param userId the specified user id
     * @throws RepositoryException repository exception
     */
    public void removeByUserId(final String userId) throws RepositoryException {
        remove(new Query().setFilter(new PropertyFilter(Liveness.LIVENESS_USER_ID, FilterOperator.EQUAL, userId)));
    }

    /**
     * Gets a liveness by the specified user id and date.
     *
     * @param userId the specified user id
     * @param date   the specified date
     * @return a liveness, {@code null} if not found
     * @throws RepositoryException repository exception
     */
    public JSONObject getByUserAndDate(final String userId, final String date) throws RepositoryException {<FILL_FUNCTION_BODY>}
}

        final Query query = new Query().setFilter(CompositeFilterOperator.and(
                new PropertyFilter(Liveness.LIVENESS_USER_ID, FilterOperator.EQUAL, userId),
                new PropertyFilter(Liveness.LIVENESS_DATE, FilterOperator.EQUAL, date))).setPageCount(1);
        return getFirst(query);
    
<no_super_class>