@@ -34,14 +34,29 @@ private ModelGenerator() {
3434 }
3535
3636 private static final Logger logger = LoggerFactory .getLogger (ModelGenerator .class );
37- protected static Map <String , Table > tablesMap = new HashMap <>();
37+ private static final Map <String , Table > tablesMap = new HashMap <>();
38+
39+ /**
40+ * Clears the tables map. This is needed to have a clean start between JUnits
41+ */
42+ public static void clearTablesMap () {
43+ tablesMap .clear ();
44+ }
45+
46+ /**
47+ * Returns the tables map.
48+ */
49+ public static Map <String , Table > getTablesMap () {
50+ return tablesMap ;
51+ }
52+
3853
3954 /**
4055 * Parse the DDL statements using JSQL parser
4156 * @param sqlScript The input DDL commands used for generating the models
4257 * @return List of Tables models
4358 */
44- public static List <Table > parse (final String sqlScript ) {
59+ static List <Table > parse (final String sqlScript ) {
4560 try {
4661 Statements statements = CCJSqlParserUtil .parseStatements (sqlScript );
4762 processCreateTableStatements (statements );
@@ -54,13 +69,6 @@ public static List<Table> parse(final String sqlScript) {
5469 return new ArrayList <>();
5570 }
5671
57- /**
58- * Clears the tables map. This is needed to have a clean start between junits
59- */
60- public static void clearTablesMap () {
61- tablesMap .clear ();
62- }
63-
6472 /**
6573 * Iterate over all the JSQL Create Table statements and prepare the list of Table Model
6674 * @param statements Set of JSQL statements
@@ -149,7 +157,6 @@ private static void extractForeignKeys(final List<Index> foreignKeyIndexes, fina
149157
150158 /**
151159 * Extracting primary key information from the JSQL parsed data and setting them into the Table model
152- *
153160 * @param primaryKeyIndex JSQL primaryKeyIndex
154161 * @param table Table model
155162 */
0 commit comments