56 lines
1.2 KiB
Java
56 lines
1.2 KiB
Java
package de.vanitasvitae.fasel.db.entity;
|
|
|
|
import com.j256.ormlite.field.DataType;
|
|
import com.j256.ormlite.field.DatabaseField;
|
|
import com.j256.ormlite.table.DatabaseTable;
|
|
import de.vanitasvitae.fasel.db.dao.impl.AccountDaoImpl;
|
|
|
|
@DatabaseTable(tableName = "accounts", daoClass = AccountDaoImpl.class)
|
|
public class Account {
|
|
|
|
@DatabaseField(generatedId = true, dataType = DataType.INTEGER)
|
|
private int accountId;
|
|
|
|
@DatabaseField(canBeNull = false, unique = true, dataType = DataType.STRING)
|
|
private String jid;
|
|
|
|
@DatabaseField(canBeNull = false, dataType = DataType.STRING)
|
|
private String password;
|
|
|
|
/**
|
|
* Empty account for ORMLite.
|
|
*/
|
|
public Account() {
|
|
|
|
}
|
|
|
|
public Account(String jid, String password) {
|
|
this.jid = jid;
|
|
this.password = password;
|
|
}
|
|
|
|
public int getAccountId() {
|
|
return accountId;
|
|
}
|
|
|
|
public void setAccountId(int accountId) {
|
|
this.accountId = accountId;
|
|
}
|
|
|
|
public String getJid() {
|
|
return jid;
|
|
}
|
|
|
|
public void setJid(String jid) {
|
|
this.jid = jid;
|
|
}
|
|
|
|
public String getPassword() {
|
|
return password;
|
|
}
|
|
|
|
public void setPassword(String password) {
|
|
this.password = password;
|
|
}
|
|
}
|