Class BigIntArgument
- java.lang.Object
-
- org.firebirdsql.gds.impl.argument.Argument
-
- org.firebirdsql.gds.impl.argument.BigIntArgument
-
- All Implemented Interfaces:
java.io.Serializable
,Parameter
public final class BigIntArgument extends Argument
Argument
implementation for bigint (long) values.- Since:
- 3.0
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description BigIntArgument(int type, ArgumentType argumentType, long value)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
copyTo(ParameterBuffer buffer, Encoding encoding)
Copies this argument into the supplied buffer, uses the suppliedEncoding
for string arguments.boolean
equals(java.lang.Object other)
int
getLength()
long
getValueAsLong()
The value of the parameter as long.int
hashCode()
void
writeTo(java.io.OutputStream outputStream)
Writes the arguments to the suppliedOutputStream
in the XDR format of the type.protected void
writeValue(java.io.OutputStream outputStream, long value)
-
Methods inherited from class org.firebirdsql.gds.impl.argument.Argument
getType, getValueAsInt, getValueAsString
-
-
-
-
Constructor Detail
-
BigIntArgument
public BigIntArgument(int type, ArgumentType argumentType, long value)
-
-
Method Detail
-
writeTo
public void writeTo(java.io.OutputStream outputStream) throws java.io.IOException
Description copied from class:Argument
Writes the arguments to the suppliedOutputStream
in the XDR format of the type.
-
getLength
public int getLength()
- Specified by:
getLength
in classArgument
- Returns:
- Total length of the buffer item when written to the OutputStream by
Argument.writeTo(java.io.OutputStream)
. This includes the item, the value and other items contributing to the total length (eg the length of the value).
-
writeValue
protected void writeValue(java.io.OutputStream outputStream, long value) throws java.io.IOException
- Throws:
java.io.IOException
-
getValueAsLong
public long getValueAsLong()
Description copied from interface:Parameter
The value of the parameter as long.The implementation may throw a RuntimeException if the parameter isn't a long (or shouldn't be used as a long).
- Specified by:
getValueAsLong
in interfaceParameter
- Overrides:
getValueAsLong
in classArgument
- Returns:
- The value as long
-
copyTo
public void copyTo(ParameterBuffer buffer, Encoding encoding)
Description copied from interface:Parameter
Copies this argument into the supplied buffer, uses the suppliedEncoding
for string arguments.An instance of
Parameter
should know how to copy itself into another buffer (eg an instance ofStringArgument
would know to callParameterBuffer.addArgument(int, String, Encoding)
).The parameter does not need to check if it is the right type of destination buffer (if someone tries to add a TPB argument to a DPB he is free to try that).
- Parameters:
buffer
- ParameterBuffer instanceencoding
- Encoding to use for string properties. A value ofnull
can be used to signal that the original encoding should be used.
-
equals
public boolean equals(java.lang.Object other)
- Overrides:
equals
in classjava.lang.Object
-
-