Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

com.RuntimeCollective.webapps.bean
Class SimpleTrackedUser  view SimpleTrackedUser download SimpleTrackedUser.java

java.lang.Object
  extended bycom.RuntimeCollective.webapps.bean.SimpleUser
      extended bycom.RuntimeCollective.webapps.bean.SimpleTrackedUser
All Implemented Interfaces:
EntityBean, java.io.Serializable, TrackedUser, User

public class SimpleTrackedUser
extends SimpleUser
implements TrackedUser

The default implementation of TrackedUser.

Version:
$Id: SimpleTrackedUser.java,v 1.13 2003/09/30 15:13:10 joe Exp $

Field Summary
private static java.lang.String AND
           
protected  boolean Archived
          The Archived.
private static java.lang.String ARCHIVED
           
private static java.lang.String CLOSE
           
static java.lang.String DATABASE_TABLE
          The name of the database table for this bean type.
private static java.lang.String DELETE_FROM
           
private static java.lang.String LAST_USED
           
private static java.lang.String LASTLOG
           
protected  java.util.Date LastLoginDate
          The LastLoginDate.
protected  int MaxNoOfSimultaneousSessions
          The MaxNoOfSimultaneousSessions.
private static java.lang.String MAXSIMSES
           
private static java.lang.String NO_LOGINS
           
protected  int NoOfLogins
          The NoOfLogins.
private static java.lang.String SELECT_DATA
           
private static java.lang.String SELECT_ID
           
private static java.lang.String SPACE
           
private static java.lang.String SPACE_OPEN
           
private static java.lang.String WHERE_ID
           
private static java.lang.String WHERE_T_ID
           
private static java.lang.String WHERE_USER
           
 
Fields inherited from class com.RuntimeCollective.webapps.bean.SimpleUser
address, attributes, createDate, email, firstName, id, INTERFACE_BEAN, lastName, password, roles
 
Fields inherited from interface com.RuntimeCollective.webapps.bean.TrackedUser
ALLOW_INFINITE_LOGONS
 
Fields inherited from interface com.RuntimeCollective.webapps.bean.EntityBean
INTERFACE_BEAN, NULL_ID
 
Constructor Summary
SimpleTrackedUser()
          Construct a new blank SimpleTrackedUser, giving it a new unique ID.
SimpleTrackedUser(int id)
          Get a current SimpleTrackedUser from the RuntimeDataSource, given an id.
 
Method Summary
 void delete()
          Delete this bean from the database.
 boolean getArchived()
          Get the Archived
 java.util.Date getLastLoginDate()
          Get the LastLoginDate
 int getMaxNoOfSimultaneousSessions()
          Get the MaxNoOfSimultaneousSessions
 java.lang.String getNameDescriptor()
          Get the descriptor of this user: first last (email).
 int getNoOfCurrentSessions()
          Get the number of current/active sessions, eg sessions which haven't timed out.
 int getNoOfLogins()
          Get the NoOfLogins
 void increaseNoOfLogins()
          Increase NoOfLogins by 1.
 boolean isArchived()
          Get the Archived
 void save()
          Save this bean to the database.
 void setArchived(boolean archived)
          Set the Archived.
 void setLastLoginDate(java.util.Date lastLoginDate)
          Set the LastLoginDate.
 void setMaxNoOfSimultaneousSessions(int maxNoOfSimultaneousSessions)
          Set the MaxNoOfSimultaneousSessions.
 void setNoOfLogins(int noOfLogins)
          Set the NoOfLogins.
 
Methods inherited from class com.RuntimeCollective.webapps.bean.SimpleUser
addRole, archive, findByEmail, getAddress, getAttribute, getCreateDate, getEmail, getFirstName, getId, getLastName, getName, getPassword, getProperty, getRoles, hasRole, removeRole, searchUsers, setAddress, setAttribute, setCreateDate, setEmail, setFirstName, setId, setLastName, setPassword, setRoles, toString, unArchive
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.RuntimeCollective.webapps.bean.User
addRole, getAddress, getAttribute, getCreateDate, getEmail, getFirstName, getLastName, getPassword, getRoles, hasRole, removeRole, setAddress, setAttribute, setCreateDate, setEmail, setFirstName, setLastName, setPassword, setRoles
 
Methods inherited from interface com.RuntimeCollective.webapps.bean.EntityBean
getId, setId
 

Field Detail

DELETE_FROM

private static final java.lang.String DELETE_FROM
See Also:
Constant Field Values

SELECT_DATA

