|
1 | 1 | package org.javawebstack.orm; |
2 | 2 |
|
| 3 | +import org.javawebstack.orm.connection.SQL; |
3 | 4 | import org.javawebstack.orm.connection.pool.SQLPool; |
| 5 | +import org.javawebstack.orm.connection.pool.SingletonPool; |
4 | 6 | import org.javawebstack.orm.exception.ORMConfigurationException; |
5 | 7 | import org.javawebstack.orm.migration.AutoMigrator; |
6 | 8 | import org.reflections.Reflections; |
@@ -40,6 +42,26 @@ public static void register(Package p, SQLPool pool) throws ORMConfigurationExce |
40 | 42 | register(p, pool, new ORMConfig()); |
41 | 43 | } |
42 | 44 |
|
| 45 | + @Deprecated |
| 46 | + public static <T extends Model> Repo<T> register(Class<T> model, SQL sql, ORMConfig config) throws ORMConfigurationException { |
| 47 | + return register(model, new SingletonPool(sql), config); |
| 48 | + } |
| 49 | + |
| 50 | + @Deprecated |
| 51 | + public static <T extends Model> Repo<T> register(Class<T> model, SQL sql) throws ORMConfigurationException { |
| 52 | + return register(model, new SingletonPool(sql)); |
| 53 | + } |
| 54 | + |
| 55 | + @Deprecated |
| 56 | + public static void register(Package p, SQL sql, ORMConfig config) throws ORMConfigurationException { |
| 57 | + register(p, new SingletonPool(sql), config); |
| 58 | + } |
| 59 | + |
| 60 | + @Deprecated |
| 61 | + public static void register(Package p, SQL sql) throws ORMConfigurationException { |
| 62 | + register(p, new SingletonPool(sql)); |
| 63 | + } |
| 64 | + |
43 | 65 | public static void unregister(Class<? extends Model> model) { |
44 | 66 | repositories.remove(model); |
45 | 67 | } |
|
0 commit comments