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 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 . |
int |
getCode()
The type code of the underlying type.
|
DataType |
getDerivedFrom()
Synonym for
SimpleType.baseType . |
boolean |
getFixedLength()
true if this item has fixed length for string and binary values. |
java.lang.String |
getLocalName()
The local name of this type within its owning
DataSchema , e.g. |
int |
getMaxLength()
Maximum length for
string and binary values. |
int |
getMinLength()
Minimum length for
string and binary values. |
java.lang.String |
getName()
Synonym for
SimpleType.qualifiedName . |
int |
getPrecision()
Precision for
decimal and integer values. |
java.lang.String |
getQualifiedName()
The name of this type qualified by its owning
DataSchema name, e.g. |
int |
getScale()
Scale for
decimal values. |
int |
getSrid()
EPSG Spatial Reference System Identifier (SRID) for the associated value.
|
TypeFacets |
getTypeFacets()
(nullable) Type facets for this type.
|
boolean |
isDerived()
true if this type is a derived simple, complex, entity or enum type. |
boolean |
isExtension()
true if this type was added since metadata was originally loaded. |
boolean |
isInferred()
true if this simple type was inferred due to a missing term definition in the CSDL. |
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. |
boolean |
isUnicode()
true if this item allows Unicode content. |
void |
setCanBeRemoved(boolean value)
Can this model element be removed by
DataService.refreshMetadata . |
void |
setDerivedFrom(DataType value)
Synonym for
SimpleType.baseType . |
void |
setExtension(boolean value)
true if this type was added since metadata was originally loaded. |
void |
setInferred(boolean value)
true if this simple 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 |
setMaxLength(int value)
Maximum length for
string and binary values. |
void |
setMinLength(int value)
Minimum length for
string and binary values. |
void |
setPrecision(int value)
Precision for
decimal and integer values. |
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 |
setScale(int value)
Scale for
decimal values. |
void |
setSrid(int value)
EPSG Spatial Reference System Identifier (SRID) for the associated value.
|
void |
setTypeFacets(TypeFacets value)
Type facets for this type.
|
void |
setUnicode(boolean value)
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 type annotation by term name.
SimpleType.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 int getCode()
The type code of the underlying type.
public DataType getDerivedFrom()
Synonym for SimpleType.baseType
.
public boolean getFixedLength()
true
if this item has fixed length for string
and binary
values.
public java.lang.String getLocalName()
The local name of this type within its owning DataSchema
, e.g. "MyType".
public int getMaxLength()
Maximum length for string
and binary
values.
TypeFacets.ANY_LENGTH.
public int getMinLength()
Minimum length for string
and binary
values.
TypeFacets.ANY_LENGTH.
public java.lang.String getName()
Synonym for SimpleType.qualifiedName
.
public int getPrecision()
Precision for decimal
and integer
values.
TypeFacets.ANY_PRECISION.
public java.lang.String getQualifiedName()
The name of this type qualified by its owning DataSchema
name, e.g. "MySchema.MyType".
public int getScale()
Scale for decimal
values.
TypeFacets.FLOATING_SCALE, TypeFacets.VARIABLE_SCALE.
public int getSrid()
EPSG Spatial Reference System Identifier (SRID) for the associated value.
TypeFacets.VARIABLE_SRID.
public TypeFacets getTypeFacets()
(nullable) Type facets for this type. Can be null
if there are no custom facets.
public boolean isDerived()
true
if this type is a derived simple, complex, entity or enum type.
public boolean isExtension()
true
if this type was added since metadata was originally loaded.
public boolean isInferred()
true
if this simple type was inferred due to a missing term definition in the CSDL.
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 boolean isUnicode()
true
if this item allows Unicode content.
If isUnicode
is false
, then this item only allows ASCII content.
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 setDerivedFrom(DataType value)
Synonym for SimpleType.baseType
.
public void setExtension(boolean value)
true
if this type was added since metadata was originally loaded.
public void setInferred(boolean value)
true
if this simple 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 setMaxLength(int value)
Maximum length for string
and binary
values.
TypeFacets.ANY_LENGTH.
public void setMinLength(int value)
Minimum length for string
and binary
values.
TypeFacets.ANY_LENGTH.
public void setPrecision(int value)
Precision for decimal
and integer
values.
TypeFacets.ANY_PRECISION.
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 setScale(int value)
Scale for decimal
values.
TypeFacets.FLOATING_SCALE, TypeFacets.VARIABLE_SCALE.
public void setSrid(int value)
EPSG Spatial Reference System Identifier (SRID) for the associated value.
TypeFacets.VARIABLE_SRID.
public void setTypeFacets(TypeFacets value)
Type facets for this type. Can be null
if there are no custom facets.
public void setUnicode(boolean value)
true
if this item allows Unicode content.
If isUnicode
is false
, then this item only allows ASCII content.