FileDocCategorySizeDatePackage
PrimaryKey.javaAPI DocHibernate 3.2.51061Sat Feb 12 00:19:50 GMT 2005org.hibernate.mapping

PrimaryKey

public class PrimaryKey extends Constraint
A primary key constraint
author
Gavin King

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringsqlConstraintString(org.hibernate.dialect.Dialect dialect)

		StringBuffer buf = new StringBuffer("primary key (");
		Iterator iter = getColumnIterator();
		while ( iter.hasNext() ) {
			buf.append( ( (Column) iter.next() ).getQuotedName(dialect) );
			if ( iter.hasNext() ) buf.append(", ");
		}
		return buf.append(')").toString();
	
public java.lang.StringsqlConstraintString(org.hibernate.dialect.Dialect dialect, java.lang.String constraintName, java.lang.String defaultCatalog, java.lang.String defaultSchema)

		StringBuffer buf = new StringBuffer(
			dialect.getAddPrimaryKeyConstraintString(constraintName)
		).append('(");
		Iterator iter = getColumnIterator();
		while ( iter.hasNext() ) {
			buf.append( ( (Column) iter.next() ).getQuotedName(dialect) );
			if ( iter.hasNext() ) buf.append(", ");
		}
		return buf.append(')").toString();