2010-03-22 7 views

답변

0

최대 절전 모드 ClassMetadata를 통해 가능합니다. 보호 방법에 액세스하려면 다음 링크에서

Session session = (Session) entityManager.getDelegate(); 
SessionFactoryImplementor sessionFactory = (SessionFactoryImplementor) session.getSessionFactory(); 
ClassMetadata hibernateMetadata = sessionFactory.getClassMetadata(pEntityClass.getName()); 
if (hibernateMetadata instanceof AbstractEntityPersister) { 
    /*...look at protected methods that return SQL Strings for the entity getSQLIdentityInsertString,getSQLLazySelectString,getSQLSnapshotSelectString,getSQLUpdateByRowIdStrings,getSQLLazyUpdateByRowIdStrings,getSQLDeleteStrings,getSQLInsertStrings,getSQLUpdateStrings,getSQLLazyUpdateStrings */ 
} 

봐 : http://tutorials.jenkov.com/java-reflection/private-fields-and-methods.html