Class SQLMethodHash

  • All Implemented Interfaces:
    SQLMethod, Comparable<SQLMethod>

    public class SQLMethodHash
    extends AbstractSQLMethod
    Hash a string supporting multiple algorithm, all those supported by JVM
    Author:
    Luca Garulli (l.garulli--(at)--gmail.com)
    • Constructor Detail

      • SQLMethodHash

        public SQLMethodHash()
    • Method Detail

      • getSyntax

        public String getSyntax()
        Description copied from interface: SQLMethod
        Returns a convenient SQL String representation of the method.

        Example :

          field.myMethod( param1, param2, [optionalParam3])
         

        This text will be used in exception messages.

        Specified by:
        getSyntax in interface SQLMethod
        Overrides:
        getSyntax in class AbstractSQLMethod
        Returns:
        String , never null.
      • execute

        public Object execute​(Object value,
                              Identifiable iCurrentRecord,
                              CommandContext iContext,
                              Object[] iParams)
        Description copied from interface: SQLMethod
        Process a record.
        Parameters:
        value - current object
        iCurrentRecord - : current record
        iContext - execution context
        iParams - : function parameters, number is ensured to be within minParams and maxParams.
        Returns:
        evaluation result
      • byteArrayToHexStr

        public static String byteArrayToHexStr​(byte[] data)