java.lang.Object
org.firebirdsql.gds.impl.argument.Argument
- All Implemented Interfaces:
Serializable,Parameter
- Direct Known Subclasses:
TypedArgument
Base class for arguments to the parameter buffer.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract intfinal intgetType()The type identifier of the parameter (usually one of the constant values inISCConstants).intThe value of the parameter as int.longThe value of the parameter as long.The value of the parameter as String.abstract voidwriteTo(OutputStream outputStream) Writes the arguments to the suppliedOutputStreamin the XDR format of the type.
-
Constructor Details
-
Argument
protected Argument(int type)
-
-
Method Details
-
getType
public final int getType()Description copied from interface:ParameterThe type identifier of the parameter (usually one of the constant values inISCConstants). -
getValueAsString
Description copied from interface:ParameterThe value of the parameter as String.The implementation may throw a RuntimeException if the parameter isn't a string (or shouldn't be used as a string).
- Specified by:
getValueAsStringin interfaceParameter- Returns:
- The value as string
-
getValueAsInt
public int getValueAsInt()Description copied from interface:ParameterThe value of the parameter as int.The implementation may throw a RuntimeException if the parameter isn't an int (or shouldn't be used as an int).
- Specified by:
getValueAsIntin interfaceParameter- Returns:
- The value as int
-
getValueAsLong
public long getValueAsLong()Description copied from interface:ParameterThe 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:
getValueAsLongin interfaceParameter- Returns:
- The value as long
-
writeTo
Writes the arguments to the suppliedOutputStreamin the XDR format of the type.- Parameters:
outputStream- OutputStream- Throws:
IOException- For errors writing to the OutputStream
-
getLength
public abstract int getLength()- Returns:
- Total length of the buffer item when written to the OutputStream by
writeTo(java.io.OutputStream). This includes the item, the value and other items contributing to the total length (e.g. the length of the value).
-