com.irisel.sv.faces.mgdbeans
Class UserMB
java.lang.Object
com.irisel.sv.faces.mgdbeans.BaseMB
com.irisel.sv.faces.mgdbeans.UserMB
public class UserMB
- extends BaseMB
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
S_DATE_FORMAT
public static java.lang.String S_DATE_FORMAT
DATE_FORMAT
public static java.text.DateFormat DATE_FORMAT
CLASSNAME
public static final java.lang.String CLASSNAME
- See Also:
- Constant Field Values
UserMB
public UserMB(CLBrowser clbrowser)
throws java.lang.Exception
- Throws:
java.lang.Exception
UserMB
public UserMB(CLBrowser clbrowser,
long oid)
throws java.lang.Exception
- Throws:
java.lang.Exception
UserMB
public UserMB(CLBrowser clbrowser,
java.lang.Long oid)
throws java.lang.Exception
- Throws:
java.lang.Exception
UserMB
public UserMB(CLBrowser clbrowser,
java.lang.String username)
throws java.lang.Exception
- Throws:
java.lang.Exception
UserMB
public UserMB(CLBrowser clbrowser,
JSONObject obj)
throws java.lang.Exception
- Throws:
java.lang.Exception
getName
public java.lang.String getName()
- Overrides:
getName
in class BaseMB
- Returns:
- the "name" value of this object's instance.
getFirstName
public java.lang.String getFirstName()
getLastName
public java.lang.String getLastName()
encryptPassword
public static java.lang.String encryptPassword(java.lang.String cleartext)
save
public void save()
throws QuerySaveException,
java.rmi.RemoteException,
java.sql.SQLException,
DataException
- Description copied from class:
BaseMB
- Saves this object to database.
Calls clbrowser.setAutomaticFields first.
If getId() is 0, calls clbrowser.create(), otherwise clbrowser.update()
- Overrides:
save
in class BaseMB
- Throws:
QuerySaveException
java.rmi.RemoteException
java.sql.SQLException
DataException
getId
public long getId()
- Overrides:
getId
in class BaseMB
- Returns:
- the id of this object's instance.
load
public void load(long oid)
throws java.rmi.RemoteException,
java.sql.SQLException,
org.jboss.resteasy.spi.NoLogWebApplicationException,
DataException
- Description copied from class:
BaseMB
- Loads the instance from database into this object, uses the classname associated to the object
which is implemented by the abstract getClassname().
- Overrides:
load
in class BaseMB
- Parameters:
oid
- is the primary key of the instance
- Throws:
java.rmi.RemoteException
java.sql.SQLException
DataException
org.jboss.resteasy.spi.NoLogWebApplicationException
setInstance
public void setInstance(Instance instance)
- Overrides:
setInstance
in class BaseMB
load
public void load(JSONObject obj)
- Description copied from class:
BaseMB
- Loads from the given JSON to this object
for the class given by getClassname(), each property is read and copied from the json obj.
- Overrides:
load
in class BaseMB
- Parameters:
obj
- is the JSON representation of the object
delete
public void delete(boolean soft)
throws java.rmi.RemoteException,
java.sql.SQLException,
DataException
- Description copied from class:
BaseMB
- Deletes this instance from the database
- Overrides:
delete
in class BaseMB
- Parameters:
soft
- will flag the record as deleted, without actually deleting it
- Throws:
java.rmi.RemoteException
java.sql.SQLException
DataException
setPassword
public void setPassword(java.lang.String clearpasswd)
findByEmail
public static UserMB[] findByEmail(CLGuiomBrowser clbrowser,
java.lang.String email)
throws java.lang.Exception
- Throws:
java.lang.Exception
countAccountsByEmail
public static long countAccountsByEmail(CLGuiomBrowser clbrowser,
java.lang.String email)
throws java.lang.Exception
- Throws:
java.lang.Exception
getEmail
public java.lang.String getEmail()
getLang
public java.lang.String getLang()