resultClass.setValue(query.resultClass().getName()); namedQuery.addMemberValue("resultClass", resultClass);
.createNamedQueryDefinition(); else if ( !void.class.equals( queryAnn.resultClass() ) ) { new NativeSQLQueryRootReturn( "alias1", queryAnn.resultClass().getName(), new HashMap(), LockMode.READ ); builder.setQueryReturns( new NativeSQLQueryReturn[] {entityQueryReturn} );
); else if ( !void.class.equals( queryAnn.resultClass() ) ) { new NativeSQLQueryRootReturn( "alias1", queryAnn.resultClass().getName(), new HashMap(), LockMode.READ ); query = new NamedSQLQueryDefinition( queryName,
private NamedQueryInfo(NamedNativeQuery theQuery) { mName = theQuery.name(); mQuery = theQuery.query(); mResultMapping = theQuery.resultSetMapping(); mResultClass = theQuery.resultClass(); mHints = Arrays.asList(theQuery.hints()); }
/** * @param locator * the locator * @param annotation * the annotation * * @since 2.0.0 */ public NamedNativeQueryMetadataImpl(AbstractLocator locator, NamedNativeQuery annotation) { super(); this.locator = locator; this.name = annotation.name(); this.query = annotation.query(); this.resultClass = annotation.resultClass().getName(); this.resultSetMapping = annotation.resultSetMapping(); for (final QueryHint hint : annotation.hints()) { this.hints.put(hint.name(), hint.value()); } }
/** * @param locator * the locator * @param annotation * the annotation * * @since 2.0.0 */ public NamedNativeQueryMetadataImpl(AbstractLocator locator, NamedNativeQuery annotation) { super(); this.locator = locator; this.name = annotation.name(); this.query = annotation.query(); this.resultClass = annotation.resultClass().getName(); this.resultSetMapping = annotation.resultSetMapping(); for (final QueryHint hint : annotation.hints()) { this.hints.put(hint.name(), hint.value()); } }
/** * @param locator * the locator * @param annotation * the annotation * * @since 2.0.0 */ public NamedNativeQueryMetadataImpl(AbstractLocator locator, NamedNativeQuery annotation) { super(); this.locator = locator; this.name = annotation.name(); this.query = annotation.query(); this.resultClass = annotation.resultClass().getName(); this.resultSetMapping = annotation.resultSetMapping(); for (final QueryHint hint : annotation.hints()) { this.hints.put(hint.name(), hint.value()); } }
/** * INTERNAL: */ public MetadataNamedNativeQuery(NamedNativeQuery namedNativeQuery, Class javaClass) { // Set the location where we found this query. setLocation(javaClass.getName()); // Process the name setName(namedNativeQuery.name()); // Process the query string. setEJBQLString(namedNativeQuery.query()); // Process the query hints. for (QueryHint hint : namedNativeQuery.hints()) { addHint(new MetadataQueryHint(hint.name(), hint.value())); } // Process the result class. setResultClass(namedNativeQuery.resultClass()); // Process the result set mapping. setResultSetMapping(namedNativeQuery.resultSetMapping()); }
if (queries[j].resultClass() != null && queries[j].resultClass() != void.class) resultClassName = queries[j].resultClass().getName();
); else if ( ! void.class.equals( queryAnn.resultClass() ) ) { new NativeSQLQueryRootReturn( "alias1", queryAnn.resultClass().getName(), new HashMap(), LockMode.READ ); query = new NamedSQLQueryDefinition( queryName,
nativeQueryConfig.setResultClass(namedNativeQueryAnn.resultClass()); nativeQueryConfig.setResultSetMapping(namedNativeQueryAnn.resultSetMapping()); _persistenceUnit.addNamedNativeQuery(namedNativeQueryAnn.name(),
if (queries[j].resultClass() != null && queries[j].resultClass() != void.class) resultClassName = queries[j].resultClass().getName();
); else if ( !void.class.equals( queryAnn.resultClass() ) ) { new NativeSQLQueryRootReturn( "alias1", queryAnn.resultClass().getName(), new HashMap(), LockMode.READ ); query = new NamedSQLQueryDefinition( queryAnn.name(),
); else if ( !void.class.equals( queryAnn.resultClass() ) ) { new NativeSQLQueryRootReturn( "alias1", queryAnn.resultClass().getName(), new HashMap(), LockMode.READ ); query = new NamedSQLQueryDefinition( queryAnn.name(),
meta.setQueryString(query.query()); meta.setLanguage(QueryLanguages.LANG_SQL); Class res = query.resultClass(); if (ImplHelper.isManagedType(getConfiguration(), res)) meta.setCandidateType(res);
meta.setLanguage(QueryLanguages.LANG_SQL); meta.setQueryString(query.query()); Class<?> res = query.resultClass(); if (ImplHelper.isManagedType(getConfiguration(), res)) meta.setCandidateType(res);
meta.setLanguage(QueryLanguages.LANG_SQL); meta.setQueryString(query.query()); Class<?> res = query.resultClass(); if (ImplHelper.isManagedType(getConfiguration(), res)) meta.setCandidateType(res);
builder.setResultSetMapping( resultSetMappingName ); else if ( !void.class.equals( queryAnn.resultClass() ) ) { final ResultSetMappingDefinitionImpl inLineResultMapping = new ResultSetMappingDefinitionImpl( "inline-result-mapping:" + ++inlineResultMappingCount queryAnn.resultClass().getName(), "alias1" );
meta.setLanguage(QueryLanguages.LANG_SQL); meta.setQueryString(query.query()); Class<?> res = query.resultClass(); if (ImplHelper.isManagedType(getConfiguration(), res)) meta.setCandidateType(res);
meta.setLanguage(QueryLanguages.LANG_SQL); meta.setQueryString(query.query()); Class<?> res = query.resultClass(); if (ImplHelper.isManagedType(getConfiguration(), res)) meta.setCandidateType(res);