Java tutorial
/* * To change this license header, choose License Headers in Project Properties. * To change this template file, choose Tools | Templates * and open the template in the editor. */ package com.sg.domail.vo; import org.apache.commons.lang3.builder.EqualsBuilder; import org.apache.commons.lang3.builder.HashCodeBuilder; /** * * @author tarasev */ public class SchemaId { private final long id; public SchemaId(long id) { this.id = id; } /** * @return the id */ public long getId() { return id; } @Override public boolean equals(Object obj) { if (this == obj) { return true; } if (obj == null || this.getClass() != obj.getClass()) { return false; } SchemaId other = (SchemaId) obj; return new EqualsBuilder().append(this.id, other.id).isEquals(); } @Override public int hashCode() { return new HashCodeBuilder().append(id).build(); } }