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()
DataType.ENTITY_VALUE
|
CustomPathList |
getCustomPaths()
For internal use only.
|
PropertyList |
getKeyProperties()
List of key properties for this type.
|
Property |
getKeyProperty(java.lang.String name)
Lookup a key property by name.
|
EntityTypeList |
getSubtypes()
(nullable) If
EntityType.hasSubtypes is true , then the list of subtypes. |
EntityType |
getSupertype()
(nullable) If
EntityType.hasSupertype is true , then the parent entity type. |
boolean |
hasSubtypes()
true if this entity type is a parent of one or more derived entity types. |
boolean |
hasSupertype()
true if this entity type is a subtype of a parent entity type. |
boolean |
isMedia()
true if this entity type is a media resource (has stream content). |
void |
registerFactory(ObjectFactory factory)
Set the
EntityType.objectFactory for this entity type. |
void |
setCustomPaths(CustomPathList value)
For internal use only.
|
void |
setKeyProperties(PropertyList value)
List of key properties for this type.
|
void |
setMedia(boolean value)
true if this entity type is a media resource (has stream content). |
void |
setObjectFactoryWithClass(java.lang.Class<? extends EntityValue> cls) |
void |
setSubtypes(EntityTypeList value)
If
EntityType.hasSubtypes is true , then the list of subtypes. |
void |
setSupertype(EntityType value)
If
EntityType.hasSupertype is true , then the parent entity type. |
java.lang.String |
toString()
Return the name of this data type.
|
EntityType |
withFactory(ObjectFactory factory)
Set the
EntityType.objectFactory for this entity type. |
getAnnotation, getAnnotationList, getAnnotationMap, getCanBeRemoved, getComplexProperties, getExtensionProperties, getLocalName, getName, getNavigationProperties, getObjectFactory, getProperty, getPropertyList, getPropertyMap, getQualifiedName, getStreamProperties, getStructuralProperties, isAbstract, isExtension, isInferred, isOpenType, isRemoved, setAbstract, setCanBeRemoved, setComplexProperties, setExtension, setExtensionProperties, setInferred, setLocalName, setNavigationProperties, setObjectFactory, setOpenType, setPropertyList, setPropertyMap, setQualifiedName, setRemoved, 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 CustomPathList getCustomPaths()
For internal use only.
public PropertyList getKeyProperties()
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 EntityTypeList getSubtypes()
(nullable) If EntityType.hasSubtypes
is true
, then the list of subtypes. Otherwise null
.
public EntityType getSupertype()
(nullable) If EntityType.hasSupertype
is true
, then the parent entity type. Otherwise null
.
public boolean hasSubtypes()
true
if this entity type is a parent of one or more derived entity types.
public boolean hasSupertype()
true
if this entity type is a subtype of a parent entity type.
public boolean isMedia()
true
if this entity type is a media resource (has stream content).
public void registerFactory(ObjectFactory factory)
Set the EntityType.objectFactory
for this entity type.
factory
- Custom factory to produce EntityValue
instances of this type.public void setCustomPaths(CustomPathList value)
For internal use only.
public void setKeyProperties(PropertyList value)
List of key properties for this type.
public void setMedia(boolean value)
true
if this entity type is a media resource (has stream content).
public void setSubtypes(EntityTypeList value)
If EntityType.hasSubtypes
is true
, then the list of subtypes. Otherwise null
.
public void setSupertype(EntityType 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(ObjectFactory factory)
Set the EntityType.objectFactory
for this entity type.
factory
- Custom factory to produce EntityValue
instances of this type.