Skip to content

Instantly share code, notes, and snippets.

@tagantroy
Created September 3, 2014 17:04
Show Gist options
  • Save tagantroy/b7519f1851a8e4c3ad53 to your computer and use it in GitHub Desktop.
Save tagantroy/b7519f1851a8e4c3ad53 to your computer and use it in GitHub Desktop.
package com.example.ivan.examplezbs;
import com.j256.ormlite.field.DataType;
import com.j256.ormlite.field.DatabaseField;
import com.j256.ormlite.table.DatabaseTable;
import java.util.Date;
@DatabaseTable(tableName = "friend")
public class Friend {
public final static String GOAL_NAME_FIELD_NAME = "name";
@DatabaseField(columnName = "id",id = true)
private int Id;
@DatabaseField(canBeNull = false, dataType = DataType.STRING, columnName = GOAL_NAME_FIELD_NAME)
private String name;
@DatabaseField()
private String notes;
@DatabaseField(foreign = true, foreignAutoRefresh = true)
private People people;
public int getId() {
return Id;
}
public void setId(int id) {
Id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getNotes() {
return notes;
}
public void setNotes(String notes) {
this.notes = notes;
}
public People getPeople() {
return people;
}
public void setPeople(People people) {
this.people = people;
}
@Override
public String toString() {
return "Friend{" +
"Id=" + Id +
", name='" + name + '\'' +
", notes='" + notes + '\'' +
'}';
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment