com.jpattern.orm.crud.SequenceColumnValueGenerator Maven / Gradle / Ivy
package com.jpattern.orm.crud;
import com.jpattern.orm.dialect.Dialect;
/**
*
* @author Francesco Cina
*
* 13/giu/2011
*/
public class SequenceColumnValueGenerator extends AColumnValueGenerator {
/**
*
*/
public SequenceColumnValueGenerator(String name) {
super(name);
}
@Override
public String insertQueryParameter(Dialect dialect, String currentValue) {
return dialect.insertQuerySequence(getName());
}
@Override
public String insertColumn(Dialect dialect, String currentValue) {
return currentValue;
}
@Override
public boolean returnGeneratedKeys() {
return true;
}
@Override
public boolean isAutoGenerated() {
return true;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy