// Path: app/src/main/java/com/jonathanpetitfrere/mvvm/repository/persistence/entity/User.java
// @Entity
// public class User {
// 
//     @PrimaryKey
//     private String email;
// 
//     @ColumnInfo(name = "first_name")
//     private String firstName;
// 
//     @ColumnInfo(name = "last_name")
//     private String lastName;
// 
//     public User(String email, String firstName, String lastName) {
//         this.email = email;
//         this.firstName = firstName;
//         this.lastName = lastName;
//     }
// 
//     public String getEmail() {
//         return email;
//     }
// 
//     public String getFirstName() {
//         return firstName;
//     }
// 
//     public String getLastName() {
//         return lastName;
//     }
// 
//     @Override
//     public boolean equals(Object object) {
//         if (this == object) return true;
//         if (object == null || getClass() != object.getClass()) return false;
// 
//         User user = (User) object;
// 
//         if (email != null ? !email.equals(user.email) : user.email != null) return false;
//         if (firstName != null ? !firstName.equals(user.firstName) : user.firstName != null)
//             return false;
//         return lastName != null ? lastName.equals(user.lastName) : user.lastName == null;
// 
//     }
// 
//     @Override
//     public int hashCode() {
//         int result = email != null ? email.hashCode() : 0;
//         result = 31 * result + (firstName != null ? firstName.hashCode() : 0);
//         result = 31 * result + (lastName != null ? lastName.hashCode() : 0);
//         return result;
//     }
// }


import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.OnConflictStrategy;
import android.arch.persistence.room.Query;
import com.jonathanpetitfrere.mvvm.repository.persistence.entity.User;
import java.util.List;
import io.reactivex.Flowable;
package com.jonathanpetitfrere.mvvm.repository.persistence.dao;





/**
 * @author jpetit
 */

@Dao
public interface UserDao {

    @Query("SELECT * FROM user WHERE email = :email")
// Path: app/src/main/java/com/jonathanpetitfrere/mvvm/repository/persistence/entity/User.java
// @Entity
// public class User {
// 
//     @PrimaryKey
//     private String email;
// 
//     @ColumnInfo(name = "first_name")
//     private String firstName;
// 
//     @ColumnInfo(name = "last_name")
//     private String lastName;
// 
//     public User(String email, String firstName, String lastName) {
//         this.email = email;
//         this.firstName = firstName;
//         this.lastName = lastName;
//     }
// 
//     public String getEmail() {
//         return email;
//     }
// 
//     public String getFirstName() {
//         return firstName;
//     }
// 
//     public String getLastName() {
//         return lastName;
//     }
// 
//     @Override
//     public boolean equals(Object object) {
//         if (this == object) return true;
//         if (object == null || getClass() != object.getClass()) return false;
// 
//         User user = (User) object;
// 
//         if (email != null ? !email.equals(user.email) : user.email != null) return false;
//         if (firstName != null ? !firstName.equals(user.firstName) : user.firstName != null)
//             return false;
//         return lastName != null ? lastName.equals(user.lastName) : user.lastName == null;
// 
//     }
// 
//     @Override
//     public int hashCode() {
//         int result = email != null ? email.hashCode() : 0;
//         result = 31 * result + (firstName != null ? firstName.hashCode() : 0);
//         result = 31 * result + (lastName != null ? lastName.hashCode() : 0);
//         return result;
//     }
// }


// Path: app/src/main/java/com/jonathanpetitfrere/mvvm/repository/persistence/dao/UserDao.java
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.OnConflictStrategy;
import android.arch.persistence.room.Query;
import com.jonathanpetitfrere.mvvm.repository.persistence.entity.User;
import java.util.List;
import io.reactivex.Flowable;

package com.jonathanpetitfrere.mvvm.repository.persistence.dao;





/**
 * @author jpetit
 */

@Dao
public interface UserDao {

    @Query("SELECT * FROM user WHERE email = :email")
    Flowable<User> loadUser(String email);