本文整理了Java中org.hibernate.engine.spi.SessionFactoryImplementor.getSqlFunctionRegistry()
方法的一些代码示例,展示了SessionFactoryImplementor.getSqlFunctionRegistry()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。SessionFactoryImplementor.getSqlFunctionRegistry()
方法的具体详情如下:
包路径:org.hibernate.engine.spi.SessionFactoryImplementor
类名称:SessionFactoryImplementor
方法名:getSqlFunctionRegistry
暂无
代码示例来源:origin: hibernate/hibernate-orm
@Override
public SQLFunctionRegistry getSqlFunctionRegistry() {
return delegate.getSqlFunctionRegistry();
}
代码示例来源:origin: hibernate/hibernate-orm
/**
* Locate a registered sql function by name.
*
* @param functionName The name of the function to locate
*
* @return The sql function, or null if not found.
*/
public SQLFunction findSQLFunction(String functionName) {
return sfi.getSqlFunctionRegistry().findSQLFunction( functionName );
}
代码示例来源:origin: hibernate/hibernate-orm
protected static String getTemplateFromString(String string, SessionFactoryImplementor factory) {
return string == null ?
null :
Template.renderWhereStringTemplate( string, factory.getDialect(), factory.getSqlFunctionRegistry() );
}
代码示例来源:origin: hibernate/hibernate-orm
private SQLFunction getFunction(String name, QueryTranslatorImpl q) {
return q.getFactory().getSqlFunctionRegistry().findSQLFunction( name );
}
代码示例来源:origin: hibernate/hibernate-orm
protected SQLFunction getFunction(CriteriaQuery criteriaQuery) {
final SQLFunctionRegistry sqlFunctionRegistry = criteriaQuery.getFactory().getSqlFunctionRegistry();
final SQLFunction function = sqlFunctionRegistry.findSQLFunction( "count" );
if ( function == null ) {
throw new HibernateException( "Unable to locate count function mapping" );
}
return function;
}
代码示例来源:origin: hibernate/hibernate-orm
protected SQLFunction getFunction(String functionName, CriteriaQuery criteriaQuery) {
final SQLFunction function = criteriaQuery.getFactory()
.getSqlFunctionRegistry()
.findSQLFunction( functionName );
if ( function == null ) {
throw new HibernateException( "Unable to locate mapping for function named [" + functionName + "]" );
}
return function;
}
代码示例来源:origin: hibernate/hibernate-orm
sessionFactory,
sessionFactory.getJdbcServices().getDialect(),
sessionFactory.getSqlFunctionRegistry()
);
代码示例来源:origin: hibernate/hibernate-orm
@Test
public void testNoArgFcnAndColumnSameNameAsNoArgFunctionHQL() {
SQLFunction function = sessionFactory().getSqlFunctionRegistry().findSQLFunction( "current_date" );
if ( function == null || function.hasParenthesesIfNoArguments() ) {
SkipLog.reportSkip( "current_date reuires ()", "tests noarg function that does not require ()" );
代码示例来源:origin: hibernate/hibernate-orm
rootTableKeyColumnReaderTemplates[i] = col.getTemplate(
dialect,
factory.getSqlFunctionRegistry()
);
identifierAliases[i] = col.getAlias( dialect, persistentClass.getRootTable() );
sqlWhereString,
dialect,
factory.getSqlFunctionRegistry()
);
foundFormula = true;
( (Formula) thing ).setFormula( substituteBrackets( ( (Formula) thing ).getFormula() ) );
formulaTemplates[k] = thing.getTemplate( dialect, factory.getSqlFunctionRegistry() );
colReaderTemplates[k] = col.getTemplate( dialect, factory.getSqlFunctionRegistry() );
colWriters[k] = col.getWriteExpr();
Selectable thing = (Selectable) colIter.next();
if ( thing.isFormula() ) {
String template = thing.getTemplate( dialect, factory.getSqlFunctionRegistry() );
formnos[l] = formulaTemplates.size();
colnos[l] = -1;
String readerTemplate = col.getTemplate( dialect, factory.getSqlFunctionRegistry() );
readerTemplates[l] = readerTemplate;
columnReaderTemplates.add( readerTemplate );
代码示例来源:origin: hibernate/hibernate-orm
FilterImpl.MARKER,
factory.getDialect(),
factory.getSqlFunctionRegistry()
代码示例来源:origin: hibernate/hibernate-orm
keyCols[k] = column.getQuotedName( factory.getDialect() );
keyColReaders[k] = column.getReadExpr( factory.getDialect() );
keyColReaderTemplates[k] = column.getTemplate( factory.getDialect(), factory.getSqlFunctionRegistry() );
keyCols[k] = column.getQuotedName( factory.getDialect() );
keyColReaders[k] = column.getReadExpr( factory.getDialect() );
keyColReaderTemplates[k] = column.getTemplate( factory.getDialect(), factory.getSqlFunctionRegistry() );
代码示例来源:origin: hibernate/hibernate-orm
@Test
public void testGetMultiColumnSameNameAsNoArgFunctionHQL() throws Exception {
SQLFunction function = sessionFactory().getSqlFunctionRegistry().findSQLFunction( "current_date" );
if ( function == null || function.hasParenthesesIfNoArguments() ) {
SkipLog.reportSkip( "current_date reuires ()", "tests noarg function that does not require ()" );
代码示例来源:origin: hibernate/hibernate-orm
discriminatorFormulaTemplate = formula.getTemplate(
factory.getDialect(),
factory.getSqlFunctionRegistry()
);
discriminatorColumnName = null;
discriminatorColumnReaderTemplate = column.getTemplate(
factory.getDialect(),
factory.getSqlFunctionRegistry()
);
discriminatorAlias = column.getAlias( factory.getDialect(), persistentClass.getRootTable() );
代码示例来源:origin: hibernate/hibernate-orm
@Test
public void testGetMultiColumnSameNameAsNoArgFunctionCriteria() {
SQLFunction function = sessionFactory().getSqlFunctionRegistry().findSQLFunction( "current_date" );
if ( function == null || function.hasParenthesesIfNoArguments() ) {
SkipLog.reportSkip( "current_date reuires ()", "tests noarg function that does not require ()" );
代码示例来源:origin: hibernate/hibernate-orm
hasWhere = sqlWhereString != null;
sqlWhereStringTemplate = hasWhere ?
Template.renderWhereStringTemplate( sqlWhereString, dialect, factory.getSqlFunctionRegistry() ) :
null;
if ( selectable.isFormula() ) {
Formula form = (Formula) selectable;
elementFormulaTemplates[j] = form.getTemplate( dialect, factory.getSqlFunctionRegistry() );
elementFormulas[j] = form.getFormula();
elementColumnWriters[j] = col.getWriteExpr();
elementColumnReaders[j] = col.getReadExpr( dialect );
elementColumnReaderTemplates[j] = col.getTemplate( dialect, factory.getSqlFunctionRegistry() );
elementColumnIsSettable[j] = true;
elementColumnIsInPrimaryKey[j] = !col.isNullable();
if ( s.isFormula() ) {
Formula indexForm = (Formula) s;
indexFormulaTemplates[i] = indexForm.getTemplate( dialect, factory.getSqlFunctionRegistry() );
indexFormulas[i] = indexForm.getFormula();
hasFormula = true;
factory,
dialect,
factory.getSqlFunctionRegistry()
);
manyToManyWhereTemplate = manyToManyWhereString == null ?
null :
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
/**
* Locate a registered sql function by name.
*
* @param functionName The name of the function to locate
* @return The sql function, or null if not found.
*/
public SQLFunction findSQLFunction(String functionName) {
return sfi.getSqlFunctionRegistry().findSQLFunction( functionName.toLowerCase() );
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
protected static String getTemplateFromString(String string, SessionFactoryImplementor factory) {
return string == null ?
null :
Template.renderWhereStringTemplate( string, factory.getDialect(), factory.getSqlFunctionRegistry() );
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate.core
protected SQLFunction getFunction(String functionName, CriteriaQuery criteriaQuery) {
SQLFunction function = criteriaQuery.getFactory()
.getSqlFunctionRegistry()
.findSQLFunction( functionName );
if ( function == null ) {
throw new HibernateException( "Unable to locate mapping for function named [" + functionName + "]" );
}
return function;
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
protected SQLFunction getFunction(CriteriaQuery criteriaQuery) {
SQLFunction function = criteriaQuery.getFactory()
.getSqlFunctionRegistry()
.findSQLFunction( "count" );
if ( function == null ) {
throw new HibernateException( "Unable to locate count function mapping" );
}
return function;
}
}
代码示例来源:origin: org.hibernate/com.springsource.org.hibernate
protected SQLFunction getFunction(String functionName, CriteriaQuery criteriaQuery) {
SQLFunction function = criteriaQuery.getFactory()
.getSqlFunctionRegistry()
.findSQLFunction( functionName );
if ( function == null ) {
throw new HibernateException( "Unable to locate mapping for function named [" + functionName + "]" );
}
return function;
}
内容来源于网络,如有侵权,请联系作者删除!