@Override
	public Object getAsObject(FacesContext context, UIComponent component, String value) {
		Object ret = null; 
		if (component instanceof PickList) {
			Object dualList = ((PickList) component).getValue();
			
			@SuppressWarnings("unchecked")
			DualListModel<Livro> dl =  (DualListModel<Livro>) dualList;
			
			for (Iterator<Livro> iterator = dl.getSource().iterator(); iterator.hasNext();) { 
				Object o = iterator.next();
				String id = (new StringBuilder()).append(((Livro) o).getId()).toString();
				if (value.equals(id)) {
					ret = o;
					break;
				}
			}

			if (ret == null) {
				for (Iterator<Livro> iterator1 = dl.getTarget().iterator(); iterator1 .hasNext();) {
					Object o = iterator1.next();
					String id = (new StringBuilder()).append(((Livro) o).getId()).toString();
					if (value.equals(id)) {
						ret = o;
						break;
					}
				}
			}
		}
		return ret; 
	}