1 | private class DropPrimaryKeySqlExtractor implements IDialectSqlExtractor {↵ | | 1 | private class DropConstraintSqlExtractor implements IDialectSqlExtractor {↵
|
|
2 | ↵ | | 2 | ↵
|
3 | String tableName;↵ | | 3 | private String tableName;↵
|
4 | String pkName;↵ | | 4 | private String constraintName;↵
|
5 | ↵ | | |
|
6 | public DropPrimaryKeySqlExtractor(String tableName, String pkName)↵ | | 5 | public DropConstraintSqlExtractor(String tableName, String constraintName)↵
|
7 | {↵ | | 6 | {↵
|
8 | super();↵ | | 7 | super();↵
|
9 | this.tableName = tableName;↵ | | 8 | this.tableName = tableName;↵
|
10 | this.pkName = pkName;↵ | | 9 | this.constraintName = constraintName;↵
|
11 | }↵ | | 10 | }↵
|
|
12 | public String[] getSql(HibernateDialect dialect)↵ | | 11 | public String[] getSql(HibernateDialect dialect)↵
|
13 | {↵ | | 12 | {↵
|
14 | return new String[] { dialect.getDropPrimaryKeySQL(pkName, tableName, qualifier, prefs) };↵ | | 13 | return new String[] { dialect.getDropConstraintSQL(tableName, constraintName, qualifier, prefs) };↵
|
15 | }↵ | | 14 | }↵
|
|
16 | public boolean supportsOperation(HibernateDialect dialect)↵ | | 15 | public boolean supportsOperation(HibernateDialect dialect)↵
|
17 | {↵ | | 16 | {↵
|
18 | return true | | 17 | return dialect.supportsDropConstraint()
|