package cn.gov.customs.data.dm;

import org.hibernate.dialect.Dialect;
import org.hibernate.dialect.identity.GetGeneratedKeysDelegate;
import org.hibernate.dialect.identity.IdentityColumnSupportImpl;
import org.hibernate.id.PostInsertIdentityPersister;


public class DM8IdentityColumnSupport extends IdentityColumnSupportImpl {
    @Override
    public boolean supportsIdentityColumns() {
        return true;
    }

    @Override
    public boolean supportsInsertSelectIdentity() {
        return true;
    }

    @Override
    public String getIdentityColumnString(int type) {
        return "";
    }

    @Override
    public GetGeneratedKeysDelegate buildGetGeneratedKeysDelegate(
            PostInsertIdentityPersister persister, Dialect dialect) {
        return new DM8GetGeneratedKeysDelegate( persister, dialect );
    }

    @Override
    public String getIdentityInsertString() {
        return "default";
    }

}
