1 /** 2 * Copyright 2006 Matthew Purland (m.purland@gmail.com) 3 * 4 * Licensed under the Apache 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.apache.org/licenses/LICENSE-2.0 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 net.sf.mud4j.dao; 17 18 import java.util.List; 19 20 import org.springframework.dao.DataAccessException; 21 22 /** 23 * Character dao interface. 24 * 25 * @author Matthew Purland 26 */ 27 public interface CharacterDao { 28 /** 29 * Get a character that matches the characterId. 30 * 31 * @param characterId Character id to find character. 32 * @return Returns character from characterId 33 * 34 * @throws DataAccessException in case of data I/O problems 35 */ 36 public Character getCharacter(String characterId) throws DataAccessException; 37 38 /** 39 * Get list of characters. 40 * 41 * @return Returns a list of characters. 42 * 43 * @throws DataAccessException in case of data I/O problems 44 */ 45 public List getCharacters() throws DataAccessException; 46 47 /** 48 * Save and persist a character. 49 * @param character Character instance to save. 50 * 51 * @throws DataAccessException in case of data I/O problems 52 */ 53 public void saveCharacter(Character character) throws DataAccessException; 54 55 /** 56 * Remove a character. 57 * 58 * @param character Character to remove. 59 * 60 * @throws DataAccessException in case of data I/O problems 61 */ 62 public void removeCharacter(String characterId) throws DataAccessException; 63 }