net.gdface.facelog.db.ILogManager 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.facelog.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 fl_log table.
* Remarks: 人脸验证日志,记录所有通过验证的人员
* @author guyadong
*/
public interface ILogManager extends TableManager
{
//////////////////////////////////////
// PRIMARY KEY METHODS
//////////////////////////////////////
//1
/**
* Loads a {@link LogBean} from the fl_log using primary key fields.
*
* @param id Integer - PK# 1
* @return a unique LogBean or {@code null} if not found
* @throws RuntimeDaoException
*/
public LogBean loadByPrimaryKey(Integer id)throws RuntimeDaoException;
//1.1
/**
* Loads a {@link LogBean} from the fl_log using primary key fields.
*
* @param id Integer - PK# 1
* @return a unique LogBean
* @throws ObjectRetrievalException if not found
* @throws RuntimeDaoException
*/
public LogBean loadByPrimaryKeyChecked(Integer id) throws RuntimeDaoException,ObjectRetrievalException;
//1.4
/**
* check if contains row with primary key fields.
* @param id Integer - PK# 1
* @return true if this fl_log contains row with primary key fields.
* @throws RuntimeDaoException
*/
public boolean existsPrimaryKey(Integer id)throws RuntimeDaoException;
//1.4.1
/**
* Check duplicated row by primary keys,if row exists throw exception
* @param id primary keys
* @return id
* @throws RuntimeDaoException
* @throws ObjectRetrievalException
*/
public Integer checkDuplicate(Integer id)throws RuntimeDaoException,ObjectRetrievalException;
//1.8
/**
* Loads {@link LogBean} from the fl_log using primary key fields.
*
* @param keys primary keys array
* @return list of LogBean
* @throws RuntimeDaoException
*/
public java.util.List loadByPrimaryKey(Integer... keys)throws RuntimeDaoException;
//1.9
/**
* Loads {@link LogBean} from the fl_log using primary key fields.
*
* @param keys primary keys collection
* @return list of LogBean
* @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 id Integer - PK# 1
* @return the number of deleted rows
* @throws RuntimeDaoException
*/
public int deleteByPrimaryKey(Integer id)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(Integer... 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;
//3.5 SYNC SAVE
/**
* Save the LogBean bean and referenced beans and imported beans into the database.
*
* @param bean the {@link LogBean} bean to be saved
* @param refDeviceByDeviceId the {@link DeviceBean} bean referenced by {@link LogBean}
* @param refFaceByCompareFace the {@link FaceBean} bean referenced by {@link LogBean}
* @param refFeatureByVerifyFeature the {@link FeatureBean} bean referenced by {@link LogBean}
* @param refImageByImageMd5 the {@link ImageBean} bean referenced by {@link LogBean}
* @param refPersonByPersonId the {@link PersonBean} bean referenced by {@link LogBean}
* @return the inserted or updated {@link LogBean} bean
* @throws RuntimeDaoException
*/
public LogBean save(LogBean bean
, DeviceBean refDeviceByDeviceId , FaceBean refFaceByCompareFace , FeatureBean refFeatureByVerifyFeature , ImageBean refImageByImageMd5 , PersonBean refPersonByPersonId
)throws RuntimeDaoException;
//3.6 SYNC SAVE AS TRANSACTION
/**
* Transaction version for sync save
* see also {@link #save(LogBean , DeviceBean , FaceBean , FeatureBean , ImageBean , PersonBean )}
* @param bean the {@link LogBean} bean to be saved
* @param refDeviceByDeviceId the {@link DeviceBean} bean referenced by {@link LogBean}
* @param refFaceByCompareFace the {@link FaceBean} bean referenced by {@link LogBean}
* @param refFeatureByVerifyFeature the {@link FeatureBean} bean referenced by {@link LogBean}
* @param refImageByImageMd5 the {@link ImageBean} bean referenced by {@link LogBean}
* @param refPersonByPersonId the {@link PersonBean} bean referenced by {@link LogBean}
* @return the inserted or updated {@link LogBean} bean
* @throws RuntimeDaoException
*/
public LogBean saveAsTransaction(final LogBean bean
,final DeviceBean refDeviceByDeviceId ,final FaceBean refFaceByCompareFace ,final FeatureBean refFeatureByVerifyFeature ,final ImageBean refImageByImageMd5 ,final PersonBean refPersonByPersonId
)throws RuntimeDaoException;
//////////////////////////////////////
// GET/SET FOREIGN KEY BEAN METHOD
//////////////////////////////////////
//5.1 GET REFERENCED VALUE
/**
* Retrieves the {@link DeviceBean} object referenced by {@link LogBean#getDeviceId}() field.
* FK_NAME : fl_log_ibfk_2
* @param bean the {@link LogBean}
* @return the associated {@link DeviceBean} bean or {@code null} if {@code bean} is {@code null}
* @throws RuntimeDaoException
*/
public DeviceBean getReferencedByDeviceId(LogBean bean)throws RuntimeDaoException;
//5.2 SET REFERENCED
/**
* Associates the {@link LogBean} object to the {@link DeviceBean} object by {@link LogBean#getDeviceId}() field.
*
* @param bean the {@link LogBean} object to use
* @param beanToSet the {@link DeviceBean} object to associate to the {@link LogBean}
* @return always beanToSet saved
* @throws RuntimeDaoException
*/
public DeviceBean setReferencedByDeviceId(LogBean bean, DeviceBean beanToSet)throws RuntimeDaoException;
//5.1 GET REFERENCED VALUE
/**
* Retrieves the {@link FaceBean} object referenced by {@link LogBean#getCompareFace}() field.
* FK_NAME : fl_log_ibfk_5
* @param bean the {@link LogBean}
* @return the associated {@link FaceBean} bean or {@code null} if {@code bean} is {@code null}
* @throws RuntimeDaoException
*/
public FaceBean getReferencedByCompareFace(LogBean bean)throws RuntimeDaoException;
//5.2 SET REFERENCED
/**
* Associates the {@link LogBean} object to the {@link FaceBean} object by {@link LogBean#getCompareFace}() field.
*
* @param bean the {@link LogBean} object to use
* @param beanToSet the {@link FaceBean} object to associate to the {@link LogBean}
* @return always beanToSet saved
* @throws RuntimeDaoException
*/
public FaceBean setReferencedByCompareFace(LogBean bean, FaceBean beanToSet)throws RuntimeDaoException;
//5.1 GET REFERENCED VALUE
/**
* Retrieves the {@link FeatureBean} object referenced by {@link LogBean#getVerifyFeature}() field.
* FK_NAME : fl_log_ibfk_3
* @param bean the {@link LogBean}
* @return the associated {@link FeatureBean} bean or {@code null} if {@code bean} is {@code null}
* @throws RuntimeDaoException
*/
public FeatureBean getReferencedByVerifyFeature(LogBean bean)throws RuntimeDaoException;
//5.2 SET REFERENCED
/**
* Associates the {@link LogBean} object to the {@link FeatureBean} object by {@link LogBean#getVerifyFeature}() field.
*
* @param bean the {@link LogBean} object to use
* @param beanToSet the {@link FeatureBean} object to associate to the {@link LogBean}
* @return always beanToSet saved
* @throws RuntimeDaoException
*/
public FeatureBean setReferencedByVerifyFeature(LogBean bean, FeatureBean beanToSet)throws RuntimeDaoException;
//5.1 GET REFERENCED VALUE
/**
* Retrieves the {@link ImageBean} object referenced by {@link LogBean#getImageMd5}() field.
* FK_NAME : fl_log_ibfk_4
* @param bean the {@link LogBean}
* @return the associated {@link ImageBean} bean or {@code null} if {@code bean} is {@code null}
* @throws RuntimeDaoException
*/
public ImageBean getReferencedByImageMd5(LogBean bean)throws RuntimeDaoException;
//5.2 SET REFERENCED
/**
* Associates the {@link LogBean} object to the {@link ImageBean} object by {@link LogBean#getImageMd5}() field.
*
* @param bean the {@link LogBean} object to use
* @param beanToSet the {@link ImageBean} object to associate to the {@link LogBean}
* @return always beanToSet saved
* @throws RuntimeDaoException
*/
public ImageBean setReferencedByImageMd5(LogBean bean, ImageBean beanToSet)throws RuntimeDaoException;
//5.1 GET REFERENCED VALUE
/**
* Retrieves the {@link PersonBean} object referenced by {@link LogBean#getPersonId}() field.
* FK_NAME : fl_log_ibfk_1
* @param bean the {@link LogBean}
* @return the associated {@link PersonBean} bean or {@code null} if {@code bean} is {@code null}
* @throws RuntimeDaoException
*/
public PersonBean getReferencedByPersonId(LogBean bean)throws RuntimeDaoException;
//5.2 SET REFERENCED
/**
* Associates the {@link LogBean} object to the {@link PersonBean} object by {@link LogBean#getPersonId}() field.
*
* @param bean the {@link LogBean} object to use
* @param beanToSet the {@link PersonBean} object to associate to the {@link LogBean}
* @return always beanToSet saved
* @throws RuntimeDaoException
*/
public PersonBean setReferencedByPersonId(LogBean bean, PersonBean beanToSet)throws RuntimeDaoException;
//_____________________________________________________________________
//
// USING INDICES
//_____________________________________________________________________
/**
* Retrieves an array of LogBean using the compare_face index.
*
* @param compareFace the compare_face column's value filter.
* @return an array of LogBean
* @throws RuntimeDaoException
*/
public LogBean[] loadByIndexCompareFace(Integer compareFace)throws RuntimeDaoException;
/**
* Retrieves a list of LogBean using the compare_face index.
*
* @param compareFace the compare_face column's value filter.
* @return a list of LogBean
* @throws RuntimeDaoException
*/
public java.util.List loadByIndexCompareFaceAsList(Integer compareFace)throws RuntimeDaoException;
/**
* Deletes rows using the compare_face index.
*
* @param compareFace the compare_face column's value filter.
* @return the number of deleted objects
* @throws RuntimeDaoException
*/
public int deleteByIndexCompareFace(Integer compareFace)throws RuntimeDaoException;
/**
* Retrieves an array of LogBean using the device_id index.
*
* @param deviceId the device_id column's value filter.
* @return an array of LogBean
* @throws RuntimeDaoException
*/
public LogBean[] loadByIndexDeviceId(Integer deviceId)throws RuntimeDaoException;
/**
* Retrieves a list of LogBean using the device_id index.
*
* @param deviceId the device_id column's value filter.
* @return a list of LogBean
* @throws RuntimeDaoException
*/
public java.util.List loadByIndexDeviceIdAsList(Integer deviceId)throws RuntimeDaoException;
/**
* Deletes rows using the device_id index.
*
* @param deviceId the device_id column's value filter.
* @return the number of deleted objects
* @throws RuntimeDaoException
*/
public int deleteByIndexDeviceId(Integer deviceId)throws RuntimeDaoException;
/**
* Retrieves an array of LogBean using the image_md5 index.
*
* @param imageMd5 the image_md5 column's value filter.
* @return an array of LogBean
* @throws RuntimeDaoException
*/
public LogBean[] loadByIndexImageMd5(String imageMd5)throws RuntimeDaoException;
/**
* Retrieves a list of LogBean using the image_md5 index.
*
* @param imageMd5 the image_md5 column's value filter.
* @return a list of LogBean
* @throws RuntimeDaoException
*/
public java.util.List loadByIndexImageMd5AsList(String imageMd5)throws RuntimeDaoException;
/**
* Deletes rows using the image_md5 index.
*
* @param imageMd5 the image_md5 column's value filter.
* @return the number of deleted objects
* @throws RuntimeDaoException
*/
public int deleteByIndexImageMd5(String imageMd5)throws RuntimeDaoException;
/**
* Retrieves an array of LogBean using the person_id index.
*
* @param personId the person_id column's value filter.
* @return an array of LogBean
* @throws RuntimeDaoException
*/
public LogBean[] loadByIndexPersonId(Integer personId)throws RuntimeDaoException;
/**
* Retrieves a list of LogBean using the person_id index.
*
* @param personId the person_id column's value filter.
* @return a list of LogBean
* @throws RuntimeDaoException
*/
public java.util.List loadByIndexPersonIdAsList(Integer personId)throws RuntimeDaoException;
/**
* Deletes rows using the person_id index.
*
* @param personId the person_id column's value filter.
* @return the number of deleted objects
* @throws RuntimeDaoException
*/
public int deleteByIndexPersonId(Integer personId)throws RuntimeDaoException;
/**
* Retrieves an array of LogBean using the verify_feature index.
*
* @param verifyFeature the verify_feature column's value filter.
* @return an array of LogBean
* @throws RuntimeDaoException
*/
public LogBean[] loadByIndexVerifyFeature(String verifyFeature)throws RuntimeDaoException;
/**
* Retrieves a list of LogBean using the verify_feature index.
*
* @param verifyFeature the verify_feature column's value filter.
* @return a list of LogBean
* @throws RuntimeDaoException
*/
public java.util.List loadByIndexVerifyFeatureAsList(String verifyFeature)throws RuntimeDaoException;
/**
* Deletes rows using the verify_feature index.
*
* @param verifyFeature the verify_feature column's value filter.
* @return the number of deleted objects
* @throws RuntimeDaoException
*/
public int deleteByIndexVerifyFeature(String verifyFeature)throws RuntimeDaoException;
//45
/**
* return a primary key list from {@link LogBean} array
* @param beans
* @return primary key list
*/
public java.util.List toPrimaryKeyList(LogBean... beans);
//46
/**
* return a primary key list from {@link LogBean} collection
* @param beans
* @return primary key list
*/
public java.util.List toPrimaryKeyList(java.util.Collection beans);
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy