java.lang.Object
openfuture.bugbase.domain.update.IntroduceGroupsUpdate
- All Implemented Interfaces:
- openfuture.bugbase.model.Transaction, openfuture.bugbase.model.VersionUpdate
- public class IntroduceGroupsUpdate
- extends java.lang.Object
- implements openfuture.bugbase.model.VersionUpdate
All bug reports belong to a user group. This way it is possible to
restrict the access to bug reports to a certain group.
Created: Mon Jun 12 20:06:16 2000
- Version:
- $Revision: 1.3 $
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
version
private openfuture.bugbase.model.Version version
connection
private java.sql.Connection connection
persistency
private openfuture.bugbase.domain.Persistency persistency
columns
private java.util.LinkedList columns
coltypes
private java.util.LinkedList coltypes
backupTable
private java.lang.String backupTable
IntroduceGroupsUpdate
public IntroduceGroupsUpdate(openfuture.bugbase.domain.Persistency persistency)
setup
public openfuture.bugbase.model.TransactionResult setup()
- Setup before the transaction core is executed.
- Copy the table bugreports to bugreports_backup.
- Specified by:
setup
in interface openfuture.bugbase.model.Transaction
execute
public openfuture.bugbase.model.TransactionResult execute()
- Core execution of the transaction.
- drop table 'bugreports'
- create it new with additional column 'groupid'.
- copy entries from 'bugreports_backup' to 'bugreports'.
- set all groupid attributes to 'users', if they are null
- 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 .
- drop table 'bugreports_backup'
- 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 .
- copy table 'bugreports_backup' back to table 'bugreports'
- drop table 'bugreports_backup'
- 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
join
private java.lang.String join(java.lang.String separator,
java.util.LinkedList strings)