001 /**
002 * Copyright 2010 The Kuali Foundation Licensed under the
003 * Educational Community License, Version 2.0 (the "License"); you may
004 * not use this file except in compliance with the License. You may
005 * obtain a copy of the License at
006 *
007 * http://www.osedu.org/licenses/ECL-2.0
008 *
009 * Unless required by applicable law or agreed to in writing,
010 * software distributed under the License is distributed on an "AS IS"
011 * BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
012 * or implied. See the License for the specific language governing
013 * permissions and limitations under the License.
014 */
015
016 package org.kuali.student.core.dao;
017
018 import java.util.List;
019
020 import org.kuali.student.core.exceptions.DoesNotExistException;
021
022 public interface CrudDao {
023 public <T> T fetch(Class<T> clazz, String key) throws DoesNotExistException;
024
025 public <T> T create(T entity);
026
027 public <T> void delete(Class<T> clazz, String key) throws DoesNotExistException;
028
029 public void delete(Object entity);
030
031 public <T> List<T> find(Class<T> clazz);
032
033 public <T> T update(T entity);
034 }