@Override
	public int compareTo(ElementRef o) {
		int diff = pageRef.compareTo(o.pageRef);
		if(diff != 0) return diff;
		return id.compareTo(o.id);
	}
@ Override public int compareTo ( ElementRef o ) { int diff = pageRef . compareTo ( o . pageRef ) ; if ( diff != 0 ) return diff ; return id . compareTo ( o . id ) ; }
Orders by page then id.

@see  PageRef#compareTo(com.semanticcms.core.model.PageRef)