Class RuleHome


  • public final class RuleHome
    extends Object
    This class provides instances management methods (create, find, ...) for Rule objects
    • Method Detail

      • create

        public static Rule create​(Rule rule)
        Creation of an instance of rule
        Parameters:
        rule - The instance of the rule which contains the informations to store
        Returns:
        The instance of rule which has been created with its primary key.
      • update

        public static Rule update​(Rule rule)
        Update of the rule which is specified in parameter
        Parameters:
        rule - The instance of the rule which contains the data to store
        Returns:
        The instance of the rule which has been updated
      • remove

        public static void remove​(int nRuleId)
        Remove the Rule whose identifier is specified in parameter
        Parameters:
        nRuleId - The Rule Id
      • findByPrimaryKey

        public static Rule findByPrimaryKey​(int nKey)
        Returns an instance of a rule whose identifier is specified in parameter
        Parameters:
        nKey - The Primary key of the rule
        Returns:
        An instance of rule
      • findAll

        public static List<Rule> findAll​(Locale locale)
        Returns a collection of rules objects
        Parameters:
        locale - the current local
        Returns:
        A collection of rules
      • getRuleTypesList

        public static fr.paris.lutece.util.ReferenceList getRuleTypesList​(Locale locale)
        Returns the rule types list
        Parameters:
        locale - the Locale
        Returns:
        The rule types list
      • newInstance

        public static Rule newInstance​(String strRuleTypeId)
        Create a new instance of a rule of a given type
        Parameters:
        strRuleTypeId - The key name of the rule type
        Returns:
        A new Rule instance
      • getRuleTypes

        public static Collection<Rule> getRuleTypes()
        Returns all rule types
        Returns:
        A collection of rule types
      • getRuleTypeKey

        public static String getRuleTypeKey​(Rule rule)
        Returns the rule type of a given class type
        Parameters:
        rule - The Rule object
        Returns:
        The rule type
      • findByRuleTypeKey

        public static Collection<Rule> findByRuleTypeKey​(String strRuleTypeKey)
        Returns a collection of rules objects specified by rule type key
        Parameters:
        strRuleTypeKey - The rule type key
        Returns:
        A collection of Rule