1 5 package org.h2.engine; 6 7 import java.sql.SQLException ; 8 9 import org.h2.message.Message; 10 import org.h2.message.Trace; 11 import org.h2.table.Column; 12 import org.h2.table.Table; 13 14 public class UserDataType extends DbObject { 15 16 private Column column; 17 18 public UserDataType(Database database, int id, String name) { 19 super(database, id, name, Trace.DATABASE); 20 } 21 22 public String getCreateSQLForCopy(Table table, String quotedName) { 23 throw Message.getInternalError(); 24 } 25 26 public String getCreateSQL() { 27 StringBuffer buff = new StringBuffer (); 28 buff.append("CREATE DOMAIN "); 29 buff.append(getSQL()); 30 buff.append(" AS "); 31 buff.append(column.getCreateSQL()); 32 return buff.toString(); 33 } 34 35 public Column getColumn() { 36 return column; 37 } 38 39 public int getType() { 40 return DbObject.USER_DATATYPE; 41 } 42 43 public void removeChildrenAndResources(Session session) throws SQLException { 44 } 45 46 public void checkRename() throws SQLException { 47 } 48 49 public void setColumn(Column column) { 50 this.column = column; 51 } 52 53 } 54 | Popular Tags |