package org.shypl.sna;

public abstract class SocialNetwork {
	private final int    id;
	private final String code;
	private final String name;

	public SocialNetwork(int id, String code, String name) {
		this.id = id;
		this.code = code;
		this.name = name;
	}

	public int getId() {
		return id;
	}

	public String getCode() {
		return code;
	}

	public String getName() {
		return name;
	}

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

	@Override
	public boolean equals(Object obj) {
		return obj == this || obj instanceof SocialNetwork && ((SocialNetwork)obj).id == id;
	}
}

@@ -17,16 +17,46 @@
 l.sna;%0A%0A
+import java.io.Serializable;%0A%0A
 public a
@@ -83,16 +83,67 @@
 Network 
+implements Comparable%3CSocialNetwork%3E, Serializable 
 %7B%0A%09priva
@@ -663,11 +663,126 @@
 = id;%0A%09%7D
+%0A%0A%09@Override%0A%09public int compareTo(SocialNetwork other) %7B%0A%09%09return Integer.compare(this.getId(), other.getId());%0A%09%7D
 %0A%7D%0A

add Comparable and Serializable to SocialNetwork