Package org.firebirdsql.gds
Class GDSExceptionHelper.GDSMessage
java.lang.Object
org.firebirdsql.gds.GDSExceptionHelper.GDSMessage
- Enclosing class:
- GDSExceptionHelper
This class wraps message template obtained from isc_error_msg.properties
file and allows to set parameters to the message.
-
Constructor Summary
ConstructorsConstructorDescriptionGDSMessage(String template) Constructs an instance of GDSMessage for the specified template. -
Method Summary
Modifier and TypeMethodDescriptionintReturns the number of parameters for the message template.voidsetParameter(int position, String text) Sets the parameter valuevoidsetParameters(List<String> messageParameters) Sets the parameter values.toString()Puts parameters into the template and return the obtained string.
-
Constructor Details
-
GDSMessage
Constructs an instance of GDSMessage for the specified template.
-
-
Method Details
-
getParamCount
public int getParamCount()Returns the number of parameters for the message template.- Returns:
- number of parameters.
-
setParameter
Sets the parameter value- Parameters:
position- the parameter number, 0 - first parameter.text- value of parameter
-
setParameters
Sets the parameter values.Parameter values with an index value higher than the number of message arguments are added as extra parameters.
- Parameters:
messageParameters- Message parameters
-
toString
Puts parameters into the template and return the obtained string.
-