Adding missing method to Edm interfaces to check whether an entity or a complex type is abstract
This commit is contained in:
parent
8a6bcb3d2a
commit
10f03a2c0a
|
@ -69,4 +69,8 @@ public class EdmComplexTypeImpl extends AbstractEdmComplexType {
|
|||
return helper.isOpenType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAbstract() {
|
||||
return helper.isAbstract();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -83,4 +83,8 @@ public class EdmEntityTypeImpl extends AbstractEdmEntityType {
|
|||
return helper.isOpenType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAbstract() {
|
||||
return helper.isAbstract();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -80,4 +80,12 @@ public class EdmStructuredTypeHelperImpl implements EdmStructuredTypeHelper {
|
|||
: false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAbstract() {
|
||||
return complexType instanceof org.apache.olingo.client.api.edm.xml.v4.ComplexType
|
||||
? ((org.apache.olingo.client.api.edm.xml.v4.ComplexType) complexType).isAbstractEntityType()
|
||||
: complexType instanceof EntityType
|
||||
? ((EntityType) complexType).isAbstractEntityType()
|
||||
: false;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -81,9 +81,16 @@ public interface EdmStructuredType extends EdmType {
|
|||
boolean compatibleTo(EdmType targetType);
|
||||
|
||||
/**
|
||||
* Indicates if the entity type is an open type.
|
||||
* Indicates if the structured type is an open type.
|
||||
*
|
||||
* @return <code>true</code> if the entity type is open
|
||||
* @return <code>true</code> if the structured type is open
|
||||
*/
|
||||
boolean isOpenType();
|
||||
|
||||
/**
|
||||
* Indicates if the structured type is abstract.
|
||||
*
|
||||
* @return <code>true</code> if the structured type is abstract
|
||||
*/
|
||||
boolean isAbstract();
|
||||
}
|
||||
|
|
|
@ -31,4 +31,5 @@ public interface EdmStructuredTypeHelper {
|
|||
|
||||
boolean isOpenType();
|
||||
|
||||
boolean isAbstract();
|
||||
}
|
||||
|
|
|
@ -59,4 +59,8 @@ public class EdmComplexTypeImpl extends AbstractEdmComplexType {
|
|||
return helper.isOpenType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAbstract() {
|
||||
return helper.isAbstract();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -93,4 +93,8 @@ public class EdmEntityTypeImpl extends AbstractEdmEntityType {
|
|||
return helper.isOpenType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAbstract() {
|
||||
return helper.isAbstract();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -76,4 +76,8 @@ public class EdmStructuredTypeHelperImpl implements EdmStructuredTypeHelper {
|
|||
return structuredType.isOpenType();
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean isAbstract() {
|
||||
return structuredType.isAbstract();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue