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

eu.peppol.identifier.TransactionIdentifier Maven / Gradle / Ivy

Go to download

Holds the stuff required by external components, which may be hooked into Oxalis. Classes and resources in this module should be made available to oxalis-inbound by placing it into a shared library in the web container.

There is a newer version: 4.1.2
Show newest version
/* Created by steinar on 20.05.12 at 13:00 */
package eu.peppol.identifier;

/**
 * Type safe value object holding a PEPPOL transaction id
 *
 * @author Steinar Overbeck Cook [email protected]
 */
public class TransactionIdentifier {

    private final String transactionId;

    public TransactionIdentifier(String transactionId) {
        this.transactionId = transactionId;
    }


    public static TransactionIdentifier valueFor(String transactionId) {
        return new TransactionIdentifier(transactionId);
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        TransactionIdentifier that = (TransactionIdentifier) o;

        if (!transactionId.equals(that.transactionId)) return false;

        return true;
    }

    @Override
    public int hashCode() {
        return transactionId.hashCode();
    }

    @Override
    public String toString() {
        return transactionId;
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy