-1
SELECT T1.ORGANIZATIONID, T1.CODE, T1.RFQCATEGORYID, T1.OWNERID,
T1.PARTCOUNT, T1.DESCRIPTION,T1.STATUSCODE, T1."COMMENT", T1.CREATEID,
T1.CREATEDATE, T1.UPDATEID, T1.UPDATEDATE, T2.CODE, T2.DESCRIPTION,
T3.ORGANIZATIONNAME, T3.ORGANIZATIONURL, T4.SALUTATION, T4.FIRSTNAME,
T4.LASTNAME, T4.EMAIL,T4.FINANCIAL_LIMIT, T5.ORGANIZATIONNAME
USR_ORGNAME,T5.ORGANIZATIONURL USR_ORGURL, T6.STARTDATE, T6.ENDDATE,
T6.OPENDATE, T6.RFQID, T6.PARTNUMBER,
T7.RFQTYPEID,T1.CURRENCYID,T1.MINQUOTECOUNT,T1.ISMATCHING,T1.ISMULTICURR,
T1.ESTIMATEDVALUE,T1.RAENABLED,T1.PAYMENTENABLED,T1.ISPRICEACPTINRA,
T8.DESCRIPTION AS RFQTYPEDESC , T1.FOREIGNCURRONLY , T1.DELEGATE ,
T1.LOCATIONID ,T6.INITIATERAID ,T10.AUTHENTICATIONCODE
,T6.DOCUMENTSALEENDDATE,T1.OWNER_DIGITAL_CERT_ID , T1.ANNUALVALUE ,
CASE WHEN (SELECT COUNT(1) FROM EPS.ORGLOCATION WHERE LOCATION_ID =
T1.LOCATIONID AND ORGID = T1.ORGANIZATIONID) >0 THEN (SELECT
DESCRIPTION FROM EPS.ORGLOCATION WHERE LOCATION_ID = T1.LOCATIONID AND
ORGID = T1.ORGANIZATIONID) ELSE '' END AS LOCATIONDESC,
T1.MATIHINGVALUE,T1.SKIPQUOTE,T1.WCENABLED,T1.LOADTYPE,T6.DISALLOWBIDREV,T6.UPDATEDATE
AS RFQDATE_UPDATEDATE,T1.SIGNED,T1.ENCRYPTED,T1.OLDCODE
,T1.IMPACTBIDFLAG,T1.LOADING_EVALUATED,T1.ENCKEYENABLED,T1.VALUEFLAG,od.code
as designation, (SELECT MIN(UPDATEDATE) FROM EPS.HRFQ WHERE RFQID =
T1.RFQ_ID AND STATUSCODE= 'A') PUBLISH_DATE,LCNCMATCHING, T1.BOQ,
B.DESCRIPTION AS BOQDESC, T6.PHYSICALDOCSUBENDDATE, T1.AUCTIONSTYLE,
T1.AUCTIONTYPE, T1.AUCTIONSTATUS, T1.AUCTIONFILENAME,
T1.AUCTIONCOMMENT,T1.ITEMSUBMITBY, T1.AUCTIONWINNER FROM EPS.RFQ T1
LEFT JOIN EPS.BOQ B ON T1.BOQ=B.BOQ_ID left outer join (select * from
EPS.RFQDATE where partnumber=?) T6 on t6.RFQID=t1.RFQ_ID left outer
join EPS.RFQRFQTYPE T7 on t7.RFQID=t1.RFQ_ID,EPS.RFQCAT T2,
EPS.ORGANIZATION T3,EPS."USER" T4 left outer join eps.orgdesignation
od on od.designation_id=t4.designationid, EPS.ORGANIZATION T5,
EPS.AUTHENTICATION T10, EPS.RFQTYPE T8 WHERE T1.RFQCATEGORYID =
T2.RFQCAT_ID AND T1.ORGANIZATIONID = T3.ORGANIZATION_ID AND T1.OWNERID
= T4.USER_ID AND T4.ORGANIZATIONID = T5.ORGANIZATION_ID AND T10.USERID = T4.USER_ID AND T4.ORGANIZATIONID = T10.ORGANIZATIONID AND T1.RFQ_ID = ? AND T8.RFQTYPE_ID = T7.RFQTYPEID
我想將它轉換成hibernate。我怎樣才能做到這一點?如何使用Hibernate將此原生SQL轉換爲HQL/JPQL或Criteria查詢?