@Entity public class PageRuleImpl extends Object implements PageRule, ProfileEntity
| Modifier and Type | Field and Description | 
|---|---|
| protected Long | id | 
| protected String | matchRule | 
| Constructor and Description | 
|---|
| PageRuleImpl() | 
| Modifier and Type | Method and Description | 
|---|---|
| PageRule | cloneEntity()Builds a copy of this content rule. | 
| <G extends PageRule> | createOrRetrieveCopyInstance(MultiTenantCopyContext context)Clone this entity for the purpose of multiple tenancy. | 
| boolean | equals(Object obj) | 
| Long | getId()Gets the primary key. | 
| String | getMatchRule()The rule in the form of an MVEL expression | 
| int | hashCode() | 
| void | setId(Long id)Sets the primary key. | 
| void | setMatchRule(String matchRule)Sets the match rule used to test this item. | 
public String getMatchRule()
SimpleRulegetMatchRule in interface SimpleRulepublic void setMatchRule(String matchRule)
SimpleRulesetMatchRule in interface SimpleRulematchRule - the rule as an MVEL stringpublic PageRule cloneEntity()
PageRulecloneEntity in interface PageRulepublic <G extends PageRule> CreateResponse<G> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException
MultiTenantCloneable
 public CreateResponse<MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException {
      CreateResponse<MyClass> createResponse = super.createOrRetrieveCopyInstance(context);
      if (createResponse.isAlreadyPopulated()) {
          return createResponse;
      }
      MyClass myClone = createResponse.getClone();
      //copy extended field values on myClone here
      return createResponse;
 }
 
 
 Support should also be added for @Embeddable classes that contribute fields (collections or basic) to a cloneable entity:
 
 
 public CreateResponse<G extends MyClass> createOrRetrieveCopyInstance(MultiTenantCopyContext context) throws CloneNotSupportedException {
      CreateResponse createResponse = context.createOrRetrieveCopyInstance(this);
      MyClass myClone = createResponse.getClone();
      //copy extended field values on myClone here
      return createResponse;
 }
  createOrRetrieveCopyInstance in interface MultiTenantCloneable<PageRule>context - a context object providing persistence and library functionality for copying entitiesCloneNotSupportedException - if there's a problem detected with the cloning configurationCopyright © 2020. All rights reserved.