Created
March 28, 2023 07:51
-
-
Save johnlpage/b0ec2861859fdb0adbfc23661527e912 to your computer and use it in GitHub Desktop.
This file contains 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
public String getMOTResultInJSON(String identifier) { | |
long identifierLong; | |
try { | |
identifierLong = Long.valueOf(identifier); | |
Bson byIdQuery = Filters.eq("vehicleid", identifierLong); | |
testObj = testresults.find(byIdQuery).limit(1).first(); | |
if (testObj != null) { | |
return testObj.toJson(); | |
} | |
} catch (Exception e) { | |
logger.error(e.getLocalizedMessage()); | |
} | |
return "{ }"; // Not found | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment