@SuppressWarnings("unchecked") @Test public void testAbortsOnSearchRequest() { final CriteriaBuilder cb = mock(CriteriaBuilder.class); final CriteriaQuery<String> cq = mock(CriteriaQuery.class); final Root<String> root = mock(Root.class); final JPAEntityType entityType = mock(JPAEntityType.class); final SearchOption searchOption = mock(SearchOption.class); final ODataApplicationException act = assertThrows(ODataApplicationException.class, () -> cut.createSearchWhereClause(cb, cq, root, entityType, searchOption)); assertEquals(HttpStatusCode.NOT_IMPLEMENTED.getStatusCode(), act.getStatusCode()); }
@Override public Expression<Boolean> createSearchWhereClause(final CriteriaBuilder cb, final CriteriaQuery<?> cq, final From<?, ?> root, final JPAEntityType entityType, final SearchOption searchOption) throws ODataApplicationException { throw new ODataJPADBAdaptorException(ODataJPADBAdaptorException.MessageKeys.NOT_SUPPORTED_SEARCH, HttpStatusCode.NOT_IMPLEMENTED); }
JPA_POSTSQL_DatabaseProcessor extends JPAAbstractDatabaseProcessor { @Override public Expression<Boolean> createSearchWhereClause(final CriteriaBuilder cb, final CriteriaQuery<?> cq, final From<?, ?> root, final JPAEntityType entityType, final SearchOption searchOption) throws ODataApplicationException { throw new ODataJPADBAdaptorException(ODataJPADBAdaptorException.MessageKeys.NOT_SUPPORTED_SEARCH, HttpStatusCode.NOT_IMPLEMENTED); } }
JPA_POSTSQL_DatabaseProcessor extends JPAAbstractDatabaseProcessor { @Override public Expression<Boolean> createSearchWhereClause(final CriteriaBuilder cb, final CriteriaQuery<?> cq, final From<?, ?> root, final JPAEntityType entityType, final SearchOption searchOption) throws ODataApplicationException { throw new ODataJPADBAdaptorException(ODataJPADBAdaptorException.MessageKeys.NOT_SUPPORTED_SEARCH, HttpStatusCode.NOT_IMPLEMENTED); }  }
JPA_POSTSQL_DatabaseProcessor extends JPAAbstractDatabaseProcessor { @Override public Expression<Boolean> createSearchWhereClause(final CriteriaBuilder cb, final CriteriaQuery<?> cq, final From<?, ?> root, final JPAEntityType entityType, final SearchOption searchOption) throws ODataApplicationException { throw new ODataJPADBAdaptorException(ODataJPADBAdaptorException.MessageKeys.NOT_SUPPORTED_SEARCH, HttpStatusCode.NOT_IMPLEMENTED); }  @Override Expression<Boolean> createSearchWhereClause(final CriteriaBuilder cb, final CriteriaQuery<?> cq,
      final From<?, ?> root, final JPAEntityType entityType, final SearchOption searchOption); @SuppressWarnings("unchecked") @Override java.util.List<T> executeFunctionQuery(final List<UriResource> uriResourceParts,
      final JPADataBaseFunction jpaFunction, final EntityManager em); }
JPA_POSTSQL_DatabaseProcessor extends JPAAbstractDatabaseProcessor { @Override public Expression<Boolean> createSearchWhereClause(final CriteriaBuilder cb, final CriteriaQuery<?> cq, final From<?, ?> root, final JPAEntityType entityType, final SearchOption searchOption) throws ODataApplicationException { throw new ODataJPADBAdaptorException(ODataJPADBAdaptorException.MessageKeys.NOT_SUPPORTED_SEARCH, HttpStatusCode.NOT_IMPLEMENTED); }  @Override Expression<Boolean> createSearchWhereClause(final CriteriaBuilder cb, final CriteriaQuery<?> cq,
      final From<?, ?> root, final JPAEntityType entityType, final SearchOption searchOption); @SuppressWarnings("unchecked") @Override java.util.List<T> executeFunctionQuery(final List<UriResource> uriResourceParts,
      final JPADataBaseFunction jpaFunction, final EntityManager em);  }