public class org.finos.legend.engine.plan.execution.stores.relational.AlloyH2Server extends org.h.tools.Server
{
private static final org.slf4j.Logger LOGGER;
private static final java.lang.String H2_ALLOWED_CLASSES_PROPERTY;
public void <init>()
{
org.finos.legend.engine.plan.execution.stores.relational.AlloyH2Server v;
v := @this: org.finos.legend.engine.plan.execution.stores.relational.AlloyH2Server;
specialinvoke v.<org.h.tools.Server: void <init>()>();
return;
}
public static org.h.tools.Server startServer(int) throws java.sql.SQLException
{
org.h.tools.Server v, v;
org.slf4j.Logger v;
java.lang.String[] v;
java.lang.Integer v;
int v, v;
java.lang.String v, v, v;
v := @parameter: int;
v = staticinvoke <org.finos.legend.engine.plan.execution.stores.relational.connection.driver.vendors.h.H2Manager: int getMajorVersion()>();
if v != 2 goto label;
v = "org.h.*,org.finos.legend.engine.plan.execution.stores.relational.LegendH2Extensions";
goto label;
label:
v = "org.h.*,org.finos.legend.engine.plan.execution.stores.relational.LegendH2Extensions_1_4_200";
label:
v = <org.finos.legend.engine.plan.execution.stores.relational.AlloyH2Server: org.slf4j.Logger LOGGER>;
v = staticinvoke <java.lang.Integer: java.lang.Integer valueOf(int)>(v);
interfaceinvoke v.<org.slf4j.Logger: void debug(java.lang.String,java.lang.Object)>("startServer port {}", v);
v = staticinvoke <java.lang.System: java.lang.String getProperty(java.lang.String,java.lang.String)>("h.allowedClasses", v);
staticinvoke <java.lang.System: java.lang.String setProperty(java.lang.String,java.lang.String)>("h.allowedClasses", v);
v = newarray (java.lang.String)[3];
v[0] = "-ifNotExists";
v[1] = "-tcpPort";
v = staticinvoke <java.lang.String: java.lang.String valueOf(int)>(v);
v[2] = v;
v = staticinvoke <org.h.tools.Server: org.h.tools.Server createTcpServer(java.lang.String[])>(v);
v = virtualinvoke v.<org.h.tools.Server: org.h.tools.Server start()>();
return v;
}
public static void main(java.lang.String[])
{
java.sql.SQLException v;
int v;
java.lang.String[] v;
java.lang.RuntimeException v;
java.lang.String v;
v := @parameter: java.lang.String[];
label:
v = v[0];
v = staticinvoke <java.lang.Integer: int parseInt(java.lang.String)>(v);
staticinvoke <org.finos.legend.engine.plan.execution.stores.relational.AlloyH2Server: org.h.tools.Server startServer(int)>(v);
label:
goto label;
label:
v := @caughtexception;
v = new java.lang.RuntimeException;
specialinvoke v.<java.lang.RuntimeException: void <init>(java.lang.Throwable)>(v);
throw v;
label:
return;
catch java.sql.SQLException from label to label with label;
}
static void <clinit>()
{
org.slf4j.Logger v;
v = staticinvoke <org.slf4j.LoggerFactory: org.slf4j.Logger getLogger(java.lang.Class)>(class "Lorg/finos/legend/engine/plan/execution/stores/relational/AlloyH2Server;");
<org.finos.legend.engine.plan.execution.stores.relational.AlloyH2Server: org.slf4j.Logger LOGGER> = v;
return;
}
}