Class SetStatusDateEntityListenerContribution

java.lang.Object
ch.tocco.nice2.entityoperation.api.SetStatusDateEntityListenerContribution

public class SetStatusDateEntityListenerContribution extends Object
example: set the "confirmed_datetime" field on the "Case" entity as soon as the "relCase_status" changes to "confirmed". the type of the field is datetime and it will not be overwritten if it's already set.

 @Bean
 @SetStatusDateContribution
 public SetStatusDateEntityListenerContribution donationRelDonationStatusRecallSetStatusDate() {
     SetStatusDateEntityListenerContribution bean = new SetStatusDateEntityListenerContribution();
     bean.setEntityName("Donation");
     bean.setFieldName("recall_date");
     bean.setRelationName("relDonation_status");
     bean.setUniqueId("recall");
     bean.setFieldType("date");
     bean.setOverwrite(false);
     return bean;
 }
 
Use the identifier to remove contributions form standard modules in customer modules. Identifiers do not have to be unique, every contribution with the given identifier will be removed!
  • Field Details

    • FIELD_TYPE_DATE

      public static final String FIELD_TYPE_DATE
      See Also:
    • FIELD_TYPE_DATETIME

      public static final String FIELD_TYPE_DATETIME
      See Also:
    • VALID_FIELD_TYPES

      public static final com.google.common.collect.ImmutableSet<String> VALID_FIELD_TYPES
  • Constructor Details

    • SetStatusDateEntityListenerContribution

      public SetStatusDateEntityListenerContribution()
  • Method Details

    • getEntityName

      public String getEntityName()
    • setEntityName

      public void setEntityName(String entityName)
    • getRelationName

      public String getRelationName()
    • setRelationName

      public void setRelationName(String relationName)
    • getUniqueId

      public String getUniqueId()
    • setUniqueId

      public void setUniqueId(String uniqueId)
    • getFieldName

      public String getFieldName()
    • setFieldName

      public void setFieldName(String fieldName)
    • getIdentifier

      public String getIdentifier()
    • setIdentifier

      public void setIdentifier(String identifier)
    • getFieldType

      public String getFieldType()
    • setFieldType

      public void setFieldType(String fieldType)
    • isOverwrite

      public boolean isOverwrite()
    • setOverwrite

      public void setOverwrite(boolean overwrite)
    • getSecondaryFieldName

      public String getSecondaryFieldName()
    • setSecondaryFieldName

      public void setSecondaryFieldName(String secondaryFieldName)
    • getSecondaryFieldType

      public String getSecondaryFieldType()
    • setSecondaryFieldType

      public void setSecondaryFieldType(String secondaryFieldType)