View Javadoc

1   package org.codehaus.mojo.dashboard.report.plugin.hibernate;
2   
3   /*
4    * Copyright 2007 David Vicente
5    *
6    * Licensed under the Apache License, Version 2.0 (the "License");
7    * you may not use this file except in compliance with the License.
8    * You may obtain a copy of the License at
9    *
10   *      http://www.apache.org/licenses/LICENSE-2.0
11   *
12   * Unless required by applicable law or agreed to in writing, software
13   * distributed under the License is distributed on an "AS IS" BASIS,
14   * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15   * See the License for the specific language governing permissions and
16   * limitations under the License.
17   */
18  
19  import org.hibernate.Session;
20  import org.hibernate.SessionFactory;
21  
22  /**
23   * Service for Hibernate persistance manager.
24   * 
25   */
26  public interface HibernateService
27  {
28      String ROLE = HibernateService.class.getName();
29  
30      public SessionFactory getSessionFactory();
31  
32      public Session getSession();
33  
34      public String getDialect();
35  
36      public void setDialect( String dialect );
37  
38      public String getDriverClass();
39  
40      public void setDriverClass( String driverClass );
41  
42      public String getPassword();
43  
44      public void setPassword( String password );
45  
46      public String getConnectionUrl();
47  
48      public void setConnectionUrl( String url );
49  
50      public String getUsername();
51  
52      public void setUsername( String username );
53  
54      public void save( Object obj );
55  
56      public void update( Object obj );
57      
58      public void saveOrUpdate( Object obj );
59  
60  }