private static final java.lang.String SELECT_DATA
See Also:
Constant Field Values

WHERE_ID

private static final java.lang.String WHERE_ID
See Also:
Constant Field Values

WHERE_T_ID

private static final java.lang.String WHERE_T_ID
See Also:
Constant Field Values

SELECT_ID

private static final java.lang.String SELECT_ID
See Also:
Constant Field Values

NO_LOGINS

private static final java.lang.String NO_LOGINS
See Also:
Constant Field Values

MAXSIMSES

private static final java.lang.String MAXSIMSES
See Also:
Constant Field Values

LASTLOG

private static final java.lang.String LASTLOG
See Also:
Constant Field Values

ARCHIVED

private static final java.lang.String ARCHIVED
See Also:
Constant Field Values

WHERE_USER

private static final java.lang.String WHERE_USER
See Also:
Constant Field Values

AND

private static final java.lang.String AND
See Also:
Constant Field Values

LAST_USED

private static final java.lang.String LAST_USED
See Also:
Constant Field Values

SPACE

private static final java.lang.String SPACE
See Also:
Constant Field Values

SPACE_OPEN

private static final java.lang.String SPACE_OPEN
See Also:
Constant Field Values

CLOSE

private static final java.lang.String CLOSE
See Also:
Constant Field Values

DATABASE_TABLE

public static final java.lang.String DATABASE_TABLE
The name of the database table for this bean type.

See Also:
Constant Field Values

NoOfLogins

protected int NoOfLogins
The NoOfLogins.


MaxNoOfSimultaneousSessions

protected int MaxNoOfSimultaneousSessions
The MaxNoOfSimultaneousSessions.


LastLoginDate

protected java.util.Date LastLoginDate
The LastLoginDate.


Archived

protected boolean Archived
The Archived.

Constructor Detail

SimpleTrackedUser

public SimpleTrackedUser()
                  throws java.sql.SQLException
Construct a new blank SimpleTrackedUser, giving it a new unique ID.


SimpleTrackedUser

public SimpleTrackedUser(int id)
                  throws java.sql.SQLException
Get a current SimpleTrackedUser from the RuntimeDataSource, given an id.

Method Detail

save

public void save()
          throws java.sql.SQLException
Save this bean to the database.

Specified by:
save in interface EntityBean
Overrides:
save in class SimpleUser

delete

public void delete()
            throws java.sql.SQLException
Delete this bean from the database.

Specified by:
delete in interface EntityBean
Overrides:
delete in class SimpleUser

setNoOfLogins

public void setNoOfLogins(int noOfLogins)
Set the NoOfLogins.

Specified by:
setNoOfLogins in interface TrackedUser

getNoOfLogins

public int getNoOfLogins()
Get the NoOfLogins

Specified by:
getNoOfLogins in interface TrackedUser

increaseNoOfLogins

public void increaseNoOfLogins()
Increase NoOfLogins by 1.

Specified by:
increaseNoOfLogins in interface TrackedUser

setMaxNoOfSimultaneousSessions

public void setMaxNoOfSimultaneousSessions(int maxNoOfSimultaneousSessions)
Set the MaxNoOfSimultaneousSessions.

Specified by:
setMaxNoOfSimultaneousSessions in interface TrackedUser

getMaxNoOfSimultaneousSessions

public int getMaxNoOfSimultaneousSessions()
Get the MaxNoOfSimultaneousSessions

Specified by:
getMaxNoOfSimultaneousSessions in interface TrackedUser

getNoOfCurrentSessions

public int getNoOfCurrentSessions()
Get the number of current/active sessions, eg sessions which haven't timed out.

Specified by:
getNoOfCurrentSessions in interface TrackedUser

setLastLoginDate

public void setLastLoginDate(java.util.Date lastLoginDate)
Set the LastLoginDate.

Specified by:
setLastLoginDate in interface TrackedUser

getLastLoginDate

public java.util.Date getLastLoginDate()
Get the LastLoginDate

Specified by:
getLastLoginDate in interface TrackedUser

setArchived

public void setArchived(boolean archived)
Set the Archived.

Specified by:
setArchived in interface TrackedUser

getArchived

public boolean getArchived()
Get the Archived

Specified by:
getArchived in interface TrackedUser

isArchived

public boolean isArchived()
Get the Archived

Specified by:
isArchived in interface TrackedUser

getNameDescriptor

public java.lang.String getNameDescriptor()
Get the descriptor of this user: first last (email).

Specified by:
getNameDescriptor in interface TrackedUser