@Test public void getKeyProperties() throws Exception { List<EdmProperty> keyProperties = edmEntityType.getKeyProperties(); assertNotNull(keyProperties); assertEquals("Id", keyProperties.get(0).getName()); }
@Override public List<EdmProperty> getKeyProperties() throws EdmException { if (edmKeyProperties == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyProperties(); } if (keyProperties == null) { keyProperties = new HashMap<String, EdmProperty>(); edmKeyProperties = new ArrayList<EdmProperty>(); for (String keyPropertyName : getKeyPropertyNames()) { final EdmTyped edmProperty = getProperty(keyPropertyName); if (edmProperty != null && edmProperty instanceof EdmProperty) { keyProperties.put(keyPropertyName, (EdmProperty) edmProperty); edmKeyProperties.add((EdmProperty) edmProperty); } else { throw new EdmException(EdmException.COMMON); } } } } return edmKeyProperties; }
EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<EdmProperty> getKeyProperties() throws EdmException { if (edmKeyProperties == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyProperties(); } if (keyProperties == null) { keyProperties = new HashMap<String, EdmProperty>(); edmKeyProperties = new ArrayList<EdmProperty>(); for (String keyPropertyName : getKeyPropertyNames()) { final EdmTyped edmProperty = getProperty(keyPropertyName); if (edmProperty != null && edmProperty instanceof EdmProperty) { keyProperties.put(keyPropertyName, (EdmProperty) edmProperty); edmKeyProperties.add((EdmProperty) edmProperty); } else { throw new EdmException(EdmException.COMMON); } } } } return edmKeyProperties; } }
EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<EdmProperty> getKeyProperties() throws EdmException { if (edmKeyProperties == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyProperties(); } if (keyProperties == null) { keyProperties = new HashMap<String, EdmProperty>(); edmKeyProperties = new ArrayList<EdmProperty>(); for (String keyPropertyName : getKeyPropertyNames()) { final EdmTyped edmProperty = getProperty(keyPropertyName); if (edmProperty != null && edmProperty instanceof EdmProperty) { keyProperties.put(keyPropertyName, (EdmProperty) edmProperty); edmKeyProperties.add((EdmProperty) edmProperty); } else { throw new EdmException(EdmException.COMMON); } } } } return edmKeyProperties; } EdmEntityTypeImplProv(final EdmImplProv edm, final EntityType entityType, final String namespace); }
EdmEntityTypeImplProv extends EdmStructuralTypeImplProv implements EdmEntityType { @Override public List<EdmProperty> getKeyProperties() throws EdmException { if (edmKeyProperties == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyProperties(); } if (keyProperties == null) { keyProperties = new HashMap<String, EdmProperty>(); edmKeyProperties = new ArrayList<EdmProperty>(); for (String keyPropertyName : getKeyPropertyNames()) { final EdmTyped edmProperty = getProperty(keyPropertyName); if (edmProperty != null && edmProperty instanceof EdmProperty) { keyProperties.put(keyPropertyName, (EdmProperty) edmProperty); edmKeyProperties.add((EdmProperty) edmProperty); } else { throw new EdmException(EdmException.COMMON); } } } } return edmKeyProperties; } 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<EdmProperty> getKeyProperties() throws EdmException { if (edmKeyProperties == null) { if (edmBaseType != null) { return ((EdmEntityType) edmBaseType).getKeyProperties(); } if (keyProperties == null) { keyProperties = new HashMap<String, EdmProperty>(); edmKeyProperties = new ArrayList<EdmProperty>(); for (String keyPropertyName : getKeyPropertyNames()) { final EdmTyped edmProperty = getProperty(keyPropertyName); if (edmProperty != null && edmProperty instanceof EdmProperty) { keyProperties.put(keyPropertyName, (EdmProperty) edmProperty); edmKeyProperties.add((EdmProperty) edmProperty); } else { throw new EdmException(EdmException.COMMON); } } } } return edmKeyProperties; } 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();  }