1 package org.neo4j.driver.projection; 2 3 import org.neo4j.driver.v1.Record; 4 5 /** 6 * Projection for simple type and on single column result. 7 */ 8 public class ProjectionClassSingle<T> extends Projection<T> { 9 10 /** 11 * Constructor. 12 */ 13 public ProjectionClassSingle(Class type) { 14 super(type); 15 } 16 17 @Override public T apply(Record record) { 18 checkIfRecordHaveSingleValue(record); 19 return (T) ConversionHelper.convertDriverValueTo(type, record.get(0)); 20 } 21 22 }