Skip to content

Commit

Permalink
Reverted deleting constructors
Browse files Browse the repository at this point in the history
  • Loading branch information
tommaso-borgato committed Nov 13, 2024
1 parent 46e398c commit f8ab5ab
Show file tree
Hide file tree
Showing 3 changed files with 74 additions and 0 deletions.
21 changes: 21 additions & 0 deletions builder/src/main/java/cz/xtf/builder/db/AbstractDatabase.java
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,12 @@ public AbstractDatabase(String symbolicName, String dataDir, boolean withLivenes
this.withReadinessProbe = withReadinessProbe;
}

public AbstractDatabase(String symbolicName, String dataDir, boolean withLivenessProbe, boolean withReadinessProbe,
boolean configureEnvironment) {
this(symbolicName, dataDir, withLivenessProbe, withReadinessProbe);
this.configureEnvironment = configureEnvironment;
}

public AbstractDatabase(String symbolicName, String dataDir, boolean withLivenessProbe, boolean withReadinessProbe,
boolean withStartupProbe,
boolean configureEnvironment) {
Expand Down Expand Up @@ -138,6 +144,21 @@ public AbstractDatabase(String username, String password, String dbName, String
this.withReadinessProbe = withReadinessProbe;
}

public AbstractDatabase(String username, String password, String dbName, String symbolicName, String dataDir,
boolean withLivenessProbe, boolean withReadinessProbe, boolean configureEnvironment) {
this(username, password, dbName, symbolicName, dataDir, withLivenessProbe, withReadinessProbe);
this.configureEnvironment = configureEnvironment;
}

public AbstractDatabase(String username, String password, String dbName, String symbolicName, String dataDir,
boolean withLivenessProbe, boolean withReadinessProbe, boolean withStartupProbe, boolean configureEnvironment) {
this(username, password, dbName, symbolicName, dataDir);
this.configureEnvironment = configureEnvironment;
this.withLivenessProbe = withLivenessProbe;
this.withReadinessProbe = withReadinessProbe;
this.withStartupProbe = withStartupProbe;
}

public abstract String getImageName();

public abstract int getPort();
Expand Down
16 changes: 16 additions & 0 deletions builder/src/main/java/cz/xtf/builder/db/AbstractSQLDatabase.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,11 @@ public AbstractSQLDatabase(String symbolicName, String dataDir, boolean withLive
super(symbolicName, dataDir, withLivenessProbe, withReadinessProbe);
}

public AbstractSQLDatabase(String symbolicName, String dataDir, boolean withLivenessProbe, boolean withReadinessProbe,
boolean configureEnvironment) {
super(symbolicName, dataDir, withLivenessProbe, withReadinessProbe, configureEnvironment);
}

public AbstractSQLDatabase(String symbolicName, String dataDir, boolean withLivenessProbe, boolean withReadinessProbe,
boolean withStartupProbe,
boolean configureEnvironment) {
Expand All @@ -56,6 +61,17 @@ public AbstractSQLDatabase(String username, String password, String dbName, Stri
super(username, password, dbName, symbolicName, dataDir, withLivenessProbe, withReadinessProbe);
}

public AbstractSQLDatabase(String username, String password, String dbName, String symbolicName, String dataDir,
boolean withLivenessProbe, boolean withReadinessProbe, boolean configureEnvironment) {
super(username, password, dbName, symbolicName, dataDir, withLivenessProbe, withReadinessProbe, configureEnvironment);
}

public AbstractSQLDatabase(String username, String password, String dbName, String symbolicName, String dataDir,
boolean withLivenessProbe, boolean withReadinessProbe, boolean withStartupProbe, boolean configureEnvironment) {
super(username, password, dbName, symbolicName, dataDir, withLivenessProbe, withReadinessProbe, withStartupProbe,
configureEnvironment);
}

public AbstractSQLDatabase(String symbolicName, String dataDir, PersistentVolumeClaim pvc, boolean withLivenessProbe,
boolean withReadinessProbe) {
super(symbolicName, dataDir, pvc, withLivenessProbe, withReadinessProbe);
Expand Down
37 changes: 37 additions & 0 deletions builder/src/main/java/cz/xtf/builder/db/PostgreSQL.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,43 @@ public PostgreSQL(PostgreSQLBuilder postgreSQLBuilder) {
: postgreSQLBuilder.pgData;
}

public PostgreSQL() {
super(DEFAULT_SYMBOLIC_NAME, DEFAULT_DATA_DIR);
}

public PostgreSQL(boolean withLivenessProbe, boolean withReadinessProbe) {
super(DEFAULT_SYMBOLIC_NAME, DEFAULT_DATA_DIR, withLivenessProbe, withReadinessProbe);
}

public PostgreSQL(boolean withLivenessProbe, boolean withReadinessProbe, boolean withStartupProbe) {
super(DEFAULT_SYMBOLIC_NAME, DEFAULT_DATA_DIR, withLivenessProbe, withReadinessProbe, withStartupProbe, true);
}

public PostgreSQL(PersistentVolumeClaim pvc) {
super(DEFAULT_SYMBOLIC_NAME, DEFAULT_DATA_DIR, pvc);
}

public PostgreSQL(PersistentVolumeClaim pvc, boolean withLivenessProbe, boolean withReadinessProbe) {
super(DEFAULT_SYMBOLIC_NAME, DEFAULT_DATA_DIR, pvc, withLivenessProbe, withReadinessProbe);
}

public PostgreSQL(PersistentVolumeClaim pvc, boolean withLivenessProbe, boolean withReadinessProbe,
boolean withStartupProbe) {
super(DEFAULT_SYMBOLIC_NAME, DEFAULT_DATA_DIR, pvc, withLivenessProbe, withReadinessProbe, withStartupProbe);
}

public PostgreSQL(String username, String password, String dbName) {
super(username, password, dbName, DEFAULT_SYMBOLIC_NAME, DEFAULT_DATA_DIR);
}

public PostgreSQL(String symbolicName, boolean withLivenessProbe, boolean withReadinessProbe) {
super(symbolicName, DEFAULT_DATA_DIR, withLivenessProbe, withReadinessProbe);
}

public PostgreSQL(String symbolicName, boolean withLivenessProbe, boolean withReadinessProbe, boolean withStartupProbe) {
super(symbolicName, DEFAULT_DATA_DIR, withLivenessProbe, withReadinessProbe, withStartupProbe, true);
}

public void setPostgresqlUserEnvVar(String postgresqlUserEnvVar) {
this.postgresqlUserEnvVar = postgresqlUserEnvVar;
}
Expand Down

0 comments on commit f8ab5ab

Please sign in to comment.