class sap.ui.model.odata.type.TimeOfDay

Visiblity: public
UX Guidelines:
Implements:
Available since: N/A
Module: sap/ui/model/odata/type/TimeOfDay
Application Component: CA-UI5-COR

This class represents the OData V4 primitive type Edm.TimeOfDay . In sap.ui.model.odata.v4.ODataModel this type is represented as a string.


Constructor

Constructor for an OData primitive type Edm.TimeOfDay.

new sap.ui.model.odata.type.TimeOfDay(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 true

If true, the value null is accepted

precision? number 0

The number of decimal places allowed in the seconds portion of a valid value; must be an integer between 0 and 12, otherwise the default value 0 is used.


Methods Overview

Method Description
sap.ui.model.odata.type.TimeOfDay.extend

Creates a new subclass of class sap.ui.model.odata.type.TimeOfDay 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.

formatValue

Formats the given value to the given target type.

sap.ui.model.odata.type.TimeOfDay.getMetadata

Returns a metadata object for class sap.ui.model.odata.type.TimeOfDay.

getName

Returns the type's name.

parseValue

Parses the given value, which is expected to be of the given type, to a string with an OData V4 Edm.TimeOfDay value.

validateValue

Validates the given value in model representation and meets the type's constraints.

sap.ui.model.odata.type.TimeOfDay.extend

Creates a new subclass of class sap.ui.model.odata.type.TimeOfDay 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

formatValue

Formats the given value to the given target type.

Param Type DefaultValue Description
sValue string

The value to be formatted, which is represented as a string in the model

sTargetType string

The target type, may be "any", "object" (since 1.69.0), "string", or a type with one of these types as its primitive type. See sap.ui.model.odata.type for more information

sap.ui.model.odata.type.TimeOfDay.getMetadata

Returns a metadata object for class sap.ui.model.odata.type.TimeOfDay.

getName

Returns the type's name.

parseValue

Parses the given value, which is expected to be of the given type, to a string with an OData V4 Edm.TimeOfDay value.

Param Type DefaultValue Description
vValue Date string

The value to be parsed, maps "" to null; Date objects are expected to represent local time and are supported if and only if source type is "object".

sSourceType string

The source type (the expected type of sValue), must be "string", "object" (since 1.69.0) or a type with one of these types as its primitive type. See sap.ui.model.odata.type for more information.

validateValue

Validates the given value in model representation and meets the type's constraints.

Param Type DefaultValue Description
sValue string

The value to be validated