Package systextil.dao

Class Cnpj

All Implemented Interfaces:
Comparable<Cnpj>

@Deprecated(forRemoval=true) public class Cnpj extends Cnpj
Deprecated, for removal: This API element is subject to removal in a future version.
Essa classe não deve mais ser usada, pois representa um CNPJ numérico. Use CNPJ.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final TempConverter<Cnpj,Integer[]>
    Deprecated, for removal: This API element is subject to removal in a future version.
    Conversor usado nos cadastros de registros temporários para filtros em relatórios.
    static final Cnpj
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Fields inherited from class br.com.intersys.systextil.util.Cnpj

    cgc2, cgc4, cgc9
  • Constructor Summary

    Constructors
    Constructor
    Description
    Cnpj(int cgc9, int cgc4, int cgc2)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    static Cnpj
    parse(int[] cgcs)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Utilidade para obter um Cnpj numérico a partir de um array de inteiros.
    static Cnpj
    parse(String string)
    Deprecated, for removal: This API element is subject to removal in a future version.
    Obtém um Cnpj a partir de um CPF ou CNPJ.
    static Cnpj
    Deprecated, for removal: This API element is subject to removal in a future version.
    Obtém um Cnpj a partir de um CNPJ formatado como CNPJ (por exemplo 12.345.678/0001-35) - com algumas tolerâncias.
    static Cnpj
    Deprecated, for removal: This API element is subject to removal in a future version.
    Obtém um Cnpj a partir de um CPF formatado como CPF (por exemplo 123.456.789-35) - com algumas tolerâncias.
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class br.com.intersys.systextil.util.Cnpj

    compareTo, equals, format, formatCNPJ, formatCPF, hashCode, isPessoaFisica, toNew, toString

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • TEMP_CONVERTER

      public static final TempConverter<Cnpj,Integer[]> TEMP_CONVERTER
      Deprecated, for removal: This API element is subject to removal in a future version.
      Conversor usado nos cadastros de registros temporários para filtros em relatórios.
    • ZEROS

      public static final Cnpj ZEROS
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Constructor Details

    • Cnpj

      public Cnpj(int cgc9, int cgc4, int cgc2)
      Deprecated, for removal: This API element is subject to removal in a future version.
  • Method Details

    • parseToUtil

      public Cnpj parseToUtil()
      Deprecated, for removal: This API element is subject to removal in a future version.
    • parseCNPJ

      public static Cnpj parseCNPJ(String cnpj) throws IllegalArgumentException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Obtém um Cnpj a partir de um CNPJ formatado como CNPJ (por exemplo 12.345.678/0001-35) - com algumas tolerâncias. Os pontos não são necessários, nem zeros à esquerda. Se não tiver delimitadores, deve conter 14 dígitos. Espaços ao redor são desconsiderados.
      Returns:
      o Cnpj correspondente ao CNPJ, ou nulo se estiver nulo ou vazio
      Throws:
      IllegalArgumentException - se não estiver em um formato válido
    • parseCPF

      public static Cnpj parseCPF(String cpf) throws IllegalArgumentException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Obtém um Cnpj a partir de um CPF formatado como CPF (por exemplo 123.456.789-35) - com algumas tolerâncias. Os pontos não são necessários, nem zeros à esquerda, e o delimitador pode ser hífen ou barra. Se não tiver delimitadores, deve conter 11 dígitos. Espaços ao redor são desconsiderados.
      Returns:
      o Cnpj correspondente ao CNPJ, ou nulo se estiver nulo ou vazio
      Throws:
      IllegalArgumentException - se não estiver em um formato válido
    • parse

      public static Cnpj parse(String string)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Obtém um Cnpj a partir de um CPF ou CNPJ. Primeiro tenta parseCNPJ(java.lang.String), e, se não funcionar, tenta parseCPF(java.lang.String).
      Returns:
      o Cnpj correspondente, ou nulo se estiver nulo ou vazio
      Throws:
      IllegalArgumentException - se não estiver em um formato válido
    • parse

      public static Cnpj parse(int[] cgcs)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Utilidade para obter um Cnpj numérico a partir de um array de inteiros. Tem por objetivo ser usado para a reforma tributária, na forma: Cnpj.parse(cnpj.toOld());
      Parameters:
      cgcs - um array de inteiros obtido de CNPJ.toOld()
      Returns:
      o Cnpj numérico para uso em código legado