/* * To change this template, choose Tools | Templates * and open the template in the editor. */ package br.usp.nds.remote.conversao; import org.apache.commons.beanutils.Converter; /** * * @author sussumu */ public class LongConverter implements Converter { public Long convert(Class type, Object string) { try { if (string == null || string.toString().isEmpty()) { return null; } return Long.parseLong(string.toString()); } catch (NumberFormatException e) { return null; } } }