public abstract class StructureType extends DataType
Common base class for ComplexType
and EntityType
.
ANNOTATION_PATH, BINARY, BOOLEAN, BYTE, BYTE_STREAM, CHAR, CHAR_STREAM, CODE_UNKNOWN, COMPLEX_VALUE, COMPLEX_VALUE_LIST, DATA_VALUE_LIST, DAY_TIME_DURATION, DECIMAL, DELTA_STREAM, DOUBLE, DYNAMIC_PATH, EDM_PRIMITIVE, ENTITY_VALUE, ENTITY_VALUE_LIST, ENUM_VALUE, FLOAT, GEOGRAPHY_COLLECTION, GEOGRAPHY_LINE_STRING, GEOGRAPHY_MULTI_LINE_STRING, GEOGRAPHY_MULTI_POINT, GEOGRAPHY_MULTI_POLYGON, GEOGRAPHY_POINT, GEOGRAPHY_POLYGON, GEOGRAPHY_VALUE, GEOMETRY_COLLECTION, GEOMETRY_LINE_STRING, GEOMETRY_MULTI_LINE_STRING, GEOMETRY_MULTI_POINT, GEOMETRY_MULTI_POLYGON, GEOMETRY_POINT, GEOMETRY_POLYGON, GEOMETRY_VALUE, GLOBAL_DATE_TIME, GUID_VALUE, INT, INTEGER, LIST, LOCAL_DATE, LOCAL_DATE_TIME, LOCAL_TIME, LONG, NAVIGATION_PATH, OBJECT, PATH, PATH_EXPRESSION, PROPERTY_PATH, QUERY_ALIAS, QUERY_FILTER, QUERY_FUNCTION_CALL, QUERY_OPERATOR_CALL, SHORT, STREAM_LINK, STRING, STRUCTURAL_PATH, TARGET_PATH, unknown, UNSIGNED_BYTE, UNSIGNED_INT, UNSIGNED_LONG, UNSIGNED_SHORT, YEAR_MONTH_DURATION
Constructor and Description |
---|
StructureType() |
Modifier and Type | Method and Description |
---|---|
Annotation |
getAnnotation(java.lang.String term)
Lookup an existing type annotation by term name.
|
AnnotationList |
getAnnotationList()
List of annotations for this type.
|
AnnotationMap |
getAnnotationMap()
Map of annotations for this type.
|
boolean |
getCanBeRemoved()
Can this model element be removed by
DataService.refreshMetadata . |
PropertyList |
getComplexProperties()
List of complex properties for this type (a subset of
StructureType.structuralProperties ). |
PropertyList |
getExtensionProperties()
List of extension properties for this type.
|
java.lang.String |
getLocalName()
The local name of this type within its owning
DataSchema , e.g. |
java.lang.String |
getName()
Synonym for
StructureType.qualifiedName . |
PropertyList |
getNavigationProperties()
List of navigation properties for this type.
|
ObjectFactory |
getObjectFactory()
(nullable) Factory for creating custom (subclass) objects with this type.
|
Property |
getProperty(java.lang.String name)
Lookup an existing property by name.
|
PropertyList |
getPropertyList()
List of stream, structural and navigation properties for this type.
|
PropertyMap |
getPropertyMap()
Map of stream, structural and navigation properties for this type.
|
java.lang.String |
getQualifiedName()
The name of this type qualified by its owning
DataSchema name, e.g. |
PropertyList |
getStreamProperties()
List of stream properties for this type.
|
PropertyList |
getStructuralProperties()
List of structural properties for this type.
|
boolean |
isAbstract()
true if this is an abstract type. |
boolean |
isExtension()
true if this type was added since metadata was originally loaded. |
boolean |
isInferred()
true if this structure type was inferred due to a missing term definition in the CSDL. |
boolean |
isOpenType()
true if this is an open type. |
boolean |
isRemoved()
Has this model element been removed by a successful call to
DataService.refreshMetadata ?
If `isRemoved == true, that implies that the old metadata (before refreshMetadata was called) did include this model element,
and that the new metadata (after refreshMetadata was called) does not include this model element. |
void |
setAbstract(boolean value)
true if this is an abstract type. |
void |
setCanBeRemoved(boolean value)
Can this model element be removed by
DataService.refreshMetadata . |
void |
setComplexProperties(PropertyList value)
List of complex properties for this type (a subset of
StructureType.structuralProperties ). |
void |
setExtension(boolean value)
true if this type was added since metadata was originally loaded. |
void |
setExtensionProperties(PropertyList value)
List of extension properties for this type.
|
void |
setInferred(boolean value)
true if this structure type was inferred due to a missing term definition in the CSDL. |
void |
setLocalName(java.lang.String value)
The local name of this type within its owning
DataSchema , e.g. |
void |
setNavigationProperties(PropertyList value)
List of navigation properties for this type.
|
void |
setObjectFactory(ObjectFactory value)
Factory for creating custom (subclass) objects with this type.
|
void |
setOpenType(boolean value)
true if this is an open type. |
void |
setPropertyList(PropertyList value)
List of stream, structural and navigation properties for this type.
|
void |
setPropertyMap(PropertyMap value)
Map of stream, structural and navigation properties for this type.
|
void |
setQualifiedName(java.lang.String value)
The name of this type qualified by its owning
DataSchema name, e.g. |
void |
setRemoved(boolean value)
Has this model element been removed by a successful call to
DataService.refreshMetadata ?
If `isRemoved == true, that implies that the old metadata (before refreshMetadata was called) did include this model element,
and that the new metadata (after refreshMetadata was called) does not include this model element. |
void |
setStreamProperties(PropertyList value)
List of stream properties for this type.
|
void |
setStructuralProperties(PropertyList value)
List of structural properties for this type.
|
forCode, forName, getBaseType, getCode, getItemType, isBasic, isBasicList, isCalendar, isComplex, isComplexList, isDerived, isEntity, isEntityList, isEnum, isEnumList, isGeography, isGeometry, isGeospatial, isGuid, isList, isNumber, isPath, isStream, isUnsigned, listOf, toString
public Annotation getAnnotation(java.lang.String term)
Lookup an existing type annotation by term name.
StructureType.annotationMap
, for looking up annotations that might not exist.
term
- The term name.public AnnotationList getAnnotationList()
List of annotations for this type.
public AnnotationMap getAnnotationMap()
Map of annotations for this type.
public boolean getCanBeRemoved()
Can this model element be removed by DataService.refreshMetadata
. Defaults to false
.
Set this to true
to indicate that the application is coded to be able able to function correctly without this model element.
public PropertyList getComplexProperties()
List of complex properties for this type (a subset of StructureType.structuralProperties
).
public PropertyList getExtensionProperties()
List of extension properties for this type. Includes extension structural/navigation properties.
public java.lang.String getLocalName()
The local name of this type within its owning DataSchema
, e.g. "MyType".
public java.lang.String getName()
Synonym for StructureType.qualifiedName
.
public PropertyList getNavigationProperties()
List of navigation properties for this type.
public ObjectFactory getObjectFactory()
(nullable) Factory for creating custom (subclass) objects with this type.
public Property getProperty(java.lang.String name)
Lookup an existing property by name. If the property does not exist it indicates a fundamental implementation
problem, therefore a non-catchable FatalException
will be thrown, and the app intentionally crashes.
The reason behind this drastic behaviour is to avoid mismatch between server and client.
It is still possible to avoid the FatalException
by looking up propery before calling this method like in the
following code snippet:
public void checkPropertyExistsExample() { DataService service = this.getService(); EntitySet entitySet = service.getEntitySet("Employees"); EntityType entityType = entitySet.getEntityType(); PropertyMap propMap = entityType.getPropertyMap(); if (propMap.keys().includes("BirthDate")) { Ignore.valueOf_any(entityType.getProperty("BirthDate")); } else { } }
StructureType.propertyMap
, for looking up properties that might not exist.
name
- Name of the property.public PropertyList getPropertyList()
List of stream, structural and navigation properties for this type.
public PropertyMap getPropertyMap()
Map of stream, structural and navigation properties for this type.
public java.lang.String getQualifiedName()
The name of this type qualified by its owning DataSchema
name, e.g. "MySchema.MyType".
public PropertyList getStreamProperties()
List of stream properties for this type.
public PropertyList getStructuralProperties()
List of structural properties for this type.
public boolean isAbstract()
true
if this is an abstract type.
public boolean isExtension()
true
if this type was added since metadata was originally loaded.
public boolean isInferred()
true
if this structure type was inferred due to a missing term definition in the CSDL.
public boolean isOpenType()
true
if this is an open type. An open type can have dynamic properties.
public boolean isRemoved()
Has this model element been removed by a successful call to DataService.refreshMetadata
?
If `isRemoved == true, that implies that the old metadata (before refreshMetadata was called) did include this model element,
and that the new metadata (after refreshMetadata was called) does not include this model element.
public void setAbstract(boolean value)
true
if this is an abstract type.
public void setCanBeRemoved(boolean value)
Can this model element be removed by DataService.refreshMetadata
. Defaults to false
.
Set this to true
to indicate that the application is coded to be able able to function correctly without this model element.
public void setComplexProperties(PropertyList value)
List of complex properties for this type (a subset of StructureType.structuralProperties
).
public void setExtension(boolean value)
true
if this type was added since metadata was originally loaded.
public void setExtensionProperties(PropertyList value)
List of extension properties for this type. Includes extension structural/navigation properties.
public void setInferred(boolean value)
true
if this structure type was inferred due to a missing term definition in the CSDL.
public void setLocalName(java.lang.String value)
The local name of this type within its owning DataSchema
, e.g. "MyType".
public void setNavigationProperties(PropertyList value)
List of navigation properties for this type.
public void setObjectFactory(ObjectFactory value)
Factory for creating custom (subclass) objects with this type.
public void setOpenType(boolean value)
true
if this is an open type. An open type can have dynamic properties.
public void setPropertyList(PropertyList value)
List of stream, structural and navigation properties for this type.
public void setPropertyMap(PropertyMap value)
Map of stream, structural and navigation properties for this type.
public void setQualifiedName(java.lang.String value)
The name of this type qualified by its owning DataSchema
name, e.g. "MySchema.MyType".
public void setRemoved(boolean value)
Has this model element been removed by a successful call to DataService.refreshMetadata
?
If `isRemoved == true, that implies that the old metadata (before refreshMetadata was called) did include this model element,
and that the new metadata (after refreshMetadata was called) does not include this model element.
public void setStreamProperties(PropertyList value)
List of stream properties for this type.
public void setStructuralProperties(PropertyList value)
List of structural properties for this type.