From f69cd8f7b0f0d8263fda1af9a799ede678d7f82d Mon Sep 17 00:00:00 2001 From: Ralf Wisser Date: Tue, 17 Mar 2026 13:49:50 +0100 Subject: [PATCH] improved JavaDoc comments --- .../net/sf/jailer/ExecutionContext.java | 83 ++++++++++++++++--- .../engine/net/sf/jailer/api/Subsetter.java | 12 ++- 2 files changed, 81 insertions(+), 14 deletions(-) diff --git a/src/main/engine/net/sf/jailer/ExecutionContext.java b/src/main/engine/net/sf/jailer/ExecutionContext.java index c9b7d185c..ecc4af903 100644 --- a/src/main/engine/net/sf/jailer/ExecutionContext.java +++ b/src/main/engine/net/sf/jailer/ExecutionContext.java @@ -628,13 +628,17 @@ public class ExecutionContext { /** * Is the subsetter embedded into an application? + * + * @return true if the subsetter is embedded into an application */ public boolean isEmbedded() { return embedded; } /** - * @param embedded is the subsetter embedded into an application? + * Sets whether the subsetter is embedded into an application. + * + * @param embedded true if the subsetter is embedded into an application */ public void setEmbedded(boolean embedded) { this.embedded = embedded; @@ -674,6 +678,12 @@ public class ExecutionContext { private Map schemaMapping; + /** + * Parses a raw schema mapping string (comma-separated "from=to" pairs) into a map. + * + * @param rawschemamapping comma-separated schema mapping string, e.g. {@code "schema1=schema2,schema3=schema4"} + * @return parsed schema mapping + */ public static Map getSchemaMapping(String rawschemamapping) { Map mapping = new HashMap(); if (rawschemamapping != null) { @@ -687,6 +697,11 @@ public class ExecutionContext { return mapping; } + /** + * Gets schema map for destination database. + * + * @return schema map for destination database + */ public Map getSchemaMapping() { if (schemaMapping == null) { schemaMapping = getSchemaMapping(rawschemamapping); @@ -695,10 +710,10 @@ public class ExecutionContext { } /** - * Sets source schema map + * Sets schema map for destination database. * * @param schemaMapping - * source schema map + * destination schema map */ public void setSchemaMapping(Map schemaMapping) { this.schemaMapping = schemaMapping; @@ -707,12 +722,19 @@ public class ExecutionContext { private Map sourceSchemaMapping; /** - * @param sourceSchemaMapping the sourceSchemaMapping to set + * Sets schema map for source database. + * + * @param sourceSchemaMapping the source schema map */ public void setSourceSchemaMapping(Map sourceSchemaMapping) { this.sourceSchemaMapping = sourceSchemaMapping; } + /** + * Gets schema map for source database. + * + * @return the source schema map + */ public Map getSourceSchemaMapping() { if (sourceSchemaMapping == null) { sourceSchemaMapping = new HashMap(); @@ -731,12 +753,19 @@ public class ExecutionContext { private Map deletionSchemaMapping; /** - * @param deletionSchemaMapping the sourceSchemaMapping to set + * Sets schema map for the deletion script. + * + * @param deletionSchemaMapping the deletion schema map */ public void setDeletionSchemaMapping(Map deletionSchemaMapping) { this.deletionSchemaMapping = deletionSchemaMapping; } + /** + * Gets schema map for the deletion script. + * + * @return the deletion schema map + */ public Map getDeletionSchemaMapping() { if (deletionSchemaMapping == null) { deletionSchemaMapping = new HashMap(); @@ -777,7 +806,7 @@ public class ExecutionContext { /** * Sets the script format. * - * @return the script format + * @param scriptFormat the script format */ public void setScriptFormat(ScriptFormat scriptFormat) { this.scriptFormat = scriptFormat; @@ -809,7 +838,9 @@ public class ExecutionContext { private URL datamodelURL; /** - * Gets URL of the current data model (the datamodels base folder) + * Gets URL of the current data model (the datamodel's base folder) + * + * @return URL of the current data model (the datamodel's base folder) */ public URL getDataModelURL() { if (datamodelURL == null) { @@ -829,7 +860,9 @@ public class ExecutionContext { } /** - * Sets URL of the current data model (the datamodels base folder) + * Sets URL of the current data model (the datamodel's base folder) + * + * @param datamodelURL URL of the data model base folder */ public void setDataModelURL(URL datamodelURL) { if (!datamodelURL.toExternalForm().endsWith("/")) { @@ -982,14 +1015,14 @@ public class ExecutionContext { } /** - * @return allow only a single root/subject object to be written out into JSON/YAML/XML export file + * @return if true, raise an error if there are objects not aggregated into any other object in JSON/YAML/XML export file */ public boolean isDisallowNonAggregated() { return disallowNonAggregated; } /** - * @param disallowNonAggregated allow only a single root/subject object to be written out into JSON/YAML/XML export file + * @param disallowNonAggregated if true, raise an error if there are objects not aggregated into any other object in JSON/YAML/XML export file */ public void setDisallowNonAggregated(boolean disallowNonAggregated) { this.disallowNonAggregated = disallowNonAggregated; @@ -1066,10 +1099,20 @@ public class ExecutionContext { private LayoutStorage layoutStorage = new LayoutStorage(); + /** + * Gets the layout storage. + * + * @return the layout storage + */ public LayoutStorage getLayoutStorage() { return layoutStorage; } + /** + * Sets the layout storage. + * + * @param layoutStorage the layout storage + */ public void setLayoutStorage(LayoutStorage layoutStorage) { this.layoutStorage = layoutStorage; } @@ -1102,18 +1145,38 @@ public class ExecutionContext { this.independentWorkingTables = independentWorkingTables; } + /** + * Gets the universal primary key domain. + * + * @return the universal primary key domain + */ public Set getUpkDomain() { return upkDomain; } + /** + * Sets the universal primary key domain. + * + * @param upkDomain the universal primary key domain + */ public void setUpkDomain(Set upkDomain) { this.upkDomain = upkDomain; } + /** + * Gets the alias of the current connection. + * + * @return the current connection alias + */ public String getCurrentConnectionAlias() { return currentConnectionAlias; } + /** + * Sets the alias of the current connection. + * + * @param currentConnectionAlias the current connection alias + */ public void setCurrentConnectionAlias(String currentConnectionAlias) { this.currentConnectionAlias = currentConnectionAlias; } diff --git a/src/main/engine/net/sf/jailer/api/Subsetter.java b/src/main/engine/net/sf/jailer/api/Subsetter.java index d8d01d763..38c2b3467 100644 --- a/src/main/engine/net/sf/jailer/api/Subsetter.java +++ b/src/main/engine/net/sf/jailer/api/Subsetter.java @@ -231,6 +231,8 @@ public class Subsetter { /** * Gets URL of the current data model (the datamodel's base folder) + * + * @return URL of the current data model (the datamodel's base folder) */ public URL getDataModelURL() { return executionContext.getDataModelURL(); @@ -238,6 +240,8 @@ public class Subsetter { /** * Sets URL of the current data model (the datamodel's base folder) + * + * @param datamodelURL URL of the data model base folder */ public void setDataModelURL(URL datamodelURL) { executionContext.setDataModelURL(datamodelURL); @@ -288,14 +292,14 @@ public class Subsetter { /** * Sets the script format. * - * @return the script format + * @param scriptFormat the script format */ public void setScriptFormat(ScriptFormat scriptFormat) { executionContext.setScriptFormat(scriptFormat); } /** - * If true, Use uTF-8 encoding + * If true, use UTF-8 encoding * * @return true if use UTF-8 encoding */ @@ -436,14 +440,14 @@ public class Subsetter { } /** - * @return allow only a single root/subject object to be written out into JSON/YAML/XML export file + * @return if true, raise an error if there are objects not aggregated into any other object in JSON/YAML/XML export file */ public boolean isDisallowNonAggregated() { return executionContext.isDisallowNonAggregated(); } /** - * @param disallowNonAggregated allow only a single root/subject object to be written out into JSON/YAML/XML export file + * @param disallowNonAggregated if true, raise an error if there are objects not aggregated into any other object in JSON/YAML/XML export file */ public void setDisallowNonAggregated(boolean disallowNonAggregated) { executionContext.setDisallowNonAggregated(disallowNonAggregated);