Package org.firebirdsql.gds
Interface Parameter
- 
- All Known Implementing Classes:
- Argument,- BigIntArgument,- ByteArgument,- ByteArrayArgument,- NumericArgument,- SingleItem,- StringArgument,- TypedArgument
 
 public interface ParameterInterface for parameters stored in aParameterBuffer.- Since:
- 3.0
- Author:
- Mark Rotteveel
 
- 
- 
Method SummaryAll Methods Instance Methods Abstract Methods Modifier and Type Method Description voidcopyTo(ParameterBuffer buffer, Encoding stringEncoding)Copies this argument into the supplied buffer, uses the suppliedEncodingfor string arguments.intgetType()The type identifier of the parameter (usually one of the constant values inISCConstants).intgetValueAsInt()The value of the parameter as int.longgetValueAsLong()The value of the parameter as long.java.lang.StringgetValueAsString()The value of the parameter as String.
 
- 
- 
- 
Method Detail- 
getTypeint getType() The type identifier of the parameter (usually one of the constant values inISCConstants).- Returns:
- The type of the parameter
 
 - 
getValueAsStringjava.lang.String getValueAsString() The 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). - Returns:
- The value as string
 
 - 
getValueAsIntint getValueAsInt() The 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). - Returns:
- The value as int
 
 - 
getValueAsLonglong getValueAsLong() 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). - Returns:
- The value as long
 
 - 
copyTovoid copyTo(ParameterBuffer buffer, Encoding stringEncoding) Copies this argument into the supplied buffer, uses the suppliedEncodingfor string arguments.An instance of Parametershould know how to copy itself into another buffer (eg an instance ofStringArgumentwould 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 instance
- stringEncoding- Encoding to use for string properties. A value of- nullcan be used to signal that the original encoding should be used.
 
 
- 
 
-