public class SimpleType extends DataType
Represents a type definition for an underlying basic type.
Modifier and Type | Field and Description |
---|---|
static EnumType |
simplr |
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 |
---|
SimpleType() |
Modifier and Type | Method and Description |
---|---|
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 the type code of the underlying type.
|
DataType |
getDerivedFrom()
Return synonym for
SimpleType.baseType . |
boolean |
getFixedLength()
Return
true if this item has fixed length for string and binary values. |
java.lang.String |
getLocalName()
Return the local name of this type within its owning
DataSchema , e.g. |
int |
getMaxLength()
Return maximum length for
string and binary values. |
int |
getMinLength()
Return minimum length for
string and binary values. |
java.lang.String |
getName()
Return synonym for
SimpleType.qualifiedName . |
int |
getPrecision()
Return precision for
decimal and integer values. |
java.lang.String |
getQualifiedName()
Return the name of this type qualified by its owning
DataSchema name, e.g. |
int |
getScale()
Return scale for
decimal values. |
int |
getSourceLine()
Return source line number for this schema element within its defining schema.
|
int |
getSrid()
Return EPSG Spatial Reference System Identifier (SRID) for the associated value.
|
TypeFacets |
getTypeFacets()
Return (nullable) Type facets for this type.
|
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 |
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. |
boolean |
isUnicode()
Return
true if this item allows Unicode content. |
void |
setCanBeRemoved(boolean value)
Set can this model element be removed by
DataService.refreshMetadata . |
void |
setDerivedFrom(DataType value)
Set synonym for
SimpleType.baseType . |
void |
setExtension(boolean value)
Set
true if this type was added since metadata was originally loaded. |
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 |
setMaxLength(int value)
Set maximum length for
string and binary values. |
void |
setMinLength(int value)
Set minimum length for
string and binary values. |
void |
setPrecision(int value)
Set precision for
decimal and integer values. |
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 |
setScale(int value)
Set scale for
decimal values. |
void |
setSourceLine(int value)
Set source line number for this schema element within its defining schema.
|
void |
setSrid(int value)
Set EPSG Spatial Reference System Identifier (SRID) for the associated value.
|
void |
setTypeFacets(TypeFacets value)
Set type facets for this type.
|
void |
setUnicode(boolean value)
Set
true if this item allows Unicode content. |
java.lang.String |
toString()
Return the name of this data type.
|
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 simplr
public Annotation getAnnotation(java.lang.String term)
Lookup an existing annotation by term name, or throw an exception if the annotation is not found.
SimpleType.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 the type code of the underlying type.
public DataType getDerivedFrom()
Return synonym for SimpleType.baseType
.
SimpleType.baseType
.public boolean getFixedLength()
Return true
if this item has fixed length for string
and binary
values.
public java.lang.String getLocalName()
Return the local name of this type within its owning DataSchema
, e.g. "MyType".
DataSchema
, e.g. "MyType".public int getMaxLength()
Return maximum length for string
and binary
values.
TypeFacets.ANY_LENGTH.
public int getMinLength()
Return minimum length for string
and binary
values.
TypeFacets.ANY_LENGTH.
public java.lang.String getName()
Return synonym for SimpleType.qualifiedName
.
getName
in class DataType
SimpleType.qualifiedName
.public int getPrecision()
Return precision for decimal
and integer
values.
TypeFacets.ANY_PRECISION.
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 getScale()
Return scale for decimal
values.
TypeFacets.FLOATING_SCALE, TypeFacets.VARIABLE_SCALE.
public int getSourceLine()
Return source line number for this schema element within its defining schema.
public int getSrid()
Return EPSG Spatial Reference System Identifier (SRID) for the associated value.
TypeFacets.VARIABLE_SRID.
public TypeFacets getTypeFacets()
Return (nullable) Type facets for this type. Can be null
if there are no custom facets.
null
if there are no custom facets.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.
true
if this type was added since metadata was originally loaded.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 boolean isUnicode()
Return true
if this item allows Unicode content.
If isUnicode
is false
, then this item only allows ASCII content.
true
if this item allows Unicode content.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 SimpleType.baseType
.
value
- Synonym for SimpleType.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 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 setMaxLength(int value)
Set maximum length for string
and binary
values.
TypeFacets.ANY_LENGTH.
value
- Maximum length for `string` and `binary` values.public void setMinLength(int value)
Set minimum length for string
and binary
values.
TypeFacets.ANY_LENGTH.
value
- Minimum length for `string` and `binary` values.public void setPrecision(int value)
Set precision for decimal
and integer
values.
TypeFacets.ANY_PRECISION.
value
- Precision for `decimal` and `integer` values.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 setScale(int value)
Set scale for decimal
values.
TypeFacets.FLOATING_SCALE, TypeFacets.VARIABLE_SCALE.
value
- Scale for `decimal` values.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 void setSrid(int value)
Set EPSG Spatial Reference System Identifier (SRID) for the associated value.
TypeFacets.VARIABLE_SRID.
value
- [EPSG](http://www.epsg.org/Geodetic.html) Spatial Reference System Identifier (SRID) for the associated value.public void setTypeFacets(TypeFacets value)
Set type facets for this type. Can be null
if there are no custom facets.
value
- Type facets for this type. Can be null
if there are no custom facets.public void setUnicode(boolean value)
Set true
if this item allows Unicode content.
If isUnicode
is false
, then this item only allows ASCII content.
value
- true
if this item allows Unicode content.