sampling and smartSampling cached
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/databases-manager-portlet@100288 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
358c98db4c
commit
53ac9390b7
|
@ -1324,12 +1324,12 @@ public class GxtBorderLayoutPanel extends ContentPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(SamplingResultWithFileFromServlet obj) {
|
public void onSuccess(SamplingResultWithFileFromServlet samplingResult) {
|
||||||
rootLogger.log(Level.SEVERE, "SUCCESS RPC sample");
|
rootLogger.log(Level.SEVERE, "SUCCESS RPC sample");
|
||||||
|
|
||||||
if (obj != null) {
|
if (samplingResult != null) {
|
||||||
// get data
|
// get data
|
||||||
List<Result> result = obj.getListOutput();
|
List<Result> result = samplingResult.getListOutput();
|
||||||
// get the attributes list for the result
|
// get the attributes list for the result
|
||||||
// table
|
// table
|
||||||
List<String> listAttributes = new ArrayList<String>();
|
List<String> listAttributes = new ArrayList<String>();
|
||||||
|
@ -1342,11 +1342,19 @@ public class GxtBorderLayoutPanel extends ContentPanel {
|
||||||
+ result.size());
|
+ result.size());
|
||||||
|
|
||||||
// get path
|
// get path
|
||||||
String fileName = obj.getFileName();
|
String fileName = samplingResult.getFileName();
|
||||||
// parse the result in order to obtain a
|
// parse the result in order to obtain a
|
||||||
// table
|
// table
|
||||||
parseResult(result, listAttributes, fileName);
|
parseResult(result, listAttributes, fileName);
|
||||||
|
|
||||||
|
} else{
|
||||||
|
MessageBox.alert("Error ",
|
||||||
|
"<br/>Message: " + "no data available", null);
|
||||||
|
|
||||||
|
if (obj.isMasked()) {
|
||||||
|
obj.unmask();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1468,12 +1476,12 @@ public class GxtBorderLayoutPanel extends ContentPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(SamplingResultWithFileFromServlet obj) {
|
public void onSuccess(SamplingResultWithFileFromServlet samplingResult) {
|
||||||
rootLogger.log(Level.SEVERE, "SUCCESS RPC smartSample");
|
rootLogger.log(Level.SEVERE, "SUCCESS RPC smartSample");
|
||||||
|
|
||||||
if (obj != null) {
|
if (samplingResult != null) {
|
||||||
// get data
|
// get data
|
||||||
List<Result> result = obj.getListOutput();
|
List<Result> result = samplingResult.getListOutput();
|
||||||
// get the attributes list for the result
|
// get the attributes list for the result
|
||||||
// table
|
// table
|
||||||
List<String> listAttributes = new ArrayList<String>();
|
List<String> listAttributes = new ArrayList<String>();
|
||||||
|
@ -1485,10 +1493,18 @@ public class GxtBorderLayoutPanel extends ContentPanel {
|
||||||
rootLogger.log(Level.SEVERE, "output size: "
|
rootLogger.log(Level.SEVERE, "output size: "
|
||||||
+ result.size());
|
+ result.size());
|
||||||
// get path
|
// get path
|
||||||
String fileName = obj.getFileName();
|
String fileName = samplingResult.getFileName();
|
||||||
// parse the result in order to obtain a
|
// parse the result in order to obtain a
|
||||||
// table
|
// table
|
||||||
parseResult(result, listAttributes, fileName);
|
parseResult(result, listAttributes, fileName);
|
||||||
|
}else{
|
||||||
|
MessageBox.alert("Error ",
|
||||||
|
"<br/>Message: " + "no data available", null);
|
||||||
|
|
||||||
|
if (obj.isMasked()) {
|
||||||
|
obj.unmask();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
@ -1578,13 +1594,13 @@ public class GxtBorderLayoutPanel extends ContentPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(SamplingResultWithFileFromServlet obj) {
|
public void onSuccess(SamplingResultWithFileFromServlet samplingResult) {
|
||||||
rootLogger
|
rootLogger
|
||||||
.log(Level.SEVERE, "SUCCESS RPC randomSample");
|
.log(Level.SEVERE, "SUCCESS RPC randomSample");
|
||||||
|
|
||||||
if (obj != null) {
|
if (samplingResult != null) {
|
||||||
// get data
|
// get data
|
||||||
List<Result> result = obj.getListOutput();
|
List<Result> result = samplingResult.getListOutput();
|
||||||
// get the attributes list for the result
|
// get the attributes list for the result
|
||||||
// table
|
// table
|
||||||
List<String> listAttributes = new ArrayList<String>();
|
List<String> listAttributes = new ArrayList<String>();
|
||||||
|
@ -1596,10 +1612,18 @@ public class GxtBorderLayoutPanel extends ContentPanel {
|
||||||
rootLogger.log(Level.SEVERE, "output size: "
|
rootLogger.log(Level.SEVERE, "output size: "
|
||||||
+ result.size());
|
+ result.size());
|
||||||
// get path
|
// get path
|
||||||
String fileName = obj.getFileName();
|
String fileName = samplingResult.getFileName();
|
||||||
// parse the result in order to obtain a
|
// parse the result in order to obtain a
|
||||||
// table
|
// table
|
||||||
parseResult(result, listAttributes, fileName);
|
parseResult(result, listAttributes, fileName);
|
||||||
|
} else{
|
||||||
|
MessageBox.alert("Error ",
|
||||||
|
"<br/>Message: " + "no data available", null);
|
||||||
|
|
||||||
|
if (obj.isMasked()) {
|
||||||
|
obj.unmask();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -189,8 +189,11 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
// logger.error("dbmanager-> Error while starting the servlet. Failed to create the cache", e);
|
// logger.error("dbmanager-> Error while starting the servlet. Failed to create the cache",
|
||||||
throw new Exception("Error while starting the servlet. Failed to create the cache. Exception: " +e);
|
// e);
|
||||||
|
throw new Exception(
|
||||||
|
"Error while starting the servlet. Failed to create the cache. Exception: "
|
||||||
|
+ e);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -721,7 +724,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
// throw new Exception("Failed to load data. " + e);
|
// throw new Exception("Failed to load data. " + e);
|
||||||
// logger.error("dbmanager-> ", e);
|
// logger.error("dbmanager-> ", e);
|
||||||
|
|
||||||
if (!(e instanceof StatisticalManagerException)) {
|
if (!(e instanceof StatisticalManagerException)) {
|
||||||
// GWT can't serialize all exceptions
|
// GWT can't serialize all exceptions
|
||||||
|
@ -904,6 +907,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
// data output
|
// data output
|
||||||
// List<Result> output = new ArrayList<Result>();
|
// List<Result> output = new ArrayList<Result>();
|
||||||
List<Result> output = null;
|
List<Result> output = null;
|
||||||
|
SubmitQueryResultWithFileFromServlet result;
|
||||||
|
|
||||||
// list that contains table attributes
|
// list that contains table attributes
|
||||||
List<String> listAttributes = null;
|
List<String> listAttributes = null;
|
||||||
|
@ -960,6 +964,31 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
inputParameters.get(4).setValue(language);
|
inputParameters.get(4).setValue(language);
|
||||||
inputParameters.get(5).setValue(query);
|
inputParameters.get(5).setValue(query);
|
||||||
|
|
||||||
|
// get data from cache
|
||||||
|
// check if data exist considering as key the input parameters
|
||||||
|
|
||||||
|
// parse the query in order to remove spaces
|
||||||
|
String queryParsed = parseQuery(inputParameters.get(5).getValue());
|
||||||
|
|
||||||
|
String key = inputParameters.get(0).getValue()
|
||||||
|
+ inputParameters.get(1).getValue()
|
||||||
|
+ inputParameters.get(2).getValue()
|
||||||
|
+ inputParameters.get(3).getValue()
|
||||||
|
+ inputParameters.get(4).getValue()
|
||||||
|
+ queryParsed;
|
||||||
|
|
||||||
|
net.sf.ehcache.Element dataFromCache = getDataFromCache(key);
|
||||||
|
|
||||||
|
Object value = null;
|
||||||
|
if (dataFromCache != null) {
|
||||||
|
value = dataFromCache.getObjectValue();
|
||||||
|
// System.out.println("***GETTING DATA FROM CACHE");
|
||||||
|
}
|
||||||
|
if (value != null) {
|
||||||
|
result = (SubmitQueryResultWithFileFromServlet) value;
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
// create data structure
|
// create data structure
|
||||||
ComputationOutput outputData = new ComputationOutput();
|
ComputationOutput outputData = new ComputationOutput();
|
||||||
|
|
||||||
|
@ -1027,10 +1056,17 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
String partialPathFile = applicationPath + "/computationResult/"
|
String partialPathFile = applicationPath + "/computationResult/"
|
||||||
+ fileName;
|
+ fileName;
|
||||||
|
|
||||||
SubmitQueryResultWithFileFromServlet obj = new SubmitQueryResultWithFileFromServlet(
|
result = new SubmitQueryResultWithFileFromServlet(
|
||||||
listAttributes, convertedQuery, partialPathFile);
|
listAttributes, convertedQuery, partialPathFile);
|
||||||
|
|
||||||
|
// put data in cache
|
||||||
|
net.sf.ehcache.Element dataToCache = new net.sf.ehcache.Element(
|
||||||
|
key, result);
|
||||||
|
insertDataIntoCache(dataToCache);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
return obj;
|
return result;
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
|
@ -1068,6 +1104,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
List<Parameter> inputParameters = new ArrayList<Parameter>();
|
List<Parameter> inputParameters = new ArrayList<Parameter>();
|
||||||
// output sample result
|
// output sample result
|
||||||
List<Result> output = new ArrayList<Result>();
|
List<Result> output = new ArrayList<Result>();
|
||||||
|
SamplingResultWithFileFromServlet result;
|
||||||
|
|
||||||
String algorithmId = "SAMPLEONTABLE";
|
String algorithmId = "SAMPLEONTABLE";
|
||||||
|
|
||||||
|
@ -1126,41 +1163,70 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
inputParameters.get(2).setValue(scm);
|
inputParameters.get(2).setValue(scm);
|
||||||
inputParameters.get(3).setValue(tab);
|
inputParameters.get(3).setValue(tab);
|
||||||
|
|
||||||
// create data structure
|
// get data from cache
|
||||||
ComputationOutput outputData = new ComputationOutput();
|
// check if data exist considering as key the input parameters
|
||||||
// computation id
|
String key = algorithmId + inputParameters.get(0).getValue()
|
||||||
String computationId = startComputation(algorithmId,
|
+ inputParameters.get(1).getValue()
|
||||||
inputParameters, outputData);
|
+ inputParameters.get(2).getValue()
|
||||||
|
+ inputParameters.get(3).getValue();
|
||||||
|
|
||||||
// print check on retrieving data
|
net.sf.ehcache.Element dataFromCache = getDataFromCache(key);
|
||||||
// logger.info("output data retrieved");
|
|
||||||
|
|
||||||
// data output values
|
Object value = null;
|
||||||
LinkedHashMap<String, String> mapValues = new LinkedHashMap<String, String>();
|
if (dataFromCache != null) {
|
||||||
// data output keys
|
value = dataFromCache.getObjectValue();
|
||||||
LinkedHashMap<String, String> mapKeys = new LinkedHashMap<String, String>();
|
// System.out.println("***GETTING DATA FROM CACHE");
|
||||||
|
}
|
||||||
|
if (value != null) {
|
||||||
|
result = (SamplingResultWithFileFromServlet) value;
|
||||||
|
|
||||||
mapValues = outputData.getMapValues();
|
} else {
|
||||||
mapKeys = outputData.getmapKeys();
|
|
||||||
|
// start computation
|
||||||
|
|
||||||
|
// create data structure
|
||||||
|
ComputationOutput outputData = new ComputationOutput();
|
||||||
|
// computation id
|
||||||
|
String computationId = startComputation(algorithmId,
|
||||||
|
inputParameters, outputData);
|
||||||
|
|
||||||
|
// print check on retrieving data
|
||||||
|
// logger.info("output data retrieved");
|
||||||
|
|
||||||
|
// data output values
|
||||||
|
LinkedHashMap<String, String> mapValues = new LinkedHashMap<String, String>();
|
||||||
|
// data output keys
|
||||||
|
LinkedHashMap<String, String> mapKeys = new LinkedHashMap<String, String>();
|
||||||
|
|
||||||
|
mapValues = outputData.getMapValues();
|
||||||
|
mapKeys = outputData.getmapKeys();
|
||||||
|
|
||||||
|
for (int i = 0; i < mapValues.size(); i++) {
|
||||||
|
Result row = new Result(mapKeys.get(String.valueOf(i)),
|
||||||
|
mapValues.get(String.valueOf(i)));
|
||||||
|
output.add(row);
|
||||||
|
}
|
||||||
|
|
||||||
|
String name = "Sampling" + "_" + tab;
|
||||||
|
String fileName = storeResultIntoCSVFile(output, name);
|
||||||
|
|
||||||
|
HttpServletRequest request = this.getThreadLocalRequest();
|
||||||
|
String applicationPath = request.getContextPath();
|
||||||
|
// logger.info("dbmanager-> Application Path: " +
|
||||||
|
// applicationPath);
|
||||||
|
String partialPathFile = applicationPath
|
||||||
|
+ "/computationResult/" + fileName;
|
||||||
|
result = new SamplingResultWithFileFromServlet(output,
|
||||||
|
partialPathFile);
|
||||||
|
|
||||||
|
// put data in cache
|
||||||
|
net.sf.ehcache.Element dataToCache = new net.sf.ehcache.Element(
|
||||||
|
key, result);
|
||||||
|
insertDataIntoCache(dataToCache);
|
||||||
|
|
||||||
for (int i = 0; i < mapValues.size(); i++) {
|
|
||||||
Result row = new Result(mapKeys.get(String.valueOf(i)),
|
|
||||||
mapValues.get(String.valueOf(i)));
|
|
||||||
output.add(row);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String name = "Sampling" + "_" + tab;
|
return result;
|
||||||
String fileName = storeResultIntoCSVFile(output, name);
|
|
||||||
|
|
||||||
HttpServletRequest request = this.getThreadLocalRequest();
|
|
||||||
String applicationPath = request.getContextPath();
|
|
||||||
// logger.info("dbmanager-> Application Path: " + applicationPath);
|
|
||||||
String partialPathFile = applicationPath + "/computationResult/"
|
|
||||||
+ fileName;
|
|
||||||
SamplingResultWithFileFromServlet obj = new SamplingResultWithFileFromServlet(
|
|
||||||
output, partialPathFile);
|
|
||||||
|
|
||||||
return obj;
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("dbmanager-> ", e);
|
logger.error("dbmanager-> ", e);
|
||||||
|
@ -1187,6 +1253,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
List<Parameter> inputParameters = new ArrayList<Parameter>();
|
List<Parameter> inputParameters = new ArrayList<Parameter>();
|
||||||
// output sample result
|
// output sample result
|
||||||
List<Result> output = new ArrayList<Result>();
|
List<Result> output = new ArrayList<Result>();
|
||||||
|
SamplingResultWithFileFromServlet result;
|
||||||
|
|
||||||
String algorithmId = "SMARTSAMPLEONTABLE";
|
String algorithmId = "SMARTSAMPLEONTABLE";
|
||||||
|
|
||||||
|
@ -1245,41 +1312,68 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
inputParameters.get(2).setValue(scm);
|
inputParameters.get(2).setValue(scm);
|
||||||
inputParameters.get(3).setValue(tab);
|
inputParameters.get(3).setValue(tab);
|
||||||
|
|
||||||
// create data structure
|
// get data from cache
|
||||||
ComputationOutput outputData = new ComputationOutput();
|
// check if data exist considering as key the input parameters
|
||||||
// computation id
|
String key = algorithmId + inputParameters.get(0).getValue()
|
||||||
String computationId = startComputation(algorithmId,
|
+ inputParameters.get(1).getValue()
|
||||||
inputParameters, outputData);
|
+ inputParameters.get(2).getValue()
|
||||||
|
+ inputParameters.get(3).getValue();
|
||||||
|
|
||||||
// print check on retrieving data
|
net.sf.ehcache.Element dataFromCache = getDataFromCache(key);
|
||||||
// logger.info("dbmanager-> output data retrieved");
|
|
||||||
|
|
||||||
// data output values
|
Object value = null;
|
||||||
LinkedHashMap<String, String> mapValues = new LinkedHashMap<String, String>();
|
if (dataFromCache != null) {
|
||||||
// data output keys
|
value = dataFromCache.getObjectValue();
|
||||||
LinkedHashMap<String, String> mapKeys = new LinkedHashMap<String, String>();
|
// System.out.println("***GETTING DATA FROM CACHE");
|
||||||
|
}
|
||||||
|
if (value != null) {
|
||||||
|
result = (SamplingResultWithFileFromServlet) value;
|
||||||
|
|
||||||
mapValues = outputData.getMapValues();
|
} else {
|
||||||
mapKeys = outputData.getmapKeys();
|
|
||||||
|
// create data structure
|
||||||
|
ComputationOutput outputData = new ComputationOutput();
|
||||||
|
// computation id
|
||||||
|
String computationId = startComputation(algorithmId,
|
||||||
|
inputParameters, outputData);
|
||||||
|
|
||||||
|
// print check on retrieving data
|
||||||
|
// logger.info("dbmanager-> output data retrieved");
|
||||||
|
|
||||||
|
// data output values
|
||||||
|
LinkedHashMap<String, String> mapValues = new LinkedHashMap<String, String>();
|
||||||
|
// data output keys
|
||||||
|
LinkedHashMap<String, String> mapKeys = new LinkedHashMap<String, String>();
|
||||||
|
|
||||||
|
mapValues = outputData.getMapValues();
|
||||||
|
mapKeys = outputData.getmapKeys();
|
||||||
|
|
||||||
|
for (int i = 0; i < mapValues.size(); i++) {
|
||||||
|
Result row = new Result(mapKeys.get(String.valueOf(i)),
|
||||||
|
mapValues.get(String.valueOf(i)));
|
||||||
|
output.add(row);
|
||||||
|
}
|
||||||
|
|
||||||
|
String name = "SmartSampling" + "_" + tab;
|
||||||
|
String fileName = storeResultIntoCSVFile(output, name);
|
||||||
|
|
||||||
|
HttpServletRequest request = this.getThreadLocalRequest();
|
||||||
|
String applicationPath = request.getContextPath();
|
||||||
|
// logger.info("dbmanager-> Application Path: " +
|
||||||
|
// applicationPath);
|
||||||
|
String partialPathFile = applicationPath
|
||||||
|
+ "/computationResult/" + fileName;
|
||||||
|
result = new SamplingResultWithFileFromServlet(output,
|
||||||
|
partialPathFile);
|
||||||
|
|
||||||
|
// put data in cache
|
||||||
|
net.sf.ehcache.Element dataToCache = new net.sf.ehcache.Element(
|
||||||
|
key, result);
|
||||||
|
insertDataIntoCache(dataToCache);
|
||||||
|
|
||||||
for (int i = 0; i < mapValues.size(); i++) {
|
|
||||||
Result row = new Result(mapKeys.get(String.valueOf(i)),
|
|
||||||
mapValues.get(String.valueOf(i)));
|
|
||||||
output.add(row);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
String name = "SmartSampling" + "_" + tab;
|
return result;
|
||||||
String fileName = storeResultIntoCSVFile(output, name);
|
|
||||||
|
|
||||||
HttpServletRequest request = this.getThreadLocalRequest();
|
|
||||||
String applicationPath = request.getContextPath();
|
|
||||||
// logger.info("dbmanager-> Application Path: " + applicationPath);
|
|
||||||
String partialPathFile = applicationPath + "/computationResult/"
|
|
||||||
+ fileName;
|
|
||||||
SamplingResultWithFileFromServlet obj = new SamplingResultWithFileFromServlet(
|
|
||||||
output, partialPathFile);
|
|
||||||
|
|
||||||
return obj;
|
|
||||||
|
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("dbmanager-> ", e);
|
logger.error("dbmanager-> ", e);
|
||||||
|
@ -1915,7 +2009,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.info("dbmanager-> startComputation: the job submit has failed!");
|
logger.info("dbmanager-> startComputation: the job submit has failed!");
|
||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
// logger.error("dbmanager-> ", e);
|
// logger.error("dbmanager-> ", e);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1994,7 +2088,7 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
StatisticalManagerException e = new StatisticalManagerException(
|
StatisticalManagerException e = new StatisticalManagerException(
|
||||||
smResource.description());
|
smResource.description());
|
||||||
// e.printStackTrace();
|
// e.printStackTrace();
|
||||||
// logger.error("dbmanager-> ", e);
|
// logger.error("dbmanager-> ", e);
|
||||||
throw e;
|
throw e;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2289,15 +2383,15 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
}
|
}
|
||||||
|
|
||||||
private synchronized void refreshCache(String key) throws Exception {
|
private synchronized void refreshCache(String key) throws Exception {
|
||||||
// try {
|
// try {
|
||||||
employeeCache.remove(key);
|
employeeCache.remove(key);
|
||||||
// } catch (Exception e) {
|
// } catch (Exception e) {
|
||||||
// TODO: handle exception
|
// TODO: handle exception
|
||||||
// logger.error("dbmanager-> ", e);
|
// logger.error("dbmanager-> ", e);
|
||||||
// throw new Exception("Failure to clear the cache. " + e);
|
// throw new Exception("Failure to clear the cache. " + e);
|
||||||
// throw new Exception(
|
// throw new Exception(
|
||||||
// "Error in server while loading data. Exception: " + e);
|
// "Error in server while loading data. Exception: " + e);
|
||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
private String storeResultIntoCSVFile(List<Result> result, String n)
|
private String storeResultIntoCSVFile(List<Result> result, String n)
|
||||||
|
@ -2348,4 +2442,12 @@ public class GWTdbManagerServiceImpl extends RemoteServiceServlet implements
|
||||||
return SessionUtil.isSessionExpired(this.getThreadLocalRequest()
|
return SessionUtil.isSessionExpired(this.getThreadLocalRequest()
|
||||||
.getSession());
|
.getSession());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private String parseQuery(String query) {
|
||||||
|
String queryParsed;
|
||||||
|
|
||||||
|
queryParsed = query.trim();
|
||||||
|
queryParsed = queryParsed.replaceAll(" +", " ");
|
||||||
|
return queryParsed;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue