001: /**
002: * Copyright (c) 2000-2008 Liferay, Inc. All rights reserved.
003: *
004: * Permission is hereby granted, free of charge, to any person obtaining a copy
005: * of this software and associated documentation files (the "Software"), to deal
006: * in the Software without restriction, including without limitation the rights
007: * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
008: * copies of the Software, and to permit persons to whom the Software is
009: * furnished to do so, subject to the following conditions:
010: *
011: * The above copyright notice and this permission notice shall be included in
012: * all copies or substantial portions of the Software.
013: *
014: * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
015: * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
016: * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
017: * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
018: * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
019: * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
020: * SOFTWARE.
021: */package com.liferay.util.dao.hibernate;
022:
023: import java.io.Serializable;
024:
025: import java.lang.Class;
026: import java.lang.Object;
027: import java.lang.String;
028:
029: import java.util.Collection;
030: import java.util.Iterator;
031: import java.util.List;
032:
033: import org.hibernate.HibernateException;
034: import org.hibernate.Query;
035: import org.hibernate.classic.Session;
036: import org.hibernate.type.Type;
037:
038: /**
039: * <a href="LiferayClassicSession.java.html"><b><i>View Source</i></b></a>
040: *
041: * <p>
042: * See http://support.liferay.com/browse/LEP-2996.
043: * </p>
044: *
045: * @author Brian Wing Shun Chan
046: *
047: */
048: public class LiferayClassicSession extends LiferaySession implements
049: Session {
050:
051: public LiferayClassicSession(Session session) {
052: super (session);
053:
054: _session = session;
055: }
056:
057: public Session getHibernateClassicSession() {
058: return _session;
059: }
060:
061: /**
062: * @deprecated
063: */
064: public Query createSQLQuery(String sql, String returnAlias,
065: Class returnClass) {
066:
067: return _session.createSQLQuery(sql, returnAlias, returnClass);
068: }
069:
070: /**
071: * @deprecated
072: */
073: public Query createSQLQuery(String sql, String[] returnAliases,
074: Class[] returnClasses) {
075:
076: return _session.createSQLQuery(sql, returnAliases,
077: returnClasses);
078: }
079:
080: /**
081: * @deprecated
082: */
083: public int delete(String query) throws HibernateException {
084: return _session.delete(query);
085: }
086:
087: /**
088: * @deprecated
089: */
090: public int delete(String query, Object value, Type type)
091: throws HibernateException {
092:
093: return _session.delete(query, value, type);
094: }
095:
096: /**
097: * @deprecated
098: */
099: public int delete(String query, Object[] values, Type[] types)
100: throws HibernateException {
101:
102: return _session.delete(query, values, types);
103: }
104:
105: /**
106: * @deprecated
107: */
108: public Collection filter(Object collection, String filter)
109: throws HibernateException {
110:
111: return _session.filter(collection, filter);
112: }
113:
114: /**
115: * @deprecated
116: */
117: public Collection filter(Object collection, String filter,
118: Object value, Type type) throws HibernateException {
119:
120: return _session.filter(collection, filter, value, type);
121: }
122:
123: /**
124: * @deprecated
125: */
126: public Collection filter(Object collection, String filter,
127: Object[] values, Type[] types) throws HibernateException {
128:
129: return _session.filter(collection, filter, values, types);
130: }
131:
132: /**
133: * @deprecated
134: */
135: public List find(String query) throws HibernateException {
136: return _session.find(query);
137: }
138:
139: /**
140: * @deprecated
141: */
142: public List find(String query, Object value, Type type)
143: throws HibernateException {
144:
145: return _session.find(query, value, type);
146: }
147:
148: /**
149: * @deprecated
150: */
151: public List find(String query, Object[] values, Type[] types)
152: throws HibernateException {
153:
154: return _session.find(query, values, types);
155: }
156:
157: /**
158: * @deprecated
159: */
160: public Iterator iterate(String query) throws HibernateException {
161: return _session.iterate(query);
162: }
163:
164: /**
165: * @deprecated
166: */
167: public Iterator iterate(String query, Object value, Type type)
168: throws HibernateException {
169:
170: return _session.iterate(query, value, type);
171: }
172:
173: /**
174: * @deprecated
175: */
176: public Iterator iterate(String query, Object[] values, Type[] types)
177: throws HibernateException {
178:
179: return _session.iterate(query, values, types);
180: }
181:
182: /**
183: * @deprecated
184: */
185: public void save(Object object, Serializable id)
186: throws HibernateException {
187: _session.save(object, id);
188: }
189:
190: /**
191: * @deprecated
192: */
193: public void save(String entityName, Object object, Serializable id)
194: throws HibernateException {
195:
196: _session.save(entityName, object, id);
197: }
198:
199: /**
200: * @deprecated
201: */
202: public Object saveOrUpdateCopy(Object object)
203: throws HibernateException {
204: return _session.saveOrUpdateCopy(object);
205: }
206:
207: /**
208: * @deprecated
209: */
210: public Object saveOrUpdateCopy(Object object, Serializable id)
211: throws HibernateException {
212:
213: return _session.saveOrUpdateCopy(object, id);
214: }
215:
216: /**
217: * @deprecated
218: */
219: public Object saveOrUpdateCopy(String entityName, Object object)
220: throws HibernateException {
221:
222: return _session.saveOrUpdateCopy(entityName, object);
223: }
224:
225: /**
226: * @deprecated
227: */
228: public Object saveOrUpdateCopy(String entityName, Object object,
229: Serializable id) throws HibernateException {
230:
231: return _session.saveOrUpdateCopy(entityName, object, id);
232: }
233:
234: /**
235: * @deprecated
236: */
237: public void update(Object object, Serializable id)
238: throws HibernateException {
239:
240: _session.update(object, id);
241: }
242:
243: /**
244: * @deprecated
245: */
246: public void update(String entityName, Object object, Serializable id)
247: throws HibernateException {
248:
249: _session.update(entityName, object, id);
250: }
251:
252: private Session _session;
253:
254: }
|