public < T > T find ( Class < T > clazz , Object id , ColumnSlice < String , byte [ ] > colSlice ) { if ( null == clazz ) { throw new IllegalArgumentException ( "clazz cannot be null" ) ; } if ( null == id ) { throw new IllegalArgumentException ( "id cannot be null" ) ; } CFMappingDef < T > cfMapDef = cacheMgr . getCfMapDef ( clazz , false ) ; if ( null == cfMapDef ) { throw new HectorObjectMapperException ( "No class annotated with @" + Entity . class . getSimpleName ( ) + " for type, " + clazz . getName ( ) ) ; } T obj = objMapper . createObject ( cfMapDef , id , colSlice ) ; return obj ; }
Load an entity instance given the raw column slice . This is a stop gap solution for instanting objects using entity manager while iterating over rows .