Class SQL.Environment

java.lang.Object
org.proto4j.redis.sql.SQL.Environment
Enclosing class:
SQL

public static class SQL.Environment
extends java.lang.Object
The SQL.Environment class can be used to store SQL statements globally for a specific time period. It can be used within the SQL.ENV variable in a Param annotation.
Since:
1.0
  • Constructor Summary

    Constructors 
    Constructor Description
    Environment()  
  • Method Summary

    Modifier and Type Method Description
    static void clear()
    Resets the current environment.
    static java.lang.String getProperty​(java.lang.String name)
    Retrieves a stored property for the given name.
    static boolean isDefined​(java.lang.String s)
    Returns whether the given input string equals the SQL.ENV indicator.
    static void setupEnvironment​(java.util.Properties p)
    Sets up a new environment with the given properties instance.

    Methods inherited from class java.lang.Object

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

  • Method Details

    • isDefined

      public static boolean isDefined​(java.lang.String s)
      Returns whether the given input string equals the SQL.ENV indicator.
      Parameters:
      s - the input string
      Returns:
      s == SQL.ENV (content equals)
    • setupEnvironment

      public static void setupEnvironment​(java.util.Properties p)
      Sets up a new environment with the given properties instance.
      Parameters:
      p - the new properties
    • getProperty

      public static java.lang.String getProperty​(java.lang.String name)
      Retrieves a stored property for the given name.
      Parameters:
      name - the name of the stored property
      Returns:
      the mapped property value
    • clear

      public static void clear()
      Resets the current environment.