public abstract class MediaItem extends com.orm.SugarRecord implements java.io.Serializable, Sectioned
Modifier and Type | Class and Description |
---|---|
static class |
MediaItem.Duration
Represents a generic duration (value + measure unit)
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
COLUMN_CATEGORY |
static java.lang.String |
COLUMN_COMPLETION_DATE |
static java.lang.String |
COLUMN_DOING_NOW |
static java.lang.String |
COLUMN_GENRES |
static java.lang.String |
COLUMN_ID |
static java.lang.String |
COLUMN_IMPORTANCE_LEVEL |
static java.lang.String |
COLUMN_NAME |
static java.lang.String |
COLUMN_ORDER_IN_SECTION |
static java.lang.String |
COLUMN_OWNED |
static java.lang.String |
COLUMN_RELEASE_DATE |
static java.lang.String |
COLUMN_TIMES_COMPLETED |
Constructor and Description |
---|
MediaItem() |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
java.lang.Long |
getCategory()
Getter
|
java.util.Date |
getCompletionDate()
Getter
|
abstract java.lang.String |
getCreator()
Getter
|
java.lang.String |
getDescription()
Getter
|
abstract MediaItem.Duration |
getDuration(Context context)
Getter
|
java.lang.String |
getExternalServiceId()
Getter
|
java.lang.String |
getGenres()
Getter
|
java.net.URL |
getImageUrl()
Getter
|
ImportanceLevel |
getImportanceLevel()
Getter
|
int |
getOrderInSection()
Getter
|
java.util.Date |
getReleaseDate()
Getter
|
Section |
getSection()
Returns the section of the item
|
int |
getTimesCompleted()
Getter
|
java.lang.String |
getTitle()
Getter
|
java.lang.String |
getUserComment()
Getter
|
boolean |
isCompleted()
Getter
|
boolean |
isDoingNow()
Getter
|
boolean |
isOwned()
Getter
|
boolean |
isUpcoming()
Getter
|
void |
setCategory(java.lang.Long category)
Setter
|
void |
setCompletionDate(java.util.Date completionDate)
Setter
|
void |
setDescription(java.lang.String description)
Setter
|
void |
setDoingNow(boolean doingNow)
Setter
|
void |
setExternalServiceId(java.lang.String externalServiceId)
Setter
|
void |
setGenres(java.lang.String genres)
Setter
|
void |
setImageUrl(java.net.URL imageUrl)
Setter
|
void |
setImportanceLevel(ImportanceLevel importanceLevel)
Setter
|
void |
setOrderInSection(int orderInSection)
Setter
|
void |
setOwned(boolean owned)
Setter
|
void |
setReleaseDate(java.util.Date releaseDate)
Setter
|
void |
setTimesCompleted(int timesCompleted)
Setter
|
void |
setTitle(java.lang.String title)
Setter
|
void |
setUserComment(java.lang.String userComment)
Setter
|
count, count, count, delete, delete, deleteAll, deleteAll, deleteInTx, deleteInTx, executeQuery, find, find, findAll, findAsIterator, findAsIterator, findById, findById, findById, findWithQuery, findWithQueryAsIterator, first, getId, isSugarEntity, last, listAll, listAll, save, save, saveInTx, saveInTx, setId
public static final java.lang.String COLUMN_ID
public static final java.lang.String COLUMN_NAME
public static final java.lang.String COLUMN_CATEGORY
public static final java.lang.String COLUMN_COMPLETION_DATE
public static final java.lang.String COLUMN_TIMES_COMPLETED
public static final java.lang.String COLUMN_DOING_NOW
public static final java.lang.String COLUMN_RELEASE_DATE
public static final java.lang.String COLUMN_IMPORTANCE_LEVEL
public static final java.lang.String COLUMN_ORDER_IN_SECTION
public static final java.lang.String COLUMN_OWNED
public static final java.lang.String COLUMN_GENRES
public java.lang.String getTitle()
public java.util.Date getCompletionDate()
public boolean isCompleted()
public java.lang.Long getCategory()
public java.util.Date getReleaseDate()
public java.lang.String getGenres()
public java.lang.String getDescription()
public java.lang.String getUserComment()
public ImportanceLevel getImportanceLevel()
public boolean isOwned()
public boolean isUpcoming()
public abstract java.lang.String getCreator()
public boolean isDoingNow()
public java.lang.String getExternalServiceId()
public java.net.URL getImageUrl()
public abstract MediaItem.Duration getDuration(Context context)
public int getOrderInSection()
public int getTimesCompleted()
public Section getSection()
getSection
in interface Sectioned
public void setReleaseDate(java.util.Date releaseDate)
releaseDate
- the media item release datepublic void setTitle(java.lang.String title)
title
- the media item titlepublic void setCategory(java.lang.Long category)
category
- the media item category IDpublic void setImportanceLevel(ImportanceLevel importanceLevel)
importanceLevel
- the media item importance levelpublic void setOwned(boolean owned)
owned
- true if the user owns this media itempublic void setGenres(java.lang.String genres)
genres
- the media item genrespublic void setDescription(java.lang.String description)
description
- the media item descriptionpublic void setUserComment(java.lang.String userComment)
userComment
- the media item user commentpublic void setExternalServiceId(java.lang.String externalServiceId)
externalServiceId
- the media item external API IDpublic void setCompletionDate(java.util.Date completionDate)
completionDate
- the last media item completion date (null if the user hasn't completed it yet)public void setDoingNow(boolean doingNow)
doingNow
- true if the user is "doing" (e.g. watching, reading, etc.) the media item right nowpublic void setImageUrl(java.net.URL imageUrl)
imageUrl
- the URL of the imagepublic void setOrderInSection(int orderInSection)
orderInSection
- the order value inside the media item's importance level (i.e. items with the same importance level are ordered by this value)public void setTimesCompleted(int timesCompleted)
timesCompleted
- the number of times this media item was completed in the pastpublic boolean equals(java.lang.Object o)
equals
in class java.lang.Object