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

com.netgrif.application.engine.petrinet.domain.dataset.logic.CaseChangedFields.groovy Maven / Gradle / Ivy

Go to download

System provides workflow management functions including user, role and data management.

There is a newer version: 6.3.3
Show newest version
package com.netgrif.application.engine.petrinet.domain.dataset.logic

class CaseChangedFields implements Serializable {

    private static final long serialVersionUID = 2299918326436821185L;

    protected String caseId
    protected Map changedFields = new HashMap<>()

    CaseChangedFields() {
    }

    CaseChangedFields(String caseId) {
        this.caseId = caseId
    }

    CaseChangedFields(String caseId, Map changedFields) {
        this(caseId)
        this.changedFields = changedFields
    }

    void mergeChanges(Map newChangedFields) {
        mergeChanges(this.changedFields, newChangedFields)
    }

    void mergeChanges(Map changedFields, Map newChangedFields) {
        newChangedFields.forEach({ fieldId, changedField ->
            if (changedFields.containsKey(fieldId)) {
                changedFields.get(fieldId).merge(changedField)

            } else {
                changedFields.put(fieldId, changedField)
            }
        })
    }

    String getCaseId() {
        return caseId
    }

    Map getChangedFields() {
        return changedFields
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy