public class MailAccount extends DBPersist
Modifier and Type | Field and Description |
---|---|
static short |
ClassId |
Constructor and Description |
---|
MailAccount() |
MailAccount(JDCConnection oConn,
java.lang.String sGuAccount) |
Modifier and Type | Method and Description |
---|---|
boolean |
delete(JDCConnection oConn)
Delete a register from database
The deleted register will be the one matching this DBPersist primary key,
as set at constructor or load() method.
|
static boolean |
delete(JDCConnection oConn,
java.lang.String sGuAccount) |
static MailAccount |
forUser(JDCConnection oConn,
java.lang.String sGuUser)
Get MailAccount for ACLUser
Get the default mail account for an ACLUser or the first account if there is no default.
|
static MailAccount |
forUser(JDCConnection oConn,
java.lang.String sGuUser,
java.util.Properties oProps)
Get MailAccount for ACLUser or create a default one
If no account for given user is found at k_user_mail then one is temporaly
created by using properties given at parameter oProps and taking user's
tx_main_email and tx_pwd as mail address and password.
|
java.util.Properties |
getProperties() |
void |
setProperties(java.util.Properties oProps) |
boolean |
store(JDCConnection oConn)
Store mail account
This method has a special side effect: only one mail account may be the
default one for a given user.
|
allcaps, allcaps, clear, clone, columns, containsKey, containsValue, entrySet, exists, get, get, getAuditClassName, getCreationDate, getDate, getDate, getDateFormated, getDateShort, getDateTime, getDateTime24, getDecimal, getDecimalFormated, getDecimalFormated, getDouble, getDoubleFormated, getFloat, getFloatFormated, getInt, getIntArray, getInteger, getIntegerArray, getIntervalPart, getItemMap, getItems, getMoney, getPrimaryKey, getShort, getSQLDate, getSQLTime, getString, getStringHtml, getStringNull, getTable, getTable, getTime, getTimeOfDay, getTimestamp, isEmpty, isNull, iterator, keySet, load, load, parseXML, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, put, putAll, putAll, remove, remove, replace, replace, replace, replace, replace, replace, replace, replace, setAuditTransact, setAuditUser, setCreationDate, setPrimaryKey, size, toLowerCase, toUpperCase, toXML, toXML, toXML, values
public static final short ClassId
public MailAccount()
public MailAccount(JDCConnection oConn, java.lang.String sGuAccount) throws java.sql.SQLException
java.sql.SQLException
public boolean store(JDCConnection oConn) throws java.sql.SQLException
Store mail account
This method has a special side effect: only one mail account may be the default one for a given user. So each time that an account is stored with it bo_default flag set to 1 the other account for the same user are set to bo_default=0.public java.util.Properties getProperties()
public void setProperties(java.util.Properties oProps)
public static MailAccount forUser(JDCConnection oConn, java.lang.String sGuUser) throws java.sql.SQLException
Get MailAccount for ACLUser
Get the default mail account for an ACLUser or the first account if there is no default.oConn
- JDCConnectionsGuUser
- String ACLUser GUID (from k_users.gu_user)java.sql.SQLException
public static MailAccount forUser(JDCConnection oConn, java.lang.String sGuUser, java.util.Properties oProps) throws java.sql.SQLException
Get MailAccount for ACLUser or create a default one
If no account for given user is found at k_user_mail then one is temporaly created by using properties given at parameter oProps and taking user's tx_main_email and tx_pwd as mail address and password.oConn
- JDCConnectionsGuUser
- String ACLUser GUID (from k_users.gu_user)oProps
- Properties usually take from an hipergate.cnf file by calling
Environment.getProfile("hipergate")java.sql.SQLException
public boolean delete(JDCConnection oConn) throws java.sql.SQLException
DBPersist
Delete a register from database
The deleted register will be the one matching this DBPersist primary key, as set at constructor or load() method.
public static boolean delete(JDCConnection oConn, java.lang.String sGuAccount) throws java.sql.SQLException, java.io.IOException
java.sql.SQLException
java.io.IOException