01: /**
02: * Objective Database Abstraction Layer (ODAL)
03: * Copyright (c) 2004, The ODAL Development Group
04: * All rights reserved.
05: * For definition of the ODAL Development Group please refer to LICENCE.txt file
06: *
07: * Distributable under LGPL license.
08: * See terms of license at gnu.org.
09: */package com.completex.objective.components.cache.impl;
10:
11: import com.completex.objective.components.cache.Cache;
12:
13: import java.sql.SQLException;
14: import java.sql.Connection;
15: import java.sql.Statement;
16:
17: /**
18: * @see Cache
19: *
20: * @author Gennady Krizhevsky
21: */
22: public class NullCallCache implements Cache {
23: public Object acquire(Object context, Object key)
24: throws SQLException {
25: return ((Connection) context).prepareCall(((String) key));
26: }
27:
28: public void release(Object context, Object res) throws SQLException {
29: ((Statement) res).close();
30: }
31: }
|