// Path: app/src/main/java/com/nilhcem/devfestnantes/utils/Database.java
// public class Database {
// 
//     private Database() {
//         throw new UnsupportedOperationException();
//     }
// 
//     public static String getString(Cursor cursor, String columnName) {
//         return cursor.getString(cursor.getColumnIndexOrThrow(columnName));
//     }
// 
//     public static int getInt(Cursor cursor, String columnName) {
//         return cursor.getInt(cursor.getColumnIndexOrThrow(columnName));
//     }
// }


import android.content.ContentValues;
import android.database.Cursor;
import com.nilhcem.devfestnantes.utils.Database;
import rx.functions.Func1;
package com.nilhcem.devfestnantes.data.database.model;




public class Session {

    public static final String TABLE = "sessions";

    public static final String ID = "_id";
    public static final String START_AT = "start_at";
    public static final String DURATION = "duration";
    public static final String ROOM_ID = "room_id";
    public static final String SPEAKERS_IDS = "speakers_ids";
    public static final String TITLE = "title";
    public static final String DESCRIPTION = "description";

    public final int id;
    public final String startAt;
    public final int duration;
    public final int roomId;
    public final String speakersIds;
    public final String title;
    public final String description;

    public static final Func1<Cursor, Session> MAPPER = cursor -> {
// Path: app/src/main/java/com/nilhcem/devfestnantes/utils/Database.java
// public class Database {
// 
//     private Database() {
//         throw new UnsupportedOperationException();
//     }
// 
//     public static String getString(Cursor cursor, String columnName) {
//         return cursor.getString(cursor.getColumnIndexOrThrow(columnName));
//     }
// 
//     public static int getInt(Cursor cursor, String columnName) {
//         return cursor.getInt(cursor.getColumnIndexOrThrow(columnName));
//     }
// }


// Path: app/src/main/java/com/nilhcem/devfestnantes/data/database/model/Session.java
import android.content.ContentValues;
import android.database.Cursor;
import com.nilhcem.devfestnantes.utils.Database;
import rx.functions.Func1;

package com.nilhcem.devfestnantes.data.database.model;




public class Session {

    public static final String TABLE = "sessions";

    public static final String ID = "_id";
    public static final String START_AT = "start_at";
    public static final String DURATION = "duration";
    public static final String ROOM_ID = "room_id";
    public static final String SPEAKERS_IDS = "speakers_ids";
    public static final String TITLE = "title";
    public static final String DESCRIPTION = "description";

    public final int id;
    public final String startAt;
    public final int duration;
    public final int roomId;
    public final String speakersIds;
    public final String title;
    public final String description;

    public static final Func1<Cursor, Session> MAPPER = cursor -> {
        int id = Database.getInt(cursor, ID);