package cn.gov.customs.data.dm;

import java.sql.ResultSet;
import java.sql.SQLException;
import org.hibernate.tool.schema.extract.internal.SequenceInformationExtractorLegacyImpl;


public class SequenceInformationExtractorDMDatabaseImpl extends SequenceInformationExtractorLegacyImpl {

    public static final SequenceInformationExtractorDMDatabaseImpl INSTANCE = new SequenceInformationExtractorDMDatabaseImpl();

    @Override
    protected String sequenceCatalogColumn() {
        return null;
    }

    @Override
    protected String sequenceSchemaColumn() {
        return null;
    }

    @Override
    protected String sequenceStartValueColumn() {
        return null;
    }

    @Override
    protected String sequenceMinValueColumn() {
        return "min_value";
    }

    @Override
    protected Long resultSetMaxValue(ResultSet resultSet) throws SQLException {
        return resultSet.getBigDecimal( "max_value" ).longValue();
    }

    @Override
    protected String sequenceIncrementColumn() {
        return "increment_by";
    }
}
