code: public <T, K> DAO<T, K> getDAO(
                      final Class<T> entityClass
                      )
      {
          if (entityClass == null) {
              throw new ObjectTypeException( "entity type NOT specified (null)" );
          }
  
          DAO<T, K>  dao = null;
          try {
              @SuppressWarnings( "unchecked" )
              DAO<T, K>  dao_tmp = (DAO<T, K>)_daoMap.get( entityClass );
                                   //throws ClassCastException
              dao = dao_tmp;
          } catch (Exception ex) {
              throw new RepositoryConfigurationException( ex );
          }
  
          if (dao == null) {
              throw new RepositoryConfigurationException( "unknown entity type: " + entityClass );
          }
  
          return dao;
      }
docs: **********************************************************************