public class TypeFacets
extends java.lang.Object
Encapsulates the metadata of custom OData type facets.
Modifier and Type | Field and Description |
---|---|
static int |
ANY_LENGTH
Indicates an unspecified length.
|
static int |
ANY_PRECISION
Indicates an unspecified precision.
|
static int |
FLOATING_SCALE
Indicates the scale is floating.
|
static int |
VARIABLE_SCALE
Indicates the scale is variable.
|
static int |
VARIABLE_SRID
Indicates the srid is variable.
|
Constructor and Description |
---|
TypeFacets() |
Modifier and Type | Method and Description |
---|---|
DataValue |
getDefaultValue()
Return (nullable) Default value for the associated definition.
|
java.lang.Integer |
getMaxLength()
Return (nullable) Maximum length of the associated value, or
null for unspecified. |
java.lang.Integer |
getMinLength()
Return (nullable) Minimum length of the associated value, or
null for unspecified. |
java.lang.Integer |
getPrecision()
Return (nullable) Precision of the associated value, or
null for unspecified. |
java.lang.Integer |
getScale()
Return (nullable) Scale of the associated value, or
null , then it implies the value 0 . |
java.lang.Integer |
getSrid()
Return (nullable) EPSG Spatial Reference System Identifier (SRID) for the associated value, or
null for unspecified. |
java.lang.Boolean |
isNullable()
Return (nullable) Is the associated value nullable?
If
isNullable is null , then it implies the value true . |
java.lang.Boolean |
isUnicode()
Return (nullable) Does the associated value permit Unicode characters?
If
isUnicode is null , then it implies the value true . |
static TypeFacets |
merge(TypeFacets from,
TypeFacets to)
For internal use only.
|
void |
setDefaultValue(DataValue value)
Set default value for the associated definition.
|
void |
setMaxLength(java.lang.Integer value)
Set maximum length of the associated value, or
null for unspecified. |
void |
setMinLength(java.lang.Integer value)
Set minimum length of the associated value, or
null for unspecified. |
void |
setNullable(java.lang.Boolean value)
Set is the associated value nullable?
If
isNullable is null , then it implies the value true . |
void |
setPrecision(java.lang.Integer value)
Set precision of the associated value, or
null for unspecified. |
void |
setScale(java.lang.Integer value)
Set scale of the associated value, or
null , then it implies the value 0 . |
void |
setSrid(java.lang.Integer value)
Set EPSG Spatial Reference System Identifier (SRID) for the associated value, or
null for unspecified. |
void |
setUnicode(java.lang.Boolean value)
Set does the associated value permit Unicode characters?
If
isUnicode is null , then it implies the value true . |
public static final int ANY_LENGTH
Indicates an unspecified length.
public static final int ANY_PRECISION
Indicates an unspecified precision.
public static final int FLOATING_SCALE
Indicates the scale is floating.
public static final int VARIABLE_SCALE
Indicates the scale is variable.
public static final int VARIABLE_SRID
Indicates the srid is variable.
public DataValue getDefaultValue()
Return (nullable) Default value for the associated definition.
public java.lang.Integer getMaxLength()
Return (nullable) Maximum length of the associated value, or null
for unspecified.
ANY_LENGTH.
public java.lang.Integer getMinLength()
Return (nullable) Minimum length of the associated value, or null
for unspecified.
ANY_LENGTH.
public java.lang.Integer getPrecision()
Return (nullable) Precision of the associated value, or null
for unspecified.
ANY_PRECISION.
public java.lang.Integer getScale()
Return (nullable) Scale of the associated value, or null
, then it implies the value 0
.
FLOATING_SCALE, VARIABLE_SCALE.
public java.lang.Integer getSrid()
Return (nullable) EPSG Spatial Reference System Identifier (SRID) for the associated value, or null
for unspecified.
VARIABLE_SRID.
public java.lang.Boolean isNullable()
Return (nullable) Is the associated value nullable?
If isNullable
is null
, then it implies the value true
.
public java.lang.Boolean isUnicode()
Return (nullable) Does the associated value permit Unicode characters?
If isUnicode
is null
, then it implies the value true
.
public static TypeFacets merge(TypeFacets from, TypeFacets to)
For internal use only.
from
- (internal use only)to
- (internal use only)public void setDefaultValue(DataValue value)
Set default value for the associated definition.
value
- Default value for the associated definition.public void setMaxLength(java.lang.Integer value)
Set maximum length of the associated value, or null
for unspecified.
ANY_LENGTH.
value
- Maximum length of the associated value, or `null` for unspecified.public void setMinLength(java.lang.Integer value)
Set minimum length of the associated value, or null
for unspecified.
ANY_LENGTH.
value
- Minimum length of the associated value, or `null` for unspecified.public void setNullable(java.lang.Boolean value)
Set is the associated value nullable?
If isNullable
is null
, then it implies the value true
.
value
- Is the associated value nullable?public void setPrecision(java.lang.Integer value)
Set precision of the associated value, or null
for unspecified.
ANY_PRECISION.
value
- Precision of the associated value, or `null` for unspecified.public void setScale(java.lang.Integer value)
Set scale of the associated value, or null
, then it implies the value 0
.
FLOATING_SCALE, VARIABLE_SCALE.
value
- Scale of the associated value, or `null`, then it implies the value `0`.public void setSrid(java.lang.Integer value)
Set EPSG Spatial Reference System Identifier (SRID) for the associated value, or null
for unspecified.
VARIABLE_SRID.
value
- [EPSG](http://www.epsg.org/Geodetic.html) Spatial Reference System Identifier (SRID) for the associated value, or `null` for unspecified.public void setUnicode(java.lang.Boolean value)
Set does the associated value permit Unicode characters?
If isUnicode
is null
, then it implies the value true
.
value
- Does the associated value permit Unicode characters?