mirror of
https://github.com/antebudimir/tempus.git
synced 2026-01-01 01:53:31 +00:00
82 lines
1.8 KiB
Java
82 lines
1.8 KiB
Java
package com.cappielloantonio.play.model;
|
|
|
|
import android.os.Parcel;
|
|
import android.os.Parcelable;
|
|
|
|
import androidx.annotation.NonNull;
|
|
import androidx.room.ColumnInfo;
|
|
import androidx.room.Entity;
|
|
import androidx.room.PrimaryKey;
|
|
|
|
@Entity(tableName = "song_genre_cross")
|
|
public class SongGenreCross implements Parcelable {
|
|
@NonNull
|
|
@PrimaryKey(autoGenerate = true)
|
|
@ColumnInfo(name = "id")
|
|
private int id;
|
|
|
|
@ColumnInfo(name = "song_id")
|
|
private String songId;
|
|
|
|
@ColumnInfo(name = "genre_id")
|
|
private String genreId;
|
|
|
|
public SongGenreCross(String songId, String genreId) {
|
|
this.songId = songId;
|
|
this.genreId = genreId;
|
|
}
|
|
|
|
public int getId() {
|
|
return id;
|
|
}
|
|
|
|
public void setId(int id) {
|
|
this.id = id;
|
|
}
|
|
|
|
public String getSongId() {
|
|
return songId;
|
|
}
|
|
|
|
public void setSongId(String songId) {
|
|
this.songId = songId;
|
|
}
|
|
|
|
public String getGenreId() {
|
|
return genreId;
|
|
}
|
|
|
|
public void setGenreId(String genreId) {
|
|
this.genreId = genreId;
|
|
}
|
|
|
|
protected SongGenreCross(Parcel in) {
|
|
id = in.readInt();
|
|
songId = in.readString();
|
|
genreId = in.readString();
|
|
}
|
|
|
|
@Override
|
|
public void writeToParcel(Parcel dest, int flags) {
|
|
dest.writeInt(id);
|
|
dest.writeString(songId);
|
|
dest.writeString(genreId);
|
|
}
|
|
|
|
@Override
|
|
public int describeContents() {
|
|
return 0;
|
|
}
|
|
|
|
public static final Creator<SongGenreCross> CREATOR = new Creator<SongGenreCross>() {
|
|
@Override
|
|
public SongGenreCross createFromParcel(Parcel in) {
|
|
return new SongGenreCross(in);
|
|
}
|
|
|
|
@Override
|
|
public SongGenreCross[] newArray(int size) {
|
|
return new SongGenreCross[size];
|
|
}
|
|
};
|
|
}
|