Package org.faktorips.datatype
Class DefaultGenericEnumDatatype
java.lang.Object
org.faktorips.datatype.GenericValueDatatype
org.faktorips.datatype.GenericEnumDatatype
org.faktorips.datatype.DefaultGenericEnumDatatype
- All Implemented Interfaces:
Comparable<Datatype>,Datatype,EnumDatatype,NamedDatatype,ValueDatatype
-
Field Summary
Fields inherited from class org.faktorips.datatype.GenericEnumDatatype
MSGCODE_PREFIX_GET_NAME_METHODFields inherited from class org.faktorips.datatype.GenericValueDatatype
MSGCODE_GET_ALL_VALUES_METHOD_NOT_FOUND, MSGCODE_GETVALUE_METHOD_NOT_FOUND, MSGCODE_ISPARSABLE_METHOD_NOT_FOUND, MSGCODE_JAVACLASS_NOT_FOUND, MSGCODE_PREFIX, MSGCODE_PREFIX_GET_ALL_VALUES_METHOD, MSGCODE_PREFIX_GET_VALUE_METHOD, MSGCODE_PREFIX_IS_PARSABLE_METHOD, MSGCODE_PREFIX_TO_STRING_METHOD, MSGCODE_PREFIX_VALUE_OF_METHOD, MSGCODE_SPECIALCASE_NULL_IS_NOT_NULL, MSGCODE_SPECIALCASE_NULL_NOT_FOUND, MSGCODE_TOSTRING_METHOD_NOT_FOUND, MSGCODE_VALUE_OF_METHOD_NOT_FOUNDFields inherited from interface org.faktorips.datatype.Datatype
BIG_DECIMAL, BOOLEAN, DECIMAL, DOUBLE, GREGORIAN_CALENDAR, INTEGER, LONG, MONEY, PRIMITIVE_BOOLEAN, PRIMITIVE_INT, PRIMITIVE_LONG, STRING, VOID -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionClass<?>Returns the class represented by this datatype.Returns the name of the class represented by this datatype.getValueByName(String name) This method parses the given string and returns the value as an instance of the class this value datatype represents.Methods inherited from class org.faktorips.datatype.GenericEnumDatatype
checkReadyToUse, clearCache, getAllValueIds, getGetNameMethodName, getNameFromValue, getValueName, initCache, isCacheData, isParsable, isSupportingNames, setCacheData, setGetNameMethodName, setIsSupportingNamesMethods inherited from class org.faktorips.datatype.GenericValueDatatype
areValuesEqual, compare, compareTo, equals, getAllValuesMethod, getAllValuesMethodName, getDefaultValue, getIsParsableMethodName, getJavaClassName, getName, getNullObjectId, getQualifiedName, getToStringMethod, getToStringMethodName, getValue, getValueOfMethodName, getWrapperType, hashCode, hasNullObject, isAbstract, isEnum, isImmutable, isMutable, isNull, isPrimitive, isValueDatatype, isVoid, setAllValuesMethodName, setIsParsableMethodName, setNullObjectDefined, setNullObjectId, setQualifiedName, setToStringMethodName, setValueOfMethodName, supportsCompare, toString, valueToStringMethods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Comparable
compareToMethods inherited from interface org.faktorips.datatype.Datatype
getName, getQualifiedName, hasNullObject, isAbstract, isEnum, isPrimitive, isValueDatatype, isVoidMethods inherited from interface org.faktorips.datatype.NamedDatatype
getValueByName, getValueNameMethods inherited from interface org.faktorips.datatype.ValueDatatype
areValuesEqual, compare, getDefaultValue, getNullObjectId, getValue, getWrapperType, isImmutable, isMutable, isNull, supportsCompare, valueToString
-
Constructor Details
-
DefaultGenericEnumDatatype
-
-
Method Details
-
getAdaptedClass
Description copied from class:GenericValueDatatypeReturns the class represented by this datatype. If the class can't be found,nullis returned. In this case thevalidate()method returns a message list containing an error message.- Specified by:
getAdaptedClassin classGenericValueDatatype
-
getAdaptedClassName
Description copied from class:GenericValueDatatypeReturns the name of the class represented by this datatype. This method must return a value, even if the class itself can't be found.- Specified by:
getAdaptedClassNamein classGenericValueDatatype
-
getValueByName
Description copied from interface:NamedDatatypeThis method parses the given string and returns the value as an instance of the class this value datatype represents.The difference to
ValueDatatype.getValue(String)is that the given string is not a representation of the ID (as used byValueDatatype.getValue(String)) but of the name as returned byNamedDatatype.getValueName(String).Use with caution: During development time Faktor-IPS maintains all values with their string representation. This allows to change the value's datatype without the need to convert the value from one class to another (e.g. if the string representation is 42 you can change the datatype from integer to string without converting the integer object to a string object.
- Parameters:
name- the name representation of a value- Returns:
- the value as instance of the class this datatype represents
-