public static <T> String join(T[] values, Renderer<T> renderer) { return join( Arrays.asList( values ), renderer ); }
@Override public String toString() { return '(' + StringHelper.join( ' ' + nature.getOperator() + ' ', conditions.iterator() ) + ')'; }
/** * Get the descriptor for an ordinal parameter given its position * * @param position The position (0 based) * * @return The ordinal parameter descriptor * * @throws QueryParameterException If the position is out of range */ public OrdinalParameterDescriptor getOrdinalParameterDescriptor(int position) { final OrdinalParameterDescriptor descriptor = ordinalDescriptorMap.get( position ); if ( descriptor == null ) { throw new IllegalArgumentException( String.format( Locale.ROOT, "Could not locate ordinal parameter [%s], expecting one of [%s]", position, StringHelper.join( ", ", ordinalDescriptorMap.keySet().iterator()) ) ); } return descriptor; }
@Override public String convertToDatabaseColumn(List<Integer> attribute) { if ( attribute == null || attribute.isEmpty() ) { return null; } else { return StringHelper.join( ", ", attribute.iterator() ); } }
lastPosition, sortedPosition, StringHelper.join( ",", sortedPositions.iterator() )
xProperty.getDeclaringClass().getName(), xProperty.getName(), StringHelper.join( matches, RENDERER )
public String toSubselectString(String ukname) { String[] joinColumns = ukname==null ? StringHelper.qualify( alias, loadable.getIdentifierColumnNames() ) : ( (PropertyMapping) loadable ).toColumns(alias, ukname); return new StringBuffer() .append("select ") .append( StringHelper.join(", ", joinColumns) ) .append(queryString) .toString(); }
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { String[] columns = criteriaQuery.findColumns(propertyName, criteria); String result = StringHelper.join( " and ", StringHelper.suffix( columns, " is null" ) ); if (columns.length>1) result = '(' + result + ')'; return result; //TODO: get SQL rendering out of this package! }
public String toGroupSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { if (!grouped) { return super.toGroupSqlString(criteria, criteriaQuery); } else { return StringHelper.join( ", ", criteriaQuery.getColumns( propertyName, criteria ) ); } }
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { String[] columns = criteriaQuery.findColumns(propertyName, criteria); String result = StringHelper.join( " and ", StringHelper.suffix( columns, " is null" ) ); if (columns.length>1) result = '(' + result + ')'; return result; //TODO: get SQL rendering out of this package! }
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { String[] columns = criteriaQuery.getIdentifierColumns(criteria); String result = StringHelper.join( " and ", StringHelper.suffix( columns, " = ?" ) ); if (columns.length>1) result = '(' + result + ')'; return result; //TODO: get SQL rendering out of this package! }
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { String[] columns = criteriaQuery.getIdentifierColumns(criteria); String result = StringHelper.join( " and ", StringHelper.suffix( columns, " = ?" ) ); if (columns.length>1) result = '(' + result + ')'; return result; //TODO: get SQL rendering out of this package! }
public String toGroupSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { if (!grouped) { return super.toGroupSqlString(criteria, criteriaQuery); } else { return StringHelper.join( ", ", criteriaQuery.getColumns( propertyName, criteria ) ); } }
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { return StringHelper.join( " and ", StringHelper.suffix( criteriaQuery.findColumns(propertyName, criteria), " between ? and ?" ) ); //TODO: get SQL rendering out of this package! }
protected String createWhereByKey(int tableNumber, String alias) { //TODO: move to .sql package, and refactor with similar things! return StringHelper.join( "=? and ", StringHelper.qualify( alias, getSubclassTableKeyColumns( tableNumber ) ) ) + "=?"; }
protected String createWhereByKey(int tableNumber, String alias) { //TODO: move to .sql package, and refactor with similar things! return StringHelper.join( "=? and ", StringHelper.qualify( alias, getSubclassTableKeyColumns( tableNumber ) ) ) + "=?"; }
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { return StringHelper.join( " and ", StringHelper.suffix( criteriaQuery.findColumns(propertyName, criteria), " between ? and ?" ) ); //TODO: get SQL rendering out of this package! }
public String toGroupSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { if (!grouped) { return super.toGroupSqlString(criteria, criteriaQuery); } else { return StringHelper.join( ", ", criteriaQuery.getIdentifierColumns(criteria) ); } }
private void initText(String[] columns) { String text = StringHelper.join( ", ", columns ); if ( columns.length > 1 && getWalker().isComparativeExpressionClause() ) { text = "(" + text + ")"; } setText( text ); }
public String toSqlString(Criteria criteria, CriteriaQuery criteriaQuery) throws HibernateException { String[] xcols = criteriaQuery.findColumns(propertyName, criteria); String[] ycols = criteriaQuery.findColumns(otherPropertyName, criteria); String result = StringHelper.join( " and ", StringHelper.add( xcols, getOp(), ycols ) ); if (xcols.length>1) result = '(' + result + ')'; return result; //TODO: get SQL rendering out of this package! }