Mercury-IM/persistence/src/main/java/org/mercury_im/messenger/persistence/model/AccountModel.java

75 lines
1.3 KiB
Java

package org.mercury_im.messenger.persistence.model;
import org.jxmpp.jid.EntityBareJid;
/**
* Interface representing an account database entity.
*/
public interface AccountModel {
/**
* Primary key.
*
* @return account id
*/
long getId();
/**
* Set the primary key.
*
* @param id account id
*/
void setId(long id);
/**
* Return the password of the XMPP account.
*
* @return password
*/
String getPassword();
/**
* Set the password of the XMPP account.
*
* @param password password
*/
void setPassword(String password);
/**
* Return the JID of the XMPP account.
*
* @return XMPP address
*/
EntityBareJid getJid();
/**
* Set the JID of the XMPP account.
*
* @param jid XMPP address
*/
void setJid(EntityBareJid jid);
/**
* Is the account enabled (should it be online).
*
* @return account enabled?
*/
boolean getEnabled();
/**
* Set whether or not the account is enabled and active.
*
* @param enabled enabled
*/
void setEnabled(boolean enabled);
/**
* Return the state of the connection.
*
* @return state
*/
String getState();
void setState(String state);
}