Interface IDataType
public interface IDataType
Generic class for Mendix data types. Use Core.createDataType to convert model data type DSL strings to this object.
-
Nested Class Summary
-
Method Summary
Modifier and TypeMethodDescriptionboolean
checkTypeForValue
(Object value) Checks the type of the given value.
If the given value is a List, it should contain at least one item to check the object type.Returns the type of this DataType.Returns the enumeration of this DataType (if applicable).Returns the object type of this DataType (if applicable).getType()
Returns the enum type of this DataType.getTypeOfValue
(Object value) Returns DataType of the given value.
If the given value is a List, it should contain at least one item to set the object type.boolean
isList()
Returns whether this DataType is a list.boolean
Returns whether this DataType is an object.boolean
Returns whether this DataType is nothing.parseValueFromString
(String value) Parses a String to a value based on this DataType.
-
Method Details
-
getType
IDataType.DataTypeEnum getType()Returns the enum type of this DataType.- Returns:
- the enum type
-
getObjectType
String getObjectType()Returns the object type of this DataType (if applicable).- Returns:
- the object type if type is List or Object, null otherwise
-
checkTypeForValue
Checks the type of the given value.
If the given value is a List, it should contain at least one item to check the object type.- Parameters:
value
- the value to check- Returns:
- true if the value is valid for this DataType
-
getTypeOfValue
Returns DataType of the given value.
If the given value is a List, it should contain at least one item to set the object type.- Parameters:
value
- the value to check- Returns:
- the DataType of the given value
-
parseValueFromString
Parses a String to a value based on this DataType.- Parameters:
value
- the value to parse- Returns:
- the parsed string
-
isList
boolean isList()Returns whether this DataType is a list.- Returns:
- true if this DataType is a list, false otherwise
-
isMendixObject
boolean isMendixObject()Returns whether this DataType is an object.- Returns:
- true if this DataType is an object, false otherwise
-
isNothing
boolean isNothing()Returns whether this DataType is nothing.- Returns:
- true if this DataType is nothing, false otherwise
-
getDSLType
String getDSLType()Returns the type of this DataType.- Returns:
- the raw string representing the type defined in the DSL.
-
getEnumeration
IMetaEnumeration getEnumeration()Returns the enumeration of this DataType (if applicable).- Returns:
- the enumeration if this type is an enumeration, null otherwise
-