---
title: "hibernate 中 SQLFunctionTemplate 类的翻译"
author: "as619864232"
date: "2012-05-13T13:34:04Z"
tags: ["Hibernate", "SQLFunctionTemplate", "翻译"]
categories: ["行业应用"]
slug: "hibernate-sqlfunctiontemplate"
draft: false
lastmod: "2012-05-13T13:34:04Z"
id: 1526702
url: "https://ears.iteye.com/blog/1526702"
---

## org.hibernate.dialect.function Class SQLFunctionTemplate

```
java.lang.Object
  org.hibernate.dialect.function.SQLFunctionTemplate
```

**All Implemented Interfaces:**

[SQLFunction]()

* * *

```
public class SQLFunctionTemplate
```

extends [Object](http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html "class or interface in java.lang")

implements [SQLFunction]()

```

```

**Represents(**描述**)** HQL functions that can have different **representations(**描述**)** in different SQL dialects. E.g. in HQL we can define function `concat(?1, ?2)` to **concatenate(**连接**)** two strings p1 and p2. Target SQL function will be dialect-specific, e.g. `(?1 || ?2)` for Oracle, `concat(?1, ?2)` for MySql, `(?1 + ?2)` for MS SQL. Each dialect will define a template as a string (**exactly(**恰好**)** like above) marking function parameters with '?' followed by parameter's index (first index is 1).

 

 

**Version:**

`$Revision: 6608 $`

**Author:**

[Alexey Loubyansky](mailto:alex@jboss.org)