package org.adligo.models.core.shared;

import org.adligo.i.util.shared.I_Immutable;

public class SimpleStorageInfo implements I_StorageInfo, I_Immutable {

	private String storeName;
	
	public SimpleStorageInfo() {
		storeName = "DEFAULT";
	}
	
	public SimpleStorageInfo(String name) {
		storeName = name;
	}
	
	public Class getDetailClass() {
		return this.getClass();
	}

	public I_CustomInfo toImmutable() throws ValidationException {
		return this;
	}

	public I_CustomInfo toMutant() throws ValidationException {
		return this;
	}

	public boolean isValidatable() {
		return false;
	}

	public String getStoreName() {
		return storeName;
	}

	public String getImmutableFieldName() {
		return "storeName";
	}

	public void isValid() throws ValidationException {
		if (storeName == null) {
			throw new ValidationException("SimpleStorageInfo requires a store name.",
					I_Validateable.IS_VALID);
		}
	}
	
	public String toString() {
		return "SimpleStorageInfo[" + storeName + "]";
	}
	
}

@@ -302,24 +302,592 @@
  name;%0A%09%7D%0A%09%0A
+%09@Override%0A%09public int hashCode() %7B%0A%09%09final int prime = 31;%0A%09%09int result = 1;%0A%09%09result = prime * result%0A%09%09%09%09+ ((storeName == null) ? 0 : storeName.hashCode());%0A%09%09return result;%0A%09%7D%0A%0A%09@Override%0A%09public boolean equals(Object obj) %7B%0A%09%09if (this == obj)%0A%09%09%09return true;%0A%09%09if (obj == null)%0A%09%09%09return false;%0A%09%09if (getClass() != obj.getClass())%0A%09%09%09return false;%0A%09%09SimpleStorageInfo other = (SimpleStorageInfo) obj;%0A%09%09if (storeName == null) %7B%0A%09%09%09if (other.storeName != null)%0A%09%09%09%09return false;%0A%09%09%7D else if (!storeName.equals(other.storeName))%0A%09%09%09return false;%0A%09%09return true;%0A%09%7D%0A%0A
 %09public Clas

equals hashcode