
net.gdface.facedb.db.IImageManager Maven / Gradle / Ivy
// ______________________________________________________
// Generated by sql2java - https://github.com/10km/sql2java
// JDBC driver used at code generation time: com.mysql.jdbc.Driver
// template: manager.interface.java.vm
// ______________________________________________________
package net.gdface.facedb.db;
import gu.sql2java.TableManager;
import gu.sql2java.exception.ObjectRetrievalException;
import gu.sql2java.exception.RuntimeDaoException;
/**
* Interface to handle database calls (save, load, count, etc...) for the fd_image table.
* Remarks: 图像信息存储表,用于存储系统中所有用到的图像数据,表中只包含图像基本信息
* @author guyadong
*/
public interface IImageManager extends TableManager
{
//////////////////////////////////////
// PRIMARY KEY METHODS
//////////////////////////////////////
//1
/**
* Loads a {@link ImageBean} from the fd_image using primary key fields.
*
* @param md5 String - PK# 1
* @return a unique ImageBean or {@code null} if not found
* @throws RuntimeDaoException
*/
public ImageBean loadByPrimaryKey(String md5)throws RuntimeDaoException;
//1.1
/**
* Loads a {@link ImageBean} from the fd_image using primary key fields.
*
* @param md5 String - PK# 1
* @return a unique ImageBean
* @throws ObjectRetrievalException if not found
* @throws RuntimeDaoException
*/
public ImageBean loadByPrimaryKeyChecked(String md5) throws RuntimeDaoException,ObjectRetrievalException;
//1.4
/**
* check if contains row with primary key fields.
* @param md5 String - PK# 1
* @return true if this fd_image contains row with primary key fields.
* @throws RuntimeDaoException
*/
public boolean existsPrimaryKey(String md5)throws RuntimeDaoException;
//1.4.1
/**
* Check duplicated row by primary keys,if row exists throw exception
* @param md5 primary keys
* @return md5
* @throws RuntimeDaoException
* @throws ObjectRetrievalException
*/
public String checkDuplicate(String md5)throws RuntimeDaoException,ObjectRetrievalException;
//1.8
/**
* Loads {@link ImageBean} from the fd_image using primary key fields.
*
* @param keys primary keys array
* @return list of ImageBean
* @throws RuntimeDaoException
*/
public java.util.List loadByPrimaryKey(String... keys)throws RuntimeDaoException;
//1.9
/**
* Loads {@link ImageBean} from the fd_image using primary key fields.
*
* @param keys primary keys collection
* @return list of ImageBean
* @throws RuntimeDaoException
*/
public java.util.List loadByPrimaryKey(java.util.Collection keys)throws RuntimeDaoException;
//2
/**
* Delete row according to its primary keys.
* all keys must not be null
*
* @param md5 String - PK# 1
* @return the number of deleted rows
* @throws RuntimeDaoException
*/
public int deleteByPrimaryKey(String md5)throws RuntimeDaoException;
//2.2
/**
* Delete rows according to primary key.
*
* @param keys primary keys array
* @return the number of deleted rows
* @throws RuntimeDaoException
* @see #delete(gu.sql2java.BaseBean)
*/
public int deleteByPrimaryKey(String... keys)throws RuntimeDaoException;
//2.3
/**
* Delete rows according to primary key.
*
* @param keys primary keys collection
* @return the number of deleted rows
* @throws RuntimeDaoException
* @see #delete(gu.sql2java.BaseBean)
*/
public int deleteByPrimaryKey(java.util.Collection keys)throws RuntimeDaoException;
//////////////////////////////////////
// GET/SET IMPORTED KEY BEAN METHOD
//////////////////////////////////////
//3.1 GET IMPORTED
/**
* Retrieves the {@link FaceBean} object from the fd_face.image_md5 field.
* FK_NAME : fd_face_ibfk_1
* @param bean the {@link ImageBean}
* @return the associated {@link FaceBean} beans or {@code null} if {@code bean} is {@code null}
* @throws RuntimeDaoException
*/
public FaceBean[] getFaceBeansByImageMd5(ImageBean bean)throws RuntimeDaoException;
//3.1.2 GET IMPORTED
/**
* Retrieves the {@link FaceBean} object from the fd_face.image_md5 field.
* FK_NAME : fd_face_ibfk_1
* @param md5OfImage String - PK# 1
* @return the associated {@link FaceBean} beans or {@code null} if {@code bean} is {@code null}
* @throws RuntimeDaoException
*/
public FaceBean[] getFaceBeansByImageMd5(String md5OfImage)throws RuntimeDaoException;
//3.2 GET IMPORTED
/**
* see also #getFaceBeansByImageMd5AsList(ImageBean,int,int)
* @param bean
* @return import bean list
* @throws RuntimeDaoException
*/
public java.util.List getFaceBeansByImageMd5AsList(ImageBean bean)throws RuntimeDaoException;
//3.2.2 GET IMPORTED
/**
* Retrieves the {@link FaceBean} object from fd_face.image_md5 field.
* FK_NAME:fd_face_ibfk_1
* @param md5OfImage String - PK# 1
* @return the associated {@link FaceBean} beans
* @throws RuntimeDaoException
*/
public java.util.List getFaceBeansByImageMd5AsList(String md5OfImage)throws RuntimeDaoException;
//3.2.3 DELETE IMPORTED
/**
* delete the associated {@link FaceBean} objects from fd_face.image_md5 field.
* FK_NAME:fd_face_ibfk_1
* @param md5OfImage String - PK# 1
* @return the number of deleted rows
* @throws RuntimeDaoException
*/
public int deleteFaceBeansByImageMd5(String md5OfImage)throws RuntimeDaoException;
//3.2.4 GET IMPORTED
/**
* Retrieves the {@link FaceBean} object from fd_face.image_md5 field.
* FK_NAME:fd_face_ibfk_1
* @param bean the {@link ImageBean}
* @param startRow the start row to be used (first row = 1, last row=-1)
* @param numRows the number of rows to be retrieved (all rows = a negative number)
* @return the associated {@link FaceBean} beans or empty list if {@code bean} is {@code null}
* @throws RuntimeDaoException
*/
public java.util.List getFaceBeansByImageMd5AsList(ImageBean bean,int startRow,int numRows)throws RuntimeDaoException;
//3.3 SET IMPORTED
/**
* set the {@link FaceBean} object array associate to ImageBean by the fd_face.image_md5 field.
* FK_NAME : fd_face_ibfk_1
* @param bean the referenced {@link ImageBean}
* @param importedBeans imported beans from fd_face
* @return importedBeans always
* @see IFaceManager#setReferencedByImageMd5(FaceBean, ImageBean)
* @throws RuntimeDaoException
*/
public FaceBean[] setFaceBeansByImageMd5(ImageBean bean , FaceBean[] importedBeans)throws RuntimeDaoException;
//3.4 SET IMPORTED
/**
* set the {@link FaceBean} object java.util.Collection associate to ImageBean by the fd_face.image_md5 field.
* FK_NAME:fd_face_ibfk_1
* @param bean the referenced {@link ImageBean}
* @param importedBeans imported beans from fd_face
* @return importedBeans always
* @see IFaceManager#setReferencedByImageMd5(FaceBean, ImageBean)
* @throws RuntimeDaoException
*/
public > C setFaceBeansByImageMd5(ImageBean bean , C importedBeans)throws RuntimeDaoException;
//3.5 SYNC SAVE
/**
* Save the ImageBean bean and referenced beans and imported beans into the database.
*
* @param bean the {@link ImageBean} bean to be saved
* @param impFaceByImageMd5 the {@link FaceBean} bean refer to {@link ImageBean}
* @return the inserted or updated {@link ImageBean} bean
* @throws RuntimeDaoException
*/
public ImageBean save(ImageBean bean
, FaceBean[] impFaceByImageMd5 )throws RuntimeDaoException;
//3.6 SYNC SAVE AS TRANSACTION
/**
* Transaction version for sync save
* see also {@link #save(ImageBean , FaceBean[] )}
* @param bean the {@link ImageBean} bean to be saved
* @param impFaceByImageMd5 the {@link FaceBean} bean refer to {@link ImageBean}
* @return the inserted or updated {@link ImageBean} bean
* @throws RuntimeDaoException
*/
public ImageBean saveAsTransaction(final ImageBean bean
,final FaceBean[] impFaceByImageMd5 )throws RuntimeDaoException;
//3.7 SYNC SAVE
/**
* Save the ImageBean bean and referenced beans and imported beans into the database.
*
* @param bean the {@link ImageBean} bean to be saved
* @param impFaceByImageMd5 the {@link FaceBean} bean refer to {@link ImageBean}
* @return the inserted or updated {@link ImageBean} bean
* @throws RuntimeDaoException
*/
public ImageBean save(ImageBean bean
, java.util.Collection impFaceByImageMd5 )throws RuntimeDaoException;
//3.8 SYNC SAVE AS TRANSACTION
/**
* Transaction version for sync save
* see also {@link #save(ImageBean , java.util.Collection )}
* @param bean the {@link ImageBean} bean to be saved
* @param impFaceByImageMd5 the {@link FaceBean} bean refer to {@link ImageBean}
* @return the inserted or updated {@link ImageBean} bean
* @throws RuntimeDaoException
*/
public ImageBean saveAsTransaction(final ImageBean bean
,final java.util.Collection impFaceByImageMd5 )throws RuntimeDaoException;
//45
/**
* return a primary key list from {@link ImageBean} array
* @param beans
* @return primary key list
*/
public java.util.List toPrimaryKeyList(ImageBean... beans);
//46
/**
* return a primary key list from {@link ImageBean} collection
* @param beans
* @return primary key list
*/
public java.util.List toPrimaryKeyList(java.util.Collection beans);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy