This repository was archived by the owner on Nov 16, 2022. It is now read-only.
Predictive custom service for user defined functions#8
Open
Smriti-Roy wants to merge 5 commits intomainfrom
Open
Predictive custom service for user defined functions#8Smriti-Roy wants to merge 5 commits intomainfrom
Smriti-Roy wants to merge 5 commits intomainfrom
Conversation
marco-porru
reviewed
Jun 3, 2020
marco-porru
reviewed
Jun 3, 2020
marco-porru
reviewed
Jun 3, 2020
...dle/src/main/java/com/sap/iot/edgeservices/persistence/sample/BoilerPredictiveActivator.java
Outdated
Show resolved
Hide resolved
marco-porru
suggested changes
Sep 3, 2021
Contributor
marco-porru
left a comment
There was a problem hiding this comment.
is it still relevant?
| private static File configProperties = null; | ||
| private static OS_ARCH OSArch = OS_ARCH.NONE; | ||
|
|
||
| //public static String LOG_LEVEL_STRING = "INFO"; |
|
|
||
| /* | ||
| * Helper function used by the entire application | ||
| * TODO: replace with log4j |
Contributor
There was a problem hiding this comment.
Why don't we already use log4j instead of putting the TODO?
| BoilerPredictiveActivator.printlnDebug("--- new service = " + serviceRef ); | ||
|
|
||
| BoilerPredictiveActivator.printlnDebug("---- context = " + BoilerPredictiveActivator.bundleContext); | ||
| //BoilerPredictiveActivator.printlnDebug("end of this.service"); |
| try { | ||
| BoilerPredictiveActivator.persistenceClient = new PersistenceClient(BoilerPredictiveActivator.service, BoilerPredictiveActivator.bundleContext); | ||
| } catch (PersistenceException e) { | ||
| // TODO Auto-generated catch block |
Contributor
There was a problem hiding this comment.
remove automatic generated TODO
| } catch (PersistenceException e) { | ||
| // TODO Auto-generated catch block | ||
| e.printStackTrace(); | ||
| BoilerPredictiveActivator.println("ERROR: Could not get token for database. Engine not started."); |
Contributor
There was a problem hiding this comment.
log the exception or rethrow it
| // inner class | ||
| //////////////////// | ||
|
|
||
| // private class RowLine { |
| if (statementObject.hasResultList()) { | ||
| StringBuffer s = new StringBuffer(); | ||
| statementObject.getResultList().forEach((row) -> { | ||
| //RowLine rowFormated = new RowLine(" " + rowIndex + " : "); |
| private String getBundleCanonicalName( BundleContext bundleContext ) { | ||
| BoilerPredictiveActivator.printlnDebug("bundleContext = " + bundleContext.toString()); | ||
| String bundleCanonicalName = "test"; | ||
| // try { |
|
|
||
|
|
||
| private boolean exists( String storedProcedureName ) throws PersistenceException { | ||
| String query = String.format( |
Contributor
There was a problem hiding this comment.
avoid potential sqlinjection:
| return rc; | ||
| } | ||
|
|
||
| String query = String.format( |
Contributor
There was a problem hiding this comment.
avoid potential sqlinjection:
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.