1 /**
2 * Copyright 2005-2012 The Kuali Foundation
3 *
4 * Licensed under the Educational Community License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.opensource.org/licenses/ecl2.php
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16 package org.kuali.rice.ksb.messaging.dao;
17
18 import org.kuali.rice.ksb.messaging.PersistedMessageBO;
19 import org.kuali.rice.ksb.messaging.PersistedMessagePayload;
20
21 import javax.xml.namespace.QName;
22 import java.util.List;
23 import java.util.Map;
24
25
26 public interface MessageQueueDAO {
27
28 public void remove(PersistedMessageBO routeQueue);
29
30 public void save(PersistedMessageBO routeQueue);
31
32 public PersistedMessageBO findByRouteQueueId(Long routeQueueId);
33
34 public List<PersistedMessageBO> findAll();
35
36 public List<PersistedMessageBO> findAll(int maxRows);
37
38 public List<PersistedMessageBO> getNextDocuments(Integer maxDocuments);
39
40 public List<PersistedMessageBO> findByServiceName(QName serviceName, String methodName);
41
42 /**
43 * Finds the persisted messages that match the values passed into the criteriaValues Map, with an EqualTo criteria
44 * for each.
45 *
46 * @param criteriaValues
47 * A Map of Key/Value pairs, where the Key is a string holding the field name, and the Value is a
48 * string holding the value to match.
49 * @return A populated (or empty) list containing the results of the search. If no matches are made, an empty list
50 * will be returned.
51 */
52 public List<PersistedMessageBO> findByValues(Map<String, String> criteriaValues, int maxRows);
53
54 public PersistedMessagePayload findByPersistedMessageByRouteQueueId(Long routeQueueId);
55 }