This is an abstract base class for integer-based OData primitive types like Edm.Int16
or Edm.Int32
.
Constructor for a new Int
.
new sap.ui.model.odata.type.Int(oFormatOptions?, oConstraints?)
Param | Type | Default Value | Description |
---|---|---|---|
oFormatOptions? | object | type-specific format options; see subtypes |
|
oConstraints? | object | constraints; validateValue throws an error if any constraint is violated |
|
nullable? | boolean string | true | if |
Method | Description |
---|---|
sap.ui.model.odata.type.Int.extend |
Creates a new subclass of class sap.ui.model.odata.type.Int with name
|
formatValue |
Formats the given value to the given target type. When formatting to |
sap.ui.model.odata.type.Int.getMetadata |
Returns a metadata object for class sap.ui.model.odata.type.Int. |
parseValue |
Parses the given value, which is expected to be of the given source type, to an Int in number representation. |
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.Int 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. When formatting to string
the format options are used.
Param | Type | DefaultValue | Description |
---|---|---|---|
iValue | number |
the value in model representation to be formatted |
|
sTargetType | string |
the target type; may be "any", "int", "float", "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.Int.
Parses the given value, which is expected to be of the given source type, to an Int in number representation.
Param | Type | DefaultValue | Description |
---|---|---|---|
vValue | number string |
the value to be parsed. The empty string and |
|
sSourceType | string |
the source type (the expected type of |