Class SQL_DAY_SECOND_STRUCT

  • All Implemented Interfaces:
    java.lang.AutoCloseable, NativeResource, Pointer

    public class SQL_DAY_SECOND_STRUCT
    extends Struct
    implements NativeResource

    Layout

    
     struct SQL_DAY_SECOND_STRUCT {
         SQLUINTEGER day;
         SQLUINTEGER hour;
         SQLUINTEGER minute;
         SQLUINTEGER second;
         SQLUINTEGER fraction;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • DAY, HOUR, MINUTE, SECOND, FRACTION

        The struct member offsets.
    • Constructor Detail

      • SQL_DAY_SECOND_STRUCT

        public SQL_DAY_SECOND_STRUCT​(java.nio.ByteBuffer container)
        Creates a SQL_DAY_SECOND_STRUCT instance at the current position of the specified ByteBuffer container. Changes to the buffer's content will be visible to the struct instance and vice versa.

        The created instance holds a strong reference to the container object.

    • Method Detail

      • sizeof

        public int sizeof()
        Description copied from class: Struct
        Returns sizeof(struct).
        Specified by:
        sizeof in class Struct
      • day

        public int day()
        Returns the value of the day field.
      • hour

        public int hour()
        Returns the value of the hour field.
      • minute

        public int minute()
        Returns the value of the minute field.
      • second

        public int second()
        Returns the value of the second field.
      • fraction

        public int fraction()
        Returns the value of the fraction field.
      • minute

        public SQL_DAY_SECOND_STRUCT minute​(int value)
        Sets the specified value to the minute field.
      • second

        public SQL_DAY_SECOND_STRUCT second​(int value)
        Sets the specified value to the second field.
      • fraction

        public SQL_DAY_SECOND_STRUCT fraction​(int value)
        Sets the specified value to the fraction field.
      • set

        public SQL_DAY_SECOND_STRUCT set​(int day,
                                         int hour,
                                         int minute,
                                         int second,
                                         int fraction)
        Initializes this struct with the specified values.
      • malloc

        public static SQL_DAY_SECOND_STRUCT malloc()
        Returns a new SQL_DAY_SECOND_STRUCT instance allocated with memAlloc. The instance must be explicitly freed.
      • calloc

        public static SQL_DAY_SECOND_STRUCT calloc()
        Returns a new SQL_DAY_SECOND_STRUCT instance allocated with memCalloc. The instance must be explicitly freed.
      • create

        public static SQL_DAY_SECOND_STRUCT create​(long address)
        Returns a new SQL_DAY_SECOND_STRUCT instance for the specified memory address.
      • createSafe

        @Nullable
        public static SQL_DAY_SECOND_STRUCT createSafe​(long address)
        Like create, but returns null if address is NULL.
      • callocStack

        public static SQL_DAY_SECOND_STRUCT callocStack()
        Returns a new SQL_DAY_SECOND_STRUCT instance allocated on the thread-local MemoryStack and initializes all its bits to zero.
      • mallocStack

        public static SQL_DAY_SECOND_STRUCT mallocStack​(MemoryStack stack)
        Returns a new SQL_DAY_SECOND_STRUCT instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
      • callocStack

        public static SQL_DAY_SECOND_STRUCT callocStack​(MemoryStack stack)
        Returns a new SQL_DAY_SECOND_STRUCT instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
      • nday

        public static int nday​(long struct)
        Unsafe version of day().
      • nhour

        public static int nhour​(long struct)
        Unsafe version of hour().
      • nminute

        public static int nminute​(long struct)
        Unsafe version of minute().
      • nsecond

        public static int nsecond​(long struct)
        Unsafe version of second().
      • nfraction

        public static int nfraction​(long struct)
        Unsafe version of fraction().
      • nday

        public static void nday​(long struct,
                                int value)
        Unsafe version of day.
      • nhour

        public static void nhour​(long struct,
                                 int value)
        Unsafe version of hour.
      • nminute

        public static void nminute​(long struct,
                                   int value)
        Unsafe version of minute.
      • nsecond

        public static void nsecond​(long struct,
                                   int value)
        Unsafe version of second.
      • nfraction

        public static void nfraction​(long struct,
                                     int value)
        Unsafe version of fraction.