@Test public void testGetRequestToMongoDb() { try { final SelectParserMultiple request1 = new SelectParserMultiple(); request1.parse(exampleSelectMd); assertNotNull(request1); assertTrue(RequestToMongodb.getRequestToMongoDb(request1) instanceof SelectToMongodb); } catch (final Exception e) { e.printStackTrace(); fail(e.getMessage()); } try { final InsertParserMultiple request1 = new InsertParserMultiple(); request1.parse(exampleInsertMd); assertNotNull(request1); assertTrue(RequestToMongodb.getRequestToMongoDb(request1) instanceof InsertToMongodb); } catch (final Exception e) { e.printStackTrace(); fail(e.getMessage()); } try { final UpdateParserMultiple request1 = new UpdateParserMultiple(); request1.parse(exampleUpdateMd); assertNotNull(request1); assertTrue(RequestToMongodb.getRequestToMongoDb(request1) instanceof UpdateToMongodb); } catch (final Exception e) { e.printStackTrace(); fail(e.getMessage()); } try { final DeleteParserMultiple request1 = new DeleteParserMultiple(); request1.parse(exampleDeleteMd); assertNotNull(request1); assertTrue(RequestToMongodb.getRequestToMongoDb(request1) instanceof DeleteToMongodb); } catch (final Exception e) { e.printStackTrace(); fail(e.getMessage()); } }
public static RequestToMongodb getRequestToMongoDb(AbstractParser<?> requestParser) { if (requestParser instanceof SelectParserMultiple) { return new SelectToMongodb(requestParser); } else if (requestParser instanceof SelectParserSingle) { return new SelectToMongodb(requestParser); } else if (requestParser instanceof InsertParserMultiple) { return new InsertToMongodb(requestParser); } else if (requestParser instanceof UpdateParserMultiple) { return new UpdateToMongodb(requestParser); } else { return new DeleteToMongodb(requestParser); } }
RequestToMongodb extends RequestToAbstract { public static RequestToMongodb getRequestToMongoDb(AbstractParser<?> requestParser) { if (requestParser instanceof SelectParserMultiple) { return new SelectToMongodb(requestParser); } else if (requestParser instanceof SelectParserSingle) { return new SelectToMongodb(requestParser); } else if (requestParser instanceof InsertParserMultiple) { return new InsertToMongodb(requestParser); } else if (requestParser instanceof UpdateParserMultiple) { return new UpdateToMongodb(requestParser); } else { return new DeleteToMongodb(requestParser); } } }
RequestToMongodb extends RequestToAbstract { public static RequestToMongodb getRequestToMongoDb(AbstractParser<?> requestParser) { if (requestParser instanceof SelectParserMultiple) { return new SelectToMongodb(requestParser); } else if (requestParser instanceof SelectParserSingle) { return new SelectToMongodb(requestParser); } else if (requestParser instanceof InsertParserMultiple) { return new InsertToMongodb(requestParser); } else if (requestParser instanceof UpdateParserMultiple) { return new UpdateToMongodb(requestParser); } else { return new DeleteToMongodb(requestParser); } } RequestToMongodb(AbstractParser<?> requestParser); }
RequestToMongodb extends RequestToAbstract { public static RequestToMongodb getRequestToMongoDb(AbstractParser<?> requestParser) { if (requestParser instanceof SelectParserMultiple) { return new SelectToMongodb(requestParser); } else if (requestParser instanceof SelectParserSingle) { return new SelectToMongodb(requestParser); } else if (requestParser instanceof InsertParserMultiple) { return new InsertToMongodb(requestParser); } else if (requestParser instanceof UpdateParserMultiple) { return new UpdateToMongodb(requestParser); } else { return new DeleteToMongodb(requestParser); } } RequestToMongodb(AbstractParser<?> requestParser); static RequestToMongodb getRequestToMongoDb(AbstractParser<?> requestParser); Bson getInitialRoots(final String field); Bson getRequest(Bson roots, Bson query); Bson getNthQueries(final int nth); }
RequestToMongodb extends RequestToAbstract { public static RequestToMongodb getRequestToMongoDb(AbstractParser<?> requestParser) { if (requestParser instanceof SelectParserMultiple) { return new SelectToMongodb(requestParser); } else if (requestParser instanceof SelectParserSingle) { return new SelectToMongodb(requestParser); } else if (requestParser instanceof InsertParserMultiple) { return new InsertToMongodb(requestParser); } else if (requestParser instanceof UpdateParserMultiple) { return new UpdateToMongodb(requestParser); } else { return new DeleteToMongodb(requestParser); } } RequestToMongodb(AbstractParser<?> requestParser); static RequestToMongodb getRequestToMongoDb(AbstractParser<?> requestParser); Bson getInitialRoots(final String field); Bson getRequest(Bson roots, Bson query); Bson getNthQueries(final int nth);  }