Main Page | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | Related Pages

edu.virtualschool.jwaa.GenericAccount Class Reference

Inheritance diagram for edu.virtualschool.jwaa.GenericAccount:

edu.virtualschool.jwaa.GenericIdentifiable edu.virtualschool.jwaa.AccountAbstraction Collaboration diagram for edu.virtualschool.jwaa.GenericAccount:

Collaboration graph
[legend]
List of all members.

Detailed Description

Abstract superclass of application-specific implementations of whatever datastructure the application uses to identify a Person; typically an account-like structure of some sort.

Subclasses inherit the basic logic the rest of the system assumes and requires, namely an account identifier field (id) which typically serves as the primary key in the database and a list of roles that this person is authorized to play.

Roles are presently implemented as a simple ArrayList. This implementation is provisional and subject to further change without notice.

Definition at line 25 of file GenericAccount.java.

Public Member Functions

final boolean hasRole (RoleAbstraction requiredRole)
final void setRoles (ArrayList roleList)
final List getRoleList ()
abstract boolean isNull ()

Public Attributes

List roleList = new ArrayList()

Protected Member Functions

 GenericAccount (String id, List roleList)

Static Package Attributes

final Logger logger = Logger.getLogger(GenericAccount.class.getName())


Member Function Documentation

abstract boolean edu.virtualschool.jwaa.GenericAccount.isNull  )  [pure virtual]
 

As part of an ongoing campaign to forestall NPE's, lookup operations that fail avoid returning nulls by returning specialized instances. For example, Person.find() operations return GenericAccount.Null if they can't find the requested person. This method can be relied on to tell if the result of a find operation failed by comparing the receiver with GenericPerson.Null.

Implements edu.virtualschool.jwaa.AccountAbstraction.


The documentation for this class was generated from the following file: