View Javadoc

1   /**
2    * Copyright 2011 The Kuali Foundation Licensed under the
3    * Educational Community License, Version 2.0 (the "License"); you may
4    * not use this file except in compliance with the License. You may
5    * obtain a copy of the License at
6    *
7    * http://www.osedu.org/licenses/ECL-2.0
8    *
9    * Unless required by applicable law or agreed to in writing,
10   * software distributed under the License is distributed on an "AS IS"
11   * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
12   * or implied. See the License for the specific language governing
13   * permissions and limitations under the License.
14   */
15  
16  package org.kuali.mobility.push.dao;
17  
18  import java.util.List;
19  
20  import org.kuali.mobility.push.entity.Sender;
21  
22  /**
23   * Data Access Object Interface for Sender Objects
24   * 
25   * @author Kuali Mobility Team (mobility.dev@kuali.org)
26   * @since 2.0.0
27   */
28  public interface SenderDao {
29  
30  	/**
31  	 * Persists a <code>Sender</code> object.
32  	 * @param sender Sender to persist.
33  	 */
34  	 void saveSender(Sender sender);
35  
36  	/**
37  	 * Removes a <code>Sender</code> object.
38  	 * @param sender Sender to remove.
39  	 */
40  	 boolean removeSender(Sender sender);
41  
42  	/**
43  	 * Determine validity/availability of the senderKey.
44  	 * @param senderKey SenderKey to determine if valid.
45  	 * @return validity of a senderKey.
46  	 */
47  		boolean isValidSenderKey(String senderKey);
48  	
49  	/**
50  	 * Find and return all available <code>Sender</code> objects, useful for opt-in/opt-out preferences.
51  	 * @return List of all <code>Sender</code> objects.
52  	 */
53  		List<Sender> findAllSenders();
54  
55  	/**
56  	 * Find and return all available <code>Sender</code> objects, useful for opt-in/opt-out preferences.
57  	 * @return List of all <code>Sender</code> objects whom are not set to be hidden.
58  	 */
59  		List<Sender> findAllUnhiddenSenders();
60  	
61  	/**
62  	 * Find and return <code>Sender</code> object, using Id as search criteria.
63  	 * @param id Id for the <code>Sender</code> to find.
64  	 * @return <code>Sender</code> as determined by id.
65  	 */
66  		Sender findSenderById(long id);
67  
68  	/**
69  	 * Find and return <code>Sender</code> object, using Name as search criteria.
70  	 * @param name Name of the <code>Sender</code> to find.
71  	 * @return <code>Sender</code> as determined by Name.
72  	 */	
73  		Sender findSenderByName(String name);
74  	
75  	/**
76  	 * Find and return <code>Sender</code> object, using ShortName as search criteria.
77  	 * @param shortName ShortName for the <code>Sender</code> to find.
78  	 * @return <code>Sender</code> as determined by ShortName.
79  	 */
80  		Sender findSenderByShortName(String shortName);
81  	
82  	/**
83  	 * Find and return <code>Sender</code> object, using SenderKey as search criteria.
84  	 * @param senderKey SenderKey for the <code>Sender</code> to find.
85  	 * @return <code>Sender</code> as determined by SenderKey.
86  	 */
87  		Sender findSenderBySenderKey(String senderKey);
88  	
89  }