public class EntityType extends StructureType
Encapsulates the metadata of an OData entity type.
Modifier and Type | Field and Description |
---|---|
static EntityType |
abstractBase |
static EntityType |
undefined |
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 |
---|
EntityType() |
Modifier and Type | Method and Description |
---|---|
int |
getCode()
Return DataType.ENTITY_VALUE
|
int |
getCountSets()
Return the number of entity sets using this entity type.
|
CustomPathList |
getCustomPaths()
For internal use only.
|
PropertyList |
getKeyProperties()
Return list of key properties for this type.
|
Property |
getKeyProperty(java.lang.String name)
Lookup a key property by name.
|
StreamProperty |
getMediaProperty()
Return pseudo-property for media content (media entities only).
|
StringMap |
getPathColumns()
Return map from property paths (e.g.
|
EntityTypeList |
getSubtypes()
Return (nullable) If
EntityType.hasSubtypes is true , then the list of subtypes. |
EntityType |
getSupertype()
Return (nullable) If
EntityType.hasSupertype is true , then the parent entity type. |
boolean |
hasSubtypes()
Return
true if this entity type is a parent of one or more derived entity types. |
boolean |
hasSupertype()
Return
true if this entity type is a subtype of a parent entity type. |
boolean |
isMedia()
Return
true if this entity type is a media resource (has stream content). |
void |
registerFactory(com.sap.cloud.server.odata.core.ObjectFactory factory)
Set the
EntityType.objectFactory for this entity type. |
void |
setCountSets(int value)
Set the number of entity sets using this entity type.
|
void |
setCustomPaths(CustomPathList value)
For internal use only.
|
void |
setKeyProperties(PropertyList value)
Set list of key properties for this type.
|
void |
setMedia(boolean value)
Set
true if this entity type is a media resource (has stream content). |
void |
setMediaProperty(StreamProperty value)
Set pseudo-property for media content (media entities only).
|
void |
setObjectFactoryWithClass(java.lang.Class<? extends EntityValue> cls) |
void |
setPathColumns(StringMap value)
Set map from property paths (e.g.
|
void |
setSubtypes(EntityTypeList value)
Set if
EntityType.hasSubtypes is true , then the list of subtypes. |
void |
setSupertype(EntityType value)
Set if
EntityType.hasSupertype is true , then the parent entity type. |
java.lang.String |
toString()
Return the name of this data type.
|
EntityType |
withFactory(com.sap.cloud.server.odata.core.ObjectFactory factory)
Set the
EntityType.objectFactory for this entity type. |
getAnnotation, getAnnotations, getCanBeRemoved, getCollectionProperties, getComplexProperties, getExtensionProperties, getLocalName, getName, getNavigationProperties, getObjectFactory, getProperty, getPropertyList, getPropertyMap, getQualifiedName, getSourceLine, getStreamProperties, getStructuralProperties, isAbstract, isExtension, isHidden, isInferred, isOpenType, isRemoved, setAbstract, setCanBeRemoved, setCollectionProperties, setComplexProperties, setExtension, setExtensionProperties, setHidden, setInferred, setLocalName, setNavigationProperties, setObjectFactory, setOpenType, setPropertyList, setPropertyMap, setQualifiedName, setRemoved, setSourceLine, setStreamProperties, setStructuralProperties
forCode, forName, getBaseType, getItemType, isBasic, isBasicList, isCalendar, isComplex, isComplexList, isDerived, isEntity, isEntityList, isEnum, isEnumList, isGeography, isGeometry, isGeospatial, isGuid, isList, isNumber, isPath, isStream, isUnsigned, listOf
public static final EntityType undefined
public static final EntityType abstractBase
public void setObjectFactoryWithClass(java.lang.Class<? extends EntityValue> cls)
public int getCode()
Return DataType.ENTITY_VALUE
public int getCountSets()
Return the number of entity sets using this entity type.
public CustomPathList getCustomPaths()
For internal use only.
public PropertyList getKeyProperties()
Return list of key properties for this type.
public Property getKeyProperty(java.lang.String name)
Lookup a key property by name.
name
- Name of the property.public StreamProperty getMediaProperty()
Return pseudo-property for media content (media entities only).
public StringMap getPathColumns()
Return map from property paths (e.g. "Name", "Address/City") to SQL column names.
By default, this property contains an immutable map.
Before setting the contents of this map, please replace the map with a new StringMap
.
public EntityTypeList getSubtypes()
Return (nullable) If EntityType.hasSubtypes
is true
, then the list of subtypes. Otherwise null
.
EntityType.hasSubtypes
is true
, then the list of subtypes. Otherwise null
.public EntityType getSupertype()
Return (nullable) If EntityType.hasSupertype
is true
, then the parent entity type. Otherwise null
.
EntityType.hasSupertype
is true
, then the parent entity type. Otherwise null
.public boolean hasSubtypes()
Return true
if this entity type is a parent of one or more derived entity types.
true
if this entity type is a parent of one or more derived entity types.public boolean hasSupertype()
Return true
if this entity type is a subtype of a parent entity type.
true
if this entity type is a subtype of a parent entity type.public boolean isMedia()
Return true
if this entity type is a media resource (has stream content).
true
if this entity type is a media resource (has stream content).public void registerFactory(com.sap.cloud.server.odata.core.ObjectFactory factory)
Set the EntityType.objectFactory
for this entity type.
factory
- Custom factory to produce EntityValue
instances of this type.public void setCountSets(int value)
Set the number of entity sets using this entity type.
value
- The number of entity sets using this entity type.public void setCustomPaths(CustomPathList value)
For internal use only.
value
- (internal use only)public void setKeyProperties(PropertyList value)
Set list of key properties for this type.
value
- List of key properties for this type.public void setMedia(boolean value)
Set true
if this entity type is a media resource (has stream content).
value
- true
if this entity type is a media resource (has stream content).public void setMediaProperty(StreamProperty value)
Set pseudo-property for media content (media entities only).
value
- Pseudo-property for media content (media entities only).public void setPathColumns(StringMap value)
Set map from property paths (e.g. "Name", "Address/City") to SQL column names.
By default, this property contains an immutable map.
Before setting the contents of this map, please replace the map with a new StringMap
.
value
- Map from property paths (e.g. "Name", "Address/City") to SQL column names.public void setSubtypes(EntityTypeList value)
Set if EntityType.hasSubtypes
is true
, then the list of subtypes. Otherwise null
.
value
- If EntityType.hasSubtypes
is true
, then the list of subtypes. Otherwise null
.public void setSupertype(EntityType value)
Set if EntityType.hasSupertype
is true
, then the parent entity type. Otherwise null
.
value
- If EntityType.hasSupertype
is true
, then the parent entity type. Otherwise null
.public java.lang.String toString()
Return the name of this data type.
public EntityType withFactory(com.sap.cloud.server.odata.core.ObjectFactory factory)
Set the EntityType.objectFactory
for this entity type.
factory
- Custom factory to produce EntityValue
instances of this type.