1 24 25 package org.objectweb.cjdbc.common.sql.schema; 26 27 35 public class TableColumn 36 { 37 38 private String tableName; 39 40 41 private String columnName; 42 43 49 public TableColumn(String tableName, String columnName) 50 { 51 if (tableName == null) 52 throw new IllegalArgumentException ("Illegal null table name in TableColumn constructor"); 53 54 if (columnName == null) 55 throw new IllegalArgumentException ("Illegal null column name in TableColumn constructor"); 56 57 this.tableName = tableName; 58 this.columnName = columnName; 59 } 60 61 66 public String getColumnName() 67 { 68 return columnName; 69 } 70 71 76 public String getTableName() 77 { 78 return tableName; 79 } 80 81 86 public void setColumnName(String columnName) 87 { 88 this.columnName = columnName; 89 } 90 91 96 public void setTableName(String tableName) 97 { 98 this.tableName = tableName; 99 } 100 101 108 public boolean equals(Object other) 109 { 110 if ((other == null) || !(other instanceof TableColumn)) 111 return false; 112 113 TableColumn c = (TableColumn) other; 114 return columnName.equals(c.getColumnName()) 115 && tableName.equals(c.getTableName()); 116 } 117 } 118 | Popular Tags |