Class RuleHome
- java.lang.Object
-
- fr.paris.lutece.plugins.document.business.rules.RuleHome
-
public final class RuleHome extends java.lang.ObjectThis class provides instances management methods (create, find, ...) for Rule objects
-
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Rulecreate(Rule rule)Creation of an instance of rulestatic java.util.List<Rule>findAll(java.util.Locale locale)Returns a collection of rules objectsstatic RulefindByPrimaryKey(int nKey)Returns an instance of a rule whose identifier is specified in parameterstatic java.util.Collection<Rule>findByRuleTypeKey(java.lang.String strRuleTypeKey)Returns a collection of rules objects specified by rule type keystatic java.lang.StringgetRuleTypeKey(Rule rule)Returns the rule type of a given class typestatic java.util.Collection<Rule>getRuleTypes()Returns all rule typesstatic fr.paris.lutece.util.ReferenceListgetRuleTypesList(java.util.Locale locale)Returns the rule types liststatic RulenewInstance(java.lang.String strRuleTypeId)Create a new instance of a rule of a given typestatic voidremove(int nRuleId)Remove the Rule whose identifier is specified in parameterstatic Ruleupdate(Rule rule)Update of the rule which is specified in parameter
-
-
-
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
-
-