Class QueryPlus.DefaultDependencies

    • Field Detail

      • m_fTraceEnabled

        protected boolean m_fTraceEnabled
        Flag that indicates tracing mode.
      • m_fSanity

        protected boolean m_fSanity
        A flag that enables sanity checking.
      • m_fExtendedLanguage

        protected boolean m_fExtendedLanguage
        Flag that controls whether we except Map, and List as literals. This gives a json like feel to the language.
      • m_fSilent

        protected boolean m_fSilent
        A flag indicating whether the query session is running in silent mode.
      • m_sTitle

        protected String m_sTitle
        String to use for Title that heads each result displayed.
      • m_fExitWhenProcessingComplete

        protected boolean m_fExitWhenProcessingComplete
        A flag indicating whether a CohQL session should be exited when the list of statements has been executed.
      • m_listStatements

        protected List<String> m_listStatements
        A list of statements to execute when the CohQL session starts.
      • m_listFiles

        protected List<String> m_listFiles
        A list of statement script files to execute when the CohQL session starts.
      • m_sGarFileName

        protected String m_sGarFileName
        The name of an optional GAR file to load.
      • m_sApplicationName

        protected String m_sApplicationName
        An optional application name to use. This is only used in combination with the GAR file named in m_sGarFileName.
      • m_sDomainPartitions

        protected String[] m_sDomainPartitions
        A comma delimited list of domain partition names. This is only used in combination with the GAR file named in m_sGarFileName.
      • m_timeout

        protected com.oracle.coherence.common.util.Duration m_timeout
        The timeout value to use for CohQL statement execution.
    • Constructor Detail

      • DefaultDependencies

        public DefaultDependencies​(PrintWriter writer,
                                   BufferedReader reader,
                                   CoherenceQueryLanguage language)
        Create a DefaultDependencies instance that will use the specified PrintWriter and BufferedReader for output and input.
        Parameters:
        writer - the PrintWriter to use to display output
        reader - the reader to obtain user input
        language - an instance of CoherenceQueryLanguage
    • Method Detail

      • setTraceEnabled

        public void setTraceEnabled​(boolean fTraceEnabled)
        Set whether trace logging is enabled.
        Parameters:
        fTraceEnabled - is trace logging enabled
      • isTraceEnabled

        public boolean isTraceEnabled()
        Description copied from interface: QueryPlus.Dependencies
        Return whether trace is enabled. Enabling trace displays verbose output when executing statements.
        Specified by:
        isTraceEnabled in interface QueryPlus.Dependencies
        Returns:
        true if trace is enabled, otherwise returns false
      • setSanityCheckingEnabled

        public void setSanityCheckingEnabled​(boolean fSanity)
        Set whether sanity checking is enabled.
        Parameters:
        fSanity - is sanity checking enabled
      • isSanityChecking

        public boolean isSanityChecking()
        Description copied from interface: QueryPlus.Dependencies
        Return whether sanity checking should be enabled when executing statements.
        Specified by:
        isSanityChecking in interface QueryPlus.Dependencies
        Returns:
        whether sanity checking should be enabled when executing statements
      • setExtendedLanguage

        public void setExtendedLanguage​(boolean fExtendedLanguage)
        Set whether extended language features should be enabled.
        Parameters:
        fExtendedLanguage - whether extended language features should be enabled
      • setExitWhenProcessingComplete

        public void setExitWhenProcessingComplete​(boolean fExit)
        Set the flag that indicates the QueryPlus process should exit after processing the statements from the command line.
        Parameters:
        fExit - true if QueryPlus should exit after processing the command line statements
      • isExitWhenProcessingComplete

        public boolean isExitWhenProcessingComplete()
        Description copied from interface: QueryPlus.Dependencies
        Return whether the QueryPlus session should exit once all of the statements added to the statements list have been executed.
        Specified by:
        isExitWhenProcessingComplete in interface QueryPlus.Dependencies
        Returns:
        whether the QueryPlus session should exit once all of the statements added to the statements list have been executed
      • setStatements

        public void setStatements​(List<String> listStatements)
        Set the list of statements to execute before the QueryPlus session starts.
        Parameters:
        listStatements - the list of statements to execute before the QueryPlus session starts
      • getStatements

        public List<String> getStatements()
        Description copied from interface: QueryPlus.Dependencies
        Return the list of statements that should be executed prior to the start of the CohQL session.
        Specified by:
        getStatements in interface QueryPlus.Dependencies
        Returns:
        the list of statements that should be executed prior to the start of the CohQL session
      • setFiles

        public void setFiles​(List<String> listFiles)
        Set the list of statement files to execute before the QueryPlus session starts.
        Parameters:
        listFiles - the list of flies of QueryPlus statements to execute before the QueryPlus session starts.
      • getFiles

        public List<String> getFiles()
        Description copied from interface: QueryPlus.Dependencies
        Return the list of statement script files that should be executed prior to the start of the CohQL session.
        Specified by:
        getFiles in interface QueryPlus.Dependencies
        Returns:
        the list of statements that should be executed prior to the start of the CohQL session
      • isSilent

        public boolean isSilent()
        Description copied from interface: QueryPlus.Dependencies
        Return true if the current query session is running in silent mode.
        Specified by:
        isSilent in interface QueryPlus.Dependencies
        Returns:
        true if the current session is running in silent mode
      • setSilentMode

        public void setSilentMode​(boolean fSilent)
        Set the flag indicating that the QueryPlus session is running in silent mode.
        Parameters:
        fSilent - true to indicate that the QueryPlus session is running in silent mode.
      • setTitle

        public void setTitle​(String sTitle)
        Set the title that will be displayed as the results heading.
        Parameters:
        sTitle - the title that will be displayed as the results heading
      • setStatementExecutor

        public void setStatementExecutor​(StatementExecutor executor)
        Set the StatementExecutor to use to parse and execute statements.
        Parameters:
        executor - the StatementExecutor to use
      • setGarFileName

        public void setGarFileName​(String sGarFile)
        Set the name of the GAR file to load before starting the QueryPlus session. This name should point to an existing GAR file or an exploded GAR file directory.
        Parameters:
        sGarFile - the name of the GAR file to load
      • getGarFileName

        public String getGarFileName()
        Description copied from interface: QueryPlus.Dependencies
        Return the name of the optional GAR file to load before running QueryPlus.
        Specified by:
        getGarFileName in interface QueryPlus.Dependencies
        Returns:
        the name of the optional GAR file to load before running QueryPlus
      • setApplicationName

        public void setApplicationName​(String sApplicationName)
        Set the application name to use. This name only applies if the m_sGarFileName has also been set.
        Parameters:
        sApplicationName - the application name to use
      • setDomainPartitions

        public void setDomainPartitions​(String[] asDomainPartitions)
        Set the array of domain partition names to use. This list only applies if the m_sGarFileName has also been set.
        Parameters:
        asDomainPartitions - the comma delimited list of domain partition names
      • getDomainPartitions

        public String[] getDomainPartitions()
        Description copied from interface: QueryPlus.Dependencies
        Return the optional array of domain partition names to use if loading a GAR file.
        Specified by:
        getDomainPartitions in interface QueryPlus.Dependencies
        Returns:
        the optional array of domain partition names to use if loading a GAR file
      • setTimeout

        public void setTimeout​(com.oracle.coherence.common.util.Duration timeout)
        Set the timeout value for CohQL statement execution.
        Parameters:
        timeout - timeout value for CohQL statement execution
      • getTimeout

        public com.oracle.coherence.common.util.Duration getTimeout()
        Description copied from interface: QueryPlus.Dependencies
        Return the initial value that will be set as the CohQL statement timeout.
        Specified by:
        getTimeout in interface QueryPlus.Dependencies
        Returns:
        the initial value that will be set as the CohQL statement timeout.