@Test public void testCreateMultipleStringKeysParent() throws ODataJPAModelException, ODataException { String link = "AdministrativeDivisions(DivisionCode='DE100',CodeID='NUTS3',CodePublisher='Eurostat')"; cut = new JPARequestLinkImpl(path, link, helper); items.add(createConditionItem("codePublisher", "CodePublisher", "codePublisher", "CodePublisher")); items.add(createConditionItem("parentCodeID", "ParentCodeID", "codeID", "CodeID")); items.add(createConditionItem("parentDivisionCode", "ParentDivisionCode", "divisionCode", "DivisionCode")); Map<String, Object> act = cut.getRelatedKeys(); assertNotNull(act); assertEquals("DE100", act.get("divisionCode")); assertEquals("NUTS3", act.get("codeID")); assertEquals("Eurostat", act.get("codePublisher")); }
@Override public Map<String, Object> getRelatedKeys() throws ODataJPAProcessorException { if (keys.size() == 0) try { buildKeys(); } catch (Exception e) { throw new ODataJPAProcessorException(e, HttpStatusCode.BAD_REQUEST); } return keys; }
JPARequestLinkImpl implements JPARequestLink { @Override public Map<String, Object> getRelatedKeys() throws ODataJPAProcessorException { if (keys.size() == 0) try { buildKeys(); } catch (Exception e) { throw new ODataJPAProcessorException(e, HttpStatusCode.BAD_REQUEST); } return keys; } }
JPARequestLinkImpl implements JPARequestLink { @Override public Map<String, Object> getRelatedKeys() throws ODataJPAProcessorException { if (keys.size() == 0) try { buildKeys(); } catch (Exception e) { throw new ODataJPAProcessorException(e, HttpStatusCode.BAD_REQUEST); } return keys; } JPARequestLinkImpl(final JPAAssociationPath path, final String bindingLink, final JPAConversionHelper helper); }
JPARequestLinkImpl implements JPARequestLink { @Override public Map<String, Object> getRelatedKeys() throws ODataJPAProcessorException { if (keys.size() == 0) try { buildKeys(); } catch (Exception e) { throw new ODataJPAProcessorException(e, HttpStatusCode.BAD_REQUEST); } return keys; } JPARequestLinkImpl(final JPAAssociationPath path, final String bindingLink, final JPAConversionHelper helper); @Override JPAEntityType getEntityType(); @Override Map<String, Object> getRelatedKeys(); @Override Map<String, Object> getValues(); }
JPARequestLinkImpl implements JPARequestLink { @Override public Map<String, Object> getRelatedKeys() throws ODataJPAProcessorException { if (keys.size() == 0) try { buildKeys(); } catch (Exception e) { throw new ODataJPAProcessorException(e, HttpStatusCode.BAD_REQUEST); } return keys; } JPARequestLinkImpl(final JPAAssociationPath path, final String bindingLink, final JPAConversionHelper helper); @Override JPAEntityType getEntityType(); @Override Map<String, Object> getRelatedKeys(); @Override Map<String, Object> getValues();  }