code: private E getEntity(Object entity)
      {
          return (E) (entity.getClass().isAssignableFrom(EnhanceEntity.class) ? ((EnhanceEntity) entity).getEntity()
                  : entity);
      }
docs: Extract wrapped entity object from enhanced entity.
  
  @param entity
  enhanced entity.
  
  @return returns extracted instance of E.