Modifier and Type | Field and Description |
---|---|
static EnumType |
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 |
---|
EnumType() |
Modifier and Type | Method and Description |
---|---|
EnumValue |
createMember(java.lang.String name)
|
EnumValue |
createMember(java.lang.String name,
java.lang.Long value)
Create a new member, optionally generating a unique numeric value for it.
|
EnumValue |
findMember(java.lang.String name)
Lookup a member by name.
|
Annotation |
getAnnotation(java.lang.String term)
Lookup an existing annotation by term name, or throw an exception if the annotation is not found.
|
AnnotationMap |
getAnnotations()
Return map of annotations for this model element.
|
boolean |
getCanBeRemoved()
Return can this model element be removed by
DataService.refreshMetadata . |
int |
getCode()
Return DataType.ENUM_VALUE.
|
DataType |
getDerivedFrom()
Return synonym for
EnumType.baseType . |
java.lang.String |
getLocalName()
Return the local name of this type within its owning
DataSchema , e.g. |
EnumValue |
getMember(java.lang.String name)
Lookup a member by name.
|
EnumValueList |
getMemberList()
Return list of members for this type.
|
EnumValueMap |
getMemberMap()
Return map of members for this type.
|
java.lang.String |
getName()
Return synonym for
EnumType.qualifiedName . |
java.lang.String |
getQualifiedName()
Return the name of this type qualified by its owning
DataSchema name, e.g. |
int |
getSourceLine()
Return source line number for this schema element within its defining schema.
|
boolean |
isDerived()
Return
true if this type is a derived simple, complex, entity or enum type. |
boolean |
isExtension()
Return true if this type was added since metadata was originally loaded.
|
boolean |
isFlags()
Return does this enum type represent a set of bit flags?
|
boolean |
isInferred()
Return
true if this simple type was inferred due to a missing term definition in the CSDL. |
boolean |
isRemoved()
Return 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 |
setCanBeRemoved(boolean value)
Set can this model element be removed by
DataService.refreshMetadata . |
void |
setDerivedFrom(DataType value)
Set synonym for
EnumType.baseType . |
void |
setExtension(boolean value)
Set true if this type was added since metadata was originally loaded.
|
void |
setFlags(boolean value)
Set does this enum type represent a set of bit flags?
|
void |
setInferred(boolean value)
Set
true if this simple type was inferred due to a missing term definition in the CSDL. |
void |
setLocalName(java.lang.String value)
Set the local name of this type within its owning
DataSchema , e.g. |
void |
setMemberList(EnumValueList value)
Set list of members for this type.
|
void |
setMemberMap(EnumValueMap value)
Set map of members for this type.
|
void |
setQualifiedName(java.lang.String value)
Set the name of this type qualified by its owning
DataSchema name, e.g. |
void |
setRemoved(boolean value)
Set 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 |
setSourceLine(int value)
Set source line number for this schema element within its defining schema.
|
java.lang.String |
toString()
Return the name of this data type.
|
EnumValue |
withByte(byte value)
Return a value of this enum type with the specified value.
|
EnumValue |
withInt(int value)
Return a value of this enum type with the specified value.
|
EnumValue |
withLong(long value)
Return a value of this enum type with the specified value.
|
EnumValue |
withNullableByte(java.lang.Byte value)
Return (nullable) A value of this enum type with the specified value.
|
EnumValue |
withNullableInt(java.lang.Integer value)
Return (nullable) A value of this enum type with the specified value.
|
EnumValue |
withNullableLong(java.lang.Long value)
Return (nullable) A value of this enum type with the specified value.
|
EnumValue |
withNullableShort(java.lang.Short value)
Return (nullable) A value of this enum type with the specified value.
|
EnumValue |
withShort(short value)
Return a value of this enum type with the specified value.
|
EnumValue |
withUnsignedByte(UnsignedByte value)
Return (nullable) A value of this enum type with the specified value.
|
forCode, forName, getBaseType, getItemType, isBasic, isBasicList, isCalendar, isComplex, isComplexList, isEntity, isEntityList, isEnum, isEnumList, isGeography, isGeometry, isGeospatial, isGuid, isList, isNumber, isPath, isStream, isUnsigned, listOf
public static final EnumType undefined
public EnumValue createMember(java.lang.String name)
name
- Name parameter.public EnumValue createMember(java.lang.String name, java.lang.Long value)
Create a new member, optionally generating a unique numeric value for it.
name
- Member name.value
- (nullable) Member value (if null
, a unique member value will be automatically assigned, or zero if too many member values have already been assigned).public EnumValue findMember(java.lang.String name)
Lookup a member by name.
name
- Name of the member, or numeric value.null
if not found.public Annotation getAnnotation(java.lang.String term)
Lookup an existing annotation by term name, or throw an exception if the annotation is not found.
EnumType.annotations
and AnnotationMap.get
, for looking up annotations that might not exist.
term
- The term name.public AnnotationMap getAnnotations()
Return map of annotations for this model element. For annotations without qualifiers, the entry key is the annotation term name. For annotations with qualifiers, the entry key is the annotation term name, then "#", then the annotation qualifier.
public boolean getCanBeRemoved()
Return 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 int getCode()
Return DataType.ENUM_VALUE.
public DataType getDerivedFrom()
Return synonym for EnumType.baseType
.
EnumType.baseType
.public java.lang.String getLocalName()
Return the local name of this type within its owning DataSchema
, e.g. "MyType".
DataSchema
, e.g. "MyType".public EnumValue getMember(java.lang.String name)
Lookup a member by name.
UndefinedException
if no member is found with this name.
name
- Name of the member, or numeric value.public EnumValueList getMemberList()
Return list of members for this type.
public EnumValueMap getMemberMap()
Return map of members for this type.
public java.lang.String getName()
Return synonym for EnumType.qualifiedName
.
getName
in class DataType
EnumType.qualifiedName
.public java.lang.String getQualifiedName()
Return the name of this type qualified by its owning DataSchema
name, e.g. "MySchema.MyType".
DataSchema
name, e.g. "MySchema.MyType".public int getSourceLine()
Return source line number for this schema element within its defining schema.
public boolean isDerived()
Return true
if this type is a derived simple, complex, entity or enum type.
public boolean isExtension()
Return true if this type was added since metadata was originally loaded.
public boolean isFlags()
Return does this enum type represent a set of bit flags?
public boolean isInferred()
Return true
if this simple type was inferred due to a missing term definition in the CSDL.
true
if this simple type was inferred due to a missing term definition in the CSDL.public boolean isRemoved()
Return 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 setCanBeRemoved(boolean value)
Set 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.
value
- Can this model element be removed by `DataService.refreshMetadata`. Defaults to `false`.public void setDerivedFrom(DataType value)
Set synonym for EnumType.baseType
.
value
- Synonym for EnumType.baseType
.public void setExtension(boolean value)
Set true if this type was added since metadata was originally loaded.
value
- True if this type was added since metadata was originally loaded.public void setFlags(boolean value)
Set does this enum type represent a set of bit flags?
value
- Does this enum type represent a set of bit flags?public void setInferred(boolean value)
Set true
if this simple type was inferred due to a missing term definition in the CSDL.
value
- true
if this simple type was inferred due to a missing term definition in the CSDL.public void setLocalName(java.lang.String value)
Set the local name of this type within its owning DataSchema
, e.g. "MyType".
value
- The local name of this type within its owning DataSchema
, e.g. "MyType".public void setMemberList(EnumValueList value)
Set list of members for this type.
value
- List of members for this type.public void setMemberMap(EnumValueMap value)
Set map of members for this type.
value
- Map of members for this type.public void setQualifiedName(java.lang.String value)
Set the name of this type qualified by its owning DataSchema
name, e.g. "MySchema.MyType".
value
- The name of this type qualified by its owning DataSchema
name, e.g. "MySchema.MyType".public void setRemoved(boolean value)
Set 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.
value
- Has this model element been removed by a successful call to `DataService.refreshMetadata`?public void setSourceLine(int value)
Set source line number for this schema element within its defining schema.
value
- Source line number for this schema element within its defining schema.public java.lang.String toString()
Return the name of this data type.
public EnumValue withByte(byte value)
Return a value of this enum type with the specified value.
value
- Numeric enum value.public EnumValue withInt(int value)
Return a value of this enum type with the specified value.
value
- Numeric enum value.public EnumValue withLong(long value)
Return a value of this enum type with the specified value.
value
- Numeric enum value.public EnumValue withNullableByte(java.lang.Byte value)
Return (nullable) A value of this enum type with the specified value.
value
- (nullable) Numeric enum value.public EnumValue withNullableInt(java.lang.Integer value)
Return (nullable) A value of this enum type with the specified value.
value
- (nullable) Numeric enum value.public EnumValue withNullableLong(java.lang.Long value)
Return (nullable) A value of this enum type with the specified value.
value
- (nullable) Numeric enum value.public EnumValue withNullableShort(java.lang.Short value)
Return (nullable) A value of this enum type with the specified value.
value
- (nullable) Numeric enum value.public EnumValue withShort(short value)
Return a value of this enum type with the specified value.
value
- Numeric enum value.public EnumValue withUnsignedByte(UnsignedByte value)
Return (nullable) A value of this enum type with the specified value.
value
- (nullable) Numeric enum value.