package cz.muni.fi.pa165.dao;

import cz.muni.fi.pa165.entity.Loan;

/**
 * Data manipulation operations for Loan entity.
 *
 * @author Michael Simacek
 *
 */
public interface LoanDao {
    /**
     * Creates persistent representation of Loan in the database. Sets the ID.
     *
     * @param loan Loan object to be persisted
     * */
    void create(Loan loan);

    /**
     * Finds a loan in the database by its ID
     *
     * @return Found Loan object or null if no loan was found.
     * */
    Loan findById(Long id);

}

@@ -24,16 +24,40 @@
 5.dao;%0A%0A
+import java.util.List;%0A%0A
 import c
@@ -85,16 +85,16 @@
 y.Loan;%0A
-
 %0A/**%0A * 
@@ -383,16 +383,172 @@
 loan);%0A%0A
+    /**%0A     * Updates entity data in database%0A     *%0A     * @param loan%0A     *            Loan object to be updated%0A     * */%0A    void update(Loan loan);%0A%0A
     /**%0A
@@ -702,10 +702,230 @@
 g id);%0A%0A
+    /**%0A     * Retrieves all Loans from the database%0A     *%0A     * @return List of all Loans%0A     * */%0A    List%3CLoan%3E findAll();%0A%0A    /**%0A     * Removes given Loan from the database%0A     * */%0A    void delete(Loan loan);%0A
 %7D%0A

Add more LoanDao methods