Class MRule

    • Constructor Detail

      • MRule

        public MRule​(Properties ctx,
                     int AD_Rule_ID,
                     String trxName)
        Standard Constructor
        Parameters:
        ctx - context
        AD_Rule_ID - id
        trxName - transaction
      • MRule

        public MRule​(Properties ctx,
                     ResultSet rs,
                     String trxName)
        Load Constructor
        Parameters:
        ctx - context
        rs - result set
        trxName - transaction
      • MRule

        public MRule​(MRule copy)
        Parameters:
        copy -
      • MRule

        public MRule​(Properties ctx,
                     MRule copy)
        Parameters:
        ctx -
        copy -
      • MRule

        public MRule​(Properties ctx,
                     MRule copy,
                     String trxName)
        Parameters:
        ctx -
        copy -
        trxName -
    • Method Detail

      • get

        public static MRule get​(int AD_Rule_ID)
        Get Rule from Cache (immutable)
        Parameters:
        AD_Rule_ID - id
        Returns:
        MRule
      • get

        public static MRule get​(Properties ctx,
                                int AD_Rule_ID)
        Get Rule from Cache (immutable)
        Parameters:
        ctx - context
        AD_Rule_ID - id
        Returns:
        MRule
      • get

        public static MRule get​(Properties ctx,
                                String ruleValue)
        Get Rule from Cache
        Parameters:
        ctx - context
        ruleValue - case sensitive rule Value
        Returns:
        Rule
      • getModelValidatorLoginRules

        public static List<MRule> getModelValidatorLoginRules​(Properties ctx)
        Get Model Validation Login Rules
        Parameters:
        ctx - context
        Returns:
        Rule
      • beforeSave

        protected boolean beforeSave​(boolean newRecord)
        Before Save
        Overrides:
        beforeSave in class PO
        Parameters:
        newRecord - new
        Returns:
        true
      • getScriptEngine

        public ScriptEngine getScriptEngine()
        Script Engine for this rule
        Returns:
        ScriptEngine
      • getEngineName

        public String getEngineName()
      • setContext

        public static void setContext​(ScriptEngine engine,
                                      Properties ctx,
                                      int windowNo)
        Set Context ctx to the engine based on windowNo
        Parameters:
        engine - ScriptEngine
        ctx - context
        windowNo - window number
      • convertKey

        public static String convertKey​(String key,
                                        int m_windowNo)
        Convert Key # -> _
        Parameters:
        key -
        m_windowNo -
        Returns:
        converted key