001// ______________________________________________________
002// Generated by sql2java - https://github.com/10km/sql2java 
003// JDBC driver used at code generation time: com.mysql.jdbc.Driver
004// template: manager.interface.java.vm
005// ______________________________________________________
006package net.gdface.facedb.db;
007import gu.sql2java.TableManager;
008import gu.sql2java.exception.ObjectRetrievalException;
009import gu.sql2java.exception.RuntimeDaoException;
010
011/**
012 * Interface to handle database calls (save, load, count, etc...) for the fd_store table.<br>
013 * Remarks: 二进制数据存储表
014 * @author guyadong
015 */
016public interface IStoreManager extends TableManager<StoreBean>
017{  
018    //////////////////////////////////////
019    // PRIMARY KEY METHODS
020    //////////////////////////////////////
021
022    //1
023    /**
024     * Loads a {@link StoreBean} from the fd_store using primary key fields.
025     *
026     * @param md5 String - PK# 1
027     * @return a unique StoreBean or {@code null} if not found
028     * @throws RuntimeDaoException
029     */
030    public StoreBean loadByPrimaryKey(String md5)throws RuntimeDaoException;
031
032    //1.1
033    /**
034     * Loads a {@link StoreBean} from the fd_store using primary key fields.
035     *
036     * @param md5 String - PK# 1
037     * @return a unique StoreBean
038     * @throws ObjectRetrievalException if not found
039     * @throws RuntimeDaoException
040     */
041    public StoreBean loadByPrimaryKeyChecked(String md5) throws RuntimeDaoException,ObjectRetrievalException;
042    
043    //1.4
044    /**
045     * check if contains row with primary key fields.
046     * @param md5 String - PK# 1
047     * @return true if this fd_store contains row with primary key fields.
048     * @throws RuntimeDaoException
049     */
050    public boolean existsPrimaryKey(String md5)throws RuntimeDaoException;
051    //1.4.1
052    /**
053     * Check duplicated row by primary keys,if row exists throw exception
054     * @param md5 primary keys
055     * @return md5
056     * @throws RuntimeDaoException
057     * @throws ObjectRetrievalException
058     */
059    public String checkDuplicate(String md5)throws RuntimeDaoException,ObjectRetrievalException;
060    //1.8
061    /**
062     * Loads {@link StoreBean} from the fd_store using primary key fields.
063     *
064     * @param keys primary keys array
065     * @return list of StoreBean
066     * @throws RuntimeDaoException
067     */
068    public java.util.List<StoreBean> loadByPrimaryKey(String... keys)throws RuntimeDaoException;
069    //1.9
070    /**
071     * Loads {@link StoreBean} from the fd_store using primary key fields.
072     *
073     * @param keys primary keys collection
074     * @return list of StoreBean
075     * @throws RuntimeDaoException
076     */
077    public java.util.List<StoreBean> loadByPrimaryKey(java.util.Collection<String> keys)throws RuntimeDaoException;
078    //2
079    /**
080     * Delete row according to its primary keys.<br>
081     * all keys must not be null
082     *
083     * @param md5 String - PK# 1
084     * @return the number of deleted rows
085     * @throws RuntimeDaoException
086     */
087    public int deleteByPrimaryKey(String md5)throws RuntimeDaoException;
088    //2.2
089    /**
090     * Delete rows according to primary key.<br>
091     *
092     * @param keys primary keys array
093     * @return the number of deleted rows
094     * @throws RuntimeDaoException
095     * @see #delete(gu.sql2java.BaseBean)
096     */
097    public int deleteByPrimaryKey(String... keys)throws RuntimeDaoException;
098    //2.3
099    /**
100     * Delete rows according to primary key.<br>
101     *
102     * @param keys primary keys collection
103     * @return the number of deleted rows
104     * @throws RuntimeDaoException
105     * @see #delete(gu.sql2java.BaseBean)
106     */
107    public int deleteByPrimaryKey(java.util.Collection<String> keys)throws RuntimeDaoException;
108 
109 
110    //45
111    /**
112     * return a primary key list from {@link StoreBean} array
113     * @param beans
114     * @return primary key list
115     */
116    public java.util.List<String> toPrimaryKeyList(StoreBean... beans);
117    //46
118    /**
119     * return a primary key list from {@link StoreBean} collection
120     * @param beans
121     * @return primary key list
122     */
123    public java.util.List<String> toPrimaryKeyList(java.util.Collection<StoreBean> beans);
124
125}