Enum Class PostgresqlObjectId

java.lang.Object
java.lang.Enum<PostgresqlObjectId>
io.r2dbc.postgresql.codec.PostgresqlObjectId
All Implemented Interfaces:
PostgresTypeIdentifier, Type, Serializable, Comparable<PostgresqlObjectId>, java.lang.constant.Constable

public enum PostgresqlObjectId extends Enum<PostgresqlObjectId> implements Type, PostgresTypeIdentifier
Object IDs for well know PostgreSQL data types.

Extension Object IDs that are provided by Postgres extensions such as PostGIS are not constants of this enumeration and must be looked up from pg_type.

Lightweight PostgresTypeIdentifier identifier returning Object.class when calling getJavaType().

  • Enum Constant Details

  • Field Details

  • Method Details

    • values

      public static PostgresqlObjectId[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static PostgresqlObjectId valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
      Parameters:
      name - the name of the enum constant to be returned.
      Returns:
      the enum constant with the specified name
      Throws:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null
    • from

      public static PostgresqlObjectId from(PostgresTypeIdentifier dataType)
    • isValid

      public static boolean isValid(int objectId)
      Returns if the objectId is a known and valid objectId.
      Parameters:
      objectId - the object id to match
      Returns:
      true if the objectId is a valid and known (static) objectId;false otherwise.
    • valueOf

      public static PostgresqlObjectId valueOf(int objectId)
      Returns the PostgresqlObjectId matching a given object id.
      Parameters:
      objectId - the object id to match
      Returns:
      the PostgresqlObjectId matching a given object id
      Throws:
      IllegalArgumentException - if objectId isn't a valid object id
    • valueOf

      public static PostgresqlObjectId valueOf(R2dbcType type)
      Returns the PostgresqlObjectId matching a given R2DBC type.
      Parameters:
      type - the R2DBC type
      Returns:
      the PostgresqlObjectId
      Throws:
      IllegalArgumentException - if type is null
      UnsupportedOperationException - if the given type is not supported
      Since:
      0.9
    • getJavaType

      public Class<?> getJavaType()
      Specified by:
      getJavaType in interface Type
    • getName

      public String getName()
      Specified by:
      getName in interface Type
    • getObjectId

      public int getObjectId()
      Returns the object id represented by each return value.
      Specified by:
      getObjectId in interface PostgresTypeIdentifier
      Returns:
      the object id represented by each return value
    • toInt

      public static int toInt(@Nullable Long oid)
    • toInt

      public static int toInt(long oid)
    • toLong

      public static long toLong(int oid)