@ Override public < T > T find ( Class < T > clazz , Object id ) { 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 ( ) ) ; } return objMapper . getObject ( keyspace , cfMapDef . getEffectiveColFamName ( ) , id ) ; }
Load an entity instance . If the ID does not map to a persisted entity then null is returned .