This class is an abstract base class for all OData primitive types (see OData V4 Edm Types
and OData V2 Edm Types
). All subtypes implement the interface of sap.ui.model.SimpleType. That means they implement next to the constructor:
All ODataTypes are immutable. All format options and constraints are given to the constructor, they cannot be modified later.
All ODataTypes use a locale-specific message when throwing an error caused by invalid user input (e.g. if Double.parseValue cannot parse the given value to a number, or if any type's validateValue gets a null
, but the constraint nullable
is false
).
Constructor for a new ODataType
.
new sap.ui.model.odata.type.ODataType(oFormatOptions?, oConstraints?)
Param | Type | Default Value | Description |
---|---|---|---|
oFormatOptions? | object | type-specific format options; see subtypes |
|
oConstraints? | object | type-specific constraints (e.g. |
Method | Description |
---|---|
sap.ui.model.odata.type.ODataType.extend |
Creates a new subclass of class sap.ui.model.odata.type.ODataType with name
|
sap.ui.model.odata.type.ODataType.getMetadata |
Returns a metadata object for class sap.ui.model.odata.type.ODataType. |
Creates a new subclass of class sap.ui.model.odata.type.ODataType with name sClassName
and enriches it with the information contained in oClassInfo
.
oClassInfo
might contain the same kind of information as described in sap.ui.model.SimpleType.extend.
Param | Type | DefaultValue | Description |
---|---|---|---|
sClassName | string |
Name of the class being created |
|
oClassInfo | object |
Object literal with information about the class |
|
FNMetaImpl | function |
Constructor function for the metadata object; if not given, it defaults to the metadata implementation used by this class |