Class NamedQuery

  • All Implemented Interfaces:
    java.io.Serializable

    public class NamedQuery
    extends java.lang.Object
    implements java.io.Serializable
    This class represents a single named query. Instances of this class are serialized using the default Ignition XML serialization and stored as project resources.
    See Also:
    Serialized Form
    • Field Detail

      • RESOURCE_TYPE

        public static final ResourceType RESOURCE_TYPE
      • ROOT_FOLDER

        public static final java.util.UUID ROOT_FOLDER
      • PARAMETER_TYPES

        public static final java.util.Set<DataType> PARAMETER_TYPES
        Suggested list of acceptable data types for named query parameters
      • DATABASE_PARAM_IDENTIFIER

        public static final java.lang.String DATABASE_PARAM_IDENTIFIER
        See Also:
        Constant Field Values
      • DATABASE_PARAM_OPTION

        public static final java.lang.String DATABASE_PARAM_OPTION
        See Also:
        Constant Field Values
    • Constructor Detail

      • NamedQuery

        public NamedQuery()
        Public empty ctor for xml serialization
      • NamedQuery

        public NamedQuery​(@Nonnull
                          NamedQuery nq)
        Copy constructor. Used by reports to override query limits and caching
        Parameters:
        nq - Named Query to copy. Not null.
    • Method Detail

      • getQuery

        public java.lang.String getQuery()
      • setQuery

        public void setQuery​(java.lang.String query)
      • getFallbackValue

        public java.lang.String getFallbackValue()
      • setFallbackValue

        public void setFallbackValue​(java.lang.String fallbackValue)
      • isFallbackEnabled

        public boolean isFallbackEnabled()
      • setFallbackEnabled

        public void setFallbackEnabled​(boolean fallbackEnabled)
      • getDatabase

        public java.lang.String getDatabase()
      • setDatabase

        public void setDatabase​(java.lang.String database)
      • getDescription

        public java.lang.String getDescription()
      • setDescription

        public void setDescription​(java.lang.String description)
      • isEnabled

        public boolean isEnabled()
      • setEnabled

        public void setEnabled​(boolean enabled)
      • isCachingEnabled

        public boolean isCachingEnabled()
      • setCachingEnabled

        public void setCachingEnabled​(boolean cachingEnabled)
      • getCacheAmount

        public int getCacheAmount()
      • setCacheAmount

        public void setCacheAmount​(int cacheAmount)
      • getCacheUnit

        public TimeUnits getCacheUnit()
      • setCacheUnit

        public void setCacheUnit​(TimeUnits cacheUnit)
      • getCacheInMillis

        public long getCacheInMillis()
      • isAutoBatchEnabled

        public boolean isAutoBatchEnabled()
      • setAutoBatchEnabled

        public void setAutoBatchEnabled​(boolean autoBatchEnabled)
      • isUseMaxReturnSize

        public boolean isUseMaxReturnSize()
      • setUseMaxReturnSize

        public void setUseMaxReturnSize​(boolean useMaxReturnSize)
      • getMaxReturnSize

        public long getMaxReturnSize()
      • setMaxReturnSize

        public void setMaxReturnSize​(long maxReturnSize)
      • setPermissions

        public void setPermissions​(java.util.List<ZoneRoleRequirement> permissions)
      • getSyntaxProvider

        public java.lang.String getSyntaxProvider()
      • setSyntaxProvider

        public void setSyntaxProvider​(java.lang.String syntax)
      • getNamedTheme

        public NamedTheme getNamedTheme()
        Gets the current NamedTheme. See NamedTheme
        Returns:
        selected NamedTheme, to be applied to the CodeEditor instance in NamedQueryAuthoringPanel
      • setNamedTheme

        public void setNamedTheme​(NamedTheme namedTheme)
        Sets the current NamedTheme. Ensures that theme choices persist across designer sessions.
        Parameters:
        namedTheme - Current NamedTheme. Update when CodeEditor NamedTheme is changed.
      • isValidParamName

        public static boolean isValidParamName​(java.lang.String paramName)
        Checks to make sure a name is at least one character long and doesn't contain special characters Does not check for duplicates. See the isUniqueParamName method in ParameterTable.java
        Parameters:
        paramName - String parameter name to check. Do not include the key characters "{", ":", etc.
        Returns:
        true if the name is valid, false if the name is invalid (likely due to special characters)