private static void setSystemSettings(DeploymentType deployment,
Deployment catDeployment)
{
// Create catalog Systemsettings
Systemsettings syssettings =
catDeployment.getSystemsettings().add("systemsettings");
int temptableMaxSize = 100;
int snapshotPriority = 6;
int elasticDuration = 50;
int elasticThroughput = 2;
int queryTimeout = 0;
if (deployment.getSystemsettings() != null)
{
Temptables temptables = deployment.getSystemsettings().getTemptables();
if (temptables != null)
{
temptableMaxSize = temptables.getMaxsize();
}
SystemSettingsType.Snapshot snapshot = deployment.getSystemsettings().getSnapshot();
if (snapshot != null) {
snapshotPriority = snapshot.getPriority();
}
SystemSettingsType.Elastic elastic = deployment.getSystemsettings().getElastic();
if (elastic != null) {
elasticDuration = elastic.getDuration();
elasticThroughput = elastic.getThroughput();
}
SystemSettingsType.Query timeout = deployment.getSystemsettings().getQuery();
if (timeout != null)
{
queryTimeout = timeout.getTimeout();
}
}
syssettings.setTemptablemaxsize(temptableMaxSize);
syssettings.setSnapshotpriority(snapshotPriority);
syssettings.setElasticduration(elasticDuration);
syssettings.setElasticthroughput(elasticThroughput);
syssettings.setQuerytimeout(queryTimeout);
}