Class SQL_YEAR_MONTH_STRUCT

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

    public class SQL_YEAR_MONTH_STRUCT
    extends org.lwjgl.system.Struct
    implements org.lwjgl.system.NativeResource

    Layout

    
     struct SQL_YEAR_MONTH_STRUCT {
         SQLUINTEGER year;
         SQLUINTEGER month;
     }
    • Field Detail

      • SIZEOF

        The struct size in bytes.
      • ALIGNOF

        The struct alignment in bytes.
      • YEAR, MONTH

        The struct member offsets.
    • Constructor Detail

      • SQL_YEAR_MONTH_STRUCT

        public SQL_YEAR_MONTH_STRUCT​(java.nio.ByteBuffer container)
        Creates a SQL_YEAR_MONTH_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()
        Specified by:
        sizeof in class org.lwjgl.system.Struct
      • year

        public int year()
        Returns the value of the year field.
      • month

        public int month()
        Returns the value of the month field.
      • set

        public SQL_YEAR_MONTH_STRUCT set​(int year,
                                         int month)
        Initializes this struct with the specified values.
      • malloc

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

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

        public static SQL_YEAR_MONTH_STRUCT create()
        Returns a new SQL_YEAR_MONTH_STRUCT instance allocated with BufferUtils.
      • create

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

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

        public static SQL_YEAR_MONTH_STRUCT mallocStack()
        Returns a new SQL_YEAR_MONTH_STRUCT instance allocated on the thread-local MemoryStack.
      • callocStack

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

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

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

        public static SQL_YEAR_MONTH_STRUCT.Buffer mallocStack​(int capacity,
                                                               org.lwjgl.system.MemoryStack stack)
        Returns a new SQL_YEAR_MONTH_STRUCT.Buffer instance allocated on the specified MemoryStack.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • callocStack

        public static SQL_YEAR_MONTH_STRUCT.Buffer callocStack​(int capacity,
                                                               org.lwjgl.system.MemoryStack stack)
        Returns a new SQL_YEAR_MONTH_STRUCT.Buffer instance allocated on the specified MemoryStack and initializes all its bits to zero.
        Parameters:
        stack - the stack from which to allocate
        capacity - the buffer capacity
      • nyear

        public static int nyear​(long struct)
        Unsafe version of year().
      • nmonth

        public static int nmonth​(long struct)
        Unsafe version of month().
      • nyear

        public static void nyear​(long struct,
                                 int value)
        Unsafe version of year.
      • nmonth

        public static void nmonth​(long struct,
                                  int value)
        Unsafe version of month.