OwnerDao.java 863 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
package at.ac.tuwien.sepm.assignment.individual.persistence;

import at.ac.tuwien.sepm.assignment.individual.entity.Owner;
import at.ac.tuwien.sepm.assignment.individual.exception.NotFoundException;
import org.springframework.dao.DataAccessException;

public interface OwnerDao {

    /**
     * @param id of the owner to find.
     * @return the owner with the specified id.
     * @throws DataAccessException will be thrown if something goes wrong during the database access.
     * @throws NotFoundException   will be thrown if the owner could not be found in the database.
     */
    Owner findOneById(Long id);

17 18 19 20 21 22 23
    /**
     * @param owner that specifies the owner to add
     * @return the newly created horse
     * @throws DataAccessException will be thrown if something goes wrong during the database access.
     */
    Owner addOwner(Owner owner);

24
}