All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.hibernate.dialect.sequence.ANSISequenceSupport Maven / Gradle / Ivy

There is a newer version: 7.0.0.Alpha2
Show newest version
/*
 * Hibernate, Relational Persistence for Idiomatic Java
 *
 * License: GNU Lesser General Public License (LGPL), version 2.1 or later.
 * See the lgpl.txt file in the root directory or .
 */
package org.hibernate.dialect.sequence;

import org.hibernate.MappingException;

/**
 * ANSI SQL compliant sequence support, for dialects which
 * support the ANSI SQL syntax {@code next value for seqname}.
 *
 * @author Gavin King
 */
public class ANSISequenceSupport implements SequenceSupport {

	public static final SequenceSupport INSTANCE = new ANSISequenceSupport();

	@Override
	public final String getSelectSequenceNextValString(String sequenceName) {
		return "next value for " + sequenceName;
	}

	@Override
	public String getSelectSequencePreviousValString(String sequenceName) throws MappingException {
		return "current value for " + sequenceName;
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy