View Javadoc

1   /*
2    * Copyright (c) 2001 - 2004 ivata limited.
3    * All rights reserved.
4    * -----------------------------------------------------------------------------
5    * ivata masks may be redistributed under the GNU General Public
6    * License as published by the Free Software Foundation;
7    * version 2 of the License.
8    *
9    * These programs are free software; you can redistribute them and/or
10   * modify them under the terms of the GNU General Public License
11   * as published by the Free Software Foundation; version 2 of the License.
12   *
13   * These programs are distributed in the hope that they will be useful,
14   * but WITHOUT ANY WARRANTY; without even the implied warranty of
15   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
16   *
17   * See the GNU General Public License in the file LICENSE.txt for more
18   * details.
19   *
20   * If you would like a copy of the GNU General Public License write to
21   *
22   * Free Software Foundation, Inc.
23   * 59 Temple Place - Suite 330
24   * Boston, MA 02111-1307, USA.
25   *
26   *
27   * To arrange commercial support and licensing, contact ivata at
28   *                  http://www.ivata.com/contact.jsp
29   * -----------------------------------------------------------------------------
30   * $Log: CatalogSession.java,v $
31   * Revision 1.6  2005/04/09 18:04:13  colinmacleod
32   * Changed copyright text to GPL v2 explicitly.
33   *
34   * Revision 1.5  2005/03/10 10:17:13  colinmacleod
35   * Added cancel method.
36   *
37   * Revision 1.4  2005/01/19 12:15:55  colinmacleod
38   * Added new methods for system-specific session.
39   * (Required by ivata groupware 0.10.)
40   *
41   * Revision 1.3  2005/01/07 09:13:02  colinmacleod
42   * Added newline to end of file.
43   *
44   * Revision 1.2  2005/01/07 08:08:17  colinmacleod
45   * Moved up a version number.
46   * Changed copyright notices to 2005.
47   * Updated the documentation:
48   *   - started working on multiproject:site docu.
49   *   - changed the logo.
50   * Added checkstyle and fixed LOADS of style issues.
51   * Added separate thirdparty subproject.
52   * Added struts (in web), util and webgui (in webtheme) from ivata op.
53   *
54   * Revision 1.1  2004/11/12 15:10:40  colinmacleod
55   * Moved persistence classes from ivata op as a replacement for
56   ValueObjectLocator.
57   * -----------------------------------------------------------------------------
58   */
59  package com.ivata.mask.web.demo.catalog;
60  import java.sql.Connection;
61  import com.ivata.mask.persistence.PersistenceException;
62  import com.ivata.mask.persistence.PersistenceSession;
63  /***
64   * Normally, a persistence session is analagous to a database transaction,
65   * grouping together like persistence actions unless they fail. This is just
66   * a dummy for the demo, however, and has no real functionality :-)
67   *
68   * @since ivata masks 0.3 (2004-11-12)
69   * @author Colin MacLeod
70   * <a href='mailto:colin.macleod@ivata.com'>colin.macleod@ivata.com</a>
71   * @version $Revision: 1.6 $
72   */
73  public final class CatalogSession implements PersistenceSession {
74      /***
75       * This method doesn't really do anything. :-)
76       *
77       * @see com.ivata.mask.persistence.PersistenceSession#cancel()
78       */
79      public void cancel() {
80      }
81      /***
82       * <p>
83       * Implements persistence session method. Does nothing for this demo
84       * implementation.
85       * </p>
86       *
87       * @see com.ivata.mask.persistence.PersistenceSession#close()
88       */
89      public void close() throws PersistenceException {
90      }
91      /***
92       * <p>
93       * Implements persistence session method. Does nothing for this demo
94       * implementation.
95       * </p>
96       *
97       * @see com.ivata.mask.persistence.PersistenceSession#getConnection()
98       * @return nothing is ever returned as the exception is always thrown,
99       * @throws PersistenceException always thrown since this method is
100      * unsupported in this demo.
101      */
102     public Connection getConnection() throws PersistenceException {
103         throw new PersistenceException(
104                 "CatalogSession.getConnection unsupported in demo program");
105     }
106     /***
107      * Refer to {@link PersistenceSession#getSystemSession}.
108      *
109      * @return Refer to {@link PersistenceSession#getSystemSession}.
110      */
111     public Object getSystemSession() {
112         return null;
113     }
114 
115 }
116