1 45 package org.exolab.jms.tools.db; 46 47 import java.sql.Connection ; 48 49 import org.exolab.jms.tools.db.migration.V061toV072SchemaConverter; 50 import org.exolab.jms.tools.db.migration.V072toV076SchemaConverter; 51 52 53 59 public class SchemaConverterFactory { 60 61 64 private static final String VERSION_0_6_1 = "V0.6.1"; 65 private static final String VERSION_0_7_2 = "V0.7.2"; 66 private static final String VERSION_0_7_6 = "V0.7.6"; 67 68 69 public static SchemaConverter create(String fromVersion, String toVersion, 70 Connection connection) { 71 SchemaConverter result = null; 72 if (fromVersion.equals(VERSION_0_6_1) && 73 toVersion.equals(VERSION_0_7_2)) { 74 result = new V061toV072SchemaConverter(connection); 75 } 76 if (fromVersion.equals(VERSION_0_7_2) && 77 toVersion.equals(VERSION_0_7_6)) { 78 result = new V072toV076SchemaConverter(connection); 79 } 80 81 return result; 82 } 83 84 } | Popular Tags |