org.melati.poem
Class UserTable

Package class diagram package UserTable
java.lang.Object
  extended by org.melati.poem.JdbcTable
      extended by org.melati.poem.PoemTable
          extended by org.melati.poem.generated.UserTableBase
              extended by org.melati.poem.UserTable
All Implemented Interfaces:
Selectable, Table

public class UserTable
extends UserTableBase

The Table of registered Users. Every Melati DB has this table. This table will contain at least a _guest_ and _administrator_ User. Melati POEM generated, programmer modifiable stub for a UserTable 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#generateTableMainJava

Field Summary
protected  User administratorUser
           
protected  User guestUser
           
 
Constructor Summary
UserTable(Database database, String name, DefinitionSource definitionSource)
          Constructor.
 
Method Summary
 User administratorUser()
           
 Capability canReadPasswords()
          Defaults to the db's administraor capability.
 Capability canWritePasswords()
          Defaults to the db's administraor capability.
 User guestUser()
           
 void postInitialise()
          Apply default protection to this table if it has not already been protected.
 void unifyWithDB(ResultSet colDescs)
          Create guestUser and administratorUser.
 
Methods inherited from class org.melati.poem.generated.UserTableBase
_newPersistent, defaultCategory, defaultDescription, defaultDisplayOrder, defaultRememberAllTroids, getIdColumn, getLoginColumn, getNameColumn, getPasswordColumn, getPoemDatabaseTables, getUserObject, getUserObject, init
 
Methods inherited from class org.melati.poem.JdbcTable
_getColumn, addColumnAndCommit, addListener, appendWhereClause, cachedCount, cachedCount, cachedCount, cachedCount, cachedCount, cachedExists, cachedSelection, cachedSelectionField, cachedSelectionType, canDeleteColumn, canReadColumn, canSelectColumn, canWriteColumn, clearColumnInfoCaches, cnfWhereClause, cnfWhereClause, columns, columnWithColumnInfoID, count, count, count, count, countSQL, countSQL, create, create, createTableInfo, dbAddConstraints, dbModifyStructure, defaultCacheLimit, defaultDisplayName, defaultOrderByClause, defineColumn, delete_unsafe, delete, deleteColumnAndCommit, deletedColumn, displayColumn, displayColumns, displayColumnsCount, dump, dump, dumpCacheAnalysis, equals, exists, exists, extrasCount, firstSelection, getCacheInfo, getCanCreate, getCategory, getColumn, getColumnsCount, getDatabase, getDbmsTableType, getDefaultCanDelete, getDefaultCanRead, getDefaultCanWrite, getDescription, getDetailDisplayColumns, getDetailDisplayColumnsCount, getDisplayName, getDsdName, getInfo, getMostRecentTroid, getName, getNextExtrasIndex, getObject, getObject, getRecordDisplayColumns, getRecordDisplayColumnsCount, getSearchCriterionColumns, getSearchCriterionColumnsCount, getSummaryDisplayColumns, getSummaryDisplayColumnsCount, getTableInfo, hashCode, invalidateTransactionStuffs, load, newPersistent, notifyColumnInfo, notifyTouched, primaryCriterionColumn, quotedName, readLock, referencesTo, referencesTo, rememberAllTroids, selection, selection, selection, selection, selection, selection, selectionSQL, serial, setCacheLimit, setDisplayColumn, setSearchColumn, setTableInfo, tableInfoID, toString, trimCache, troidColumn, troidFor, troidSelection, troidSelection, troidSelection, uncache, unifyWithColumnInfo, whereClause, whereClause, writeDown
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

guestUser

protected User guestUser

administratorUser

protected User administratorUser
Constructor Detail

UserTable

public UserTable(Database database,
                 String name,
                 DefinitionSource definitionSource)
          throws PoemException
Constructor.

Parameters:
database - the POEM database we are using
name - the name of this Table
definitionSource - which definition is being used
Throws:
PoemException - if anything goes wrong
Method Detail

guestUser

public User guestUser()
Returns:
the special User guest

administratorUser

public User administratorUser()
Returns:
the special User administrator

canReadPasswords

public Capability canReadPasswords()
Defaults to the db's administraor capability.

Returns:
the Capability required to read a password

canWritePasswords

public Capability canWritePasswords()
Defaults to the db's administraor capability.

Returns:
the Capability required to write a password

unifyWithDB

public void unifyWithDB(ResultSet colDescs)
                 throws PoemException
Create guestUser and administratorUser. Unify the JDBC description of this table with the meta data held in the TableInfo

Specified by:
unifyWithDB in interface Table
Overrides:
unifyWithDB in class JdbcTable
Parameters:
colDescs - a JDBC ResultSet describing the columns
Throws:
PoemException
See Also:
Table.unifyWithDB(java.sql.ResultSet)

postInitialise

public void postInitialise()
Description copied from class: PoemTable
Apply default protection to this table if it has not already been protected.

Specified by:
postInitialise in interface Table
Overrides:
postInitialise in class PoemTable
See Also:
JdbcTable.notifyColumnInfo(ColumnInfo), JdbcTable.clearColumnInfoCaches()


Copyright © 2000-2010 PanEris. All Rights Reserved.