Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 /*
  * Hibernate OGM, Domain model persistence for NoSQL datastores
  *
  * License: GNU Lesser General Public License (LGPL), version 2.1 or later
  * See the lgpl.txt file in the root directory or <http://www.gnu.org/licenses/lgpl-2.1.html>.
  */
 package org.hibernate.ogm.dialect.query.spi;
 
Base class for ParameterMetadataBuilders based on ORM's org.hibernate.engine.query.spi.ParamLocationRecognizer SPI.

Author(s):
Gunnar Morling
		parseQueryParametersnativeQueryrecognizer );
		final int size = recognizer.getOrdinalParameterLocationList().size();
		final OrdinalParameterDescriptor[] ordinalDescriptors = new OrdinalParameterDescriptorsize ];
		for ( int i = 0; i < sizei++ ) {
			final Integer position = recognizer.getOrdinalParameterLocationList().geti );
			ordinalDescriptors[i] = new OrdinalParameterDescriptorinullposition );
		}
		final Map<StringNamedParameterDescriptornamedParamDescriptorMap = new HashMap<StringNamedParameterDescriptor>();
		for ( final String name : map.keySet() ) {
			final ParamLocationRecognizer.NamedParameterDescription description = map.getname );
			namedParamDescriptorMap.put(
					name,
							name,
							null,
							description.buildPositionsArray(),
							description.isJpaStyle()
					)
			);
		}
		return new ParameterMetadataordinalDescriptorsnamedParamDescriptorMap );
	}

Parses the given native NoSQL query string, collecting the contained named parameters in the course of doing so.

Parameters:
noSqlQuery the query to parse
recognizer collects any named parameters contained in the given query
	protected abstract void parseQueryParameters(String noSqlQueryRecognizer recognizer);
New to GrepCode? Check out our FAQ X