Class SQLWriterRegistry.SQLMessageFormatWriter

  • All Implemented Interfaces:
    SQLWriter.SQLValueWriter, java.io.Serializable
    Enclosing class:
    SQLWriterRegistry

    public static final class SQLWriterRegistry.SQLMessageFormatWriter
    extends java.lang.Object
    implements SQLWriter.SQLValueWriter, java.io.Serializable
    Simple writer that takes a MessageFormat string and passes in the value as {0}/ Useful for spcifying functions. e.g. rawtohex(''{0}'') Note that single quotes have to be duplicated.
    See Also:
    Serialized Form
    • Constructor Summary

      Constructors 
      Constructor Description
      SQLMessageFormatWriter​(java.lang.String messageFormat)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String writeValueToSQL​(java.lang.Object value)
      If the value is null then "NULL" is returned (no quotes).
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • SQLMessageFormatWriter

        public SQLMessageFormatWriter​(java.lang.String messageFormat)
    • Method Detail

      • writeValueToSQL

        public java.lang.String writeValueToSQL​(java.lang.Object value)
        If the value is null then "NULL" is returned (no quotes). Otherwise generate the formatted value using the MessageFormat with the value param being passed in as {0}.
        Specified by:
        writeValueToSQL in interface SQLWriter.SQLValueWriter
        Parameters:
        value - The value to write
        Returns:
        The formatted value or "NULL"