public class Property extends PropertyPath
Encapsulates the metadata of an OData structural or navigation property. Used for properties of complex and entity types.
Modifier and Type | Field and Description |
---|---|
static int |
HAS_FOREIGN_KEYS_IN_SOURCE
Foreign keys for this navigation property exist on the source side of the relationship.
|
static int |
HAS_FOREIGN_KEYS_IN_TARGET
Foreign keys for this navigation property exist on the target side of the relationship.
|
static int |
HAS_NO_FOREIGN_KEYS
There are no foreign keys for this navigation property.
|
static int |
ON_DELETE_CASCADE
Related entities will be deleted if the source entity is deleted.
|
static int |
ON_DELETE_RESTRICT
A delete request on a source entity with related entities will fail.
|
static int |
ON_DELETE_SET_DEFAULT
All properties of related entities that are tied to properties of the source entity via a referential constraint and that do not participate in other referential constraints will be set to their default value.
|
static int |
ON_DELETE_SET_NULL
All properties of related entities that are tied to properties of the source entity via a referential constraint and that do not participate in other referential constraints will be set to
null . |
Constructor and Description |
---|
Property() |
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.
|
DataValueList |
getBasicList(StructureBase source)
Get the value of this property from a structure.
|
byte[] |
getBinary(StructureBase source)
Get the value of this property from a structure.
|
boolean |
getBoolean(StructureBase source)
Get the value of this property from a structure.
|
byte |
getByte(StructureBase source)
Get the value of this property from a structure.
|
boolean |
getCanBeRemoved()
Return can this model element be removed by
DataService.refreshMetadata . |
java.lang.String |
getColumn()
Return (nullable) Database column name for this property.
|
java.lang.String |
getColumnDefault()
Return (nullable) A database-level column default for this property.
|
java.lang.String |
getColumnType()
Return (nullable) Database column type for this property.
|
ComplexValue |
getComplex(StructureBase source)
Get the value of this property from a structure.
|
ComplexValueList |
getComplexList(StructureBase source)
Get the value of this property from a structure.
|
ComplexType |
getComplexType()
Return if this property has a complex type, then return it.
|
boolean |
getContainsTarget()
Return if this property is a navigation property, then does it contain its target?
|
CustomPath |
getCustomPath()
Return (nullable) Path for customized property-to-element mapping.
|
DataType |
getDataType()
Return data type of the property.
|
java.math.BigDecimal |
getDecimal(StructureBase source)
Get the value of this property from a structure.
|
DataValue |
getDefaultValue()
Return (nullable) Default value for this item.
|
double |
getDouble(StructureBase source)
Get the value of this property from a structure.
|
EntityValue |
getEntity(StructureBase source)
Get the value of this property from a structure.
|
EntityValueList |
getEntityList(StructureBase source)
Get the value of this property from a structure.
|
EntityType |
getEntityType()
Return if this property has an entity type, then return it.
|
EnumValue |
getEnum(StructureBase source)
Get the value of this property from a structure.
|
EnumType |
getEnumType()
Return if this property has an enum type, then return it.
|
boolean |
getFixedLength()
Return
true if this item has fixed length for string and binary values. |
float |
getFloat(StructureBase source)
Get the value of this property from a structure.
|
GuidValue |
getGuid(StructureBase source)
Get the value of this property from a structure.
|
int |
getId()
Return zero-based index for this property within its parent type definition.
|
int |
getInt(StructureBase source)
Get the value of this property from a structure.
|
java.math.BigInteger |
getInteger(StructureBase source)
Get the value of this property from a structure.
|
ComplexType |
getItemComplexType()
Return if this property is a list with complex item type, then return it.
|
EntityType |
getItemEntityType()
Return if this property is a list with entity item type, then return it.
|
long |
getLong(StructureBase source)
Get the value of this property from a structure.
|
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 name of the property.
|
byte[] |
getNullableBinary(StructureBase source)
Get the value of this property from a structure.
|
java.lang.Boolean |
getNullableBoolean(StructureBase source)
Get the value of this property from a structure.
|
java.lang.Byte |
getNullableByte(StructureBase source)
Get the value of this property from a structure.
|
ComplexValue |
getNullableComplex(StructureBase source)
Get the value of this property from a structure.
|
java.math.BigDecimal |
getNullableDecimal(StructureBase source)
Get the value of this property from a structure.
|
java.lang.Double |
getNullableDouble(StructureBase source)
Get the value of this property from a structure.
|
EntityValue |
getNullableEntity(StructureBase source)
Get the value of this property from a structure.
|
EnumValue |
getNullableEnum(StructureBase source)
Get the value of this property from a structure.
|
java.lang.Float |
getNullableFloat(StructureBase source)
Get the value of this property from a structure.
|
GuidValue |
getNullableGuid(StructureBase source)
Get the value of this property from a structure.
|
java.lang.Integer |
getNullableInt(StructureBase source)
Get the value of this property from a structure.
|
java.math.BigInteger |
getNullableInteger(StructureBase source)
Get the value of this property from a structure.
|
java.lang.Long |
getNullableLong(StructureBase source)
Get the value of this property from a structure.
|
java.lang.Short |
getNullableShort(StructureBase source)
Get the value of this property from a structure.
|
java.lang.String |
getNullableString(StructureBase source)
Get the value of this property from a structure.
|
java.lang.Integer |
getNullableUnsignedByte(StructureBase source)
Get the value of this property from a structure.
|
int |
getOnDeleteAction()
Return if this property is a navigation property, then the action upon deletion of the source entity.
|
DataValue |
getOptionalValue(StructureBase source)
For internal use only.
|
java.lang.String |
getOwningType()
Return name of type that owns this property.
|
java.lang.String |
getPartnerPath()
Return (nullable) If this property is a navigation property with a defined partner property, then the path of the partner.
|
int |
getPrecision()
Return precision for
decimal and integer values. |
java.lang.String |
getQualifiedName()
Return owning type name, forward slash, then property name, e.g.
|
StringMap |
getReferentialConstraints()
Return if this property is a navigation property with referential constraints, then a map of constraints (from property name in the dependent entity to property name in the principal entity).
|
DataValue |
getRequiredValue(StructureBase source)
For internal use only.
|
int |
getScale()
Return scale for
decimal values. |
short |
getShort(StructureBase source)
Get the value of this property from a structure.
|
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.
|
StreamLink |
getStreamLink(StructureBase source)
Get the stream link for this property from a structure.
|
java.lang.String |
getString(StructureBase source)
Get the value of this property from a structure.
|
StructureType |
getStructureType()
Return if this property has a structure (complex/entity) type, then return it.
|
int |
getSystemFlags()
For internal use only.
|
boolean |
getTrackChanges()
Return indicate if this property is individually tracked for changes using its own timestamp column
|
DataType |
getType()
Return synonym for
Property.dataType . |
int |
getUnsignedByte(StructureBase source)
Get the value of this property from a structure.
|
DataValue |
getValue(StructureBase source)
Get the value of this property from a structure.
|
boolean |
hasColumnDefault()
Return a value for this property can be provided by the client on insert.
|
int |
hasForeignKeys()
Return if this property is a navigation property, then where are foreign keys found.
|
boolean |
isCollection()
Return
true if this is a collection-typed property. |
boolean |
isExtension()
Return
true if this property was added since metadata was originally loaded. |
boolean |
isForeignKey()
Return
true if this property is a primary key, or part of a composite foreign key. |
boolean |
isGeneratedKey()
Return if
Property.isKey is true and Property.isForeignKey is false , then isGeneratedKey defaults to true . |
boolean |
isImmutable()
Return
true if this property is immutable (non-updatable after insert). |
boolean |
isKey()
Return
true if this property is the primary key, or part of a composite primary key. |
boolean |
isNavigation()
Return
true if this is a navigation property. |
boolean |
isNullable()
Return
true if this item is nullable. |
boolean |
isOptimistic()
Return
true if this property is used for optimistic concurrency control (part of entity tag). |
boolean |
isPersistent()
Return
true if this property is persistent (stored in the local database when offline). |
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 |
isStream()
Return
true if this property has a stream type. |
boolean |
isStructural()
Return
true if this is a structural property. |
boolean |
isUnicode()
Return
true if this item allows Unicode content. |
DataPath |
path(Property child)
Return a new data path from this property to a
child property. |
void |
setBasicList(StructureBase target,
DataValueList value)
Set the value of this property in a structure.
|
void |
setBinary(StructureBase target,
byte[] value)
Set the value of this property in a structure.
|
void |
setBoolean(StructureBase target,
boolean value)
Set the value of this property in a structure.
|
void |
setByte(StructureBase target,
byte value)
Set the value of this property in a structure.
|
void |
setCanBeRemoved(boolean value)
Set can this model element be removed by
DataService.refreshMetadata . |
void |
setColumn(java.lang.String value)
Set database column name for this property.
|
void |
setColumnDefault(boolean value)
Set a value for this property can be provided by the client on insert.
|
void |
setColumnDefault(java.lang.String value)
Set a database-level column default for this property.
|
void |
setColumnType(java.lang.String value)
Set database column type for this property.
|
void |
setComplex(StructureBase target,
ComplexValue value)
Set the value of this property in a structure.
|
void |
setComplexList(StructureBase target,
ComplexValueList value)
Set the value of this property in a structure.
|
void |
setContainsTarget(boolean value)
Set if this property is a navigation property, then does it contain its target?
|
void |
setCustomPath(CustomPath value)
Set path for customized property-to-element mapping.
|
void |
setDecimal(StructureBase target,
java.math.BigDecimal value)
Set the value of this property in a structure.
|
void |
setDefaultValue(DataValue value)
Set default value for this item.
|
void |
setDouble(StructureBase target,
double value)
Set the value of this property in a structure.
|
void |
setEntity(StructureBase target,
EntityValue value)
Set the value of this property in a structure.
|
void |
setEntityList(StructureBase target,
EntityValueList value)
Set the value of this property in a structure.
|
void |
setEnum(StructureBase target,
EnumValue value)
Set the value of this property in a structure.
|
void |
setExtension(boolean value)
Set
true if this property was added since metadata was originally loaded. |
void |
setFloat(StructureBase target,
float value)
Set the value of this property in a structure.
|
void |
setForeignKey(boolean value)
Set
true if this property is a primary key, or part of a composite foreign key. |
void |
setForeignKeys(int value)
Set if this property is a navigation property, then where are foreign keys found.
|
void |
setGeneratedKey(boolean value)
Set if
Property.isKey is true and Property.isForeignKey is false , then isGeneratedKey defaults to true . |
void |
setGuid(StructureBase target,
GuidValue value)
Set the value of this property in a structure.
|
void |
setId(int value)
Set zero-based index for this property within its parent type definition.
|
void |
setImmutable(boolean value)
Set
true if this property is immutable (non-updatable after insert). |
void |
setInt(StructureBase target,
int value)
Set the value of this property in a structure.
|
void |
setInteger(StructureBase target,
java.math.BigInteger value)
Set the value of this property in a structure.
|
void |
setKey(boolean value)
Set
true if this property is the primary key, or part of a composite primary key. |
void |
setLong(StructureBase target,
long value)
Set the value of this property in a structure.
|
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 |
setName(java.lang.String value)
Set name of the property.
|
void |
setNullable(boolean value)
Set
true if this item is nullable. |
void |
setNullableBinary(StructureBase target,
byte[] value)
Set the value of this property in a structure.
|
void |
setNullableBoolean(StructureBase target,
java.lang.Boolean value)
Set the value of this property in a structure.
|
void |
setNullableByte(StructureBase target,
java.lang.Byte value)
Set the value of this property in a structure.
|
void |
setNullableComplex(StructureBase target,
ComplexValue value)
Set the value of this property in a structure.
|
void |
setNullableDecimal(StructureBase target,
java.math.BigDecimal value)
Set the value of this property in a structure.
|
void |
setNullableDouble(StructureBase target,
java.lang.Double value)
Set the value of this property in a structure.
|
void |
setNullableEntity(StructureBase target,
EntityValue value)
Set the value of this property in a structure.
|
void |
setNullableEnum(StructureBase target,
EnumValue value)
Set the value of this property in a structure.
|
void |
setNullableFloat(StructureBase target,
java.lang.Float value)
Set the value of this property in a structure.
|
void |
setNullableGuid(StructureBase target,
GuidValue value)
Set the value of this property in a structure.
|
void |
setNullableInt(StructureBase target,
java.lang.Integer value)
Set the value of this property in a structure.
|
void |
setNullableInteger(StructureBase target,
java.math.BigInteger value)
Set the value of this property in a structure.
|
void |
setNullableLong(StructureBase target,
java.lang.Long value)
Set the value of this property in a structure.
|
void |
setNullableShort(StructureBase target,
java.lang.Short value)
Set the value of this property in a structure.
|
void |
setNullableString(StructureBase target,
java.lang.String value)
Set the value of this property in a structure.
|
void |
setNullableUnsignedByte(StructureBase target,
java.lang.Integer value)
Set the value of this property in a structure.
|
void |
setOnDeleteAction(int value)
Set if this property is a navigation property, then the action upon deletion of the source entity.
|
void |
setOptimistic(boolean value)
Set
true if this property is used for optimistic concurrency control (part of entity tag). |
void |
setOwningType(java.lang.String value)
Set name of type that owns this property.
|
void |
setPartnerPath(java.lang.String value)
Set if this property is a navigation property with a defined partner property, then the path of the partner.
|
void |
setPrecision(int value)
Set precision for
decimal and integer values. |
void |
setReferentialConstraints(StringMap value)
Set if this property is a navigation property with referential constraints, then a map of constraints (from property name in the dependent entity to property name in the principal entity).
|
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 |
setShort(StructureBase target,
short value)
Set the value of this property in a structure.
|
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 |
setString(StructureBase target,
java.lang.String value)
Set the value of this property in a structure.
|
void |
setSystemFlags(int value)
For internal use only.
|
void |
setTrackChanges(boolean value)
Set indicate if this property is individually tracked for changes using its own timestamp column
|
void |
setType(DataType value)
Set synonym for
Property.dataType . |
void |
setUnicode(boolean value)
Set
true if this item allows Unicode content. |
void |
setUnsignedByte(StructureBase target,
int value)
Set the value of this property in a structure.
|
void |
setValue(StructureBase target,
DataValue value)
Set the value of this property in a structure.
|
DataPath |
toPath()
Return this property or path, expressed as a
DataPath . |
java.lang.String |
toString()
Convert this data value to a string.
|
DataValue |
unwrap()
Return the path, property, constant value or query function/operator call which is wrapped by this object.
|
java.lang.String |
urlString()
Return the name of this property, percent-encoded for use in a URL.
|
add, add, add, add, add, add, add, all, any, asType, average, ceiling, concat, concat, contains, contains, countDistinct, date, day, divide, divide, divide, divide, divide, divide, divide, endsWith, endsWith, equal, equal, equal, equal, equal, equal, equal, equal, equal, floor, fractionalSeconds, geoDistance, geoIntersectse, geoLength, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterEqual, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, greaterThan, has, hour, indexOf, indexOf, isNull, isType, length, lessEqual, lessEqual, lessEqual, lessEqual, lessEqual, lessEqual, lessEqual, lessEqual, lessEqual, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, lessThan, maximum, minimum, minute, modulo, modulo, modulo, modulo, modulo, modulo, modulo, month, multiply, multiply, multiply, multiply, multiply, multiply, multiply, negate, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notEqual, notNull, round, second, startsWith, startsWith, substring, substring, substring, substring, subtract, subtract, subtract, subtract, subtract, subtract, subtract, sum, time, toLower, totalOffsetMinutes, toUpper, trim, wrap, year
cloneMutable, equals, getTypeCode, hashCode
public static final int ON_DELETE_CASCADE
Related entities will be deleted if the source entity is deleted.
public static final int ON_DELETE_RESTRICT
A delete request on a source entity with related entities will fail.
public static final int ON_DELETE_SET_DEFAULT
All properties of related entities that are tied to properties of the source entity via a referential constraint and that do not participate in other referential constraints will be set to their default value.
public static final int ON_DELETE_SET_NULL
All properties of related entities that are tied to properties of the source entity via a referential constraint and that do not participate in other referential constraints will be set to null
.
public static final int HAS_NO_FOREIGN_KEYS
There are no foreign keys for this navigation property.
public static final int HAS_FOREIGN_KEYS_IN_SOURCE
Foreign keys for this navigation property exist on the source side of the relationship.
public static final int HAS_FOREIGN_KEYS_IN_TARGET
Foreign keys for this navigation property exist on the target side of the relationship.
public Annotation getAnnotation(java.lang.String term)
Lookup an existing annotation by term name, or throw an exception if the annotation is not found.
Property.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 DataValueList getBasicList(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public byte[] getBinary(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public boolean getBoolean(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public byte getByte(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.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 java.lang.String getColumn()
Return (nullable) Database column name for this property.
public java.lang.String getColumnDefault()
Return (nullable) A database-level column default for this property.
public java.lang.String getColumnType()
Return (nullable) Database column type for this property.
public ComplexValue getComplex(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public ComplexValueList getComplexList(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public ComplexType getComplexType()
Return if this property has a complex type, then return it. Otherwise throw UsageException
.
UsageException
.public boolean getContainsTarget()
Return if this property is a navigation property, then does it contain its target?
public CustomPath getCustomPath()
Return (nullable) Path for customized property-to-element mapping.
public DataType getDataType()
Return data type of the property.
Property.type
for detailed usage information and example code.
getDataType
in class QueryValue
public java.math.BigDecimal getDecimal(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public DataValue getDefaultValue()
Return (nullable) Default value for this item. May be null
.
null
.public double getDouble(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public EntityValue getEntity(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public EntityValueList getEntityList(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public EntityType getEntityType()
Return if this property has an entity type, then return it. Otherwise throw UsageException
.
UsageException
.public EnumValue getEnum(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public EnumType getEnumType()
Return if this property has an enum type, then return it. Otherwise throw UsageException
.
UsageException
.public boolean getFixedLength()
Return true
if this item has fixed length for string
and binary
values.
public float getFloat(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public GuidValue getGuid(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public int getId()
Return zero-based index for this property within its parent type definition.
public int getInt(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public java.math.BigInteger getInteger(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public ComplexType getItemComplexType()
Return if this property is a list with complex item type, then return it. Otherwise throw UsageException
.
UsageException
.public EntityType getItemEntityType()
Return if this property is a list with entity item type, then return it. Otherwise throw UsageException
.
UsageException
.public long getLong(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.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 name of the property.
public byte[] getNullableBinary(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public java.lang.Boolean getNullableBoolean(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public java.lang.Byte getNullableByte(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public ComplexValue getNullableComplex(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public java.math.BigDecimal getNullableDecimal(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public java.lang.Double getNullableDouble(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public EntityValue getNullableEntity(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public EnumValue getNullableEnum(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public java.lang.Float getNullableFloat(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public GuidValue getNullableGuid(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public java.lang.Integer getNullableInt(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public java.math.BigInteger getNullableInteger(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public java.lang.Long getNullableLong(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public java.lang.Short getNullableShort(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public java.lang.String getNullableString(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public java.lang.Integer getNullableUnsignedByte(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public int getOnDeleteAction()
Return if this property is a navigation property, then the action upon deletion of the source entity. Zero indicates an undefined action.
ON_DELETE_* constants.
public DataValue getOptionalValue(StructureBase source)
For internal use only.
source
- (internal use only)public java.lang.String getOwningType()
Return name of type that owns this property.
public java.lang.String getPartnerPath()
Return (nullable) If this property is a navigation property with a defined partner property, then the path of the partner.
public int getPrecision()
Return precision for decimal
and integer
values.
TypeFacets.ANY_PRECISION.
public java.lang.String getQualifiedName()
Return owning type name, forward slash, then property name, e.g. "MySchema.MyEntityType/MyPropertyName".
public StringMap getReferentialConstraints()
Return if this property is a navigation property with referential constraints, then a map of constraints (from property name in the dependent entity to property name in the principal entity).
public DataValue getRequiredValue(StructureBase source)
For internal use only.
source
- (internal use only)public int getScale()
Return scale for decimal
values.
TypeFacets.FLOATING_SCALE, TypeFacets.VARIABLE_SCALE.
public short getShort(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.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 StreamLink getStreamLink(StructureBase source)
Get the stream link for this property from a structure.
source
- Source structure.public java.lang.String getString(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public StructureType getStructureType()
Return if this property has a structure (complex/entity) type, then return it. Otherwise throw UsageException
.
UsageException
.public int getSystemFlags()
For internal use only.
public boolean getTrackChanges()
Return indicate if this property is individually tracked for changes using its own timestamp column
public DataType getType()
Return synonym for Property.dataType
.
If this property has a basic type, then type.isBasic
will be true
.
If this property has a basic list type, then type.isBasicList
will be true
.
If this property has a complex type, then type.isComplex
will be true
and type
will be an instance of ComplexType
.
If this property has a complex list type, then type.isComplexList
will be true
and type.itemType
will be an instance of ComplexType
.
If this property has an entity type, then type.isEntity
will be true
and type
will be an instance of EntityType
.
If this property has an entity list type, then type.isEntityList
will be true
and type.itemType
will be an instance of EntityType
.
Property.dataType
.public int getUnsignedByte(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set, CastException
if the value does not have the expected type for this property.
source
- Source structure.public DataValue getValue(StructureBase source)
Get the value of this property from a structure.
UndefinedException
if the property value was not previously set.
source
- Source structure.public boolean hasColumnDefault()
Return a value for this property can be provided by the client on insert. If no value is provided by the client, a default value is generated by the database.
public int hasForeignKeys()
Return if this property is a navigation property, then where are foreign keys found.
constants.
public boolean isCollection()
Return true
if this is a collection-typed property. Equivalent to type.isList
.
true
if this is a collection-typed property. Equivalent to type.isList
.public boolean isExtension()
Return true
if this property was added since metadata was originally loaded.
true
if this property was added since metadata was originally loaded.public boolean isForeignKey()
Return true
if this property is a primary key, or part of a composite foreign key.
true
if this property is a primary key, or part of a composite foreign key.public boolean isGeneratedKey()
Return if Property.isKey
is true
and Property.isForeignKey
is false
, then isGeneratedKey defaults to true
. Set to false to disable backend key generation for this property.
Property.isKey
is true
and Property.isForeignKey
is false
, then isGeneratedKey defaults to true
. Set to false to disable backend key generation for this property.public boolean isImmutable()
Return true
if this property is immutable (non-updatable after insert).
true
if this property is immutable (non-updatable after insert).public boolean isKey()
Return true
if this property is the primary key, or part of a composite primary key.
true
if this property is the primary key, or part of a composite primary key.public boolean isNavigation()
Return true
if this is a navigation property.
true
if this is a navigation property.public boolean isNullable()
Return true
if this item is nullable.
true
if this item is nullable.public boolean isOptimistic()
Return true
if this property is used for optimistic concurrency control (part of entity tag).
For OData V3, this relates to a ConcurrencyMode of "Fixed".
For OData V4, this relates to the use of Org.OData.Core.V1.OptimisticConcurrency in
one or more entity sets using the entity type containing this property.
true
if this property is used for optimistic concurrency control (part of entity tag).public boolean isPersistent()
Return true
if this property is persistent (stored in the local database when offline).
true
if this property is persistent (stored in the local database when offline).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 isStream()
Return true
if this property has a stream type.
true
if this property has a stream type.public boolean isStructural()
Return true
if this is a structural property.
true
if this is a structural property.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 DataPath path(Property child)
Return a new data path from this property to a child
property.
child
- Child property.child
property.public void setBasicList(StructureBase target, DataValueList value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.public void setBinary(StructureBase target, byte[] value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.public void setBoolean(StructureBase target, boolean value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.public void setByte(StructureBase target, byte value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.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 setColumn(java.lang.String value)
Set database column name for this property.
value
- Database column name for this property.public void setColumnDefault(java.lang.String value)
Set a database-level column default for this property.
value
- A database-level column default for this property.public void setColumnDefault(boolean value)
Set a value for this property can be provided by the client on insert. If no value is provided by the client, a default value is generated by the database.
value
- A value for this property can be provided by the client on insert. If no value is provided by the client, a default value is generated by the database.public void setColumnType(java.lang.String value)
Set database column type for this property.
value
- Database column type for this property.public void setComplex(StructureBase target, ComplexValue value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.public void setComplexList(StructureBase target, ComplexValueList value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.public void setContainsTarget(boolean value)
Set if this property is a navigation property, then does it contain its target?
value
- If this property is a navigation property, then does it contain its target?public void setCustomPath(CustomPath value)
Set path for customized property-to-element mapping.
value
- Path for customized property-to-element mapping.public void setDecimal(StructureBase target, java.math.BigDecimal value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.public void setDefaultValue(DataValue value)
Set default value for this item. May be null
.
value
- Default value for this item. May be null
.public void setDouble(StructureBase target, double value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.public void setEntity(StructureBase target, EntityValue value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.public void setEntityList(StructureBase target, EntityValueList value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.public void setEnum(StructureBase target, EnumValue value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.public void setExtension(boolean value)
Set true
if this property was added since metadata was originally loaded.
value
- true
if this property was added since metadata was originally loaded.public void setFloat(StructureBase target, float value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.public void setForeignKey(boolean value)
Set true
if this property is a primary key, or part of a composite foreign key.
value
- true
if this property is a primary key, or part of a composite foreign key.public void setForeignKeys(int value)
Set if this property is a navigation property, then where are foreign keys found.
constants.
value
- If this property is a navigation property, then where are foreign keys found.public void setGeneratedKey(boolean value)
Set if Property.isKey
is true
and Property.isForeignKey
is false
, then isGeneratedKey defaults to true
. Set to false to disable backend key generation for this property.
value
- If Property.isKey
is true
and Property.isForeignKey
is false
, then isGeneratedKey defaults to true
. Set to false to disable backend key generation for this property.public void setGuid(StructureBase target, GuidValue value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.public void setId(int value)
Set zero-based index for this property within its parent type definition.
value
- Zero-based index for this property within its parent type definition.public void setImmutable(boolean value)
Set true
if this property is immutable (non-updatable after insert).
value
- true
if this property is immutable (non-updatable after insert).public void setInt(StructureBase target, int value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.public void setInteger(StructureBase target, java.math.BigInteger value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.public void setKey(boolean value)
Set true
if this property is the primary key, or part of a composite primary key.
value
- true
if this property is the primary key, or part of a composite primary key.public void setLong(StructureBase target, long value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.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 setName(java.lang.String value)
Set name of the property.
value
- Name of the property.public void setNullable(boolean value)
Set true
if this item is nullable.
value
- true
if this item is nullable.public void setNullableBinary(StructureBase target, byte[] value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- (nullable) Property value.public void setNullableBoolean(StructureBase target, java.lang.Boolean value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- (nullable) Property value.public void setNullableByte(StructureBase target, java.lang.Byte value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- (nullable) Property value.public void setNullableComplex(StructureBase target, ComplexValue value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- (nullable) Property value.public void setNullableDecimal(StructureBase target, java.math.BigDecimal value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- (nullable) Property value.public void setNullableDouble(StructureBase target, java.lang.Double value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- (nullable) Property value.public void setNullableEntity(StructureBase target, EntityValue value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- (nullable) Property value.public void setNullableEnum(StructureBase target, EnumValue value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- (nullable) Property value.public void setNullableFloat(StructureBase target, java.lang.Float value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- (nullable) Property value.public void setNullableGuid(StructureBase target, GuidValue value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- (nullable) Property value.public void setNullableInt(StructureBase target, java.lang.Integer value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- (nullable) Property value.public void setNullableInteger(StructureBase target, java.math.BigInteger value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- (nullable) Property value.public void setNullableLong(StructureBase target, java.lang.Long value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- (nullable) Property value.public void setNullableShort(StructureBase target, java.lang.Short value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- (nullable) Property value.public void setNullableString(StructureBase target, java.lang.String value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- (nullable) Property value.public void setNullableUnsignedByte(StructureBase target, java.lang.Integer value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- (nullable) Property value.public void setOnDeleteAction(int value)
Set if this property is a navigation property, then the action upon deletion of the source entity. Zero indicates an undefined action.
ON_DELETE_* constants.
value
- If this property is a navigation property, then the action upon deletion of the source entity. Zero indicates an undefined action.public void setOptimistic(boolean value)
Set true
if this property is used for optimistic concurrency control (part of entity tag).
For OData V3, this relates to a ConcurrencyMode of "Fixed".
For OData V4, this relates to the use of Org.OData.Core.V1.OptimisticConcurrency in
one or more entity sets using the entity type containing this property.
value
- true
if this property is used for optimistic concurrency control (part of entity tag).public void setOwningType(java.lang.String value)
Set name of type that owns this property.
value
- Name of type that owns this property.public void setPartnerPath(java.lang.String value)
Set if this property is a navigation property with a defined partner property, then the path of the partner.
value
- If this property is a navigation property with a defined partner property, then the path of the partner.public void setPrecision(int value)
Set precision for decimal
and integer
values.
TypeFacets.ANY_PRECISION.
value
- Precision for `decimal` and `integer` values.public void setReferentialConstraints(StringMap value)
Set if this property is a navigation property with referential constraints, then a map of constraints (from property name in the dependent entity to property name in the principal entity).
value
- If this property is a navigation property with referential constraints, then a map of constraints (from property name in the dependent entity to property name in the principal entity).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 setShort(StructureBase target, short value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.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 setString(StructureBase target, java.lang.String value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.public void setSystemFlags(int value)
For internal use only.
value
- (internal use only)public void setTrackChanges(boolean value)
Set indicate if this property is individually tracked for changes using its own timestamp column
value
- Indicate if this property is individually tracked for changes using its own timestamp columnpublic void setType(DataType value)
Set synonym for Property.dataType
.
If this property has a basic type, then type.isBasic
will be true
.
If this property has a basic list type, then type.isBasicList
will be true
.
If this property has a complex type, then type.isComplex
will be true
and type
will be an instance of ComplexType
.
If this property has a complex list type, then type.isComplexList
will be true
and type.itemType
will be an instance of ComplexType
.
If this property has an entity type, then type.isEntity
will be true
and type
will be an instance of EntityType
.
If this property has an entity list type, then type.isEntityList
will be true
and type.itemType
will be an instance of EntityType
.
value
- Synonym for Property.dataType
.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.public void setUnsignedByte(StructureBase target, int value)
Set the value of this property in a structure.
CastException
if the value does not have the expected type for this property.
target
- Target structure.value
- Property value.public void setValue(StructureBase target, DataValue value)
Set the value of this property in a structure.
target
- Target structure.value
- (nullable) Property value.public DataPath toPath()
Return this property or path, expressed as a DataPath
.
toPath
in class PropertyPath
DataPath
.public java.lang.String toString()
Convert this data value to a string.
If the Property.dataType
is defined by XML Schema Part 2: Datatypes, then the corresponding lexical format is used.
JSON format is used for structured values (arrays and objects).
toString
in class QueryValue
public DataValue unwrap()
Return the path, property, constant value or query function/operator call which is wrapped by this object.
unwrap
in class QueryValue
public java.lang.String urlString()
Return the name of this property, percent-encoded for use in a URL.