package com.palmnest.model;

import javax.persistence.Entity;
import javax.persistence.Table;

@Entity
@Table(name = "tb_dictionary_item")
public class Element extends AbstractElement implements java.io.Serializable, Comparable {

	// Constructors

	private static final long serialVersionUID = 1L;

	/**
	 * default constructor
	 */
	public Element() {
	}

	/**
	 * minimal constructor
	 */
	public Element(Long id, ElementGroup elementGroup) {
		super(id, elementGroup);
	}


	public int compareTo(Object arg0) {
		if (arg0 instanceof Element) {
			return (this.getOrderno().intValue() - ((Element) arg0).getOrderno().intValue());
		} else {
			return -1;
		}
	}

}
