View Javadoc
1   /*
2    * ============================================================================
3    * Project betoffice-storage Copyright (c) 2000-2016 by Andre Winkler. All
4    * rights reserved.
5    * ============================================================================
6    * GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND
7    * MODIFICATION
8    *
9    * This program is free software; you can redistribute it and/or modify it under
10   * the terms of the GNU General Public License as published by the Free Software
11   * Foundation; either version 2 of the License, or (at your option) any later
12   * version.
13   *
14   * This program is distributed in the hope that it will be useful, but WITHOUT
15   * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16   * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
17   * details.
18   *
19   * You should have received a copy of the GNU General Public License along with
20   * this program; if not, write to the Free Software Foundation, Inc., 59 Temple
21   * Place, Suite 330, Boston, MA 02111-1307 USA
22   *
23   */
24  
25  package de.winkler.betoffice.dao;
26  
27  import java.util.List;
28  import java.util.Optional;
29  
30  import de.winkler.betoffice.storage.Team;
31  import de.winkler.betoffice.storage.TeamAlias;
32  
33  /**
34   * DAO für die Datenbanktabelle bo_teamalias.
35   *
36   * @author by Andre Winkler
37   */
38  public interface TeamAliasDao extends CommonDao<TeamAlias> {
39  
40      /**
41       * Liefert eine Liste alle Mannschafts Aliasnamen.
42       *
43       * @return Eine Liste aller Mannschafts Aliasnamen.
44       */
45      public List<TeamAlias> findAll();
46  
47      /**
48       * Liefert eine Mannschaften mit gesuchten Aliasnamen.
49       *
50       * @param aliasName
51       *            Der gesuchte Aliasname.
52       * @return Eine Mannschaften.
53       */
54      public Optional<Team> findByAliasName(String aliasName);
55  
56      /**
57       * Liefert die Alias Namen einer Mannschaft.
58       *
59       * @param team
60       *            Die gesuchte Mannschaft.
61       * @return Die Alias Namen der Mannschaft.
62       */
63      public List<TeamAlias> findAliasNames(Team team);
64  
65      /**
66       * Legt eine neuen Aliasnamen an.
67       *
68       * @param team
69       *            Ein Mannschaft.
70       */
71      public void save(TeamAlias team);
72  
73      /**
74       * Legt mehrere neue Aliasnamen an.
75       *
76       * @param teams
77       *            Eine Liste von Mannschaften.
78       */
79      public void saveAll(List<TeamAlias> teams);
80  
81      /**
82       * Eine Update-Operation.
83       *
84       * @param aliasName
85       *            Ein Aliasname.
86       */
87      public void update(TeamAlias aliasName);
88  
89      /**
90       * Löscht eine Mannschaft.
91       *
92       * @param value
93       *            Der zu löschende Aliasname.
94       */
95      public void delete(TeamAlias value);
96  
97      /**
98       * Löscht alle Mannschaften.
99       *
100      * @param aliasNames
101      *            Der zu löschende Aliasname.
102      */
103     public void deleteAll(List<TeamAlias> aliasNames);
104 
105 }