/** * Gets the first value of a specific attribute, as a date/dateTime * range. * * This method only takes into account attributes of type * {@link GoogleBaseAttributeType#DATE_TIME}, * {@link GoogleBaseAttributeType#DATE} and * {@link GoogleBaseAttributeType#DATE_TIME_RANGE}. * * * @param name attribute name * @return value of the attribute or null if no attribute * with this name was found on the list * @exception NumberFormatException if some value was * found that could not be converted */ public DateTimeRange getDateRangeAttribute(String name) { GoogleBaseAttribute attribute = getAttribute(name, GoogleBaseAttributeType.DATE_TIME_RANGE); return ConversionUtil.extractDateTimeRange(attribute); }
/** * Gets the first value of a specific attribute, as a * {@link com.google.api.gbase.client.DateTimeRange}. * * This method does not check the type of the attribute * that's being queried, it just gets the value and try * and convert it. * * @param name attribute name * @return value of the attribute or null if no attribute * with this name was found on the list * @exception NumberFormatException if some value was * found that could not be converted */ public DateTimeRange getDateTimeRangeAttribute(String name) { GoogleBaseAttribute value = getAttribute(name); if (value == null) { return null; } return ConversionUtil.extractDateTimeRange(value); }
/** * Gets all the values of a specific attribute, as a list of * {@link com.google.api.gbase.client.DateTimeRange}. * * This method does not check the type of the attribute * that's being queried, it just gets the values and try * and convert them. * * @param name attribute name * @return a list of DateTimeRange, which might be empty but not null * @exception NumberFormatException if some value was * found that could not be converted */ public List<? extends DateTimeRange> getDateTimeRangeAttributes(String name) { List<DateTimeRange> retval = new ArrayList<DateTimeRange>(); for (GoogleBaseAttribute attr: attributes) { if (hasNameAndType(attr, name, GoogleBaseAttributeType.DATE_TIME_RANGE)) { retval.add(ConversionUtil.extractDateTimeRange(attr)); } } return retval; }
/** * Gets the first value of a specific attribute, as a * {@link com.google.api.gbase.client.DateTimeRange}. * * This method does not check the type of the attribute * that's being queried, it just gets the value and try * and convert it. * * @param name attribute name * @return value of the attribute or null if no attribute * with this name was found on the list * @exception NumberFormatException if some value was * found that could not be converted */ public DateTimeRange getDateTimeRangeAttribute(String name) { GoogleBaseAttribute value = getAttribute(name); if (value == null) { return null; } return ConversionUtil.extractDateTimeRange(value); }
/** * Gets the first value of a specific attribute, as a date/dateTime * range. * * This method only takes into account attributes of type * {@link GoogleBaseAttributeType#DATE_TIME}, * {@link GoogleBaseAttributeType#DATE} and * {@link GoogleBaseAttributeType#DATE_TIME_RANGE}. * * * @param name attribute name * @return value of the attribute or null if no attribute * with this name was found on the list * @exception NumberFormatException if some value was * found that could not be converted */ public DateTimeRange getDateRangeAttribute(String name) { GoogleBaseAttribute attribute = getAttribute(name, GoogleBaseAttributeType.DATE_TIME_RANGE); return ConversionUtil.extractDateTimeRange(attribute); }
/** * Gets all the values of a specific attribute, as a list of * {@link com.google.api.gbase.client.DateTimeRange}. * * This method does not check the type of the attribute * that's being queried, it just gets the values and try * and convert them. * * @param name attribute name * @return a list of DateTimeRange, which might be empty but not null * @exception NumberFormatException if some value was * found that could not be converted */ public List<? extends DateTimeRange> getDateTimeRangeAttributes(String name) { List<DateTimeRange> retval = new ArrayList<DateTimeRange>(); for (GoogleBaseAttribute attr: attributes) { if (hasNameAndType(attr, name, GoogleBaseAttributeType.DATE_TIME_RANGE)) { retval.add(ConversionUtil.extractDateTimeRange(attr)); } } return retval; }