View Javadoc

1   /*
2   Copyright 2010 James Pether Sörling Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. 
3   	$Id
4   */
5   
6   package org.directdemocracyportal.democracy.service.dao;
7   
8   import org.directdemocracyportal.democracy.model.application.GovernmentPortal;
9   import org.directdemocracyportal.democracy.model.application.Portal;
10  import org.directdemocracyportal.democracy.model.world.Country;
11  import org.directdemocracyportal.democracy.model.world.Government;
12  import org.directdemocracyportal.democracy.model.world.Region;
13  import org.springframework.dao.DataAccessException;
14  
15  /***
16   * The Interface PortalDAO.
17   */
18  public interface PortalDAO extends GenericDAO<Portal, Long>
19  {
20  
21      /***
22       * Find by name.
23       *
24       * @param name the name
25       * @return the portal
26       * @throws DataAccessException the data access exception
27       */
28      public Portal findByName(String name) throws DataAccessException;
29  
30      /***
31       * Find government portal.
32       *
33       * @param government the government
34       * @return the government portal
35       */
36      public GovernmentPortal findGovernmentPortal(Government government);
37  
38      /***
39       * Find national by country.
40       *
41       * @param country the country
42       * @return the portal
43       */
44      public Portal findNationalByCountry(Country country);
45  
46      /***
47       * Find regional by region.
48       *
49       * @param region the region
50       * @return the portal
51       */
52      public Portal findRegionalByRegion(Region region);
53  }