/** * Publically available method to update the current timezone. * * @param timezone a timezone instance */ public void setTimeZone(final TimeZone timezone) { updateTimeZone(timezone); }
/** * Publically available method to update the current timezone. * @param timezone a timezone instance */ public void setTimeZone(final TimeZone timezone) { updateTimeZone(timezone); }
/** * Creates a new instance of the named property with an initial timezone. * * @param name property name * @param timezone initial timezone */ public DateProperty(final String name, TimeZone timezone, PropertyFactory factory) { super(name, factory); updateTimeZone(timezone); }
/** * Publically available method to update the current timezone. * * @param timezone a timezone instance */ public void setTimeZone(final TimeZone timezone) { updateTimeZone(timezone); }
/** * Publically available method to update the current timezone. * * @param timezone a timezone instance */ public void setTimeZone(final TimeZone timezone) { updateTimeZone(timezone); }
/** * Creates a new instance of the named property with an initial timezone. * @param name property name * @param timezone initial timezone */ public DateProperty(final String name, TimeZone timezone, PropertyFactory factory) { super(name, factory); updateTimeZone(timezone); }
/** * Creates a new instance of the named property with an initial timezone. * * @param name property name * @param timezone initial timezone */ public DateProperty(final String name, TimeZone timezone, PropertyFactory factory) { super(name, factory); updateTimeZone(timezone); }
/** * Creates a new instance of the named property with an initial timezone. * * @param name property name * @param timezone initial timezone */ public DateProperty(final String name, TimeZone timezone, PropertyFactoryImpl factory) { super(name, factory); updateTimeZone(timezone); }
/** * Creates a new instance of the named property with an initial timezone. * * @param name property name * @param timezone initial timezone */ public DateProperty(final String name, TimeZone timezone, PropertyFactoryImpl factory) { super(name, factory); updateTimeZone(timezone); }
/** * Publically available method to update the current timezone. * * @param timezone a timezone instance */ public void setTimeZone(final TimeZone timezone) { updateTimeZone(timezone); }
/** * Default setValue() implementation. Allows for either DATE or DATE-TIME values. * * @param value a string representation of a DATE or DATE-TIME value * @throws ParseException where the specified value is not a valid DATE or DATE-TIME * representation */ public void setValue(final String value) throws ParseException { // value can be either a date-time or a date.. if (Value.DATE.equals(getParameter(Parameter.VALUE))) { // ensure timezone is null for VALUE=DATE properties.. updateTimeZone(null); this.date = new Date(value); } else if (value != null && !value.isEmpty()){ this.date = new DateTime(value, timeZone); } }
/** * Default setValue() implementation. Allows for either DATE or DATE-TIME values. * * @param value a string representation of a DATE or DATE-TIME value * @throws ParseException where the specified value is not a valid DATE or DATE-TIME * representation */ public void setValue(final String value) throws ParseException { // value can be either a date-time or a date.. if (Value.DATE.equals(getParameter(Parameter.VALUE))) { // ensure timezone is null for VALUE=DATE properties.. updateTimeZone(null); this.date = new Date(value); } else if (value != null && !value.isEmpty()){ this.date = new DateTime(value, timeZone); } }
/** * Default setValue() implementation. Allows for either DATE or DATE-TIME values. * * @param value a string representation of a DATE or DATE-TIME value * @throws ParseException where the specified value is not a valid DATE or DATE-TIME * representation */ public void setValue(final String value) throws ParseException { // value can be either a date-time or a date.. if (Value.DATE.equals(getParameter(Parameter.VALUE))) { // ensure timezone is null for VALUE=DATE properties.. updateTimeZone(null); this.date = new Date(value); } else if (value != null && !value.isEmpty()){ this.date = new DateTime(value, timeZone); } }
/** * Default setValue() implementation. Allows for either DATE or DATE-TIME values. * * @param value a string representation of a DATE or DATE-TIME value * @throws ParseException where the specified value is not a valid DATE or DATE-TIME * representation */ public void setValue(final String value) throws ParseException { // value can be either a date-time or a date.. if (Value.DATE.equals(getParameter(Parameter.VALUE))) { // ensure timezone is null for VALUE=DATE properties.. updateTimeZone(null); this.date = new Date(value); } else { this.date = new DateTime(value, timeZone); } }
/** * Default setValue() implementation. Allows for either DATE or DATE-TIME values. * * @param value a string representation of a DATE or DATE-TIME value * @throws ParseException where the specified value is not a valid DATE or DATE-TIME * representation */ public void setValue(final String value) throws ParseException { // value can be either a date-time or a date.. if (Value.DATE.equals(getParameter(Parameter.VALUE))) { // ensure timezone is null for VALUE=DATE properties.. updateTimeZone(null); this.date = new Date(value); } else { this.date = new DateTime(value, timeZone); } }
/** * Sets the date value of this property. The timezone and value of this * instance will also be updated accordingly. * @param date The date to set. */ public final void setDate(final Date date) { this.date = date; if (date instanceof DateTime) { if (Value.DATE.equals(getParameter(Parameter.VALUE))) { getParameters().replace(Value.DATE_TIME); } updateTimeZone(((DateTime) date).getTimeZone()); } else { if (date != null) { getParameters().replace(Value.DATE); } /* else { getParameters().removeAll(Parameter.VALUE); } */ // ensure timezone is null for VALUE=DATE or null properties.. updateTimeZone(null); } }
/** * Sets the date value of this property. The timezone and value of this * instance will also be updated accordingly. * * @param date The date to set. */ public final void setDate(final Date date) { this.date = date; if (date instanceof DateTime) { if (Value.DATE.equals(getParameter(Parameter.VALUE))) { getParameters().replace(Value.DATE_TIME); } updateTimeZone(((DateTime) date).getTimeZone()); } else { if (date != null) { getParameters().replace(Value.DATE); } /* else { getParameters().removeAll(Parameter.VALUE); } */ // ensure timezone is null for VALUE=DATE or null properties.. updateTimeZone(null); } }
/** * Sets the date value of this property. The timezone and value of this * instance will also be updated accordingly. * * @param date The date to set. */ public final void setDate(final Date date) { this.date = date; if (date instanceof DateTime) { if (Value.DATE.equals(getParameter(Parameter.VALUE))) { getParameters().replace(Value.DATE_TIME); } updateTimeZone(((DateTime) date).getTimeZone()); } else { if (date != null) { getParameters().replace(Value.DATE); } /* else { getParameters().removeAll(Parameter.VALUE); } */ // ensure timezone is null for VALUE=DATE or null properties.. updateTimeZone(null); } }
/** * Sets the date value of this property. The timezone and value of this * instance will also be updated accordingly. * * @param date The date to set. */ public final void setDate(final Date date) { this.date = date; if (date instanceof DateTime) { if (Value.DATE.equals(getParameter(Parameter.VALUE))) { getParameters().replace(Value.DATE_TIME); } updateTimeZone(((DateTime) date).getTimeZone()); } else { if (date != null) { getParameters().replace(Value.DATE); } /* else { getParameters().removeAll(Parameter.VALUE); } */ // ensure timezone is null for VALUE=DATE or null properties.. updateTimeZone(null); } }
/** * Sets the date value of this property. The timezone and value of this * instance will also be updated accordingly. * * @param date The date to set. */ public final void setDate(final Date date) { this.date = date; if (date instanceof DateTime) { if (Value.DATE.equals(getParameter(Parameter.VALUE))) { getParameters().replace(Value.DATE_TIME); } updateTimeZone(((DateTime) date).getTimeZone()); } else { if (date != null) { getParameters().replace(Value.DATE); } /* else { getParameters().removeAll(Parameter.VALUE); } */ // ensure timezone is null for VALUE=DATE or null properties.. updateTimeZone(null); } }