/** * Retrieves the ActiveDtFilter filter value as a formatted date/time string * * @param _locale locale settings used to format text based display values * @return The ActiveDtFilter filter value in formatted date/time form * @throws ServiceException thrown if an error occurs formatting the data for the ActiveDtFilter * field */ public String[] getActiveDtFilterAsFormattedDateTimeString(Locale _locale) throws ServiceException { if (Logger.TRACE) Logger.traceEntry(this.getClass(), "getActiveDtFilterAsFormattedDateTimeString"); try { String[] formattedValues = null; Object[] formattedObjs = FilterConversionHelper.format(this.getActiveDtFilter(), _locale, true, false); if (formattedObjs != null) { formattedValues = new String[formattedObjs.length]; for (int i = 0; i < formattedObjs.length; i++) { formattedValues[i] = formattedObjs[i].toString(); } } if (Logger.TRACE) Logger.traceExit(this.getClass(), "getActiveDtFilterAsFormattedDateTimeString"); return formattedValues; } catch (ServiceException excp) { excp.setErrorObjectName(this.getClass().getName()); excp.setErrorObjectFieldName("ActiveDtFilter"); if (Logger.TRACE) Logger.traceError(this.getClass(), "getActiveDtFilterAsFormattedDateTimeString"); throw excp; } }
/** * Sets the CounterFilter filter value from a formatted string * * @param _value the CounterFilter filter value(s) in formatted form. If the requested output * filter type is a type that contains a single data item, then a single String display value * object must be specified. If the requested output filter type is a type that contains more * than one data item (e.g. a Between Filter), then a Collection of String display value * objects must be provided. * @param _filterType output filter type (see {@link FilterConversionHelper} fields for a list of * valid values) * @param _locale locale settings used to format text based display values * @throws ServiceException thrown if invalid data is set in the CounterFilter filter field */ public void setCounterFilterFromFormattedString( String[] _value, String[] _filterType, Locale _locale) throws ServiceException { if (Logger.TRACE) Logger.traceEntry(this.getClass(), "setCounterFilterFromFormattedString"); try { this.setCounterFilter( (IntegerFilter[]) (FilterConversionHelper.parse(_value, _filterType, _locale, false, false))); } catch (ServiceException excp) { excp.setErrorObjectName(this.getClass().getName()); excp.setErrorObjectFieldName("CounterFilter"); if (Logger.TRACE) Logger.traceError(this.getClass(), "setCounterFilterFromFormattedString"); throw excp; } if (Logger.TRACE) Logger.traceExit(this.getClass(), "setCounterFilterFromFormattedString"); }