/*******************************************************************************
 * Copyright (c) 2007, 2012 Oracle. All rights reserved.
 * This program and the accompanying materials are made available under the
 * terms of the Eclipse Public License v1.0, which accompanies this distribution
 * and is available at http://www.eclipse.org/legal/epl-v10.html.
 * 
 * Contributors:
 *     Oracle - initial API and implementation
 ******************************************************************************/
package org.eclipse.jpt.jpa.core.resource.java;

import org.eclipse.jpt.common.core.utility.TextRange;

/**
 * Corresponds to the JPA annotation
 * <code>javax.persistence.SequenceGenerator</code>
 * <p>
 * Provisional API: This interface is part of an interim API that is still
 * under development and expected to change significantly before reaching
 * stability. It is available at this early stage to solicit feedback from
 * pioneering adopters on the understanding that any code that uses this API
 * will almost certainly be broken (repeatedly) as the API evolves.
 * 
 * @version 2.1
 * @since 2.0
 */
public interface SequenceGeneratorAnnotation
	extends GeneratorAnnotation
{
	String ANNOTATION_NAME = JPA.SEQUENCE_GENERATOR;

	/**
	 * Corresponds to the 'sequenceName' element of the *Generator annotation.
	 * Return null if the element does not exist in Java.
	 */
	String getSequenceName();
		String SEQUENCE_NAME_PROPERTY = "sequenceName"; //$NON-NLS-1$

	/**
	 * Corresponds to the 'sequenceName' element of the *Generator annotation.
	 * Set to null to remove the element.
	 */
	void setSequenceName(String sequenceName);
	
	/**
	 * Return the {@link TextRange} for the 'sequenceName' element. If the element 
	 * does not exist return the {@link TextRange} for the SequenceGenerator annotation.
	 */
	TextRange getSequenceNameTextRange();

	/**
	 * Return whether the specified position touches the 'sequenceName' element.
	 * Return false if the element does not exist.
	 */
	boolean sequenceNameTouches(int pos);
}
