1 21 22 package org.dbunit.dataset; 23 24 import java.util.Arrays ; 25 26 27 32 public class DefaultTableMetaData extends AbstractTableMetaData 33 { 34 private final String _tableName; 35 private final Column[] _columns; 36 private final Column[] _primaryKeys; 37 38 public DefaultTableMetaData(String tableName, Column[] columns) 39 { 41 this(tableName, columns, new String [0]); 42 } 43 44 public DefaultTableMetaData(String tableName, Column[] columns, 45 String [] primaryKeys) { 47 _tableName = tableName; 48 _columns = columns; 49 _primaryKeys = getPrimaryKeys(columns, primaryKeys); 50 } 51 52 public DefaultTableMetaData(String tableName, Column[] columns, 53 Column[] primaryKeys) { 55 _tableName = tableName; 56 _columns = columns; 57 _primaryKeys = primaryKeys; 58 } 59 60 public String toString() 61 { 62 return "tableName=" + _tableName + 63 ", columns=" + Arrays.asList(_columns) + 64 ", keys=" + Arrays.asList(_primaryKeys) + ""; 65 } 66 67 70 public String getTableName() 71 { 72 return _tableName; 73 } 74 75 public Column[] getColumns() 76 { 77 return _columns; 78 } 79 80 public Column[] getPrimaryKeys() 81 { 82 return _primaryKeys; 83 } 84 } 85 86 87 88 89 90 | Popular Tags |