本文整理汇总了Java中org.hibernate.engine.jdbc.internal.BasicFormatterImpl类的典型用法代码示例。如果您正苦于以下问题:Java BasicFormatterImpl类的具体用法?Java BasicFormatterImpl怎么用?Java BasicFormatterImpl使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BasicFormatterImpl类属于org.hibernate.engine.jdbc.internal包,在下文中一共展示了BasicFormatterImpl类的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: formatCodeIfNeeded
import org.hibernate.engine.jdbc.internal.BasicFormatterImpl; //导入依赖的package包/类
private void formatCodeIfNeeded() {
String nonFormattedSqlCode;
if (getSelectedQuery() != null) {
nonFormattedSqlCode = getSelectedQuery().getSqlTranslation();
if (formattedSqlCodeCheck.isSelected()) {
if (nonFormattedSqlCode.length() > 0) {
// Format SQL Code
sqlCodeEditor.setText(new BasicFormatterImpl().format(nonFormattedSqlCode));
}
}
else {
sqlCodeEditor.setText(nonFormattedSqlCode);
}
}
}
示例2: toString
import org.hibernate.engine.jdbc.internal.BasicFormatterImpl; //导入依赖的package包/类
@Override
public String toString() {
final String format = sql.replaceAll("\\?", "%s");
final Object[] parametersConverted = parameters.stream().map(p -> p instanceof String ? "'" + p + "'" : p).collect(Collectors.toList()).toArray();
return new BasicFormatterImpl().format(String.format(format, parametersConverted));
}
示例3: getSqlFormatter
import org.hibernate.engine.jdbc.internal.BasicFormatterImpl; //导入依赖的package包/类
public BasicFormatterImpl getSqlFormatter() {
return sqlFormatter;
}
示例4: setSqlFormatter
import org.hibernate.engine.jdbc.internal.BasicFormatterImpl; //导入依赖的package包/类
public void setSqlFormatter(BasicFormatterImpl sqlFormatter) {
this.sqlFormatter = sqlFormatter;
}
示例5: format
import org.hibernate.engine.jdbc.internal.BasicFormatterImpl; //导入依赖的package包/类
public void format() throws IOException {
String original = readSql();
String formatted = new BasicFormatterImpl().format(original);
writer.write(formatted);
writer.flush();
}
示例6: getPrettySQL
import org.hibernate.engine.jdbc.internal.BasicFormatterImpl; //导入依赖的package包/类
public String getPrettySQL() {
String formattedSQL = new BasicFormatterImpl().format(query.query);
return formattedSQL;
}