@Entity(tableName = STREAM_HISTORY_TABLE, primaryKeys = {JOIN_STREAM_ID, STREAM_ACCESS_DATE}, indices = {@Index(value = {JOIN_STREAM_ID})}, foreignKeys = { @ForeignKey(entity = StreamEntity.class,
@Entity(tableName = PLAYLIST_TABLE, indices = {@Index(value = {PLAYLIST_NAME})}) public class PlaylistEntity { final public static String PLAYLIST_TABLE = "playlists";
@Entity(tableName = SearchHistoryEntry.TABLE_NAME, indices = {@Index(value = SEARCH)}) public class SearchHistoryEntry {
@Entity(tableName = SUBSCRIPTION_TABLE, indices = {@Index(value = {SUBSCRIPTION_SERVICE_ID, SUBSCRIPTION_URL}, unique = true)}) public class SubscriptionEntity {
@Entity(tableName = STREAM_TABLE, indices = {@Index(value = {STREAM_SERVICE_ID, STREAM_URL}, unique = true)}) public class StreamEntity implements Serializable {
@Entity(indices = {@Index("id")}, primaryKeys = {"id"}) public class Genre { @NonNull public int id; public String name; public Genre(int id, String name) { this.id = id; this.name = name; } @Override public String toString() { return "ClassPojo [id = " + id + ", name = " + name + "]"; } }
@Entity(indices = {@Index("id")}, primaryKeys = {"id"}) public class TmdbVideo {
@Entity(indices = {@Index("id")}, primaryKeys = {"id"}) @TypeConverters(TmdbTypeConverters.class)
@Entity(tableName="todos", indices=@Index(value="id")) public class ToDoEntity { @PrimaryKey
childColumns="tripId", onDelete=CASCADE), indices=@Index("tripId")) public class Link implements Note { @PrimaryKey
@Entity(tableName="paragraphs", foreignKeys=@ForeignKey(entity=ChapterEntity.class, parentColumns="id", childColumns="chapterId", onDelete=ForeignKey.CASCADE), indices={@Index(value="chapterId")}) public class ParagraphEntity { @PrimaryKey long sequence; String prose; long chapterId; ParagraphEntity(String prose) { this.prose=prose; } }
childColumns="tripId", onDelete=CASCADE), indices=@Index("tripId")) public class Comment implements Note { @PrimaryKey
childColumns="tripId", onDelete=CASCADE), indices=@Index("tripId")) public class Note { public enum Type {
@Entity(indices = {@Index(value = "name", unique = true)}) public class SearchHistory {
childColumns="tripId", onDelete=CASCADE), indices=@Index("tripId")) class Flight extends Plan { public final String departingAirport;
@Entity(tableName = "trophy", foreignKeys = { @ForeignKey( entity = User.class, parentColumns = "id", childColumns = "userId", onDelete = ForeignKey.CASCADE )}, indices = { @Index(value = "userId")} ) public class Trophy { @PrimaryKey(autoGenerate = true) long id; public long userId; String description; public Trophy(long userId, String description) { this.userId = userId; this.description = description; } }
@Entity( tableName = "AppInfo", indices = {@Index("appName"), @Index("installTime"), @Index("disabled")} ) @TypeConverters(DateConverter.class) public class AppInfo { @PrimaryKey public long id; @ColumnInfo(name = "packageName") public String packageName; @ColumnInfo(name = "appName") public String appName; @ColumnInfo(name = "installTime") public long installTime; @ColumnInfo(name = "system") public boolean system; @ColumnInfo(name = "adhellWhitelisted") public boolean adhellWhitelisted; @ColumnInfo(name = "disabled") public boolean disabled; }
@Entity( tableName="lodgings", foreignKeys=@ForeignKey( entity=Trip.class, parentColumns="id", childColumns="tripId", onDelete=CASCADE), indices=@Index("tripId")) @TypeConverters({TypeTransmogrifier.class}) class Lodging extends Plan { public final String address; public final String tripId; @Ignore Lodging(String title, int duration, Priority priority, Date startTime, String address, String tripId) { super(title, duration, priority, startTime); this.address=address; this.tripId=tripId; } Lodging(String id, String title, int duration, Priority priority, Date startTime, Date creationTime, Date updateTime, String address, String tripId) { super(id, title, duration, priority, startTime, creationTime, updateTime); this.address=address; this.tripId=tripId; } }