The first parameter of the Get method is the DTO for the table, the second parameter is the primary key, and if the primary key is a federated primary key, the second parameter is directly used by a DTO.
Publictbk2018dto Get (String Ordererid, String systemdivision) {//Eiken Cable condition ログ output if(log.isinfoenabled ()) {Log.info (Messageutil.getmessage () (Commonconstants.lgac0001_i,"Ordererid =" + Ordererid + ", systemdivision =" +systemdivision)); } tbk2018dto tbk2018dto=Newtbk2018dto (); Tbk2018dto.setordererid (Ordererid); Tbk2018dto.setsystemdivision (systemdivision); tbk2018dto dto = (tbk2018dto) gethibernatetemplate (). Get (tbk2018dto. Class , tbk2018dto); String Logcount= "0"; if(Dto! =NULL) {Logcount= "1"; } //Natsumi Sato number of rows ログ output if(log.isinfoenabled ()) {Log.info (Messageutil.getmessage (Commonconstants.lgac0002_i,logcount)); } returnDTOs; }
Get method for Gethibernatetemplate ()