This class represents the OData V2 primitive type Edm.Time
.
In ODataModel this type is represented as an object with two properties:
__edmType
with the value "Edm.Time" ms
with the number of milliseconds since midnight Constructor for an OData primitive type Edm.Time
.
new sap.ui.model.odata.type.Time(oFormatOptions?, oConstraints?)
Param | Type | Default Value | Description |
---|---|---|---|
oFormatOptions? | object | format options as defined in sap.ui.core.format.DateFormat |
|
oConstraints? | object | constraints; validateValue throws an error if any constraint is violated |
|
nullable? | boolean string | true | if |
Method | Description |
---|---|
sap.ui.model.odata.type.Time.extend |
Creates a new subclass of class sap.ui.model.odata.type.Time with name
|
formatValue |
Formats the given value to the given target type |
sap.ui.model.odata.type.Time.getMetadata |
Returns a metadata object for class sap.ui.model.odata.type.Time. |
getName |
Returns the type's name. |
parseValue |
Parses the given value, which is expected to be of the given type, to a time object. |
validateValue |
Validates whether the given value in model representation is valid and meets the defined constraints. |
Creates a new subclass of class sap.ui.model.odata.type.Time 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.odata.type.ODataType.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 |
Formats the given value to the given target type
Param | Type | DefaultValue | Description |
---|---|---|---|
oValue | object |
the value in model representation to be formatted. |
|
__edmType | string |
the type has to be "Edm.Time" |
|
ms | number |
the time in milliseconds |
|
sTargetType | string |
the target type; may be "any", "string", or a type with one of these types as its primitive type. See sap.ui.model.odata.type for more information. |
Returns a metadata object for class sap.ui.model.odata.type.Time.
Parses the given value, which is expected to be of the given type, to a time object.
Param | Type | DefaultValue | Description |
---|---|---|---|
sValue | string |
the value to be parsed, maps |
|
sSourceType | string |
the source type (the expected type of |