@Transactional(readOnly=true) public BagCount[] checkFilteredBagCounts(String filterText){
  TypedQuery<BagCount> query=myEM.createNamedQuery("Bag.countBagPaths",BagCount.class);
  query.setParameter("text",filterText);
  List<BagCount> results=query.getResultList();
  return results.toArray(new BagCount[results.size()]);
}

@ Transactional ( readOnly = true ) public BagCount [ ] checkFilteredBagCounts ( String filterText ) { TypedQuery < BagCount > query = myEM . createNamedQuery ( "Bag.countBagPaths" , BagCount . class ) ; query . setParameter ( "text" , filterText ) ; List < BagCount > results = query . getResultList ( ) ; return results . toArray ( new BagCount [ results . size ( ) ] ) ; }
examines all of the paths on the filesystem known to the bag database and returns a recursive count of how many bags there are under that path that match the given filter text . if the filter text is empty , all bags will match .
