/** Sets pickup attribute. */ public void setPickup(boolean pickup) { removeAttributes(PICKUP_ATTRIBUTE, GoogleBaseAttributeType.BOOLEAN); addBooleanAttribute(PICKUP_ATTRIBUTE, pickup); }
/** Sets the date at which the entry expires. */ public void setExpirationDate(DateTime date) { removeAttributes(EXPIRATION_DATE_ATTRIBUTE, GoogleBaseAttributeType.DATE_TIME); addDateTimeAttribute(EXPIRATION_DATE_ATTRIBUTE, date); }
/** * Sets tax percent attribute. * * @deprecated use {@link #addTax(Tax)} instead */ @Deprecated public void setTaxPercent(float taxPercent) { removeAttributes(TAX_PERCENT_ATTRIBUTE); addFloatAttribute(TAX_PERCENT_ATTRIBUTE, taxPercent); }
/** Sets quantity. */ public void setQuantity(int value) { removeAttributes(QUANTITY_ATTRIBUTE); addIntAttribute(QUANTITY_ATTRIBUTE, value); }
/** * Sets the location. */ public void setLocation(String value) { removeAttributes(LOCATION_ATTRIBUTE); addLocationAttribute(LOCATION_ATTRIBUTE, value); }
/** Adds group attribute. */ public void addGroupAttribute(String groupName, Group group) { addAttribute(ConversionUtil.createAttribute(groupName, group)); }
/** * Sets the price of the item. * * @param value */ public void setPrice(NumberUnit<Float> value) { removeAttributes(PRICE_ATTRIBUTE); addFloatUnitAttribute(PRICE_ATTRIBUTE, value); }
/** * Creates a new, empty feed. */ public GoogleBaseFeed() { super(GoogleBaseEntry.class); googleBaseAttributesExtension = new GoogleBaseAttributesExtension(); addExtension(googleBaseAttributesExtension); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#INT_UNIT}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param value * @param unit * @return the attribute object that has been created and added to the item */ public GoogleBaseAttribute addIntUnitAttribute(String name, int value, String unit) { return addIntUnitAttribute(name, new NumberUnit<Integer>(value, unit)); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#NUMBER_UNIT}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param value * @param unit * @return the attribute object that has been created and added to the item */ public GoogleBaseAttribute addNumberUnitAttribute(String name, Number value, String unit) { return addNumberUnitAttribute(name, new NumberUnit<Number>(value, unit)); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#FLOAT_UNIT}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param value * @param unit * @return the attribute object that has been created and added to the item */ public GoogleBaseAttribute addFloatUnitAttribute(String name, float value, String unit) { return addFloatUnitAttribute(name, new NumberUnit<Float>(value, unit)); }
/** Adds group attribute. */ public void addGroupAttribute(String groupName, Group group) { addAttribute(ConversionUtil.createAttribute(groupName, group)); }
/** * Sets the price of the item. * * @param value */ public void setPrice(NumberUnit<Float> value) { removeAttributes(PRICE_ATTRIBUTE); addFloatUnitAttribute(PRICE_ATTRIBUTE, value); }
/** Sets quantity. */ public void setQuantity(int value) { removeAttributes(QUANTITY_ATTRIBUTE); addIntAttribute(QUANTITY_ATTRIBUTE, value); }
/** * Sets the location. */ public void setLocation(String value) { removeAttributes(LOCATION_ATTRIBUTE); addLocationAttribute(LOCATION_ATTRIBUTE, value); }
/** * Creates a new entry. */ public GoogleBaseEntry() { googleBaseAttributesExtension = new GoogleBaseAttributesExtension(); addExtension(googleBaseAttributesExtension); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#INT_UNIT}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param value * @param unit * @return the attribute object that has been created and added to the item */ public GoogleBaseAttribute addIntUnitAttribute(String name, int value, String unit) { return addIntUnitAttribute(name, new NumberUnit<Integer>(value, unit)); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#NUMBER_UNIT}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param value * @param unit * @return the attribute object that has been created and added to the item */ public GoogleBaseAttribute addNumberUnitAttribute(String name, Number value, String unit) { return addNumberUnitAttribute(name, new NumberUnit<Number>(value, unit)); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#FLOAT_UNIT}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param value * @param unit * @return the attribute object that has been created and added to the item */ public GoogleBaseAttribute addFloatUnitAttribute(String name, float value, String unit) { return addFloatUnitAttribute(name, new NumberUnit<Float>(value, unit)); }
/** * Adds an attribute of type * {@link com.google.api.gbase.client.GoogleBaseAttributeType#TAX}. * * This method will never remove an attribute, even if it has * the same name as the new attribute. If you would like to set * an attribute that can only appear once, call * {@link #removeAttributes(String, GoogleBaseAttributeType)} first. * * @param name attribute name * @param tax attribute value */ public void addTaxAttribute(String name, Tax tax) { addAttribute(ConversionUtil.createAttribute(name, tax)); }