Java Code Examples for org.hibernate.internal.util.StringHelper#repeat()
The following examples show how to use
org.hibernate.internal.util.StringHelper#repeat() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ReactiveDynamicBatchingEntityLoader.java From hibernate-reactive with GNU Lesser General Public License v2.1 | 5 votes |
static String expandBatchIdPlaceholder( String sql, Serializable[] ids, String alias, String[] keyColumnNames, Dialect dialect) { if ( keyColumnNames.length == 1 ) { // non-composite return StringHelper.replace( sql, StringHelper.BATCH_ID_PLACEHOLDER, StringHelper.repeat( "?", ids.length, "," ) ); } else { // composite if ( dialect.supportsRowValueConstructorSyntaxInInList() ) { final String tuple = '(' + StringHelper.repeat( "?", keyColumnNames.length, "," ) + ')'; return StringHelper.replace( sql, StringHelper.BATCH_ID_PLACEHOLDER, StringHelper.repeat( tuple, ids.length, "," ) ); } else { final String keyCheck = '(' + StringHelper.joinWithQualifierAndSuffix( keyColumnNames, alias, " = ?", " and " ) + ')'; return StringHelper.replace( sql, StringHelper.BATCH_ID_PLACEHOLDER, StringHelper.repeat( keyCheck, ids.length, " or " ) ); } } }
Example 2
Source File: OrderByFragmentRenderer.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public void traceIn(String ruleName, AST tree) { if ( inputState.guessing > 0 ) { return; } String prefix = StringHelper.repeat( '-', ( traceDepth++ * 2 ) ) + "-> "; String traceText = ruleName + " (" + buildTraceNodeName( tree ) + ")"; LOG.trace( prefix + traceText ); }
Example 3
Source File: OrderByFragmentRenderer.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public void traceOut(String ruleName, AST tree) { if ( inputState.guessing > 0 ) { return; } String prefix = "<-" + StringHelper.repeat( '-', ( --traceDepth * 2 ) ) + " "; LOG.trace( prefix + ruleName ); }
Example 4
Source File: OrderByFragmentParser.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public void traceIn(String ruleName) { if ( inputState.guessing > 0 ) { return; } String prefix = StringHelper.repeat( '-', ( traceDepth++ * 2 ) ) + "-> "; LOG.trace( prefix + ruleName ); }
Example 5
Source File: OrderByFragmentParser.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public void traceOut(String ruleName) { if ( inputState.guessing > 0 ) { return; } String prefix = "<-" + StringHelper.repeat( '-', ( --traceDepth * 2 ) ) + " "; LOG.trace( prefix + ruleName ); }
Example 6
Source File: SqlGenerator.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public void traceIn(String ruleName, AST tree) { if ( !LOG.isTraceEnabled() ) { return; } if ( inputState.guessing > 0 ) { return; } String prefix = StringHelper.repeat( '-', ( traceDepth++ * 2 ) ) + "-> "; String traceText = ruleName + " (" + buildTraceNodeName( tree ) + ")"; LOG.trace( prefix + traceText ); }
Example 7
Source File: SqlGenerator.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public void traceOut(String ruleName, AST tree) { if ( !LOG.isTraceEnabled() ) { return; } if ( inputState.guessing > 0 ) { return; } String prefix = "<-" + StringHelper.repeat( '-', ( --traceDepth * 2 ) ) + " "; LOG.trace( prefix + ruleName ); }
Example 8
Source File: HqlSqlWalker.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public void traceIn(String ruleName, AST tree) { if ( !LOG.isTraceEnabled() ) { return; } if ( inputState.guessing > 0 ) { return; } String prefix = StringHelper.repeat( '-', ( traceDepth++ * 2 ) ) + "-> "; String traceText = ruleName + " (" + buildTraceNodeName( tree ) + ")"; LOG.trace( prefix + traceText ); }
Example 9
Source File: HqlSqlWalker.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public void traceOut(String ruleName, AST tree) { if ( !LOG.isTraceEnabled() ) { return; } if ( inputState.guessing > 0 ) { return; } String prefix = "<-" + StringHelper.repeat( '-', ( --traceDepth * 2 ) ) + " "; LOG.trace( prefix + ruleName ); }
Example 10
Source File: HqlParser.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public void traceIn(String ruleName) { if ( !LOG.isTraceEnabled() ) { return; } if ( inputState.guessing > 0 ) { return; } String prefix = StringHelper.repeat( '-', ( traceDepth++ * 2 ) ) + "-> "; LOG.trace( prefix + ruleName ); }
Example 11
Source File: HqlParser.java From lams with GNU General Public License v2.0 | 5 votes |
@Override public void traceOut(String ruleName) { if ( !LOG.isTraceEnabled() ) { return; } if ( inputState.guessing > 0 ) { return; } String prefix = "<-" + StringHelper.repeat( '-', ( --traceDepth * 2 ) ) + " "; LOG.trace( prefix + ruleName ); }
Example 12
Source File: TreePrinterHelper.java From lams with GNU General Public License v2.0 | 2 votes |
/** * Returns a string containing the specified number of indentations, where * each indentation contains {@link #INDENTATION} blank characters. * * * @param nIndentations the number of indentations in the returned String. * @return the String containing the specified number of indentations. */ public String generateNodePrefix(int nIndentations) { return StringHelper.repeat( ' ', nIndentations * INDENTATION ) + " - "; }