@Test public void getKeyPropertiesNames() throws Exception { List<String> keyProperties = edmEntityType.getKeyPropertyNames(); assertNotNull(keyProperties); assertTrue(keyProperties.contains("Id")); List<String> properties = edmEntityType.getPropertyNames(); assertNotNull(properties); assertTrue(properties.contains("Id")); }
@Override public List<String> getKeyPropertyNames() throws EdmException { if (edmKeyPropertyNames == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyPropertyNames(); } edmKeyPropertyNames = new ArrayList<String>(); if (entityType.getKey() != null) { for (final PropertyRef keyProperty : entityType.getKey().getKeys()) { edmKeyPropertyNames.add(keyProperty.getName()); } } else { throw new EdmException(EdmException.COMMON); } } return edmKeyPropertyNames; }
EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getKeyPropertyNames() throws EdmException { if (edmKeyPropertyNames == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyPropertyNames(); } edmKeyPropertyNames = new ArrayList<String>(); if (entityType.getKey() != null) { for (final PropertyRef keyProperty : entityType.getKey().getKeys()) { edmKeyPropertyNames.add(keyProperty.getName()); } } else { throw new EdmException(EdmException.COMMON); } } return edmKeyPropertyNames; } }
EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getKeyPropertyNames() throws EdmException { if (edmKeyPropertyNames == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyPropertyNames(); } edmKeyPropertyNames = new ArrayList<String>(); if (entityType.getKey() != null) { for (final PropertyRef keyProperty : entityType.getKey().getKeys()) { edmKeyPropertyNames.add(keyProperty.getName()); } } else { throw new EdmException(EdmException.COMMON); } } return edmKeyPropertyNames; } EdmEntityTypeImplProv(final EdmImplProv edm, final EntityType entityType, final String namespace); }
EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getKeyPropertyNames() throws EdmException { if (edmKeyPropertyNames == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyPropertyNames(); } edmKeyPropertyNames = new ArrayList<String>(); if (entityType.getKey() != null) { for (final PropertyRef keyProperty : entityType.getKey().getKeys()) { edmKeyPropertyNames.add(keyProperty.getName()); } } else { throw new EdmException(EdmException.COMMON); } } return edmKeyPropertyNames; } EdmEntityTypeImplProv(final EdmImplProv edm, final EntityType entityType, final String namespace); @Override List<String> getKeyPropertyNames(); @Override List<EdmProperty> getKeyProperties(); @Override boolean hasStream(); @Override EdmCustomizableFeedMappings getCustomizableFeedMappings(); @Override List<String> getNavigationPropertyNames(); @Override EdmEntityType getBaseType(); }
EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<String> getKeyPropertyNames() throws EdmException { if (edmKeyPropertyNames == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyPropertyNames(); } edmKeyPropertyNames = new ArrayList<String>(); if (entityType.getKey() != null) { for (final PropertyRef keyProperty : entityType.getKey().getKeys()) { edmKeyPropertyNames.add(keyProperty.getName()); } } else { throw new EdmException(EdmException.COMMON); } } return edmKeyPropertyNames; } EdmEntityTypeImplProv(final EdmImplProv edm, final EntityType entityType, final String namespace); @Override List<String> getKeyPropertyNames(); @Override List<EdmProperty> getKeyProperties(); @Override boolean hasStream(); @Override EdmCustomizableFeedMappings getCustomizableFeedMappings(); @Override List<String> getNavigationPropertyNames(); @Override EdmEntityType getBaseType();  }