Package org.lwjgl.odbc
Class SQL_TIMESTAMP_STRUCT
- java.lang.Object
-
- org.lwjgl.system.Pointer.Default
-
- org.lwjgl.system.Struct
-
- org.lwjgl.odbc.SQL_TIMESTAMP_STRUCT
-
- All Implemented Interfaces:
java.lang.AutoCloseable
,org.lwjgl.system.NativeResource
,org.lwjgl.system.Pointer
public class SQL_TIMESTAMP_STRUCT extends org.lwjgl.system.Struct implements org.lwjgl.system.NativeResource
Layout
struct SQL_TIMESTAMP_STRUCT { SQLSMALLINT year; SQLUSMALLINT month; SQLUSMALLINT day; SQLUSMALLINT hour; SQLUSMALLINT minute; SQLUSMALLINT second; SQLUINTEGER fraction; }
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SQL_TIMESTAMP_STRUCT.Buffer
An array ofSQL_TIMESTAMP_STRUCT
structs.
-
Constructor Summary
Constructors Constructor Description SQL_TIMESTAMP_STRUCT(java.nio.ByteBuffer container)
Creates aSQL_TIMESTAMP_STRUCT
instance at the current position of the specifiedByteBuffer
container.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static SQL_TIMESTAMP_STRUCT
calloc()
Returns a newSQL_TIMESTAMP_STRUCT
instance allocated withmemCalloc
.static SQL_TIMESTAMP_STRUCT.Buffer
calloc(int capacity)
Returns a newSQL_TIMESTAMP_STRUCT.Buffer
instance allocated withmemCalloc
.static SQL_TIMESTAMP_STRUCT
callocStack()
Returns a newSQL_TIMESTAMP_STRUCT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static SQL_TIMESTAMP_STRUCT.Buffer
callocStack(int capacity)
Returns a newSQL_TIMESTAMP_STRUCT.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.static SQL_TIMESTAMP_STRUCT.Buffer
callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSQL_TIMESTAMP_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SQL_TIMESTAMP_STRUCT
callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSQL_TIMESTAMP_STRUCT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.static SQL_TIMESTAMP_STRUCT
create()
Returns a newSQL_TIMESTAMP_STRUCT
instance allocated withBufferUtils
.static SQL_TIMESTAMP_STRUCT.Buffer
create(int capacity)
Returns a newSQL_TIMESTAMP_STRUCT.Buffer
instance allocated withBufferUtils
.static SQL_TIMESTAMP_STRUCT
create(long address)
Returns a newSQL_TIMESTAMP_STRUCT
instance for the specified memory address.static SQL_TIMESTAMP_STRUCT.Buffer
create(long address, int capacity)
Create aSQL_TIMESTAMP_STRUCT.Buffer
instance at the specified memory.static SQL_TIMESTAMP_STRUCT
createSafe(long address)
static SQL_TIMESTAMP_STRUCT.Buffer
createSafe(long address, int capacity)
short
day()
Returns the value of theday
field.SQL_TIMESTAMP_STRUCT
day(short value)
Sets the specified value to theday
field.int
fraction()
Returns the value of thefraction
field.SQL_TIMESTAMP_STRUCT
fraction(int value)
Sets the specified value to thefraction
field.short
hour()
Returns the value of thehour
field.SQL_TIMESTAMP_STRUCT
hour(short value)
Sets the specified value to thehour
field.static SQL_TIMESTAMP_STRUCT
malloc()
Returns a newSQL_TIMESTAMP_STRUCT
instance allocated withmemAlloc
.static SQL_TIMESTAMP_STRUCT.Buffer
malloc(int capacity)
Returns a newSQL_TIMESTAMP_STRUCT.Buffer
instance allocated withmemAlloc
.static SQL_TIMESTAMP_STRUCT
mallocStack()
Returns a newSQL_TIMESTAMP_STRUCT
instance allocated on the thread-localMemoryStack
.static SQL_TIMESTAMP_STRUCT.Buffer
mallocStack(int capacity)
Returns a newSQL_TIMESTAMP_STRUCT.Buffer
instance allocated on the thread-localMemoryStack
.static SQL_TIMESTAMP_STRUCT.Buffer
mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSQL_TIMESTAMP_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
.static SQL_TIMESTAMP_STRUCT
mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSQL_TIMESTAMP_STRUCT
instance allocated on the specifiedMemoryStack
.short
minute()
Returns the value of theminute
field.SQL_TIMESTAMP_STRUCT
minute(short value)
Sets the specified value to theminute
field.short
month()
Returns the value of themonth
field.SQL_TIMESTAMP_STRUCT
month(short value)
Sets the specified value to themonth
field.static short
nday(long struct)
Unsafe version ofday()
.static void
nday(long struct, short value)
Unsafe version ofday
.static int
nfraction(long struct)
Unsafe version offraction()
.static void
nfraction(long struct, int value)
Unsafe version offraction
.static short
nhour(long struct)
Unsafe version ofhour()
.static void
nhour(long struct, short value)
Unsafe version ofhour
.static short
nminute(long struct)
Unsafe version ofminute()
.static void
nminute(long struct, short value)
Unsafe version ofminute
.static short
nmonth(long struct)
Unsafe version ofmonth()
.static void
nmonth(long struct, short value)
Unsafe version ofmonth
.static short
nsecond(long struct)
Unsafe version ofsecond()
.static void
nsecond(long struct, short value)
Unsafe version ofsecond
.static short
nyear(long struct)
Unsafe version ofyear()
.static void
nyear(long struct, short value)
Unsafe version ofyear
.short
second()
Returns the value of thesecond
field.SQL_TIMESTAMP_STRUCT
second(short value)
Sets the specified value to thesecond
field.SQL_TIMESTAMP_STRUCT
set(short year, short month, short day, short hour, short minute, short second, int fraction)
Initializes this struct with the specified values.SQL_TIMESTAMP_STRUCT
set(SQL_TIMESTAMP_STRUCT src)
Copies the specified struct data to this struct.int
sizeof()
short
year()
Returns the value of theyear
field.SQL_TIMESTAMP_STRUCT
year(short value)
Sets the specified value to theyear
field.
-
-
-
Constructor Detail
-
SQL_TIMESTAMP_STRUCT
public SQL_TIMESTAMP_STRUCT(java.nio.ByteBuffer container)
Creates aSQL_TIMESTAMP_STRUCT
instance at the current position of the specifiedByteBuffer
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 classorg.lwjgl.system.Struct
-
year
public short year()
Returns the value of theyear
field.
-
month
public short month()
Returns the value of themonth
field.
-
day
public short day()
Returns the value of theday
field.
-
hour
public short hour()
Returns the value of thehour
field.
-
minute
public short minute()
Returns the value of theminute
field.
-
second
public short second()
Returns the value of thesecond
field.
-
fraction
public int fraction()
Returns the value of thefraction
field.
-
year
public SQL_TIMESTAMP_STRUCT year(short value)
Sets the specified value to theyear
field.
-
month
public SQL_TIMESTAMP_STRUCT month(short value)
Sets the specified value to themonth
field.
-
day
public SQL_TIMESTAMP_STRUCT day(short value)
Sets the specified value to theday
field.
-
hour
public SQL_TIMESTAMP_STRUCT hour(short value)
Sets the specified value to thehour
field.
-
minute
public SQL_TIMESTAMP_STRUCT minute(short value)
Sets the specified value to theminute
field.
-
second
public SQL_TIMESTAMP_STRUCT second(short value)
Sets the specified value to thesecond
field.
-
fraction
public SQL_TIMESTAMP_STRUCT fraction(int value)
Sets the specified value to thefraction
field.
-
set
public SQL_TIMESTAMP_STRUCT set(short year, short month, short day, short hour, short minute, short second, int fraction)
Initializes this struct with the specified values.
-
set
public SQL_TIMESTAMP_STRUCT set(SQL_TIMESTAMP_STRUCT src)
Copies the specified struct data to this struct.- Parameters:
src
- the source struct- Returns:
- this struct
-
malloc
public static SQL_TIMESTAMP_STRUCT malloc()
Returns a newSQL_TIMESTAMP_STRUCT
instance allocated withmemAlloc
. The instance must be explicitly freed.
-
calloc
public static SQL_TIMESTAMP_STRUCT calloc()
Returns a newSQL_TIMESTAMP_STRUCT
instance allocated withmemCalloc
. The instance must be explicitly freed.
-
create
public static SQL_TIMESTAMP_STRUCT create()
Returns a newSQL_TIMESTAMP_STRUCT
instance allocated withBufferUtils
.
-
create
public static SQL_TIMESTAMP_STRUCT create(long address)
Returns a newSQL_TIMESTAMP_STRUCT
instance for the specified memory address.
-
createSafe
@Nullable public static SQL_TIMESTAMP_STRUCT createSafe(long address)
-
malloc
public static SQL_TIMESTAMP_STRUCT.Buffer malloc(int capacity)
Returns a newSQL_TIMESTAMP_STRUCT.Buffer
instance allocated withmemAlloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
calloc
public static SQL_TIMESTAMP_STRUCT.Buffer calloc(int capacity)
Returns a newSQL_TIMESTAMP_STRUCT.Buffer
instance allocated withmemCalloc
. The instance must be explicitly freed.- Parameters:
capacity
- the buffer capacity
-
create
public static SQL_TIMESTAMP_STRUCT.Buffer create(int capacity)
Returns a newSQL_TIMESTAMP_STRUCT.Buffer
instance allocated withBufferUtils
.- Parameters:
capacity
- the buffer capacity
-
create
public static SQL_TIMESTAMP_STRUCT.Buffer create(long address, int capacity)
Create aSQL_TIMESTAMP_STRUCT.Buffer
instance at the specified memory.- Parameters:
address
- the memory addresscapacity
- the buffer capacity
-
createSafe
@Nullable public static SQL_TIMESTAMP_STRUCT.Buffer createSafe(long address, int capacity)
-
mallocStack
public static SQL_TIMESTAMP_STRUCT mallocStack()
Returns a newSQL_TIMESTAMP_STRUCT
instance allocated on the thread-localMemoryStack
.
-
callocStack
public static SQL_TIMESTAMP_STRUCT callocStack()
Returns a newSQL_TIMESTAMP_STRUCT
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.
-
mallocStack
public static SQL_TIMESTAMP_STRUCT mallocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSQL_TIMESTAMP_STRUCT
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocate
-
callocStack
public static SQL_TIMESTAMP_STRUCT callocStack(org.lwjgl.system.MemoryStack stack)
Returns a newSQL_TIMESTAMP_STRUCT
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocate
-
mallocStack
public static SQL_TIMESTAMP_STRUCT.Buffer mallocStack(int capacity)
Returns a newSQL_TIMESTAMP_STRUCT.Buffer
instance allocated on the thread-localMemoryStack
.- Parameters:
capacity
- the buffer capacity
-
callocStack
public static SQL_TIMESTAMP_STRUCT.Buffer callocStack(int capacity)
Returns a newSQL_TIMESTAMP_STRUCT.Buffer
instance allocated on the thread-localMemoryStack
and initializes all its bits to zero.- Parameters:
capacity
- the buffer capacity
-
mallocStack
public static SQL_TIMESTAMP_STRUCT.Buffer mallocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSQL_TIMESTAMP_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
callocStack
public static SQL_TIMESTAMP_STRUCT.Buffer callocStack(int capacity, org.lwjgl.system.MemoryStack stack)
Returns a newSQL_TIMESTAMP_STRUCT.Buffer
instance allocated on the specifiedMemoryStack
and initializes all its bits to zero.- Parameters:
stack
- the stack from which to allocatecapacity
- the buffer capacity
-
nyear
public static short nyear(long struct)
Unsafe version ofyear()
.
-
nmonth
public static short nmonth(long struct)
Unsafe version ofmonth()
.
-
nday
public static short nday(long struct)
Unsafe version ofday()
.
-
nhour
public static short nhour(long struct)
Unsafe version ofhour()
.
-
nminute
public static short nminute(long struct)
Unsafe version ofminute()
.
-
nsecond
public static short nsecond(long struct)
Unsafe version ofsecond()
.
-
nfraction
public static int nfraction(long struct)
Unsafe version offraction()
.
-
nyear
public static void nyear(long struct, short value)
Unsafe version ofyear
.
-
nmonth
public static void nmonth(long struct, short value)
Unsafe version ofmonth
.
-
nday
public static void nday(long struct, short value)
Unsafe version ofday
.
-
nhour
public static void nhour(long struct, short value)
Unsafe version ofhour
.
-
nminute
public static void nminute(long struct, short value)
Unsafe version ofminute
.
-
nsecond
public static void nsecond(long struct, short value)
Unsafe version ofsecond
.
-
nfraction
public static void nfraction(long struct, int value)
Unsafe version offraction
.
-
-