Integer numberCachedObjects = new Integer(0);  if (_odmg != null) { HasBroker hasBroker = ((HasBroker) _odmg.currentTransaction()); if (hasBroker != null) {              numberCachedObjects = new Integer(-1); } }  return numberCachedObjects;
return new Integer(ObjectCacheOSCacheImpl.getNumberOfCachedItems());
    public Integer getNumberCachedItems()    {//        TODO: fix this method so it returns the amount of objects cached        Integer numberCachedObjects = new Integer(0);        if (_odmg != null)        {            HasBroker hasBroker = ((HasBroker) _odmg.currentTransaction());            if (hasBroker != null)            {                //PersistenceBroker broker = hasBroker.getBroker();//                System.out.println("###########################################33");//                System.out.println(//                    "broker.serviceObjectCache().class= " + broker.serviceObjectCache().getClass());                //CacheFilterRegistry cacheFilter = (CacheFilterRegistry) broker.serviceObjectCache();//                System.out.println("###########################################33");//                System.out.println(//                    "broker.serviceObjectCache().class= "//                        + cacheFilter.getCache(null, null, CacheFilterRegistry.METHOD_LOOKUP));                numberCachedObjects = new Integer(-1);            }        }        return numberCachedObjects;    }