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.type.descriptor.impl;
 
Map field to string value and persist it to the grid

Author(s):
Nicolas Helleringer
	public <X> GridValueBinder<X> getBinder(final JavaTypeDescriptor<X> javaTypeDescriptor) {
		return new BasicGridBinder<X>(javaTypeDescriptorthis) {
			protected void doBind(Tuple resultset, X valueString[] namesWrapperOptions options) {
				resultset.putnames[0], javaTypeDescriptor.toStringvalue) );
			}
		};
	}
	public <X> GridValueExtractor<X> getExtractor(JavaTypeDescriptor<X> javaTypeDescriptor) {
		return new StringMappedGridExtractor<X>( javaTypeDescriptorthis );
	}
New to GrepCode? Check out our FAQ X