Package classes
Class Object_Variant
- java.lang.Object
-
- classes.Object_BaseObject
-
- classes.Object_Variant
-
- All Implemented Interfaces:
android.os.Parcelable
public class Object_Variant extends Object_BaseObject
A Variant is a particular representation of aObject_Variant. For example, a specific vintage of a particular wine.
-
-
Field Summary
Fields Modifier and Type Field Description static android.os.Parcelable.Creator<Object_Variant>CREATORstatic intCURRENT_VARIANT_YEARstatic intNON_VARIANT
-
Constructor Summary
Constructors Constructor Description Object_Variant(long product_id, int year)Object_Variant(long id, int year, boolean fresh, boolean recommendable, double price, int num_dollar_signs, java.lang.String image, java.lang.String created_at, java.lang.String updated_at, long product_id)Object_Variant(long id, long product_id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddTag(Object_Tag tag)java.lang.StringgetCreatedAt()java.lang.StringgetImage(int width, int height, int quality)Get the variant's image.java.util.ArrayList<Object_MerchantProductLink>getMerchantLinks()Object_TaggetMostRecentRating()The most recent variant tag of typeObject_Tag.Other_TagType.RATINGfor the current user.intgetNumDollarSigns()voidgetPreferabliScore(java.lang.Boolean force_refresh, API_ResultHandler<Object_PreferenceData> handler)doublegetPrice()Object_MediagetPrimaryImage()Object_ProductgetProduct()longgetProductId()Object_Tag.Other_RatingLevelgetRatingLevel()TheObject_Tag.Other_RatingLevelof the most recent rating of a specific variant for the current user.java.util.HashSet<Object_Tag>getRatingTags()All of the variant tags of typeObject_Tag.Other_TagType.RATINGfor the current user.java.util.ArrayList<Object_Tag>getTags()java.lang.StringgetUpdatedAt()Object_TaggetWishlistTag()The first instance within the product of tag typeObject_Tag.Other_TagType.WISHLISTfor the current user.intgetYear()booleanisFresh()booleanisOnWishlist()booleanisRecommendable()voidlttt(java.lang.Long collection_id, java.lang.Boolean include_merchant_links, API_ResultHandler<java.util.ArrayList<Object_Product>> handler)voidrate(Object_Tag.Other_RatingLevel rating, java.lang.String location, java.lang.String notes, java.lang.Double price, java.lang.Integer quantity, java.lang.Integer format_ml, API_ResultHandler<Object_Product> handler)voidsetPrice(double price)voidtoggleWishlist(API_ResultHandler<Object_Product> handler)voidwhereToBuy(Other_FulfillSort fulfill_sort, java.lang.Boolean append_nonconforming_results, java.lang.Boolean lock_to_integration, API_ResultHandler<Object_WhereToBuy> handler)voidwriteToParcel(android.os.Parcel dest, int flags)-
Methods inherited from class classes.Object_BaseObject
describeContents, equals, filter, getId, hashCode, setId
-
-
-
-
Field Detail
-
CURRENT_VARIANT_YEAR
public static int CURRENT_VARIANT_YEAR
-
NON_VARIANT
public static int NON_VARIANT
-
CREATOR
public static final android.os.Parcelable.Creator<Object_Variant> CREATOR
-
-
Constructor Detail
-
Object_Variant
public Object_Variant(long id, long product_id)
-
Object_Variant
public Object_Variant(long product_id, int year)
-
Object_Variant
public Object_Variant(long id, int year, boolean fresh, boolean recommendable, double price, int num_dollar_signs, java.lang.String image, java.lang.String created_at, java.lang.String updated_at, long product_id)
-
-
Method Detail
-
getRatingLevel
public Object_Tag.Other_RatingLevel getRatingLevel()
TheObject_Tag.Other_RatingLevelof the most recent rating of a specific variant for the current user.- Returns:
- rating level.
-
getMostRecentRating
public Object_Tag getMostRecentRating()
The most recent variant tag of typeObject_Tag.Other_TagType.RATINGfor the current user.- Returns:
- a tag.
-
getRatingTags
public java.util.HashSet<Object_Tag> getRatingTags()
All of the variant tags of typeObject_Tag.Other_TagType.RATINGfor the current user.- Returns:
- an array of tags.
-
getProduct
public Object_Product getProduct()
-
getPrimaryImage
public Object_Media getPrimaryImage()
-
getMerchantLinks
public java.util.ArrayList<Object_MerchantProductLink> getMerchantLinks()
-
addTag
public void addTag(Object_Tag tag)
-
getImage
public java.lang.String getImage(int width, int height, int quality)Get the variant's image.- Parameters:
width- returns an image with the specified width in pixels.height- returns an image with the specified height in pixels.quality- returns an image with the specified quality. Scales from 0 - 100.- Returns:
- the URL of the requested image.
-
getProductId
public long getProductId()
-
getYear
public int getYear()
-
isFresh
public boolean isFresh()
-
isRecommendable
public boolean isRecommendable()
-
setPrice
public void setPrice(double price)
-
getPrice
public double getPrice()
-
getNumDollarSigns
public int getNumDollarSigns()
-
getTags
public java.util.ArrayList<Object_Tag> getTags()
-
getWishlistTag
public Object_Tag getWishlistTag()
The first instance within the product of tag typeObject_Tag.Other_TagType.WISHLISTfor the current user.- Returns:
- a tag.
-
isOnWishlist
public boolean isOnWishlist()
-
getCreatedAt
public java.lang.String getCreatedAt()
-
getUpdatedAt
public java.lang.String getUpdatedAt()
-
writeToParcel
public void writeToParcel(android.os.Parcel dest, int flags)- Specified by:
writeToParcelin interfaceandroid.os.Parcelable- Overrides:
writeToParcelin classObject_BaseObject
-
whereToBuy
public void whereToBuy(Other_FulfillSort fulfill_sort, java.lang.Boolean append_nonconforming_results, java.lang.Boolean lock_to_integration, API_ResultHandler<Object_WhereToBuy> handler)
-
rate
public void rate(Object_Tag.Other_RatingLevel rating, java.lang.String location, java.lang.String notes, java.lang.Double price, java.lang.Integer quantity, java.lang.Integer format_ml, API_ResultHandler<Object_Product> handler)
-
toggleWishlist
public void toggleWishlist(API_ResultHandler<Object_Product> handler)
-
lttt
public void lttt(java.lang.Long collection_id, java.lang.Boolean include_merchant_links, API_ResultHandler<java.util.ArrayList<Object_Product>> handler)
-
getPreferabliScore
public void getPreferabliScore(java.lang.Boolean force_refresh, API_ResultHandler<Object_PreferenceData> handler)
-
-