@Test public void givenLogbookVarNameAdapterWhenGetVariableNameThenReturnCorrect() { assertEquals(null, logbookNameAdapter.getVariableName("notValid")); assertEquals("_id", logbookNameAdapter.getVariableName("#id")); assertEquals("_lastPersistedDate", logbookNameAdapter.getVariableName("#lastPersistedDate")); }
@Override public String getVariableName(String name) { if(name.equals(ParserTokens.PROJECTIONARGS.LAST_PERSISTED_DATE.exactToken())) return LogbookDocument.LAST_PERSISTED_DATE; if(name.equals(ParserTokens.PROJECTIONARGS.ID.exactToken())) return LogbookDocument.ID; return null; }
LogbookVarNameAdapter extends VarNameAdapter { @Override public String getVariableName(String name) { if(name.equals(ParserTokens.PROJECTIONARGS.LAST_PERSISTED_DATE.exactToken())) return LogbookDocument.LAST_PERSISTED_DATE; if(name.equals(ParserTokens.PROJECTIONARGS.ID.exactToken())) return LogbookDocument.ID; return null; } }
LogbookVarNameAdapter extends VarNameAdapter { @Override public String getVariableName(String name) { if(name.equals(ParserTokens.PROJECTIONARGS.LAST_PERSISTED_DATE.exactToken())) return LogbookDocument.LAST_PERSISTED_DATE; if(name.equals(ParserTokens.PROJECTIONARGS.ID.exactToken())) return LogbookDocument.ID; return null; } LogbookVarNameAdapter(); }
LogbookVarNameAdapter extends VarNameAdapter { @Override public String getVariableName(String name) { if(name.equals(ParserTokens.PROJECTIONARGS.LAST_PERSISTED_DATE.exactToken())) return LogbookDocument.LAST_PERSISTED_DATE; if(name.equals(ParserTokens.PROJECTIONARGS.ID.exactToken())) return LogbookDocument.ID; return null; } LogbookVarNameAdapter(); @Override boolean metadataAdapter(); @Override String getVariableName(String name); }
LogbookVarNameAdapter extends VarNameAdapter { @Override public String getVariableName(String name) { if(name.equals(ParserTokens.PROJECTIONARGS.LAST_PERSISTED_DATE.exactToken())) return LogbookDocument.LAST_PERSISTED_DATE; if(name.equals(ParserTokens.PROJECTIONARGS.ID.exactToken())) return LogbookDocument.ID; return null; } LogbookVarNameAdapter(); @Override boolean metadataAdapter(); @Override String getVariableName(String name);  }