T constructEntity ( K id , com . netflix . astyanax . model . Column < ByteBuffer > column ) { try { // First, construct the parent class and give it an id T entity = clazz . newInstance ( ) ; idMapper . setValue ( entity , id ) ; setEntityFieldsFromColumnName ( entity , column . getRawName ( ) . duplicate ( ) ) ; valueMapper . setField ( entity , column . getByteBufferValue ( ) . duplicate ( ) ) ; return entity ; } catch ( Exception e ) { throw new PersistenceException ( "failed to construct entity" , e ) ; } }
Construct an entity object from a row key and column list .