@Test public void checkEmbeddedIdResovedKeyInternal() throws ODataJPAModelException { final IntermediateEntityType<AdministrativeDivisionDescription> et = new IntermediateEntityType<>( new JPADefaultEdmNameBuilder(PUNIT_NAME), getEntityType(AdministrativeDivisionDescription.class), schema); assertEquals(4, et.getKey().size()); }
@Override public List<JPAAttribute> getKey() throws ODataJPAModelException { lazyBuildEdmItem(); if (keyAttributes == null) { final List<JPAAttribute> intermediateKey = new ArrayList<>(); addKeyAttribute(intermediateKey, this.getTypeClass().getDeclaredFields()); addKeyAttribute(intermediateKey, mappedSuperclass .map(ManagedType::getJavaType) .map(Class::getDeclaredFields) .orElse(new Field[] {})); final IntermediateStructuredType<?> baseType = getBaseType(); if (baseType != null) { intermediateKey.addAll(((IntermediateEntityType<?>) baseType).getKey()); } keyAttributes = Collections.unmodifiableList(intermediateKey); } return keyAttributes; }
IntermediateEntityType extends IntermediateStructuredType<T> implements JPAEntityType,
    IntermediateEntityTypeAccess { @Override public List<JPAAttribute> getKey() throws ODataJPAModelException { lazyBuildEdmItem(); if (keyAttributes == null) { final List<JPAAttribute> intermediateKey = new ArrayList<>(); addKeyAttribute(intermediateKey, this.getTypeClass().getDeclaredFields()); addKeyAttribute(intermediateKey, mappedSuperclass .map(ManagedType::getJavaType) .map(Class::getDeclaredFields) .orElse(new Field[] {})); final IntermediateStructuredType<?> baseType = getBaseType(); if (baseType != null) { intermediateKey.addAll(((IntermediateEntityType<?>) baseType).getKey()); } keyAttributes = Collections.unmodifiableList(intermediateKey); } return keyAttributes; } }
IntermediateEntityType extends IntermediateStructuredType<T> implements JPAEntityType,
    IntermediateEntityTypeAccess { @Override public List<JPAAttribute> getKey() throws ODataJPAModelException { lazyBuildEdmItem(); if (keyAttributes == null) { final List<JPAAttribute> intermediateKey = new ArrayList<>(); addKeyAttribute(intermediateKey, this.getTypeClass().getDeclaredFields()); addKeyAttribute(intermediateKey, mappedSuperclass .map(ManagedType::getJavaType) .map(Class::getDeclaredFields) .orElse(new Field[] {})); final IntermediateStructuredType<?> baseType = getBaseType(); if (baseType != null) { intermediateKey.addAll(((IntermediateEntityType<?>) baseType).getKey()); } keyAttributes = Collections.unmodifiableList(intermediateKey); } return keyAttributes; } IntermediateEntityType(final JPAEdmNameBuilder nameBuilder, final EntityType<T> et, final IntermediateSchema schema); }
IntermediateEntityType extends IntermediateStructuredType<T> implements JPAEntityType,
    IntermediateEntityTypeAccess { @Override public List<JPAAttribute> getKey() throws ODataJPAModelException { lazyBuildEdmItem(); if (keyAttributes == null) { final List<JPAAttribute> intermediateKey = new ArrayList<>(); addKeyAttribute(intermediateKey, this.getTypeClass().getDeclaredFields()); addKeyAttribute(intermediateKey, mappedSuperclass .map(ManagedType::getJavaType) .map(Class::getDeclaredFields) .orElse(new Field[] {})); final IntermediateStructuredType<?> baseType = getBaseType(); if (baseType != null) { intermediateKey.addAll(((IntermediateEntityType<?>) baseType).getKey()); } keyAttributes = Collections.unmodifiableList(intermediateKey); } return keyAttributes; } IntermediateEntityType(final JPAEdmNameBuilder nameBuilder, final EntityType<T> et, final IntermediateSchema schema); @Override void addAnnotations(final List<CsdlAnnotation> annotations); @Override JPAAttribute getAttribute(final String internalName); @Override JPACollectionAttribute getCollectionAttribute(final String externalName); @Override JPAAttribute getAttribute(final UriResourceProperty uriResourceItem); @Override String getContentType(); @Override JPAPath getContentTypeAttributePath(); @Override JPAPath getEtagPath(); @Override List<JPAAttribute> getKey(); @Override List<JPAPath> getKeyPath(); @Override Class<?> getKeyType(); @Override List<JPAPath> getSearchablePath(); @Override JPAPath getStreamAttributePath(); @Override String getTableName(); @Override boolean hasCompoundKey(); @Override boolean hasEtag(); @Override boolean hasStream(); @Override boolean ignore(); @Override boolean isAbstract(); @Override List<JPAPath> searchChildPath(final JPAPath selectItemPath); }
IntermediateEntityType extends IntermediateStructuredType<T> implements JPAEntityType,
    IntermediateEntityTypeAccess { @Override public List<JPAAttribute> getKey() throws ODataJPAModelException { lazyBuildEdmItem(); if (keyAttributes == null) { final List<JPAAttribute> intermediateKey = new ArrayList<>(); addKeyAttribute(intermediateKey, this.getTypeClass().getDeclaredFields()); addKeyAttribute(intermediateKey, mappedSuperclass .map(ManagedType::getJavaType) .map(Class::getDeclaredFields) .orElse(new Field[] {})); final IntermediateStructuredType<?> baseType = getBaseType(); if (baseType != null) { intermediateKey.addAll(((IntermediateEntityType<?>) baseType).getKey()); } keyAttributes = Collections.unmodifiableList(intermediateKey); } return keyAttributes; } IntermediateEntityType(final JPAEdmNameBuilder nameBuilder, final EntityType<T> et, final IntermediateSchema schema); @Override void addAnnotations(final List<CsdlAnnotation> annotations); @Override JPAAttribute getAttribute(final String internalName); @Override JPACollectionAttribute getCollectionAttribute(final String externalName); @Override JPAAttribute getAttribute(final UriResourceProperty uriResourceItem); @Override String getContentType(); @Override JPAPath getContentTypeAttributePath(); @Override JPAPath getEtagPath(); @Override List<JPAAttribute> getKey(); @Override List<JPAPath> getKeyPath(); @Override Class<?> getKeyType(); @Override List<JPAPath> getSearchablePath(); @Override JPAPath getStreamAttributePath(); @Override String getTableName(); @Override boolean hasCompoundKey(); @Override boolean hasEtag(); @Override boolean hasStream(); @Override boolean ignore(); @Override boolean isAbstract(); @Override List<JPAPath> searchChildPath(final JPAPath selectItemPath);  }