package it.mice.voila.runtime.entity;

import java.util.ArrayList;
import java.util.Collection;

public class EntityDiffResult {
	private String entityName;
	private String operation;
	private Collection<AttributeDiffResult> attributeDiff = new ArrayList<AttributeDiffResult>();
	
	public EntityDiffResult(String entityName, String operation) {
		super();
		this.entityName = entityName;
		this.operation = operation;
	}

	public String getEntityName() {
		return entityName;
	}


	public void setEntityName(String entityName) {
		this.entityName = entityName;
	}


	public String getOperation() {
		return operation;
	}


	public void setOperation(String operation) {
		this.operation = operation;
	}

	public Collection<AttributeDiffResult> getAttributeDiff() {
		return attributeDiff;
	}


	public void setAttributeDiff(Collection<AttributeDiffResult> attributeDiff) {
		this.attributeDiff = attributeDiff;
	}


	public static class AttributeDiffResult {
		private String attributeName;
		private Object oldValue;
		private Object newValue;
		
		public AttributeDiffResult(String attributeName, Object oldValue,
				Object newValue) {
			super();
			this.attributeName = attributeName;
			this.oldValue = oldValue;
			this.newValue = newValue;
		}

		public String getAttributeName() {
			return attributeName;
		}

		public void setAttributeName(String attributeName) {
			this.attributeName = attributeName;
		}

		public Object getOldValue() {
			return oldValue;
		}

		public void setOldValue(Object oldValue) {
			this.oldValue = oldValue;
		}

		public Object getNewValue() {
			return newValue;
		}

		public void setNewValue(Object newValue) {
			this.newValue = newValue;
		}
	}
}
