mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-09-23 22:19:13 +00:00
escaped racelogidentifier when stored in database and requested for
loading of events
This commit is contained in:
+1
-1
@@ -932,7 +932,7 @@ public class DomainObjectFactoryImpl implements DomainObjectFactory {
|
||||
RaceLog result = new RaceLogImpl(RaceLogImpl.class.getSimpleName());
|
||||
try {
|
||||
BasicDBObject query = new BasicDBObject();
|
||||
query.put(FieldNames.RACE_LOG_IDENTIFIER.name(), identifier.getIdentifier());
|
||||
query.put(FieldNames.RACE_LOG_IDENTIFIER.name(), MongoUtils.escapeDollarAndDot(identifier.getIdentifier().toString()));
|
||||
DBCollection raceLog = database.getCollection(CollectionNames.RACE_LOGS.name());
|
||||
for (DBObject o : raceLog.find(query)) {
|
||||
RaceLogEvent raceLogEvent = loadRaceLogEvent((DBObject) o.get(FieldNames.RACE_LOG_EVENT.name()));
|
||||
|
||||
+5
-6
@@ -504,7 +504,7 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
|
||||
|
||||
public DBObject storeRaceLogEntry(RaceLogIdentifier raceLogIdentifier, RaceLogFlagEvent flagEvent) {
|
||||
BasicDBObject result = new BasicDBObject();
|
||||
result.put(FieldNames.RACE_LOG_IDENTIFIER.name(), raceLogIdentifier.getIdentifier());
|
||||
result.put(FieldNames.RACE_LOG_IDENTIFIER.name(), MongoUtils.escapeDollarAndDot(raceLogIdentifier.getIdentifier().toString()));
|
||||
|
||||
result.put(FieldNames.RACE_LOG_EVENT.name(), storeRaceLogFlagEvent(flagEvent));
|
||||
return result;
|
||||
@@ -512,7 +512,7 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
|
||||
|
||||
public DBObject storeRaceLogEntry(RaceLogIdentifier raceLogIdentifier, RaceLogStartTimeEvent startTimeEvent) {
|
||||
BasicDBObject result = new BasicDBObject();
|
||||
result.put(FieldNames.RACE_LOG_IDENTIFIER.name(), raceLogIdentifier.getIdentifier());
|
||||
result.put(FieldNames.RACE_LOG_IDENTIFIER.name(), MongoUtils.escapeDollarAndDot(raceLogIdentifier.getIdentifier().toString()));
|
||||
|
||||
result.put(FieldNames.RACE_LOG_EVENT.name(), storeRaceLogStartTimeEvent(startTimeEvent));
|
||||
return result;
|
||||
@@ -520,7 +520,7 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
|
||||
|
||||
public DBObject storeRaceLogEntry(RaceLogIdentifier raceLogIdentifier, RaceLogPassChangeEvent passChangeEvent) {
|
||||
BasicDBObject result = new BasicDBObject();
|
||||
result.put(FieldNames.RACE_LOG_IDENTIFIER.name(), raceLogIdentifier.getIdentifier());
|
||||
result.put(FieldNames.RACE_LOG_IDENTIFIER.name(), MongoUtils.escapeDollarAndDot(raceLogIdentifier.getIdentifier().toString()));
|
||||
|
||||
result.put(FieldNames.RACE_LOG_EVENT.name(), storeRaceLogPassChangeEvent(passChangeEvent));
|
||||
return result;
|
||||
@@ -528,7 +528,7 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
|
||||
|
||||
public DBObject storeRaceLogEntry(RaceLogIdentifier raceLogIdentifier, RaceLogRaceStatusEvent raceStatusEvent) {
|
||||
BasicDBObject result = new BasicDBObject();
|
||||
result.put(FieldNames.RACE_LOG_IDENTIFIER.name(), raceLogIdentifier.getIdentifier());
|
||||
result.put(FieldNames.RACE_LOG_IDENTIFIER.name(), MongoUtils.escapeDollarAndDot(raceLogIdentifier.getIdentifier().toString()));
|
||||
|
||||
result.put(FieldNames.RACE_LOG_EVENT.name(), storeRaceLogRaceStatusEvent(raceStatusEvent));
|
||||
return result;
|
||||
@@ -536,8 +536,7 @@ public class MongoObjectFactoryImpl implements MongoObjectFactory {
|
||||
|
||||
public DBObject storeRaceLogEntry(RaceLogIdentifier raceLogIdentifier, RaceLogCourseAreaChangedEvent courseAreaChangedEvent) {
|
||||
BasicDBObject result = new BasicDBObject();
|
||||
result.put(FieldNames.RACE_LOG_IDENTIFIER.name(), raceLogIdentifier.getIdentifier());
|
||||
|
||||
result.put(FieldNames.RACE_LOG_IDENTIFIER.name(), MongoUtils.escapeDollarAndDot(raceLogIdentifier.getIdentifier().toString()));
|
||||
result.put(FieldNames.RACE_LOG_EVENT.name(), storeRaceLogCourseAreaChangedEvent(courseAreaChangedEvent));
|
||||
return result;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user