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

Quick Search    Search Deep

openfuture.bugbase.domain.update
Class CreateNewDbUsers  view CreateNewDbUsers download CreateNewDbUsers.java

java.lang.Object
  extended byopenfuture.bugbase.domain.update.CreateNewDbUsers
All Implemented Interfaces:
openfuture.bugbase.model.Transaction, openfuture.bugbase.model.VersionUpdate

public class CreateNewDbUsers
extends java.lang.Object
implements openfuture.bugbase.model.VersionUpdate

Creates new DB users for each user ID occuring in the 'users' table. All user IDs must be alphanumeric. Created: Sat Jun 24 10:56:39 2000

Version:
$Revision: 1.3 $

Field Summary
private  java.sql.Connection connection
           
private  openfuture.bugbase.domain.Persistency persistency
           
private  java.util.HashSet userids
           
private  openfuture.bugbase.model.Version version
           
 
Constructor Summary
CreateNewDbUsers(openfuture.bugbase.domain.Persistency persistency)
           
 
Method Summary
 openfuture.bugbase.model.TransactionResult cleanup()
          This method will be executed after a successful execution of execute() 55 .
 openfuture.bugbase.model.TransactionResult execute()
          Core execution of the transaction.
 java.lang.String getDescription()
          Description for this version update.
 openfuture.bugbase.model.Version getVersion()
          Persistency version after this update.
 openfuture.bugbase.model.VersionUpdate predecessor()
          No predecessor available.
 openfuture.bugbase.model.TransactionResult rollback()
          This method will be executed after a unsuccessful execution of execute() 55 .
 openfuture.bugbase.model.TransactionResult setup()
          Setup before the transaction core is executed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

version

private openfuture.bugbase.model.Version version

connection

private java.sql.Connection connection

persistency

private openfuture.bugbase.domain.Persistency persistency

userids

private java.util.HashSet userids
Constructor Detail

CreateNewDbUsers

public CreateNewDbUsers(openfuture.bugbase.domain.Persistency persistency)
Method Detail

setup

public openfuture.bugbase.model.TransactionResult setup()
Setup before the transaction core is executed.
  • Retrieve all userid entries from 'users'. If one entry is not valid, the setup fails.

Specified by:
setup in interface openfuture.bugbase.model.Transaction

execute

public openfuture.bugbase.model.TransactionResult execute()
Core execution of the transaction.
  • Create new database user for each userid from 'users'. All new users obtain the the password 'bugbase'.
  • Give public access to all tables to public.

Specified by:
execute in interface openfuture.bugbase.model.Transaction

cleanup

public openfuture.bugbase.model.TransactionResult cleanup()
This method will be executed after a successful execution of execute() 55 . Nothing to be done here.

Specified by:
cleanup in interface openfuture.bugbase.model.Transaction

rollback

public openfuture.bugbase.model.TransactionResult rollback()
This method will be executed after a unsuccessful execution of execute() 55 . Nothing to be done here.

Specified by:
rollback in interface openfuture.bugbase.model.Transaction

getDescription

public java.lang.String getDescription()
Description copied from interface: openfuture.bugbase.model.Transaction
Description for this version update.

Specified by:
getDescription in interface openfuture.bugbase.model.Transaction

predecessor

public final openfuture.bugbase.model.VersionUpdate predecessor()
No predecessor available.

Specified by:
predecessor in interface openfuture.bugbase.model.VersionUpdate

getVersion

public final openfuture.bugbase.model.Version getVersion()
Persistency version after this update.

Specified by:
getVersion in interface openfuture.bugbase.model.VersionUpdate