1 10 11 package com.triactive.jdo.store; 12 13 import java.util.Collection ; 14 import java.util.Iterator ; 15 16 17 27 28 public class MissingColumnException extends SchemaValidationException 29 { 30 36 37 public MissingColumnException(Table table, Collection columns) 38 { 39 super("Required columns missing from " + table + ": " + getColumnNameList(columns)); 40 } 41 42 private static String getColumnNameList(Collection columns) 43 { 44 StringBuffer list = new StringBuffer (); 45 Iterator i = columns.iterator(); 46 47 while (i.hasNext()) 48 { 49 if (list.length() > 0) 50 list.append(", "); 51 52 list.append(((Column)i.next()).getName()); 53 } 54 55 return list.toString(); 56 } 57 } 58 | Popular Tags |