Class CharsetEncoding.Any

java.lang.Object
org.postgresql.pljava.model.CharsetEncoding.Any
All Implemented Interfaces:
CharsetEncoding
Enclosing interface:
CharsetEncoding

public static class CharsetEncoding.Any extends Object implements CharsetEncoding
A distinguished CharsetEncoding representing uses such as -1 in the collencoding column of pg_collation, indicating the collation is usable with any encoding.

This returns -1 from ordinal() and null or false from the other non-default methods according to their types. The only instance of this class is CharsetEncoding.ANY.

  • Method Details

    • ordinal

      public int ordinal()
      Description copied from interface: CharsetEncoding
      Returns the PostgreSQL encoding number (as used in the encoding columns of some system catalogs) for this encoding.
      Specified by:
      ordinal in interface CharsetEncoding
    • name

      public String name()
      Description copied from interface: CharsetEncoding
      Returns the PostgreSQL name for this encoding.

      The PostgreSQL encoding names have a long history and may not match cleanly with more standardized names in modern libraries.

      Specified by:
      name in interface CharsetEncoding
    • icuName

      public String icuName()
      Description copied from interface: CharsetEncoding
      Returns the name identifying this encoding in ICU (international components for Unicode), or null if its implementation in PostgreSQL does not define one.

      When present, the ICU name can be a better choice for matching encodings in other libraries.

      Specified by:
      icuName in interface CharsetEncoding
    • usableOnServer

      public boolean usableOnServer()
      Description copied from interface: CharsetEncoding
      Indicates whether this encoding is usable as a server encoding.
      Specified by:
      usableOnServer in interface CharsetEncoding
    • charset

      public Charset charset()
      Description copied from interface: CharsetEncoding
      Returns the corresponding Java Charset, or null if none can be identified.
      Specified by:
      charset in interface CharsetEncoding
    • toString

      public String toString()
      Overrides:
      toString in class Object