package com.planimod.core;

import javax.persistence.Column;
import javax.persistence.Entity;

import com.patrikdufresne.managers.ArchivableObject;

/**
 * The Section is only used to logically regroup position.
 */
@Entity
public class Section extends ArchivableObject {

	/**
	 * Name property
	 */
	public static final String NAME = "name"; //$NON-NLS-1$

	/**
	 * 
	 */
	private static final long serialVersionUID = 3059101410954013234L;

	/**
	 * Define a display name for the section.
	 * 
	 * @uml.property name="name"
	 */
	private String name;

	/**
	 * Getter of the property <tt>name</tt>
	 * 
	 * @return Returns the name.
	 */
	@Column(nullable = true)
	public String getName() {
		return this.name;
	}

	/**
	 * Setter of the property <tt>name</tt>
	 * 
	 * @param name
	 *            The name to set.
	 */
	public void setName(String name) {
		this.changeSupport
				.firePropertyChange(NAME, this.name, this.name = name);
	}

	@Override
	public String toString() {
		return "Section [name=" + this.name + "]"; //$NON-NLS-1$ //$NON-NLS-2$
	}

}
