01 /*
02 * DAO ArtistDAO for management of Artist(artist)
03 * Generated by iBatis-Ext
04 */
05 package com.asimovt.ibatisext.samples.crud;
06
07 import com.asimovt.ibatisext.annotations.*;
08 import java.util.List;
09
10 /**
11 * DAO ArtistDAO for management of Artist(artist)
12 */
13 @DAO
14 public interface ArtistDAO {
15
16 /**
17 * Returns a Artist instance from the database.
18 * @param pk primary key value used for lookup.
19 * @return A Artist instance with a primary key value equals to pk. null if there is no matching row.
20 */
21 @SelectStatement
22 public Artist findByPk(Integer pk);
23
24 /**
25 * Loads a Artist instance from the database.
26 * @param pk primary key value used for lookup.
27 * @param model precreated instance to be filled.
28 */
29 @SelectStatement
30 public void loadByPk(Integer pk, Artist model);
31
32 /**
33 * Returns the list of all Artist instances from the database.
34 * @return The list of all Artist instances from the database.
35 */
36 @SelectStatement
37 public List<Artist> findAll();
38
39 /**
40 * Returns a partial list of Artist instances from the database.
41 * @param skipRecords number of records to be skiped.
42 * @param maxRecords maximum number of records to be returned.
43 * @return a partial list of Artist instances from the database.
44 */
45 @SelectStatement
46 public List<Artist> findAll(int skipRecords, int maxRecords);
47
48 /**
49 * Insert an instance of Artist into the database.
50 * @param model the instance to be persisted.
51 * @return a generated primary key value if apply.
52 */
53 @InsertStatement
54 public Object insert(Artist model);
55
56 /**
57 * Updates an instance of Artist in the database.
58 * @param model the instance to be updated.
59 * @return number of records affected.
60 */
61 @UpdateStatement
62 public int update(Artist model);
63
64 /**
65 * Delete an instance of Artist from the database.
66 * @param pk primary key value of the instance to be deleted.
67 * @return number of records affected.
68 */
69 @DeleteStatement
70 public int delete(Integer pk);
71
72 }
|