Class RuleHome


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

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static Rule create​(Rule rule)
      Creation of an instance of rule
      static java.util.List<Rule> findAll​(java.util.Locale locale)
      Returns a collection of rules objects
      static Rule findByPrimaryKey​(int nKey)
      Returns an instance of a rule whose identifier is specified in parameter
      static java.util.Collection<Rule> findByRuleTypeKey​(java.lang.String strRuleTypeKey)
      Returns a collection of rules objects specified by rule type key
      static java.lang.String getRuleTypeKey​(Rule rule)
      Returns the rule type of a given class type
      static java.util.Collection<Rule> getRuleTypes()
      Returns all rule types
      static fr.paris.lutece.util.ReferenceList getRuleTypesList​(java.util.Locale locale)
      Returns the rule types list
      static Rule newInstance​(java.lang.String strRuleTypeId)
      Create a new instance of a rule of a given type
      static void remove​(int nRuleId)
      Remove the Rule whose identifier is specified in parameter
      static Rule update​(Rule rule)
      Update of the rule which is specified in parameter
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • 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 java.util.List<Rule> findAll​(java.util.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​(java.util.Locale locale)
        Returns the rule types list
        Parameters:
        locale - the Locale
        Returns:
        The rule types list
      • newInstance

        public static Rule newInstance​(java.lang.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 java.util.Collection<Rule> getRuleTypes()
        Returns all rule types
        Returns:
        A collection of rule types
      • getRuleTypeKey

        public static java.lang.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 java.util.Collection<Rule> findByRuleTypeKey​(java.lang.String strRuleTypeKey)
        Returns a collection of rules objects specified by rule type key
        Parameters:
        strRuleTypeKey - The rule type key
        Returns:
        A collection of Rule