本文整理了Java中org.apache.olingo.odata2.api.edm.provider.Key.getKeys()
方法的一些代码示例,展示了Key.getKeys()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Key.getKeys()
方法的具体详情如下:
包路径:org.apache.olingo.odata2.api.edm.provider.Key
类名称:Key
方法名:getKeys
暂无
代码示例来源:origin: com.sap.cloud.servicesdk/odata-v2-lib
@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 {
// Entity Type does not define a key
throw new EdmException(EdmException.COMMON);
}
}
return edmKeyPropertyNames;
}
代码示例来源:origin: org.apache.olingo/olingo-odata2-core
@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 {
// Entity Type does not define a key
throw new EdmException(EdmException.COMMON);
}
}
return edmKeyPropertyNames;
}
代码示例来源:origin: org.apache.olingo/olingo-odata2-core-incubating
@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 {
// Entity Type does not define a key
throw new EdmException(EdmException.COMMON);
}
}
return edmKeyPropertyNames;
}
代码示例来源:origin: io.cronapp/olingo-odata2-jpa-processor-core
@Override
public void build() throws ODataJPAModelException {
List<PropertyRef> propertyRefList = null;
if (key == null) {
key = new Key();
}
if (key.getKeys() == null) {
propertyRefList = new ArrayList<PropertyRef>();
key.setKeys(propertyRefList);
} else {
propertyRefList = key.getKeys();
}
if (isBuildModeComplexType) {
ComplexType complexType =
complexTypeView.searchEdmComplexType(propertyView.getJPAAttribute().getJavaType().getName());
normalizeComplexKey(complexType, propertyRefList);
} else {
PropertyRef propertyRef = new PropertyRef();
propertyRef.setName(propertyView.getEdmSimpleProperty().getName());
Facets facets = (Facets) propertyView.getEdmSimpleProperty().getFacets();
if (facets == null) {
propertyView.getEdmSimpleProperty().setFacets(new Facets().setNullable(false));
} else {
facets.setNullable(false);
}
propertyRefList.add(propertyRef);
}
}
代码示例来源:origin: org.apache.olingo/olingo-odata2-jpa-processor-core
@Override
public void build() throws ODataJPAModelException {
List<PropertyRef> propertyRefList = null;
if (key == null) {
key = new Key();
}
if (key.getKeys() == null) {
propertyRefList = new ArrayList<PropertyRef>();
key.setKeys(propertyRefList);
} else {
propertyRefList = key.getKeys();
}
if (isBuildModeComplexType) {
ComplexType complexType =
complexTypeView.searchEdmComplexType(propertyView.getJPAAttribute().getJavaType().getName());
normalizeComplexKey(complexType, propertyRefList);
} else {
PropertyRef propertyRef = new PropertyRef();
propertyRef.setName(propertyView.getEdmSimpleProperty().getName());
Facets facets = (Facets) propertyView.getEdmSimpleProperty().getFacets();
if (facets == null) {
propertyView.getEdmSimpleProperty().setFacets(new Facets().setNullable(false));
} else {
facets.setNullable(false);
}
propertyRefList.add(propertyRef);
}
}
代码示例来源:origin: org.apache.olingo/olingo-odata2-core
Collection<PropertyRef> propertyRefs = entityType.getKey().getKeys();
for (PropertyRef propertyRef : propertyRefs) {
xmlStreamWriter.writeStartElement(XmlMetadataConstants.EDM_PROPERTY_REF);
代码示例来源:origin: com.sap.cloud.servicesdk/odata-v2-lib
Collection<PropertyRef> propertyRefs = entityType.getKey().getKeys();
for (PropertyRef propertyRef : propertyRefs) {
xmlStreamWriter.writeStartElement(XmlMetadataConstants.EDM_PROPERTY_REF);
代码示例来源:origin: org.apache.olingo/olingo-odata2-core-incubating
Collection<PropertyRef> propertyRefs = entityType.getKey().getKeys();
for (PropertyRef propertyRef : propertyRefs) {
xmlStreamWriter.writeStartElement(XmlMetadataConstants.EDM_PROPERTY_REF);
代码示例来源:origin: com.sap.cloud.servicesdk.prov/odata-core
+ " has no key properties");
sourceRefs = key.getKeys();
} else {
sourceRefs = new ArrayList<PropertyRef>();
+ " has no key properties");
targetRefs = key.getKeys();
} else {
targetRefs = new ArrayList<PropertyRef>();
内容来源于网络,如有侵权,请联系作者删除!