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
Nested Classes Modifier and Type Interface Description static class
IDataType.DataTypeEnum
Provides all enum types.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description boolean
checkTypeForValue(java.lang.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.java.lang.String
getDSLType()
Returns the type of this DataType.IMetaEnumeration
getEnumeration()
Returns the enumeration of this DataType (if applicable).java.lang.String
getObjectType()
Returns the object type of this DataType (if applicable).IDataType.DataTypeEnum
getType()
Returns the enum type of this DataType.IDataType
getTypeOfValue(java.lang.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
isMendixObject()
Returns whether this DataType is an object.boolean
isNothing()
Returns whether this DataType is nothing.java.lang.Object
parseValueFromString(java.lang.String value)
Parses a String to a value based on this DataType.
-
-
-
Method Detail
-
getType
IDataType.DataTypeEnum getType()
Returns the enum type of this DataType.- Returns:
- the enum type
-
getObjectType
java.lang.String getObjectType()
Returns the object type of this DataType (if applicable).- Returns:
- the object type if type is List or Object, null otherwise
-
checkTypeForValue
boolean checkTypeForValue(java.lang.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.- Parameters:
value
- the value to check- Returns:
- true if the value is valid for this DataType
-
getTypeOfValue
IDataType getTypeOfValue(java.lang.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.- Parameters:
value
- the value to check- Returns:
- the DataType of the given value
-
parseValueFromString
java.lang.Object parseValueFromString(java.lang.String value)
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
java.lang.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
-
-