*
* @return {@link SQLQuery}
*/
protected SQLQuery createSQLQuery( String queryOrNamedSQLQuery, Object... values) {
Assert.hasText(queryOrNamedSQLQuery, "queryOrNamedSQLQuery不能为空");
SessionFactoryImpl factory = (SessionFactoryImpl) sessionFactory;
NamedSQLQueryDefinition nsqlqd = factory.getNamedSQLQuery( queryOrNamedSQLQuery );
Query query = null;
if (nsqlqd != null) {
query = getSession().getNamedQuery(queryOrNamedSQLQuery);
} else {