package com.bookbase.bookbase.model.entity;

import android.arch.persistence.room.ColumnInfo;
import android.arch.persistence.room.Entity;
import android.arch.persistence.room.PrimaryKey;

@Entity
public class Author {

    @PrimaryKey(autoGenerate = true)
    private int uid;

    @ColumnInfo(name = "name_first")
    private String firstName;

    @ColumnInfo(name = "name_family")
    private String lastName;

    private Author(){
        // Privatise default constructor to force initialisation of required fields.
    }

    private Author(String firstName, String lastName){
        this.firstName = firstName;
        this.lastName = lastName;
    }

    public String getFirstName(){ return firstName; }
    public String getLastName() { return lastName; }

    public void setFirstName(String firstName){
        this.firstName = firstName;
    }

    public void setLastName(String lastName){
        this.lastName = lastName;
    }

    @Override
    public String toString(){
        return firstName + " " + lastName;
    }
}

@@ -132,16 +132,61 @@
 Entity;%0A
+import android.arch.persistence.room.Ignore;%0A
 import a
@@ -226,16 +226,16 @@
 aryKey;%0A
-
 %0A@Entity
@@ -449,24 +449,36 @@
  lastName;%0A%0A
+    @Ignore%0A
     private 
@@ -580,30 +580,29 @@
     %7D%0A%0A    p
-rivate
+ublic
  Author(Stri
@@ -702,32 +702,71 @@
 astName;%0A    %7D%0A%0A
+    public int getUid()%7B return uid; %7D%0A
     public Strin
@@ -799,24 +799,24 @@
 irstName; %7D%0A
-
     public S
@@ -853,24 +853,89 @@
 astName; %7D%0A%0A
+    public  void setUid(int uid)%7B%0A        this.uid = uid;%0A    %7D%0A%0A
     public v

Fix compile errors