Package de.elo.ix.jscript.handler
Interface IConvertHandler
public interface IConvertHandler
Internally used interface. Class Convert forwards method calls to an implementation of this
interface. The implementation is only available when we are running as a IX event script or
plugin.
-
Method Summary
Modifier and TypeMethodDescriptionfromInternalDate
(Number date) Convert a date value from the internal date format into the ISO format.fromInternalDate
(Number date, String timeZone) Convert a date value from the internal date format into the ISO format.Convert an index field value in internal format into a Number object.toInternalDate
(String isoDate) Convert an ISO date in the local time zone into the internal date format.toInternalDate
(String isoDate, String timeZone) Convert an ISO date into the internal date format.toInternalNumber
(Number v, int dmlType, int max) This function converts a numeric value into the String format that is internally used for index field values.toInternalNumber
(Number v, String okeyName) This function converts a numeric value into the String format that is internally used for index field values.
-
Method Details
-
toInternalNumber
This function converts a numeric value into the String format that is internally used for index field values.- Parameters:
v
- Numeric value, e.g. -5.11okeyName
- Group name of an index field. A DocMaskLine object must be found with DocMaskLine.key = okeyName.- Returns:
- Internal string representation used in the database table objkeys in the column okeydata, e.g. @@@5.11
-
toInternalNumber
This function converts a numeric value into the String format that is internally used for index field values.- Parameters:
v
- Numeric valuedmlType
- One of the DocMaskLineC.TYPE_NUMERIC* constants. This value corresponds to DocMaskLine.type.max
- Maximum number of characters (including the decimal separator). This value corresponds to DocMaskLine.max.- Returns:
- Internal string representation used in the database table objkeys in the column okeydata.
-
fromInternalNumber
Convert an index field value in internal format into a Number object.- Parameters:
v
- Internal string representation of a numeric value, e.g. "@@@5.11" for -5.11- Returns:
- Number object.
-
toInternalDate
Convert an ISO date into the internal date format.- Parameters:
isoDate
- ISO datetimeZone
- isoDate is assumed to be in this time zone.- Returns:
- Internal date format - always in the local time zone.
-
toInternalDate
Convert an ISO date in the local time zone into the internal date format.- Parameters:
isoDate
- ISO date in the local time zone.- Returns:
- Internal date format - always in the time zone of the server.
-
fromInternalDate
Convert a date value from the internal date format into the ISO format.- Parameters:
date
- Internal date format - always in the local time zone.timeZone
- The returned ISO value is based on this time zone.- Returns:
- ISO format.
-
fromInternalDate
Convert a date value from the internal date format into the ISO format.- Parameters:
date
- Internal date format - always in the local time zone.- Returns:
- Date value in ISO format based on the local time zone.
-