org.melati.poem
Class User

Package class diagram package User
java.lang.Object
  extended by org.melati.poem.transaction.Transactioned
      extended by org.melati.poem.JdbcPersistent
          extended by org.melati.poem.generated.UserBase
              extended by org.melati.poem.User
All Implemented Interfaces:
Cloneable, AccessToken, Persistable, Persistent, Treeable

public class User
extends UserBase
implements AccessToken

A registered user. Melati POEM generated, programmer modified stub for a Persistent User object.

Description: A registered user of the database.

Field summary for SQL table User
NameTypeDescription
id Integer The Table Row Object ID
name String The user's real name
login String The user's login name
password String The user's password

Generator
org.melati.poem.prepro.TableDef#generateMainJava

Field Summary
 
Fields inherited from class org.melati.poem.generated.UserBase
id, login, name, password
 
Fields inherited from class org.melati.poem.transaction.Transactioned
valid
 
Fields inherited from interface org.melati.poem.AccessToken
root
 
Constructor Summary
User()
          Constructor for a Persistent User object.
User(String login, String password, String name)
          Constructor.
 
Method Summary
 String getPassword()
          Will throw a ReadPasswordAccessPoemException unless the access token associated with the running thread is the User object itself or provides the readPasswords capability.
 boolean givesCapability(Capability capability)
          
 boolean isAdministrator()
           
 boolean isGuest()
           
 void setPassword(String cooked)
          Sets the Password value, with checking, for this User Persistent.
 String toString()
          A string briefly describing the object for diagnostic purposes.
 
Methods inherited from class org.melati.poem.generated.UserBase
getId_unsafe, getId, getIdField, getLogin_unsafe, getLogin, getLoginField, getName_unsafe, getName, getNameField, getPassword_unsafe, getPasswordField, getPoemDatabaseTables, getUserTable, setId_unsafe, setId, setId, setLogin_unsafe, setLogin, setName_unsafe, setName, setPassword_unsafe
 
Methods inherited from class org.melati.poem.JdbcPersistent
assertCanCreate, assertCanCreate, assertCanDelete, assertCanDelete, assertCanRead, assertCanRead, assertCanWrite, assertCanWrite, clone, commit, countMatchSQL, delete_unsafe, delete, delete, deleteAndCommit, deleteAndCommit, deleteLock, displayString, displayString, displayString, dump, dump, duplicated, duplicatedFloating, equals, existenceLock, existenceLock, fieldsOfColumns, fromClause, getCanDelete, getCanRead, getCanSelect, getCanWrite, getChildren, getCooked, getCookedString, getDatabase, getDetailDisplayFields, getField, getFields, getPrimaryDisplayField, getRaw, getRawString, getReadable, getRecordDisplayFields, getSearchCriterionFields, getSummaryDisplayFields, getTable, getTroid, hashCode, invalidate, isDirty, load, makePersistent, postEdit, postInsert, postModify, postWrite, preEdit, readLock, readLock, readLock, rollback, setCooked, setDirty, setRaw, setRawString, statusExistent, statusNonexistent, troid, upToDate, writeDown, writeLock, writeLock, writeLock
 
Methods inherited from class org.melati.poem.transaction.Transactioned
markValid, reset, setTransactionPool, transactionPool, unSee
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

User

public User()
Constructor for a Persistent User object.

Description: A registered user of the database.

Generator
org.melati.poem.prepro.TableDef#generateMainJava

User

public User(String login,
            String password,
            String name)
Constructor.

Parameters:
login - user's login name
password - user's password
name - user's name
Method Detail

givesCapability

public boolean givesCapability(Capability capability)

Specified by:
givesCapability in interface AccessToken
Parameters:
capability - the capability to check
Returns:
whether current AccessToken confers the Capability.
See Also:
AccessToken.givesCapability(org.melati.poem.Capability)

getPassword

public String getPassword()
                   throws AccessPoemException
Will throw a ReadPasswordAccessPoemException unless the access token associated with the running thread is the User object itself or provides the readPasswords capability. FIXME It shouldn't be possible for anyone to getPassword Retrieves the Password value, with locking, for this User Persistent. Field description: The user's password

Overrides:
getPassword in class UserBase
Returns:
the value of the field Password for this User Persistent
Throws:
AccessPoemException - if the current AccessToken does not confer write access rights
See Also:
UserBase.getPassword()

setPassword

public void setPassword(String cooked)
                 throws AccessPoemException
Sets the Password value, with checking, for this User Persistent. Field description: The user's password

Overrides:
setPassword in class UserBase
Parameters:
cooked - a validated int
Throws:
AccessPoemException - if the current AccessToken does not confer write access rights
See Also:
UserBase.setPassword(java.lang.String)

toString

public String toString()
A string briefly describing the object for diagnostic purposes. The name of its table and its troid.

Overrides:
toString in class JdbcPersistent
See Also:
Object.toString()

isGuest

public boolean isGuest()
Returns:
whether this User is the special, guest user

isAdministrator

public boolean isAdministrator()
Returns:
whether this User is an administrator


Copyright © 2000-2010 PanEris. All Rights Reserved.