1 /* 2 * Copyright 2007-2008 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 java.util.List; 19 import java.util.Map; 20 21 import javax.xml.namespace.QName; 22 23 import org.kuali.rice.ksb.messaging.PersistedMessagePayload; 24 import org.kuali.rice.ksb.messaging.PersistedMessage; 25 26 27 public interface MessageQueueDAO { 28 29 public void remove(PersistedMessage routeQueue); 30 31 public void save(PersistedMessage routeQueue); 32 33 public PersistedMessage findByRouteQueueId(Long routeQueueId); 34 35 public List<PersistedMessage> findAll(); 36 37 public List<PersistedMessage> findAll(int maxRows); 38 39 public List<PersistedMessage> getNextDocuments(Integer maxDocuments); 40 41 public List<PersistedMessage> findByServiceName(QName serviceName, String methodName); 42 43 /** 44 * Finds the persisted messages that match the values passed into the criteriaValues Map, with an EqualTo criteria 45 * for each. 46 * 47 * @param criteriaValues 48 * A Map of Key/Value pairs, where the Key is a string holding the field name, and the Value is a 49 * string holding the value to match. 50 * @return A populated (or empty) list containing the results of the search. If no matches are made, an empty list 51 * will be returned. 52 */ 53 public List<PersistedMessage> findByValues(Map<String, String> criteriaValues, int maxRows); 54 55 public PersistedMessagePayload findByPersistedMessageByRouteQueueId(Long routeQueueId); 56 }