001    /****************************************************************
002     * Licensed to the Apache Software Foundation (ASF) under one   *
003     * or more contributor license agreements.  See the NOTICE file *
004     * distributed with this work for additional information        *
005     * regarding copyright ownership.  The ASF licenses this file   *
006     * to you under the Apache License, Version 2.0 (the            *
007     * "License"); you may not use this file except in compliance   *
008     * with the License.  You may obtain a copy of the License at   *
009     *                                                              *
010     *   http://www.apache.org/licenses/LICENSE-2.0                 *
011     *                                                              *
012     * Unless required by applicable law or agreed to in writing,   *
013     * software distributed under the License is distributed on an  *
014     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
015     * KIND, either express or implied.  See the License for the    *
016     * specific language governing permissions and limitations      *
017     * under the License.                                           *
018     ****************************************************************/
019    
020    package org.apache.hupa.shared.rpc;
021    
022    import java.io.Serializable;
023    import java.util.ArrayList;
024    
025    import org.apache.hupa.shared.data.Message;
026    /****************************************************************
027     * Licensed to the Apache Software Foundation (ASF) under one   *
028     * or more contributor license agreements.  See the NOTICE file *
029     * distributed with this work for additional information        *
030     * regarding copyright ownership.  The ASF licenses this file   *
031     * to you under the Apache License, Version 2.0 (the            *
032     * "License"); you may not use this file except in compliance   *
033     * with the License.  You may obtain a copy of the License at   *
034     *                                                              *
035     *   http://www.apache.org/licenses/LICENSE-2.0                 *
036     *                                                              *
037     * Unless required by applicable law or agreed to in writing,   *
038     * software distributed under the License is distributed on an  *
039     * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY       *
040     * KIND, either express or implied.  See the License for the    *
041     * specific language governing permissions and limitations      *
042     * under the License.                                           *
043     ****************************************************************/
044    
045    import net.customware.gwt.dispatch.shared.Result;
046    
047    public class FetchMessagesResult implements Result, Serializable {
048    
049        /**
050         * 
051         */
052        private static final long serialVersionUID = 8692400285949934424L;
053        private ArrayList<Message> messages;
054        private int start;
055        private int offset;
056        private int realCount;
057        private int realUnreadCount;
058    
059        @SuppressWarnings("unused")
060        private FetchMessagesResult() {
061        }
062        
063        public FetchMessagesResult(ArrayList<Message> messages,int start,int offset,int realCount, int realUnreadCount) {
064            this.messages = messages;
065            this.start = start;
066            this.offset = offset;
067            this.realCount = realCount;
068            this.realUnreadCount = realUnreadCount;
069        }
070        
071        public ArrayList<Message> getMessages() {
072            return messages;
073        }
074        
075        public int getOffset() {
076            return offset;
077        }
078        
079        public int getStart() {
080            return start;
081        }
082        
083        public int getRealCount() {
084            return realCount;
085        }
086        
087        public int getRealUnreadCount() {
088            return realUnreadCount;
089        }
090    }