|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.uwyn.rife.database.DbConnectionUser<ResultType,DataType>
public abstract class DbConnectionUser<ResultType,DataType>
| Field Summary | |
|---|---|
protected DataType |
mData
|
| Constructor Summary | |
|---|---|
DbConnectionUser()
Create a new DbConnectionUser. |
|
DbConnectionUser(DataType data)
Create a new DbConnectionUser with a data object. |
|
| Method Summary | |
|---|---|
Object |
clone()
Simply clones the instance with the default clone method since this class contains no member variables. |
DataType |
getData()
Retrieve the data object that was provided to the constructor. |
void |
throwException(Exception exception)
Calling this method makes it possible to throw a checked exception from within this class. |
abstract ResultType |
useConnection(DbConnection connection)
Should be implemented by all extending classes. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected DataType mData
| Constructor Detail |
|---|
public DbConnectionUser()
public DbConnectionUser(DataType data)
data - a user data object to be stored locally| Method Detail |
|---|
public DataType getData()
null if no data object was provided
public void throwException(Exception exception)
throws InnerClassException
To catch it you should surround the reserveConnection with a try-catch block that catches
InnerClassException. The original exception is then
available through getCause() and can for example be
rethrown.
exception - the exception to be thrown
InnerClassException - when a checked exception needs to be
thrown from within this class and caught outside the caller.
public abstract ResultType useConnection(DbConnection connection)
throws InnerClassException
connection - the connection that should be used
InnerClassExceptionpublic Object clone()
clone in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||