public static void update(Printer named) { remove(named.getName()); try { add(named); } catch (Exception a) { } }
public static Collection getPrinterNames() { Collection names = new Vector(); Collection c = findAll(); if (null == c) return names; Iterator i = c.iterator(); String name; Printer p; while (i.hasNext()) { p = (Printer) i.next(); name = p.getName(); names.add(name); } return names; }
public static void remove(Printer named) { remove(named.getName()); }