System.out.println("Token SN " + htd.getTokenSN() + "copyof" + copyof);
    public Collection getHardTokens(Admin admin, String username){       debug("<getHardToken(username :" + username +")");       ArrayList returnval = new ArrayList();       HardTokenDataLocal htd = null;       try{         Collection result = hardtokendatahome.findByUsername(username);         Iterator i = result.iterator();         while(i.hasNext()){           htd = (HardTokenDataLocal) i.next();           // Find Copyof           String copyof = null;           try{           	copyof = hardtokenpropertyhome.findByProperty(htd.getTokenSN(), HardTokenPropertyEntityBean.PROPERTY_COPYOF).getValue();                    }catch(FinderException fe){}                             System.out.println("Token SN " + htd.getTokenSN() + "copyof" + copyof);                        ArrayList copies = null;           if(copyof == null){           	//  Find Copies           	           	 try{           		Collection copieslocal = hardtokenpropertyhome.findIdsByPropertyAndValue(HardTokenPropertyEntityBean.PROPERTY_COPYOF , htd.getTokenSN());                    		if(copieslocal.size() >0 ){           			copies = new ArrayList();           			Iterator iter = copieslocal.iterator();           			while(iter.hasNext()){           				copies.add(((BasePropertyDataLocal) iter.next()).getId());         	           			}           		}           	 }catch(FinderException fe){}           }                                         returnval.add(new HardTokenData(htd.getTokenSN(),htd.getUsername(), htd.getCreateTime(),htd.getModifyTime(),htd.getTokenType(),htd.getHardToken(),copyof, copies));           getLogSession().log(admin, htd.getSignificantIssuerDN().hashCode(), LogEntry.MODULE_HARDTOKEN, new java.util.Date(),htd.getUsername(), null, LogEntry.EVENT_INFO_HARDTOKENVIEWED,"Hard token with sn " + htd.getTokenSN() + " viewed.");         }       }catch(Exception e){}       debug("<getHardToken()");       return returnval;    } // getHardTokens