@Override public int determineTableNumberForColumn(String columnName) { // HHH-7630: In case the naturalOrder/identifier column is explicitly given in the ordering, check here. for ( int i = 0, max = naturalOrderTableKeyColumns.length; i < max; i++ ) { final String[] keyColumns = naturalOrderTableKeyColumns[i]; if ( ArrayHelper.contains( keyColumns, columnName ) ) { return naturalOrderPropertyTableNumbers[i]; } } final String[] subclassColumnNameClosure = getSubclassColumnClosure(); for ( int i = 0, max = subclassColumnNameClosure.length; i < max; i++ ) { final boolean quoted = subclassColumnNameClosure[i].startsWith( "\"" ) && subclassColumnNameClosure[i].endsWith( "\"" ); if ( quoted ) { if ( subclassColumnNameClosure[i].equals( columnName ) ) { return getSubclassColumnTableNumberClosure()[i]; } } else { if ( subclassColumnNameClosure[i].equalsIgnoreCase( columnName ) ) { return getSubclassColumnTableNumberClosure()[i]; } } } throw new HibernateException( "Could not locate table which owns column [" + columnName + "] referenced in order-by mapping" ); }
/** * Set the properties defined using the prefix {@link InfinispanRemoteProperties#HOT_ROD_CLIENT_PREFIX} * * @param configurationMap contains all the properties defined for OGM * @param propertyReader read the value of a property * @param hotRodConfiguration the Hot Rod configuration to update */ private void setAdditionalProperties(Map<?, ?> configurationMap, ConfigurationPropertyReader propertyReader, Properties hotRodConfiguration) { // Programmatic properties override the resource file for ( Entry<?, ?> property : configurationMap.entrySet() ) { String key = (String) property.getKey(); if ( key.startsWith( HOT_ROD_CLIENT_PREFIX ) ) { String hotRodProperty = key.substring( HOT_ROD_CLIENT_PREFIX.length() ); String value = propertyReader.property( key, String.class ).getValue(); if ( !ArrayHelper.contains( noPrefixProperties, hotRodProperty ) ) { hotRodProperty = HOT_ROD_ORIGINAL_PREFIX + hotRodProperty; } hotRodConfiguration.setProperty( hotRodProperty, value ); } } }