Java Code Examples for org.hibernate.internal.util.collections.ArrayHelper#toTypeArray()
The following examples show how to use
org.hibernate.internal.util.collections.ArrayHelper#toTypeArray() .
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: CustomLoader.java From lams with GNU General Public License v2.0 | 6 votes |
@Override protected void autoDiscoverTypes(ResultSet rs) { try { JdbcResultMetadata metadata = new JdbcResultMetadata( getFactory(), rs ); rowProcessor.prepareForAutoDiscovery( metadata ); List<String> aliases = new ArrayList<>(); List<Type> types = new ArrayList<>(); for ( ResultColumnProcessor resultProcessor : rowProcessor.getColumnProcessors() ) { resultProcessor.performDiscovery( metadata, types, aliases ); } validateAliases( aliases ); resultTypes = ArrayHelper.toTypeArray( types ); transformerAliases = ArrayHelper.toStringArray( aliases ); } catch (SQLException e) { throw new HibernateException( "Exception while trying to autodiscover types.", e ); } }
Example 2
Source File: CriteriaJoinWalker.java From lams with GNU General Public License v2.0 | 5 votes |
public CriteriaJoinWalker( final OuterJoinLoadable persister, final CriteriaQueryTranslator translator, final SessionFactoryImplementor factory, final CriteriaImpl criteria, final String rootEntityName, final LoadQueryInfluencers loadQueryInfluencers, final String alias) { super( persister, factory, loadQueryInfluencers, alias ); this.translator = translator; querySpaces = translator.getQuerySpaces(); if ( translator.hasProjection() ) { initProjection( translator.getSelect(), translator.getWhereCondition(), translator.getOrderBy(), translator.getGroupBy(), LockOptions.NONE ); resultTypes = translator.getProjectedTypes(); userAliases = translator.getProjectedAliases(); includeInResultRow = new boolean[resultTypes.length]; Arrays.fill( includeInResultRow, true ); } else { initAll( translator.getWhereCondition(), translator.getOrderBy(), LockOptions.NONE ); // root entity comes last userAliasList.add( criteria.getAlias() ); //root entity comes *last* resultTypeList.add( translator.getResultType( criteria ) ); includeInResultRowList.add( true ); userAliases = ArrayHelper.toStringArray( userAliasList ); resultTypes = ArrayHelper.toTypeArray( resultTypeList ); includeInResultRow = ArrayHelper.toBooleanArray( includeInResultRowList ); } }
Example 3
Source File: IntoClause.java From lams with GNU General Public License v2.0 | 5 votes |
private void initializeColumns() { AST propertySpec = getFirstChild(); List types = new ArrayList(); visitPropertySpecNodes( propertySpec.getFirstChild(), types ); this.types = ArrayHelper.toTypeArray( types ); columnSpec = columnSpec.substring( 0, columnSpec.length() - 2 ); }