public static List<Rol> getByExample(Rol example) { List<Rol> res = new ArrayList<Rol>(); try { if (example != null && example.getNombre() != null) res = rolHome.findByName(LogicConstants.getGenericString(example.getNombre())); else res = rolHome.getAll(); } catch (Throwable t1) { log.error(t1, t1); } return res; }
public static Rol findByName(String string) { Rol rol = null; try { rol = rolHome.find(string); } catch (Throwable t) { log.error(t, t); } return rol; }
public static List<String> getAllNames() { List<String> res = new ArrayList<String>(); try { res.addAll(rolHome.getAllString()); } catch (Throwable t1) { log.error(t1, t1); } return res; }
public static Calendar lastUpdated() { return rolHome.lastUpdated(); }
public static Boolean alreadyExists(String nombre) { return rolHome.alreadyExists(nombre); }
public static Flota[] getAsigned(Rol r) { return rolHome.getAsigned(r).toArray(new Flota[0]); }
public static Flota[] getDisponibles(Rol r) { return rolHome.getDisponibles(r).toArray(new Flota[0]); }
public static Integer getTotal() { return rolHome.getTotal(); }