Example usage for org.hibernate.id PersistentIdentifierGenerator sqlDropStrings

List of usage examples for org.hibernate.id PersistentIdentifierGenerator sqlDropStrings

Introduction

In this page you can find the example usage for org.hibernate.id PersistentIdentifierGenerator sqlDropStrings.

Prototype

@Deprecated
String[] sqlDropStrings(Dialect dialect) throws HibernateException;

Source Link

Document

The SQL required to remove the underlying database objects.

Usage

From source file:org.n52.sos.ds.datasource.CustomConfiguration.java

License:Open Source License

protected List<String> generateIdentifierGeneratorDropScript(final Dialect d, final String c, final String s,
        final DatabaseMetadata m) throws MappingException, HibernateException {
    final List<String> script = new LinkedList<String>();
    final Iterator<PersistentIdentifierGenerator> itr = iterateGenerators(d, c, s);
    while (itr.hasNext()) {
        final PersistentIdentifierGenerator pig = itr.next();
        if (pig instanceof SequenceGenerator) {
            final SequenceGenerator sg = (SequenceGenerator) pig;
            if (!m.isSequence(sg.getSequenceName())) {
                continue;
            }/*from  w ww .j  a v a2  s .  c  o  m*/
        }
        script.addAll(Arrays.asList(pig.sqlDropStrings(d)));
    }
    return script;
}