View Javadoc

1   package org.kuali.mobility.database.entity;
2   
3   import org.hibernate.dialect.MySQL5Dialect;
4   
5   public class KMEMySql5Dialect extends MySQL5Dialect implements KMEDialect {
6   
7   	private boolean overrideAlterTable;
8   	
9   	@Override
10  	public String getAddForeignKeyConstraintString(String constraintName,
11  			String[] foreignKey, String referencedTable, String[] primaryKey,
12  			boolean referencesPrimaryKey) {
13  		if (overrideAlterTable) {
14  			return "";	
15  		}
16  		return super.getAddForeignKeyConstraintString(constraintName, foreignKey, referencedTable, primaryKey, referencesPrimaryKey);		
17  	}
18  	
19  	public boolean hasAlterTable() {
20  		if (overrideAlterTable) {
21  			return false;
22  		}
23  		return super.hasAlterTable();
24  	}
25  
26  	public boolean isOverrideAlterTable() {
27  		return overrideAlterTable;
28  	}
29  
30  	public void setOverrideAlterTable(boolean overrideAlterTable) {
31  		this.overrideAlterTable = overrideAlterTable;
32  	}
33  	
34  }