All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.silanis.esl.api.model.Model Maven / Gradle / Ivy

There is a newer version: 11.59.0
Show newest version
package com.silanis.esl.api.model;
//
import java.util.HashSet;
import java.util.Set;
import com.fasterxml.jackson.annotation.*;

@JsonFilter("DirtyFieldsFilter")
public class Model implements java.io.Serializable
{

   // Empty Constructor
   public Model ( ) {}

   @JsonIgnore
   private Set dirtyFields = new HashSet();

   @JsonIgnore
   protected void setDirty(String field) {
       dirtyFields.add(field);
   }

   @JsonIgnore
   public boolean isDirty(String field) {
       return dirtyFields.contains(field);
   }

   @JsonIgnore
   public Set getDirtyFields() {
       return dirtyFields;
   }


   public void clean() {
       dirtyFields.clear();
   }

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy