@Test public void checkHasEtagReturnsFalseWithoutVersion() throws ODataJPAModelException { EdmBindingTarget target = mock(EdmBindingTarget.class); EdmEntityType et = mock(EdmEntityType.class); when(target.getEntityType()).thenReturn(et); when(et.getFullQualifiedName()).thenReturn(new FullQualifiedName(PUNIT_NAME, "Country")); JPAServiceDocument svc = new IntermediateServiceDocument(PUNIT_NAME, emf.getMetamodel(), null, null); assertFalse(svc.hasETag(target)); }
@Override public boolean hasETag(final EdmBindingTarget entitySetOrSingleton) { try { return getEntity(entitySetOrSingleton.getEntityType().getFullQualifiedName()).hasEtag(); } catch (final ODataJPAModelException e) { return false; } }
IntermediateServiceDocument implements JPAServiceDocument { @Override public boolean hasETag(final EdmBindingTarget entitySetOrSingleton) { try { return getEntity(entitySetOrSingleton.getEntityType().getFullQualifiedName()).hasEtag(); } catch (final ODataJPAModelException e) { return false; } } }
IntermediateServiceDocument implements JPAServiceDocument { @Override public boolean hasETag(final EdmBindingTarget entitySetOrSingleton) { try { return getEntity(entitySetOrSingleton.getEntityType().getFullQualifiedName()).hasEtag(); } catch (final ODataJPAModelException e) { return false; } } IntermediateServiceDocument(final String namespace, final Metamodel jpaMetamodel,
      final JPAEdmMetadataPostProcessor postProcessor, final String[] packageName);   IntermediateServiceDocument(final JPAEdmNameBuilder nameBuilder, final Metamodel jpaMetamodel,
      final JPAEdmMetadataPostProcessor postProcessor, final String[] packageName); }
IntermediateServiceDocument implements JPAServiceDocument { @Override public boolean hasETag(final EdmBindingTarget entitySetOrSingleton) { try { return getEntity(entitySetOrSingleton.getEntityType().getFullQualifiedName()).hasEtag(); } catch (final ODataJPAModelException e) { return false; } } IntermediateServiceDocument(final String namespace, final Metamodel jpaMetamodel,
      final JPAEdmMetadataPostProcessor postProcessor, final String[] packageName);   IntermediateServiceDocument(final JPAEdmNameBuilder nameBuilder, final Metamodel jpaMetamodel,
      final JPAEdmMetadataPostProcessor postProcessor, final String[] packageName); @Override List<CsdlSchema> getAllSchemas(); @Override CsdlEntityContainer getEdmEntityContainer(); @Override List<CsdlSchema> getEdmSchemas(); @Override JPAEntityType getEntity(final EdmType edmType); @Override JPAEntityType getEntity(final Class<?> entityClass); @Override JPAStructuredType getComplexType(final EdmComplexType edmType); @Override JPAEntityType getEntity(final FullQualifiedName typeName); @Override JPAEntityType getEntity(final String edmEntitySetName); @Override JPAEntitySet getEntitySet(final JPAEntityType entityType); @Override JPAFunction getFunction(final EdmFunction function); @Override JPAAction getAction(final EdmAction action); @Override List<EdmxReference> getReferences(); @Override CsdlTerm getTerm(final FullQualifiedName termName); @Override boolean hasETag(final EdmBindingTarget entitySetOrSingleton); @Override boolean hasMediaETag(final EdmBindingTarget entitySetOrSingleton); @Override JPAEnumerationAttribute getEnumType(final EdmEnumType type); @Override JPAEnumerationAttribute getEnumType(final String fqnAsString); }
IntermediateServiceDocument implements JPAServiceDocument { @Override public boolean hasETag(final EdmBindingTarget entitySetOrSingleton) { try { return getEntity(entitySetOrSingleton.getEntityType().getFullQualifiedName()).hasEtag(); } catch (final ODataJPAModelException e) { return false; } } IntermediateServiceDocument(final String namespace, final Metamodel jpaMetamodel,
      final JPAEdmMetadataPostProcessor postProcessor, final String[] packageName);   IntermediateServiceDocument(final JPAEdmNameBuilder nameBuilder, final Metamodel jpaMetamodel,
      final JPAEdmMetadataPostProcessor postProcessor, final String[] packageName); @Override List<CsdlSchema> getAllSchemas(); @Override CsdlEntityContainer getEdmEntityContainer(); @Override List<CsdlSchema> getEdmSchemas(); @Override JPAEntityType getEntity(final EdmType edmType); @Override JPAEntityType getEntity(final Class<?> entityClass); @Override JPAStructuredType getComplexType(final EdmComplexType edmType); @Override JPAEntityType getEntity(final FullQualifiedName typeName); @Override JPAEntityType getEntity(final String edmEntitySetName); @Override JPAEntitySet getEntitySet(final JPAEntityType entityType); @Override JPAFunction getFunction(final EdmFunction function); @Override JPAAction getAction(final EdmAction action); @Override List<EdmxReference> getReferences(); @Override CsdlTerm getTerm(final FullQualifiedName termName); @Override boolean hasETag(final EdmBindingTarget entitySetOrSingleton); @Override boolean hasMediaETag(final EdmBindingTarget entitySetOrSingleton); @Override JPAEnumerationAttribute getEnumType(final EdmEnumType type); @Override JPAEnumerationAttribute getEnumType(final String fqnAsString);  }