package org.openregistry.core.domain.jpa.sor;

import org.openregistry.core.domain.sor.ReconciliationCriteria;
import org.openregistry.core.domain.sor.SorPerson;
import org.openregistry.core.domain.IdentifierType;
import org.javalid.annotations.validation.NotNull;
import org.javalid.annotations.core.ValidateDefinition;

import java.util.Map;
import java.util.HashMap;

/**
 * 
 *
 * @author Scott Battaglia
 * @version $Revision$ $Date$
 * @since 1.0.0
 */
@ValidateDefinition
public final class JpaReconciliationCriteriaImpl implements ReconciliationCriteria {

    @NotNull
    private SorPerson person = new JpaSorPersonImpl();

    private Map<IdentifierType, String> identifiersByType = new HashMap<IdentifierType, String>();

    private String emailAddress;

    private String phoneNumber;

    private String addressLine1;

    private String addressLine2;

    private String city;

    private String region;

    private String postalCode;

    public String getEmailAddress() {
        return this.emailAddress;
    }

    public void setEmailAddress(final String emailAddress) {
        this.emailAddress = emailAddress;
    }

    public String getPhoneNumber() {
        return this.phoneNumber;
    }

    public void setPhoneNumber(final String phoneNumber) {
        this.phoneNumber = phoneNumber;
    }

    public SorPerson getPerson() {
        return this.person;
    }

    public Map<IdentifierType, String> getIdentifiersByType() {
        return this.identifiersByType;
    }

    public String getAddressLine1() {
        return addressLine1;
    }

    public void setAddressLine1(String addressLine1) {
        this.addressLine1 = addressLine1;
    }

    public String getAddressLine2() {
        return addressLine2;
    }

    public void setAddressLine2(String addressLine2) {
        this.addressLine2 = addressLine2;
    }

    public String getCity() {
        return city;
    }

    public void setCity(String city) {
        this.city = city;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public String getPostalCode() {
        return postalCode;
    }

    public void setPostalCode(String postalCode) {
        this.postalCode = postalCode;
    }
}

@@ -313,16 +313,71 @@
 inition;
+%0Aimport org.springframework.core.style.ToStringCreator;
 %0A%0Aimport
@@ -1003,16 +1003,663 @@
 lCode;%0A%0A
+    public String toString() %7B%0A        final ToStringCreator toStringCreator = new ToStringCreator(this);%0A        toStringCreator.append(%22person%22, this.person);%0A        toStringCreator.append(%22emailAddress%22, this.emailAddress);%0A        toStringCreator.append(%22phoneNumber%22, this.phoneNumber);%0A        toStringCreator.append(%22addressLine1%22, this.addressLine1);%0A        toStringCreator.append(%22addressLine2%22, this.addressLine2);%0A        toStringCreator.append(%22city%22, this.city);%0A        toStringCreator.append(%22region%22, this.region);%0A        toStringCreator.append(%22postalCode%22, this.postalCode);%0A%0A        return toStringCreator.toString();%0A    %7D%0A%0A
     publ

NOJIRA add a toString method