Class LocalDateTimeHelper
java.lang.Object
org.faktorips.codegen.dthelpers.AbstractDatatypeHelper
org.faktorips.codegen.dthelpers.AbstractTimeHelper
org.faktorips.codegen.dthelpers.joda.BaseJodaDatatypeHelper
org.faktorips.codegen.dthelpers.joda.LocalDateTimeHelper
- All Implemented Interfaces:
BaseDatatypeHelper<JavaCodeFragment>,DatatypeHelper
-
Field Summary
FieldsFields inherited from class org.faktorips.codegen.dthelpers.joda.BaseJodaDatatypeHelper
ORG_FAKTORIPS_UTIL_JODA_UTIL, ORG_JODA_TIME_FORMAT_ISO_DATE_TIME_FORMATFields inherited from interface org.faktorips.codegen.DatatypeHelper
BIG_DECIMAL, BOOLEAN, DECIMAL, INTEGER, LONG, MONEY, PRIMITIVE_BOOLEAN, PRIMITIVE_INTEGER, STRING -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidappendToStringParameter(JavaCodeFragment fragment) Allows subclasses to add parameters to the toString() method.getToStringExpression(String fieldName) Returns aJavaCodeFragmentcontaining the code for converting the value (of the given field) to a string representation with respect to its data type.Methods inherited from class org.faktorips.codegen.dthelpers.joda.BaseJodaDatatypeHelper
getJavaClassName, nullExpression, valueOfExpressionMethods inherited from class org.faktorips.codegen.dthelpers.AbstractTimeHelper
newInstanceMethods inherited from class org.faktorips.codegen.dthelpers.AbstractDatatypeHelper
createCastExpression, getDatatype, getRangeJavaClassName, newEnumValueSetInstance, newEnumValueSetInstance, newInstanceFromExpression, newInstanceFromExpression, newRangeInstance, newSafeCopy, referenceOrSafeCopyIfNeccessary, setDatatypeMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.faktorips.codegen.DatatypeHelper
getValueSetJavaClassName, newEnumValueSetInstance, newValueInstance
-
Field Details
-
ORG_JODA_TIME_LOCAL_DATE_TIME
- See Also:
-
-
Constructor Details
-
LocalDateTimeHelper
public LocalDateTimeHelper() -
LocalDateTimeHelper
-
-
Method Details
-
appendToStringParameter
Description copied from class:BaseJodaDatatypeHelperAllows subclasses to add parameters to the toString() method.- Overrides:
appendToStringParameterin classBaseJodaDatatypeHelper- Parameters:
fragment- the fragment to append to
-
getToStringExpression
Description copied from interface:DatatypeHelperReturns aJavaCodeFragmentcontaining the code for converting the value (of the given field) to a string representation with respect to its data type. The String must be built so that it can be read using the valueOf-Expression. If the value isnull, the toString-code will yieldnullas a result.The default implementation will call the values toString() method or return
null. The default implementation for generic (extensible) data types will call the method defined using setToStringMethodName(). CustomDatatypeHelpers may override.- Specified by:
getToStringExpressionin interfaceBaseDatatypeHelper<JavaCodeFragment>- Specified by:
getToStringExpressionin interfaceDatatypeHelper- Overrides:
getToStringExpressionin classBaseJodaDatatypeHelper- Parameters:
fieldName- the name of the field in the generated class that should be converted to a string- Returns:
- a
JavaCodeFragmentcontaining the toString() code.
-