Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 8,9c8,9
- < final _<Item> item = new _<Item>();
- < final _<Connection> c = new _<Connection>();
- ---
- > final GenericWrapper<Item> item = new GenericWrapper<Item>();
- > final GenericWrapper<Connection> c = new GenericWrapper<Connection>();
- 12c12
- < item._ = c._.query( itemId );
- ---
- > item.genericWrapper = c.genericWrapper.query( itemId );
- 15c15
- < return item._;
- ---
- > return item.genericWrapper;
- 18,19c18,19
- < class _<E>{
- < public E _;
- ---
- > class GenericWrapper<E>{
- > public E genericWrapper;
- 34c34
- < public static void with( ConnectionFactory factory, _<Connection> c, Runnable block ) {
- ---
- > public static void with( ConnectionFactory factory, GenericWrapper<Connection> c, Runnable block ) {
- 36,37c36,37
- < c._ = factory.getConnection();
- < c._.open();
- ---
- > c.genericWrapper = factory.getConnection();
- > c.genericWrapper.open();
- 41,42c41,42
- < if( c._ != null ) try {
- < c._.close();
- ---
- > if( c.genericWrapper != null ) try {
- > c.genericWrapper.close();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement