|
|
@ -6,7 +6,6 @@ |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
package com.fr.third.org.hibernate.mapping; |
|
|
|
package com.fr.third.org.hibernate.mapping; |
|
|
|
import java.util.Iterator; |
|
|
|
import java.util.Iterator; |
|
|
|
import java.util.List; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
import com.fr.third.org.hibernate.dialect.Dialect; |
|
|
|
import com.fr.third.org.hibernate.dialect.Dialect; |
|
|
|
import com.fr.third.org.hibernate.internal.util.StringHelper; |
|
|
|
import com.fr.third.org.hibernate.internal.util.StringHelper; |
|
|
@ -59,18 +58,7 @@ public class PrimaryKey extends Constraint { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String sqlConstraintString(Dialect dialect) { |
|
|
|
public String sqlConstraintString(Dialect dialect) { |
|
|
|
List<Column> columnList = getColumns(); |
|
|
|
return dialect.sqlConstraintString(getColumns()); |
|
|
|
StringBuilder buf = new StringBuilder(dialect.getPrimaryKeyString(columnList)).append(" ("); |
|
|
|
|
|
|
|
Iterator iter = getColumnIterator(); |
|
|
|
|
|
|
|
while ( iter.hasNext() ) { |
|
|
|
|
|
|
|
Column column = (Column) iter.next(); |
|
|
|
|
|
|
|
buf.append( column.getQuotedName(dialect) ); |
|
|
|
|
|
|
|
buf.append( dialect.getPrimaryKeyPostfix(column) ); |
|
|
|
|
|
|
|
if ( iter.hasNext() ) { |
|
|
|
|
|
|
|
buf.append(", "); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
return buf.append(')').toString(); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public String sqlConstraintString(Dialect dialect, String constraintName, String defaultCatalog, String defaultSchema) { |
|
|
|
public String sqlConstraintString(Dialect dialect, String constraintName, String defaultCatalog, String defaultSchema) { |
|
|
|