All Downloads are FREE. Search and download functionalities are using the official Maven repository.

net.gdface.facelog.db.IPermitManager Maven / Gradle / Ivy

There is a newer version: 5.3.0
Show newest version
// ______________________________________________________
// 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_permit table.
* Remarks: 通行权限关联表 * @author guyadong */ public interface IPermitManager extends TableManager { ////////////////////////////////////// // PRIMARY KEY METHODS ////////////////////////////////////// //1 /** * Loads a {@link PermitBean} from the fl_permit using primary key fields. * * @param deviceGroupId Integer - PK# 1 * @param personGroupId Integer - PK# 2 * @return a unique PermitBean or {@code null} if not found * @throws RuntimeDaoException */ public PermitBean loadByPrimaryKey(Integer deviceGroupId,Integer personGroupId)throws RuntimeDaoException; //1.1 /** * Loads a {@link PermitBean} from the fl_permit using primary key fields. * * @param deviceGroupId Integer - PK# 1 * @param personGroupId Integer - PK# 2 * @return a unique PermitBean * @throws ObjectRetrievalException if not found * @throws RuntimeDaoException */ public PermitBean loadByPrimaryKeyChecked(Integer deviceGroupId,Integer personGroupId) throws RuntimeDaoException,ObjectRetrievalException; //1.4 /** * check if contains row with primary key fields. * @param deviceGroupId Integer - PK# 1 * @param personGroupId Integer - PK# 2 * @return true if this fl_permit contains row with primary key fields. * @throws RuntimeDaoException */ public boolean existsPrimaryKey(Integer deviceGroupId,Integer personGroupId)throws RuntimeDaoException; //2 /** * Delete row according to its primary keys.
* all keys must not be null * * @param deviceGroupId Integer - PK# 1 * @param personGroupId Integer - PK# 2 * @return the number of deleted rows * @throws RuntimeDaoException */ public int deleteByPrimaryKey(Integer deviceGroupId,Integer personGroupId)throws RuntimeDaoException; //3.5 SYNC SAVE /** * Save the PermitBean bean and referenced beans and imported beans into the database. * * @param bean the {@link PermitBean} bean to be saved * @param refDevicegroupByDeviceGroupId the {@link DeviceGroupBean} bean referenced by {@link PermitBean} * @param refPersongroupByPersonGroupId the {@link PersonGroupBean} bean referenced by {@link PermitBean} * @return the inserted or updated {@link PermitBean} bean * @throws RuntimeDaoException */ public PermitBean save(PermitBean bean , DeviceGroupBean refDevicegroupByDeviceGroupId , PersonGroupBean refPersongroupByPersonGroupId )throws RuntimeDaoException; //3.6 SYNC SAVE AS TRANSACTION /** * Transaction version for sync save
* see also {@link #save(PermitBean , DeviceGroupBean , PersonGroupBean )} * @param bean the {@link PermitBean} bean to be saved * @param refDevicegroupByDeviceGroupId the {@link DeviceGroupBean} bean referenced by {@link PermitBean} * @param refPersongroupByPersonGroupId the {@link PersonGroupBean} bean referenced by {@link PermitBean} * @return the inserted or updated {@link PermitBean} bean * @throws RuntimeDaoException */ public PermitBean saveAsTransaction(final PermitBean bean ,final DeviceGroupBean refDevicegroupByDeviceGroupId ,final PersonGroupBean refPersongroupByPersonGroupId )throws RuntimeDaoException; ////////////////////////////////////// // GET/SET FOREIGN KEY BEAN METHOD ////////////////////////////////////// //5.1 GET REFERENCED VALUE /** * Retrieves the {@link DeviceGroupBean} object referenced by {@link PermitBean#getDeviceGroupId}() field.
* FK_NAME : fl_permit_ibfk_1 * @param bean the {@link PermitBean} * @return the associated {@link DeviceGroupBean} bean or {@code null} if {@code bean} is {@code null} * @throws RuntimeDaoException */ public DeviceGroupBean getReferencedByDeviceGroupId(PermitBean bean)throws RuntimeDaoException; //5.2 SET REFERENCED /** * Associates the {@link PermitBean} object to the {@link DeviceGroupBean} object by {@link PermitBean#getDeviceGroupId}() field. * * @param bean the {@link PermitBean} object to use * @param beanToSet the {@link DeviceGroupBean} object to associate to the {@link PermitBean} * @return always beanToSet saved * @throws RuntimeDaoException */ public DeviceGroupBean setReferencedByDeviceGroupId(PermitBean bean, DeviceGroupBean beanToSet)throws RuntimeDaoException; //5.1 GET REFERENCED VALUE /** * Retrieves the {@link PersonGroupBean} object referenced by {@link PermitBean#getPersonGroupId}() field.
* FK_NAME : fl_permit_ibfk_2 * @param bean the {@link PermitBean} * @return the associated {@link PersonGroupBean} bean or {@code null} if {@code bean} is {@code null} * @throws RuntimeDaoException */ public PersonGroupBean getReferencedByPersonGroupId(PermitBean bean)throws RuntimeDaoException; //5.2 SET REFERENCED /** * Associates the {@link PermitBean} object to the {@link PersonGroupBean} object by {@link PermitBean#getPersonGroupId}() field. * * @param bean the {@link PermitBean} object to use * @param beanToSet the {@link PersonGroupBean} object to associate to the {@link PermitBean} * @return always beanToSet saved * @throws RuntimeDaoException */ public PersonGroupBean setReferencedByPersonGroupId(PermitBean bean, PersonGroupBean beanToSet)throws RuntimeDaoException; }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy