From dff0cd6b558243b11122b4555b6732cb596207ee Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Wed, 7 Mar 2018 14:15:46 +0300 Subject: [PATCH 001/133] Define interfaces for Repositories. Services to use interfaces. Resolve master conflicts --- .../dhis2/DHIS2AggregateConnector.java | 2 +- .../connector/atomfeed/it/AtomFeedTest.java | 4 +- .../dhis2/it/DHIS2AggregateConnectorTest.java | 2 +- .../dhis2/it/DHIS2SyncerListenerTest.java | 4 +- .../service/it/OpenmrsSyncerListenerTest.java | 4 +- .../opensrp/repository/AllAppStateTokens.java | 51 --- .../org/opensrp/repository/AllClients.java | 182 -------- .../repository/AppStateTokensRepository.java | 15 + .../repository/BaseEntitiesRepository.java | 17 + .../opensrp/repository/BaseRepository.java | 17 + .../opensrp/repository/ClientsRepository.java | 61 +++ .../repository/ErrorTraceRepository.java | 20 + .../opensrp/repository/EventsRepository.java | 53 +++ .../repository/MultimediaRepository.java | 38 +- .../opensrp/repository/ReportsRepository.java | 31 ++ .../opensrp/repository/SearchRepository.java | 31 +- .../opensrp/repository/StocksRepository.java | 25 ++ .../repository/couch/AllAppStateTokens.java | 141 ++++++ .../{ => couch}/AllBaseEntities.java | 5 +- .../opensrp/repository/couch/AllClients.java | 265 +++++++++++ .../repository/{ => couch}/AllErrorTrace.java | 45 +- .../repository/{ => couch}/AllEvents.java | 113 ++++- .../repository/{ => couch}/AllLocations.java | 2 +- .../repository/{ => couch}/AllProviders.java | 2 +- .../repository/{ => couch}/AllReports.java | 5 +- .../repository/{ => couch}/AllStocks.java | 5 +- .../repository/{ => couch}/AllUsers.java | 2 +- .../couch/MultimediaRepositoryImpl.java | 38 ++ .../couch/SearchRepositoryImpl.java | 38 ++ .../{ => couch}/UniqueIdRepository.java | 2 +- .../opensrp/service/BaseEntityService.java | 6 +- .../org/opensrp/service/ClientService.java | 57 +-- .../org/opensrp/service/ConfigService.java | 103 ++--- .../opensrp/service/ErrorTraceService.java | 66 ++- .../org/opensrp/service/EventService.java | 40 +- .../FormSubmissionDataMigrationService.java | 180 ++++---- .../org/opensrp/service/LocationService.java | 2 +- .../opensrp/service/MultimediaService.java | 2 + .../org/opensrp/service/OpenmrsIDService.java | 2 +- .../org/opensrp/service/ProviderService.java | 2 +- .../org/opensrp/service/ReportService.java | 57 +-- .../org/opensrp/service/StockService.java | 14 +- .../java/org/opensrp/service/UserService.java | 2 +- .../formSubmission/EventsListener.java | 4 +- .../FormSubmissionProcessor.java | 414 +++++++++++------- .../opensrp/FormSubmissionProcessorTest.java | 14 +- .../org/opensrp/MultimediaServiceTest.java | 2 +- .../it/AllBaseEntitiesIntegrationTest.java | 4 +- .../it/AllClientsIntegrationTest.java | 2 +- .../it/AllErrorTraceIntegrationTest.java | 2 +- .../it/AllEventsIntegrationTest.java | 2 +- .../it/AllLocationsIntegrationTest.java | 2 +- .../it/AllProvidersIntegrationTest.java | 2 +- .../it/AllUsersIntegrationTest.java | 4 +- .../it/ConfigServiceIntegrationTest.java | 2 +- .../repository/it/FormLifeCycleTest.java | 131 +++--- .../lucene/it/LuceneClientRepositoryTest.java | 34 +- .../lucene/it/LuceneEventRepositoryTest.java | 24 +- .../lucene/it/LuceneReportRepositoryTest.java | 27 +- .../lucene/it/LuceneSearchRepositoryTest.java | 34 +- .../opensrp/service/OpenmrsIDServiceTest.java | 2 +- .../org/opensrp/service/StockServiceTest.java | 2 +- .../formSubmission/EventListenerTest.java | 4 +- .../formSubmission/FormEntityServiceTest.java | 11 +- ...ubmissionDataMigrationIntegrationTest.java | 9 +- .../FormSubmissionProcessorScheduleTest.java | 6 +- .../formSubmission/StubAllAppStateToken.java | 2 +- .../service/it/BaseEntityServiceTest.java | 27 +- .../opensrp/service/it/ClientServiceTest.java | 52 ++- .../opensrp/service/it/ConfigServiceTest.java | 134 +++--- .../opensrp/service/it/ErrorTraceTest.java | 24 +- .../opensrp/service/it/EventServiceTest.java | 324 +++++++------- .../service/it/LocationServiceTest.java | 20 +- .../service/it/MultimediaServiceTest.java | 37 +- .../service/it/ProviderServiceTest.java | 24 +- .../opensrp/service/it/ReportServiceTest.java | 34 +- .../opensrp/service/it/SearchServiceTest.java | 32 +- .../opensrp/service/it/UserServiceTest.java | 24 +- .../opensrp/util/SampleFullDomainObject.java | 21 +- .../test/java/org.opensrp.dto/ActionTest.java | 16 +- .../register/ANCRegisterDTOTest.java | 11 +- .../handler/VaccinesScheduleHandler.java | 2 +- .../handler/ANCScheduleHandlerTest.java | 2 +- .../handler/BNFScheduleHandlerTest.java | 2 +- .../handler/BaseScheduleHandlerTest.java | 2 +- .../handler/PNCScheduleHandlerTest.java | 2 +- .../handler/VaccinesScheduleHandlerTest.java | 2 +- .../web/controller/ActionController.java | 2 +- .../web/controller/DHIS2Controller.java | 2 +- .../controller/it/ActionControllerTest.java | 24 +- .../ErrorTraceControllerIntegrationTest.java | 22 +- .../it/FormSubmissionIntegrationTest.java | 22 +- .../web/it/AtomFeedIntegrationTest.java | 4 +- .../web/it/listener/ClientListenerTest.java | 2 +- .../web/rest/it/ClientResourceTest.java | 35 +- .../web/rest/it/EventResourceTest.java | 34 +- .../web/rest/it/ProviderResourceTest.java | 14 +- .../web/rest/it/ReportResourceTest.java | 14 +- .../web/rest/it/ResourceTestUtility.java | 8 +- .../web/rest/it/SearchResourceTest.java | 20 +- .../web/rest/it/StockResourceTest.java | 25 +- .../DrishtiAuthenticationProviderTest.java | 2 +- 102 files changed, 2071 insertions(+), 1444 deletions(-) delete mode 100644 opensrp-core/src/main/java/org/opensrp/repository/AllAppStateTokens.java delete mode 100644 opensrp-core/src/main/java/org/opensrp/repository/AllClients.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/AppStateTokensRepository.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/BaseEntitiesRepository.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/BaseRepository.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/ClientsRepository.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/ErrorTraceRepository.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/EventsRepository.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/ReportsRepository.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/StocksRepository.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java rename opensrp-core/src/main/java/org/opensrp/repository/{ => couch}/AllBaseEntities.java (93%) create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java rename opensrp-core/src/main/java/org/opensrp/repository/{ => couch}/AllErrorTrace.java (73%) rename opensrp-core/src/main/java/org/opensrp/repository/{ => couch}/AllEvents.java (63%) rename opensrp-core/src/main/java/org/opensrp/repository/{ => couch}/AllLocations.java (97%) rename opensrp-core/src/main/java/org/opensrp/repository/{ => couch}/AllProviders.java (97%) rename opensrp-core/src/main/java/org/opensrp/repository/{ => couch}/AllReports.java (95%) rename opensrp-core/src/main/java/org/opensrp/repository/{ => couch}/AllStocks.java (94%) rename opensrp-core/src/main/java/org/opensrp/repository/{ => couch}/AllUsers.java (97%) create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/couch/MultimediaRepositoryImpl.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/couch/SearchRepositoryImpl.java rename opensrp-core/src/main/java/org/opensrp/repository/{ => couch}/UniqueIdRepository.java (98%) diff --git a/opensrp-connector/src/main/java/org/opensrp/connector/dhis2/DHIS2AggregateConnector.java b/opensrp-connector/src/main/java/org/opensrp/connector/dhis2/DHIS2AggregateConnector.java index d86271c81c..49b8d459a8 100644 --- a/opensrp-connector/src/main/java/org/opensrp/connector/dhis2/DHIS2AggregateConnector.java +++ b/opensrp-connector/src/main/java/org/opensrp/connector/dhis2/DHIS2AggregateConnector.java @@ -10,7 +10,7 @@ import org.json.JSONObject; import org.opensrp.domain.Event; import org.opensrp.domain.Obs; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.couch.AllEvents; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/opensrp-connector/src/test/java/org/opensrp/connector/atomfeed/it/AtomFeedTest.java b/opensrp-connector/src/test/java/org/opensrp/connector/atomfeed/it/AtomFeedTest.java index d61123bd5e..e176532cf2 100644 --- a/opensrp-connector/src/test/java/org/opensrp/connector/atomfeed/it/AtomFeedTest.java +++ b/opensrp-connector/src/test/java/org/opensrp/connector/atomfeed/it/AtomFeedTest.java @@ -30,8 +30,8 @@ import org.opensrp.domain.Client; import org.opensrp.domain.Event; import org.opensrp.domain.Obs; -import org.opensrp.repository.AllClients; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.couch.AllClients; +import org.opensrp.repository.couch.AllEvents; import org.opensrp.service.ClientService; import org.opensrp.service.EventService; import org.springframework.beans.factory.annotation.Autowired; diff --git a/opensrp-connector/src/test/java/org/opensrp/connector/dhis2/it/DHIS2AggregateConnectorTest.java b/opensrp-connector/src/test/java/org/opensrp/connector/dhis2/it/DHIS2AggregateConnectorTest.java index 566457e120..2c9ceeec87 100644 --- a/opensrp-connector/src/test/java/org/opensrp/connector/dhis2/it/DHIS2AggregateConnectorTest.java +++ b/opensrp-connector/src/test/java/org/opensrp/connector/dhis2/it/DHIS2AggregateConnectorTest.java @@ -19,7 +19,7 @@ import org.opensrp.connector.openmrs.service.TestResourceLoader; import org.opensrp.domain.Event; import org.opensrp.domain.Obs; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.couch.AllEvents; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; diff --git a/opensrp-connector/src/test/java/org/opensrp/connector/dhis2/it/DHIS2SyncerListenerTest.java b/opensrp-connector/src/test/java/org/opensrp/connector/dhis2/it/DHIS2SyncerListenerTest.java index bc11f23bfb..6c17ff43ca 100644 --- a/opensrp-connector/src/test/java/org/opensrp/connector/dhis2/it/DHIS2SyncerListenerTest.java +++ b/opensrp-connector/src/test/java/org/opensrp/connector/dhis2/it/DHIS2SyncerListenerTest.java @@ -24,8 +24,8 @@ import org.opensrp.domain.Client; import org.opensrp.domain.Event; import org.opensrp.domain.Obs; -import org.opensrp.repository.AllClients; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.couch.AllClients; +import org.opensrp.repository.couch.AllEvents; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; diff --git a/opensrp-connector/src/test/java/org/opensrp/connector/openmrs/service/it/OpenmrsSyncerListenerTest.java b/opensrp-connector/src/test/java/org/opensrp/connector/openmrs/service/it/OpenmrsSyncerListenerTest.java index 804b8b0508..b1e6af5ce7 100644 --- a/opensrp-connector/src/test/java/org/opensrp/connector/openmrs/service/it/OpenmrsSyncerListenerTest.java +++ b/opensrp-connector/src/test/java/org/opensrp/connector/openmrs/service/it/OpenmrsSyncerListenerTest.java @@ -18,8 +18,8 @@ import org.opensrp.connector.openmrs.service.PatientService; import org.opensrp.domain.Client; import org.opensrp.domain.Event; -import org.opensrp.repository.AllClients; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.couch.AllClients; +import org.opensrp.repository.couch.AllEvents; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/AllAppStateTokens.java b/opensrp-core/src/main/java/org/opensrp/repository/AllAppStateTokens.java deleted file mode 100644 index cb4feed8e6..0000000000 --- a/opensrp-core/src/main/java/org/opensrp/repository/AllAppStateTokens.java +++ /dev/null @@ -1,51 +0,0 @@ -package org.opensrp.repository; - -import java.util.List; - -import org.ektorp.CouchDbConnector; -import org.ektorp.UpdateConflictException; -import org.ektorp.support.GenerateView; -import org.ektorp.util.Assert; -import org.ektorp.util.Documents; -import org.motechproject.dao.MotechBaseRepository; -import org.opensrp.common.AllConstants; -import org.opensrp.domain.AppStateToken; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.stereotype.Repository; - -@Repository -public class AllAppStateTokens extends MotechBaseRepository { - @Autowired - protected AllAppStateTokens(@Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) CouchDbConnector db) { - super(AppStateToken.class, db); - } - - @GenerateView - public List findByName(String name) { - return queryView("by_name", name); - } - @GenerateView - public List findByName(CouchDbConnector db,String name) { - return db.queryView(createQuery("by_name") - .includeDocs(true) - .key(name), - AppStateToken.class); - } - /** - * @throws UpdateConflictException if there was an update conflict. - */ - public void update(CouchDbConnector db,AppStateToken entity) { - Assert.notNull(entity, "entity may not be null"); - db.update(entity); - } - /** - * @throws UpdateConflictException if there was an update conflict. - */ - public void add(CouchDbConnector db,AppStateToken entity) { - Assert.notNull(entity, "entity may not be null"); - Assert.isTrue(Documents.isNew(entity), "entity must be new"); - db.create(entity); - } - -} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/AllClients.java b/opensrp-core/src/main/java/org/opensrp/repository/AllClients.java deleted file mode 100644 index 092abc20d9..0000000000 --- a/opensrp-core/src/main/java/org/opensrp/repository/AllClients.java +++ /dev/null @@ -1,182 +0,0 @@ -package org.opensrp.repository; - -import java.util.ArrayList; -import java.util.List; - -import org.ektorp.ComplexKey; -import org.ektorp.CouchDbConnector; -import org.ektorp.support.GenerateView; -import org.ektorp.support.View; -import org.ektorp.util.Assert; -import org.ektorp.util.Documents; -import org.joda.time.DateTime; -import org.motechproject.dao.MotechBaseRepository; -import org.opensrp.common.AllConstants; -import org.opensrp.domain.Client; -import org.opensrp.repository.lucene.LuceneClientRepository; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.stereotype.Repository; - -import com.mysql.jdbc.StringUtils; - -@Repository -public class AllClients extends MotechBaseRepository { - - private LuceneClientRepository lcr; - - @Autowired - protected AllClients(@Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) CouchDbConnector db, - LuceneClientRepository lcr) { - super(Client.class, db); - this.lcr = lcr; - } - - @GenerateView - public Client findByBaseEntityId(String baseEntityId) { - if(StringUtils.isEmptyOrWhitespaceOnly(baseEntityId)) - return null; - List clients = queryView("by_baseEntityId", baseEntityId); - if (clients == null || clients.isEmpty()) { - return null; - } - return clients.get(0); - } - - @GenerateView - public Client findByBaseEntityId(CouchDbConnector targetDb,String baseEntityId) { - if(StringUtils.isEmptyOrWhitespaceOnly(baseEntityId)) - return null; - List clients = queryView(targetDb,"by_baseEntityId", baseEntityId); - if (clients == null || clients.isEmpty()) { - return null; - } - return clients.get(0); - } - - @View(name = "all_clients", map = "function(doc) { if (doc.type === 'Client') { emit(doc.baseEntityId); } }") - public List findAllClients() { - return db.queryView(createQuery("all_clients").includeDocs(true), Client.class); - } - - @View(name = "all_clients_by_identifier", map = "function(doc) {if (doc.type === 'Client') {for(var key in doc.identifiers) {emit(doc.identifiers[key]);}}}") - public List findAllByIdentifier(String identifier) { - return db.queryView(createQuery("all_clients_by_identifier").key(identifier).includeDocs(true), Client.class); - } - - @View(name = "all_clients_by_identifier", map = "function(doc) {if (doc.type === 'Client') {for(var key in doc.identifiers) {emit(doc.identifiers[key]);}}}") - public List findAllByIdentifier(CouchDbConnector targetDb,String identifier) { - return targetDb.queryView(createQuery("all_clients_by_identifier").key(identifier).includeDocs(true), Client.class); - } - - @View(name = "all_clients_by_identifier_of_type", map = "function(doc) {if (doc.type === 'Client') {for(var key in doc.identifiers) {emit([key, doc.identifiers[key]]);}}}") - public List findAllByIdentifier(String identifierType, String identifier) { - ComplexKey ckey = ComplexKey.of(identifierType, identifier); - return db.queryView(createQuery("all_clients_by_identifier_of_type").key(ckey).includeDocs(true), Client.class); - } - - @View(name = "all_clients_by_attribute_of_type", map = "function(doc) {if (doc.type === 'Client') {for(var key in doc.attributes) {emit([key, doc.attributes[key]]);}}}") - public List findAllByAttribute(String attributeType, String attribute) { - ComplexKey ckey = ComplexKey.of(attributeType, attribute); - return db.queryView(createQuery("all_clients_by_attribute_of_type").key(ckey).includeDocs(true), Client.class); - } - - @View(name = "all_clients_by_matching_name", map = "function(doc) {if(doc.type === 'Client'){emit(doc.firstName, doc);emit(doc.lastName, doc);}}") - public List findAllByMatchingName(String nameMatches) { - return db.queryView(createQuery("all_clients_by_matching_name").startKey(nameMatches).endKey(nameMatches+"z").includeDocs(true), Client.class); - } - /** - * Find a client based on the relationship id and between a range of date created dates e.g given mother's id get children born at a given time - * @param relationalId - * @param dateFrom - * @param dateTo - * @return - */ - @View(name = "client_by_relationship_id_and_date_created", map = "function(doc) { if (doc.type === 'Client' && doc.relationships) {for (var key in doc.relationships) { var entityid=doc.relationships[key][0]; emit([entityid, doc.dateCreated.substring(0,10)], null); }} }") - public List findByRelationshipIdAndDateCreated(String relationalId, String dateFrom,String dateTo) { - ComplexKey startKey = ComplexKey.of(relationalId, dateFrom); - ComplexKey endKey = ComplexKey.of(relationalId, dateTo); - List clients = db.queryView(createQuery("client_by_relationship_id_and_date_created").startKey(startKey).endKey(endKey).includeDocs(true), Client.class); - return clients; - } - -// @View(name = "client_by_relationship", map = "function(doc) {if (doc.type === 'Client') {for(var key in doc.relationships) {emit([key, doc.relationships[key]]);}}}") -// @View(name = "client_by_relationship", map = "function(doc) { if(doc.type == 'Client' && doc.relationships.mother[0]) {emit(null, doc._id)} }") - @View(name = "client_by_relationship", map = "function(doc) { if(doc.type === 'Client' && doc.relationships) { for (var key in doc.relationships) { var entityid = doc.relationships[key][0]; if (key === 'mother') {emit([key, entityid], doc);}}}}") - - public List findByRela3tionshipId(String relationshipType, String entityId) { - return db.queryView(createQuery("client_by_relationship").startKey(entityId).endKey(entityId).includeDocs(true), Client.class); - } - -// @View(name = "clients_by_relationship", map = "function(doc) {if (doc.type === 'Client' && doc.relationships.mother) {for(var key in doc.relationships) {emit(doc.relationships.mother[key]);}}}") -// public List findByRelationshipId(String identifier) { -// return db.queryView(createQuery("clients_by_relationship").key(identifier).includeDocs(true), Client.class); -// } - public List findByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, - DateTime deathdateFrom, DateTime deathdateTo, String attributeType, String attributeValue, - String addressType, String country, String stateProvince, String cityVillage, String countyDistrict, - String subDistrict, String town, String subTown, DateTime lastEditFrom, DateTime lastEditTo) { - return lcr.getByCriteria(nameLike, gender, birthdateFrom, birthdateTo, deathdateFrom, deathdateTo, attributeType, attributeValue, addressType, country, stateProvince, cityVillage, countyDistrict, subDistrict, town, subTown, lastEditFrom, lastEditTo,null);//db.queryView(q.includeDocs(true), Client.class); - } - - public List findByDynamicQuery(String query) { - return lcr.getByCriteria(query);//db.queryView(q.includeDocs(true), Client.class); - } - - public List findByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, - DateTime deathdateFrom, DateTime deathdateTo, String attributeType, String attributeValue, DateTime lastEditFrom, DateTime lastEditTo){ - return lcr.getByCriteria(nameLike, gender, birthdateFrom, birthdateTo, deathdateFrom, deathdateTo, attributeType, attributeValue, null, null, null, null, null, null, null, null, lastEditFrom, lastEditTo,null); - } - - public List findByCriteria(String addressType, String country, String stateProvince, String cityVillage, String countyDistrict, - String subDistrict, String town, String subTown, DateTime lastEditFrom, DateTime lastEditTo) { - return lcr.getByCriteria(null, null, null, null, null, null, null, null, addressType, country, stateProvince, cityVillage, countyDistrict, subDistrict, town, subTown, lastEditFrom, lastEditTo,null); - } - - public List findByRelationShip(String motherIndentier) { - return lcr.getByClientByMother("mother",motherIndentier); - } - - /** - * Query view from the specified db - * @param targetDb - * @param viewName - * @param key - * @return - */ - public List queryView(CouchDbConnector targetDb,String viewName, String key) { - return targetDb.queryView(createQuery(viewName) - .includeDocs(true) - .key(key), - Client.class); - } - /** - * Save client to the specified db - * @param targetDb - * @param client - */ - public void add(CouchDbConnector targetDb,Client client) { - Assert.isTrue(Documents.isNew(client), "entity must be new"); - targetDb.create(client); - } - /** - * Get all clients without a server version - * - * @return - */ - @View(name = "clients_by_empty_server_version", map = "function(doc) { if ( doc.type == 'Client' && !doc.serverVersion) { emit(doc._id, doc); } }") - public List findByEmptyServerVersion() { - return db.queryView(createQuery("clients_by_empty_server_version").limit(200).includeDocs(true), Client.class); - } - @View(name = "clients_by__server_version", map = "function(doc) { if (doc.type === 'Client') { emit([doc.serverVersion], null); } }") - public List findByServerVersion(long serverVersion) { - ComplexKey startKey = ComplexKey.of(serverVersion + 1); - ComplexKey endKey = ComplexKey.of(System.currentTimeMillis()); - return db.queryView(createQuery("clients_by__server_version").startKey(startKey).endKey(endKey).includeDocs(true), - Client.class); - } - - public List findByFieldValue(String field, List ids) { - return lcr.getByFieldValue(field, ids); - } -} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/AppStateTokensRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/AppStateTokensRepository.java new file mode 100644 index 0000000000..1ada1926ec --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/AppStateTokensRepository.java @@ -0,0 +1,15 @@ +package org.opensrp.repository; + +import java.util.List; + +import org.opensrp.domain.AppStateToken; + +public interface AppStateTokensRepository extends BaseRepository { + + List findByName(String name); + + void update(AppStateToken entity); + + void add(AppStateToken entity); + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/BaseEntitiesRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/BaseEntitiesRepository.java new file mode 100644 index 0000000000..4250fedd7c --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/BaseEntitiesRepository.java @@ -0,0 +1,17 @@ +package org.opensrp.repository; + +import java.util.List; + +import org.opensrp.domain.BaseEntity; + +public interface BaseEntitiesRepository extends BaseRepository { + + BaseEntity findByBaseEntityId(String baseEntityId); + + List findAllBaseEntities(); + + List findAllByIdentifier(String identifier); + + List findAllByIdentifier(String identifierType, String identifier); + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/BaseRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/BaseRepository.java new file mode 100644 index 0000000000..d7c6ce26ea --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/BaseRepository.java @@ -0,0 +1,17 @@ +package org.opensrp.repository; + +import java.util.List; + +public interface BaseRepository { + + T get(String id); + + void add(T entity); + + void update(T entity); + + List getAll(); + + void safeRemove(T entity); + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/ClientsRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/ClientsRepository.java new file mode 100644 index 0000000000..333fb7872d --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/ClientsRepository.java @@ -0,0 +1,61 @@ +package org.opensrp.repository; + +import java.util.Calendar; +import java.util.List; + +import org.joda.time.DateTime; +import org.opensrp.domain.Client; + +public interface ClientsRepository extends BaseRepository { + + public Client findByBaseEntityId(String baseEntityId); + + public List findAllClients(); + + public List findAllByIdentifier(String identifier); + + public List findAllByIdentifier(String identifierType, String identifier); + + public List findAllByAttribute(String attributeType, String attribute); + + public List findAllByMatchingName(String nameMatches); + + /** + * Find a client based on the relationship id and between a range of date created dates e.g + * given mother's id get children born at a given time + * + * @param relationalId + * @param dateFrom + * @param dateTo + * @return + */ + public List findByRelationshipIdAndDateCreated(String relationalId, String dateFrom, String dateTo); + + public List findByRela3tionshipId(String relationshipType, String entityId); + + public List findByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, + DateTime deathdateFrom, DateTime deathdateTo, String attributeType, + String attributeValue, String addressType, String country, String stateProvince, + String cityVillage, String countyDistrict, String subDistrict, String town, + String subTown, DateTime lastEditFrom, DateTime lastEditTo); + + public List findByDynamicQuery(String query); + + public List findByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, + DateTime deathdateFrom, DateTime deathdateTo, String attributeType, + String attributeValue, DateTime lastEditFrom, DateTime lastEditTo); + + public List findByCriteria(String addressType, String country, String stateProvince, String cityVillage, + String countyDistrict, String subDistrict, String town, String subTown, + DateTime lastEditFrom, DateTime lastEditTo); + + public List findByRelationShip(String relationIndentier); + + public List findByEmptyServerVersion(); + + public List findByServerVersion(long serverVersion); + + public List findByFieldValue(String field, List ids); + + public List notInOpenMRSByServerVersion(long serverVersion, Calendar calendar); +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/ErrorTraceRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/ErrorTraceRepository.java new file mode 100644 index 0000000000..9f6cc08e65 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/ErrorTraceRepository.java @@ -0,0 +1,20 @@ +package org.opensrp.repository; + +import java.util.List; + +import org.ektorp.DocumentNotFoundException; +import org.opensrp.domain.ErrorTrace; + +public interface ErrorTraceRepository extends BaseRepository { + + ErrorTrace findById(String _id) throws DocumentNotFoundException; + + boolean exists(String id); + + List findAllErrors() throws DocumentNotFoundException; + + List findAllUnSolvedErrors() throws DocumentNotFoundException; + + List findAllSolvedErrors() throws DocumentNotFoundException; + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/EventsRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/EventsRepository.java new file mode 100644 index 0000000000..bd08836334 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/EventsRepository.java @@ -0,0 +1,53 @@ +package org.opensrp.repository; + +import java.util.Calendar; +import java.util.List; + +import org.joda.time.DateTime; +import org.opensrp.domain.Event; + +public interface EventsRepository extends BaseRepository { + + List findAllByIdentifier(String identifier); + + List findAllByIdentifier(String identifierType, String identifier); + + Event findById(String id); + + List findByFormSubmissionId(String formSubmissionId); + + List findByBaseEntityId(String baseEntityId); + + List findByBaseEntityAndFormSubmissionId(String baseEntityId, String formSubmissionId); + + List findByBaseEntityAndType(String baseEntityId, String eventType); + + List findEvents(String baseEntityId, DateTime from, DateTime to, String eventType, String entityType, + String providerId, String locationId, DateTime lastEditFrom, DateTime lastEditTo, String team, + String teamId); + + List findEventsByDynamicQuery(String query); + + List findByServerVersion(long serverVersion); + + List notInOpenMRSByServerVersion(long serverVersion, Calendar calendar); + + List notInOpenMRSByServerVersionAndType(String type, long serverVersion, Calendar calendar); + + List findByClientAndConceptAndDate(String baseEntityId, String concept, String conceptValue, String dateFrom, + String dateTo); + + List findByBaseEntityIdAndConceptParentCode(String baseEntityId, String concept, String parentCode); + + List findByConceptAndValue(String concept, String conceptValue); + + List findByEmptyServerVersion(); + + List findEvents(String team, String teamId, String providerId, String locationId, String baseEntityId, + Long serverVersion, String sortBy, String sortOrder, int limit); + + List findEventByEventTypeBetweenTwoDates(String eventType); + + List findByProvider(String provider); + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/MultimediaRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/MultimediaRepository.java index 5439f6d788..49c6999b5f 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/MultimediaRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/MultimediaRepository.java @@ -2,38 +2,12 @@ import java.util.List; -import org.ektorp.CouchDbConnector; -import org.ektorp.support.GenerateView; -import org.ektorp.support.View; -import org.motechproject.dao.MotechBaseRepository; -import org.opensrp.common.AllConstants; import org.opensrp.domain.Multimedia; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.stereotype.Repository; - -@Repository -public class MultimediaRepository extends MotechBaseRepository { - - @Autowired - protected MultimediaRepository( - @Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) CouchDbConnector db) { - super(Multimedia.class, db); - } - - @GenerateView - public Multimedia findByCaseId(String entityId) { - List files = queryView("by_caseId", entityId); - if (files == null || files.isEmpty()) { - return null; - } - return files.get(0); - } - - @View(name = "all_multimedia_files", map = "function(doc) { if (doc.type === 'Multimedia' && doc.providerId) { emit(doc.providerId, doc); } }") - public List all(String providerId) { - return db.queryView(createQuery("all_multimedia_files").key(providerId) - .includeDocs(true), Multimedia.class); - } +public interface MultimediaRepository extends BaseRepository { + + Multimedia findByCaseId(String entityId); + + List all(String providerId); + } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/ReportsRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/ReportsRepository.java new file mode 100644 index 0000000000..15ae2c1c71 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/ReportsRepository.java @@ -0,0 +1,31 @@ +package org.opensrp.repository; + +import java.util.List; + +import org.joda.time.DateTime; +import org.opensrp.domain.Report; + +public interface ReportsRepository extends BaseRepository { + + Report findById(String id); + + List findByBaseEntityId(String baseEntityId); + + List findAllByIdentifier(String identifier); + + List findByBaseEntityAndType(String baseEntityId, String reportType); + + List findByEmptyServerVersion(); + + List findByServerVersion(long serverVersion); + + List findByBaseEntityAndFormSubmissionId(String baseEntityId, String formSubmissionId); + + List findReports(String team, String providerId, String locationId, String baseEntityId, Long serverVersion, + String sortBy, String sortOrder, int limit); + + List findReports(String baseEntityId, DateTime from, DateTime to, String reportType, String providerId, + String locationId, DateTime lastEditFrom, DateTime lastEditTo); + + List findReportsByDynamicQuery(String query); +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/SearchRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/SearchRepository.java index fa70710f08..144e1691a0 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/SearchRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/SearchRepository.java @@ -3,35 +3,12 @@ import java.util.List; import java.util.Map; -import org.ektorp.CouchDbConnector; import org.joda.time.DateTime; -import org.motechproject.dao.MotechBaseRepository; -import org.opensrp.common.AllConstants; import org.opensrp.domain.Client; -import org.opensrp.domain.Search; -import org.opensrp.repository.lucene.LuceneSearchRepository; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.stereotype.Repository; -@Repository -public class SearchRepository extends MotechBaseRepository { - - private LuceneSearchRepository sr; - - @Autowired - protected SearchRepository(@Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) CouchDbConnector db, - LuceneSearchRepository sr) { - super(Search.class, db); - this.sr = sr; - } - - public List findByCriteria(String nameLike, String firstName, String middleName, String lastName, String gender, - Map identifiers, Map attributes, - DateTime birthdateFrom, DateTime birthdateTo, DateTime lastEditFrom, - DateTime lastEditTo, Integer limit) { - return sr.getByCriteria(nameLike, firstName, middleName, lastName, gender, identifiers, attributes, birthdateFrom, - birthdateTo, lastEditFrom, lastEditTo, limit); - } +public interface SearchRepository { + List findByCriteria(String nameLike, String firstName, String middleName, String lastName, String gender, + Map identifiers, Map attributes, DateTime birthdateFrom, + DateTime birthdateTo, DateTime lastEditFrom, DateTime lastEditTo, Integer limit); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/StocksRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/StocksRepository.java new file mode 100644 index 0000000000..81af6cb4a0 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/StocksRepository.java @@ -0,0 +1,25 @@ +package org.opensrp.repository; + +import java.util.List; + +import org.opensrp.domain.Stock; + +public interface StocksRepository extends BaseRepository { + + List findAllByProviderid(String providerid); + + public List findAllByIdentifier(String vaccine_type, String vaccine_type_id); + + public Stock findById(String id); + + public List findStocks(String identifier, String vaccine_type_id, String transaction_type, String providerid, + String value, String date_created, String to_from, String date_updated, Long serverVersion, + String sortBy, String sortOrder, int limit); + + public List findStocks(String identifier, String vaccine_type_id, String transaction_type, String providerid, + String value, String date_created, String to_from, String date_updated, + String serverVersion); + + public List findAllStocks(); + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java new file mode 100644 index 0000000000..ce2f742cbc --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java @@ -0,0 +1,141 @@ +package org.opensrp.repository.couch; + +import java.util.List; + +import org.ektorp.CouchDbConnector; +import org.ektorp.UpdateConflictException; +import org.ektorp.support.GenerateView; +import org.ektorp.util.Assert; +import org.ektorp.util.Documents; +import org.motechproject.dao.MotechBaseRepository; +import org.opensrp.common.AllConstants; +import org.opensrp.domain.AppStateToken; +import org.opensrp.repository.AppStateTokensRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Repository; + +import com.mysql.jdbc.StringUtils; + +@Repository +public class AllAppStateTokens extends MotechBaseRepository implements AppStateTokensRepository { + + private CouchDbConnector db; + + @Autowired + protected AllAppStateTokens(@Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) CouchDbConnector db) { + super(AppStateToken.class, db); + this.db = db; + } + + @GenerateView + public List findByName(String name) { + return queryView("by_name", name); + } + + @GenerateView + public List findByName(CouchDbConnector db, String name) { + return db.queryView(createQuery("by_name").includeDocs(true).key(name), AppStateToken.class); + } + + /** + * @throws UpdateConflictException if there was an update conflict. + */ + public void update(AppStateToken entity) { + Assert.notNull(entity, "entity may not be null"); + db.update(entity); + } + + /** + * @throws UpdateConflictException if there was an update conflict. + */ + public void add(AppStateToken entity) { + Assert.notNull(entity, "entity may not be null"); + Assert.isTrue(Documents.isNew(entity), "entity must be new"); + db.create(entity); + } + + /** + * Gets appstatetoken from the specified database + * + * @param db + * @param tokenName + * @return AppStateToken with given name. Since model is supposed to keep track of system`s + * state at any given time it throws IllegalStateException incase multiple Tokens found + * with same name. + */ + public AppStateToken getAppStateTokenByName(CouchDbConnector db, Enum tokenName) { + List ol = findByName(db, tokenName.name()); + if (ol.size() > 1) { + throw new IllegalStateException("System was found to have multiple token with same name (" + tokenName.name() + + "). This can lead to potential critical inconsistencies."); + } + + return ol.size() == 0 ? null : ol.get(0); + } + + /** + * Registers a new token to manage the specified variable state (by token name) of App. The + * token is registered in the specified db + * + * @param db + * @param tokenName + * @param defaultValue + * @param description + * @param suppressExceptionIfExists + * @return + */ + public AppStateToken registerAppStateToken(CouchDbConnector db, Enum tokenName, Object defaultValue, + String description, boolean suppressExceptionIfExists) { + if (tokenName == null || StringUtils.isEmptyOrWhitespaceOnly(description)) { + throw new IllegalArgumentException("Token name and description must be provided"); + } + + List atl = findByName(db, tokenName.name()); + if (atl.size() > 0) { + if (!suppressExceptionIfExists) { + throw new IllegalArgumentException("Token with given name (" + tokenName.name() + ") already exists."); + } + return atl.get(0); + } + + AppStateToken token = new AppStateToken(tokenName.name(), defaultValue, 0L, description); + add(db, token); + return token; + } + + public void updateAppStateToken(CouchDbConnector db, Enum tokenName, Object value) { + List ol = findByName(db, tokenName.name()); + if (ol.size() > 1) { + throw new IllegalStateException("System was found to have multiple token with same name (" + tokenName.name() + + "). This can lead to potential critical inconsistencies."); + } + + if (ol.size() == 0) { + throw new IllegalStateException("Property with name (" + tokenName.name() + ") not found."); + } + + AppStateToken ast = ol.get(0); + ast.setValue(value); + ast.setLastEditDate(System.currentTimeMillis()); + update(db, ast); + } + + /** + * @throws UpdateConflictException if there was an update conflict. + */ + public void update(CouchDbConnector db, AppStateToken entity) { + Assert.notNull(entity, "entity may not be null"); + db.update(entity); + } + + /** + * @throws UpdateConflictException if there was an update conflict. + */ + public void add(CouchDbConnector db, AppStateToken entity) { + Assert.notNull(entity, "entity may not be null"); + Assert.isTrue(Documents.isNew(entity), "entity must be new"); + db.create(entity); + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/AllBaseEntities.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllBaseEntities.java similarity index 93% rename from opensrp-core/src/main/java/org/opensrp/repository/AllBaseEntities.java rename to opensrp-core/src/main/java/org/opensrp/repository/couch/AllBaseEntities.java index 42fb0fbfde..290a8596da 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/AllBaseEntities.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllBaseEntities.java @@ -1,4 +1,4 @@ -package org.opensrp.repository; +package org.opensrp.repository.couch; import java.util.List; @@ -9,12 +9,13 @@ import org.motechproject.dao.MotechBaseRepository; import org.opensrp.common.AllConstants; import org.opensrp.domain.BaseEntity; +import org.opensrp.repository.BaseEntitiesRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Repository; @Repository -public class AllBaseEntities extends MotechBaseRepository { +public class AllBaseEntities extends MotechBaseRepository implements BaseEntitiesRepository { @Autowired protected AllBaseEntities(@Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) CouchDbConnector db) { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java new file mode 100644 index 0000000000..13ba1c8cab --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java @@ -0,0 +1,265 @@ +package org.opensrp.repository.couch; + +import java.util.ArrayList; +import java.util.Calendar; +import java.util.List; + +import org.ektorp.ComplexKey; +import org.ektorp.CouchDbConnector; +import org.ektorp.support.GenerateView; +import org.ektorp.support.View; +import org.ektorp.util.Assert; +import org.ektorp.util.Documents; +import org.joda.time.DateTime; +import org.motechproject.dao.MotechBaseRepository; +import org.opensrp.common.AllConstants; +import org.opensrp.domain.Client; +import org.opensrp.repository.ClientsRepository; +import org.opensrp.repository.lucene.LuceneClientRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Repository; + +import com.mysql.jdbc.StringUtils; + +@Repository + +public class AllClients extends MotechBaseRepository implements ClientsRepository { + + private LuceneClientRepository lcr; + + @Autowired + protected AllClients(@Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) CouchDbConnector db, + LuceneClientRepository lcr) { + super(Client.class, db); + this.lcr = lcr; + } + + @GenerateView + public Client findByBaseEntityId(String baseEntityId) { + if (StringUtils.isEmptyOrWhitespaceOnly(baseEntityId)) + return null; + List clients = queryView("by_baseEntityId", baseEntityId); + if (clients == null || clients.isEmpty()) { + return null; + } + return clients.get(0); + } + + @GenerateView + public Client findByBaseEntityId(CouchDbConnector targetDb, String baseEntityId) { + if (StringUtils.isEmptyOrWhitespaceOnly(baseEntityId)) + return null; + List clients = queryView(targetDb, "by_baseEntityId", baseEntityId); + if (clients == null || clients.isEmpty()) { + return null; + } + return clients.get(0); + } + + @View(name = "all_clients", map = "function(doc) { if (doc.type === 'Client') { emit(doc.baseEntityId); } }") + public List findAllClients() { + return db.queryView(createQuery("all_clients").includeDocs(true), Client.class); + } + + @View(name = "all_clients_by_identifier", map = "function(doc) {if (doc.type === 'Client') {for(var key in doc.identifiers) {emit(doc.identifiers[key]);}}}") + public List findAllByIdentifier(String identifier) { + return db.queryView(createQuery("all_clients_by_identifier").key(identifier).includeDocs(true), Client.class); + } + + @View(name = "all_clients_by_identifier", map = "function(doc) {if (doc.type === 'Client') {for(var key in doc.identifiers) {emit(doc.identifiers[key]);}}}") + public List findAllByIdentifier(CouchDbConnector targetDb, String identifier) { + return targetDb.queryView(createQuery("all_clients_by_identifier").key(identifier).includeDocs(true), Client.class); + } + + @View(name = "all_clients_by_identifier_of_type", map = "function(doc) {if (doc.type === 'Client') {for(var key in doc.identifiers) {emit([key, doc.identifiers[key]]);}}}") + public List findAllByIdentifier(String identifierType, String identifier) { + ComplexKey ckey = ComplexKey.of(identifierType, identifier); + return db.queryView(createQuery("all_clients_by_identifier_of_type").key(ckey).includeDocs(true), Client.class); + } + + @View(name = "all_clients_by_attribute_of_type", map = "function(doc) {if (doc.type === 'Client') {for(var key in doc.attributes) {emit([key, doc.attributes[key]]);}}}") + public List findAllByAttribute(String attributeType, String attribute) { + ComplexKey ckey = ComplexKey.of(attributeType, attribute); + return db.queryView(createQuery("all_clients_by_attribute_of_type").key(ckey).includeDocs(true), Client.class); + } + + @View(name = "all_clients_by_matching_name", map = "function(doc) {if(doc.type === 'Client'){emit(doc.firstName, doc);emit(doc.lastName, doc);}}") + public List findAllByMatchingName(String nameMatches) { + return db.queryView( + createQuery("all_clients_by_matching_name").startKey(nameMatches).endKey(nameMatches + "z").includeDocs(true), + Client.class); + } + + /** + * Find a client based on the relationship id and between a range of date created dates e.g + * given mother's id get children born at a given time + * + * @param relationalId + * @param dateFrom + * @param dateTo + * @return + */ + @View(name = "client_by_relationship_id_and_date_created", map = "function(doc) { if (doc.type === 'Client' && doc.relationships) {for (var key in doc.relationships) { var entityid=doc.relationships[key][0]; emit([entityid, doc.dateCreated.substring(0,10)], null); }} }") + public List findByRelationshipIdAndDateCreated(String relationalId, String dateFrom, String dateTo) { + ComplexKey startKey = ComplexKey.of(relationalId, dateFrom); + ComplexKey endKey = ComplexKey.of(relationalId, dateTo); + List clients = db.queryView( + createQuery("client_by_relationship_id_and_date_created").startKey(startKey).endKey(endKey).includeDocs(true), + Client.class); + return clients; + } + + // @View(name = "client_by_relationship", map = "function(doc) {if (doc.type === 'Client') {for(var key in doc.relationships) {emit([key, doc.relationships[key]]);}}}") + // @View(name = "client_by_relationship", map = "function(doc) { if(doc.type == 'Client' && doc.relationships.mother[0]) {emit(null, doc._id)} }") + @View(name = "client_by_relationship", map = "function(doc) { if(doc.type === 'Client' && doc.relationships) { for (var key in doc.relationships) { var entityid = doc.relationships[key][0]; if (key === 'mother') {emit([key, entityid], doc);}}}}") + + public List findByRela3tionshipId(String relationshipType, String entityId) { + return db.queryView(createQuery("client_by_relationship").startKey(entityId).endKey(entityId).includeDocs(true), + Client.class); + } + + // @View(name = "clients_by_relationship", map = "function(doc) {if (doc.type === 'Client' && doc.relationships.mother) {for(var key in doc.relationships) {emit(doc.relationships.mother[key]);}}}") + // public List findByRelationshipId(String identifier) { + // return db.queryView(createQuery("clients_by_relationship").key(identifier).includeDocs(true), Client.class); + // } + public List findByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, + DateTime deathdateFrom, DateTime deathdateTo, String attributeType, + String attributeValue, String addressType, String country, String stateProvince, + String cityVillage, String countyDistrict, String subDistrict, String town, + String subTown, DateTime lastEditFrom, DateTime lastEditTo) { + return lcr.getByCriteria(nameLike, gender, birthdateFrom, birthdateTo, deathdateFrom, deathdateTo, attributeType, + attributeValue, addressType, country, stateProvince, cityVillage, countyDistrict, subDistrict, town, subTown, + lastEditFrom, lastEditTo, null);//db.queryView(q.includeDocs(true), Client.class); + } + + public List findByDynamicQuery(String query) { + return lcr.getByCriteria(query);//db.queryView(q.includeDocs(true), Client.class); + } + + public List findByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, + DateTime deathdateFrom, DateTime deathdateTo, String attributeType, + String attributeValue, DateTime lastEditFrom, DateTime lastEditTo) { + return lcr.getByCriteria(nameLike, gender, birthdateFrom, birthdateTo, deathdateFrom, deathdateTo, attributeType, + attributeValue, null, null, null, null, null, null, null, null, lastEditFrom, lastEditTo, null); + } + + public List findByCriteria(String addressType, String country, String stateProvince, String cityVillage, + String countyDistrict, String subDistrict, String town, String subTown, + DateTime lastEditFrom, DateTime lastEditTo) { + return lcr.getByCriteria(null, null, null, null, null, null, null, null, addressType, country, stateProvince, + cityVillage, countyDistrict, subDistrict, town, subTown, lastEditFrom, lastEditTo, null); + } + + public List findByRelationShip(String motherIndentier) { + return lcr.getByClientByMother("mother", motherIndentier); + } + + /** + * Query view from the specified db + * + * @param targetDb + * @param viewName + * @param key + * @return + */ + public List queryView(CouchDbConnector targetDb, String viewName, String key) { + return targetDb.queryView(createQuery(viewName).includeDocs(true).key(key), Client.class); + } + + /** + * Save client to the specified db + * + * @param targetDb + * @param client + */ + public void add(CouchDbConnector targetDb, Client client) { + Assert.isTrue(Documents.isNew(client), "entity must be new"); + targetDb.create(client); + } + + /** + * Get all clients without a server version + * + * @return + */ + @View(name = "clients_by_empty_server_version", map = "function(doc) { if ( doc.type == 'Client' && !doc.serverVersion) { emit(doc._id, doc); } }") + public List findByEmptyServerVersion() { + return db.queryView(createQuery("clients_by_empty_server_version").limit(200).includeDocs(true), Client.class); + } + + @View(name = "clients_by__server_version", map = "function(doc) { if (doc.type === 'Client') { emit([doc.serverVersion], null); } }") + public List findByServerVersion(long serverVersion) { + ComplexKey startKey = ComplexKey.of(serverVersion + 1); + ComplexKey endKey = ComplexKey.of(System.currentTimeMillis()); + return db.queryView(createQuery("clients_by__server_version").startKey(startKey).endKey(endKey).includeDocs(true), + Client.class); + } + + public List findByFieldValue(String field, List ids) { + return lcr.getByFieldValue(field, ids); + } + + @View(name = "clients_not_in_OpenMRS", map = "function(doc) { if (doc.type === 'Client' && doc.serverVersion) { var noId = true; for(var key in doc.identifiers) {if(key == 'OPENMRS_UUID') {noId = false;}}if(noId){emit([doc.serverVersion], null); }} }") + public List notInOpenMRSByServerVersion(long serverVersion, Calendar calendar) { + long serverStartKey = serverVersion + 1; + long serverEndKey = calendar.getTimeInMillis(); + if (serverStartKey < serverEndKey) { + ComplexKey startKey = ComplexKey.of(serverStartKey); + ComplexKey endKey = ComplexKey.of(serverEndKey); + return db.queryView( + createQuery("clients_not_in_OpenMRS").startKey(startKey).endKey(endKey).limit(1000).includeDocs(true), + Client.class); + } + return new ArrayList<>(); + } + + public Client addClient(CouchDbConnector targetDb, Client client) { + if (client.getBaseEntityId() == null) { + throw new RuntimeException("No baseEntityId"); + } + Client c = findClient(targetDb, client); + if (c != null) { + throw new IllegalArgumentException( + "A client already exists with given list of identifiers. Consider updating data.[" + c + "]"); + } + + client.setDateCreated(new DateTime()); + add(targetDb, client); + return client; + } + + /** + * Find a client from the specified db + * + * @param targetDb + * @param client + * @return + */ + public Client findClient(CouchDbConnector targetDb, Client client) { + // find by auto assigned entity id + try { + Client c = findByBaseEntityId(client.getBaseEntityId()); + if (c != null) { + return c; + } + + //still not found!! search by generic identifiers + + for (String idt : client.getIdentifiers().keySet()) { + List cl = findAllByIdentifier(targetDb, client.getIdentifier(idt)); + if (cl.size() > 1) { + throw new IllegalArgumentException("Multiple clients with identifier type " + idt + " and ID " + + client.getIdentifier(idt) + " exist."); + } else if (cl.size() != 0) { + return cl.get(0); + } + } + return c; + } + catch (Exception e) { + + return null; + } + } +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/AllErrorTrace.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllErrorTrace.java similarity index 73% rename from opensrp-core/src/main/java/org/opensrp/repository/AllErrorTrace.java rename to opensrp-core/src/main/java/org/opensrp/repository/couch/AllErrorTrace.java index e30f619a49..2320cdfe33 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/AllErrorTrace.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllErrorTrace.java @@ -1,5 +1,5 @@ -package org.opensrp.repository; +package org.opensrp.repository.couch; import java.util.List; @@ -9,59 +9,54 @@ import org.motechproject.dao.MotechBaseRepository; import org.opensrp.common.AllConstants; import org.opensrp.domain.ErrorTrace; +import org.opensrp.repository.ErrorTraceRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Repository; /** - * @author muhammad.ahmed@ihsinformatics.com - * Created on May 25, 2015 + * @author muhammad.ahmed@ihsinformatics.com Created on May 25, 2015 */ @Repository -public class AllErrorTrace extends MotechBaseRepository { - - +public class AllErrorTrace extends MotechBaseRepository implements ErrorTraceRepository { + @Autowired - protected AllErrorTrace( - @Qualifier(AllConstants.OPENSRP_ERRORTRACE_DATABASE) CouchDbConnector db) { + protected AllErrorTrace(@Qualifier(AllConstants.OPENSRP_ERRORTRACE_DATABASE) CouchDbConnector db) { super(ErrorTrace.class, db); } - + //@GenerateView - public ErrorTrace findById(String _id) throws DocumentNotFoundException{ + public ErrorTrace findById(String _id) throws DocumentNotFoundException { /*db.queryView(createQuery("_id").keys(_id) .includeDocs(true), ErrorTrace.class);*/ - ErrorTrace errors= (ErrorTrace)get(_id); + ErrorTrace errors = (ErrorTrace) get(_id); //List errors = queryView("_id", _id); - if (errors == null ) { + if (errors == null) { System.out.println("Error by id : = found nothing !"); return null; } - System.out.println("Error by id : = "+errors); + System.out.println("Error by id : = " + errors); return errors; } - + public boolean exists(String id) { return findById(id) != null; } - + @View(name = "all_errors", map = "function(doc) { emit(doc.id); }") - public List findAllErrors() throws DocumentNotFoundException{ - return db.queryView(createQuery("all_errors").includeDocs(true), - ErrorTrace.class); + public List findAllErrors() throws DocumentNotFoundException { + return db.queryView(createQuery("all_errors").includeDocs(true), ErrorTrace.class); } - + @View(name = "all_unsolved_errors", map = "function(doc) { if (doc.status === 'unsolved') { emit(doc.id); } }") public List findAllUnSolvedErrors() throws DocumentNotFoundException { - return db.queryView(createQuery("all_unsolved_errors").includeDocs(true), - ErrorTrace.class); + return db.queryView(createQuery("all_unsolved_errors").includeDocs(true), ErrorTrace.class); } - + @View(name = "all_solved_errors", map = "function(doc) { if (doc.status === 'solved') { emit(doc.id); } }") public List findAllSolvedErrors() throws DocumentNotFoundException { - return db.queryView(createQuery("all_solved_errors").includeDocs(true), - ErrorTrace.class); + return db.queryView(createQuery("all_solved_errors").includeDocs(true), ErrorTrace.class); } - + } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/AllEvents.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java similarity index 63% rename from opensrp-core/src/main/java/org/opensrp/repository/AllEvents.java rename to opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java index 456007ec7d..2d6622aef1 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/AllEvents.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java @@ -1,5 +1,6 @@ -package org.opensrp.repository; +package org.opensrp.repository.couch; +import java.util.ArrayList; import java.util.Calendar; import java.util.List; @@ -14,13 +15,14 @@ import org.motechproject.dao.MotechBaseRepository; import org.opensrp.common.AllConstants; import org.opensrp.domain.Event; +import org.opensrp.repository.EventsRepository; import org.opensrp.repository.lucene.LuceneEventRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Repository; @Repository -public class AllEvents extends MotechBaseRepository { +public class AllEvents extends MotechBaseRepository implements EventsRepository { private LuceneEventRepository ler; @@ -59,23 +61,24 @@ public List findByBaseEntityId(String baseEntityId) { @View(name = "all_events_by_base_entity_and_form_submission", map = "function(doc) { if (doc.type === 'Event'){ emit([doc.baseEntityId, doc.formSubmissionId], doc); } }") public List findByBaseEntityAndFormSubmissionId(String baseEntityId, String formSubmissionId) { - return db.queryView( - createQuery("all_events_by_base_entity_and_form_submission").key(ComplexKey.of(baseEntityId, formSubmissionId)) - .includeDocs(true), Event.class); + return db.queryView(createQuery("all_events_by_base_entity_and_form_submission") + .key(ComplexKey.of(baseEntityId, formSubmissionId)).includeDocs(true), + Event.class); } @View(name = "all_events_by_base_entity_and_type", map = "function(doc) { if (doc.type === 'Event'){ emit([doc.baseEntityId, doc.eventType], doc); } }") public List findByBaseEntityAndType(String baseEntityId, String eventType) { - return db.queryView(createQuery("all_events_by_base_entity_and_type").key(ComplexKey.of(baseEntityId, eventType)) - .includeDocs(true), Event.class); + return db.queryView( + createQuery("all_events_by_base_entity_and_type").key(ComplexKey.of(baseEntityId, eventType)).includeDocs(true), + Event.class); } @View(name = "all_events_by_base_entity_and_form_submission", map = "function(doc) { if (doc.type === 'Event'){ emit([doc.baseEntityId, doc.formSubmissionId], doc); } }") public List findByBaseEntityAndFormSubmissionId(CouchDbConnector targetDb, String baseEntityId, String formSubmissionId) { - return targetDb.queryView( - createQuery("all_events_by_base_entity_and_form_submission").key(ComplexKey.of(baseEntityId, formSubmissionId)) - .includeDocs(true), Event.class); + return targetDb.queryView(createQuery("all_events_by_base_entity_and_form_submission") + .key(ComplexKey.of(baseEntityId, formSubmissionId)).includeDocs(true), + Event.class); } public List findEvents(String baseEntityId, DateTime from, DateTime to, String eventType, String entityType, @@ -121,8 +124,9 @@ public List findByClientAndConceptAndDate(String baseEntityId, String con String dateFrom, String dateTo) { ComplexKey startKey = ComplexKey.of(baseEntityId, concept, conceptValue, dateFrom); ComplexKey endKey = ComplexKey.of(baseEntityId, concept, conceptValue, dateTo); - List events = db.queryView(createQuery("event_by_concept_and_date_created").startKey(startKey).endKey(endKey) - .includeDocs(true), Event.class); + List events = db.queryView( + createQuery("event_by_concept_and_date_created").startKey(startKey).endKey(endKey).includeDocs(true), + Event.class); return events; } @@ -131,14 +135,16 @@ public List findByBaseEntityIdAndConceptParentCode(String baseEntityId, S ComplexKey startKey = ComplexKey.of(baseEntityId, concept, parentCode); ComplexKey endKey = ComplexKey.of(baseEntityId, concept, parentCode); List events = db.queryView(createQuery("event_by_concept_parent_code_and_base_entity_id").startKey(startKey) - .endKey(endKey).includeDocs(true), Event.class); + .endKey(endKey).includeDocs(true), + Event.class); return events; } @View(name = "event_by_concept_and_value", map = "function(doc) {if (doc.type === 'Event' && doc.obs) {for (var obs in doc.obs) {var fieldCode = doc.obs[obs].fieldCode;var value = doc.obs[obs].values[0];emit([fieldCode,value],null);}}}") public List findByConceptAndValue(String concept, String conceptValue) { - List events = db.queryView(createQuery("event_by_concept_and_value") - .key(ComplexKey.of(concept, conceptValue)).includeDocs(true), Event.class); + List events = db.queryView( + createQuery("event_by_concept_and_value").key(ComplexKey.of(concept, conceptValue)).includeDocs(true), + Event.class); return events; } @@ -154,8 +160,8 @@ public List getAll() { public List findEvents(String team, String teamId, String providerId, String locationId, String baseEntityId, Long serverVersion, String sortBy, String sortOrder, int limit) { - return ler - .getByCriteria(team, teamId, providerId, locationId, baseEntityId, serverVersion, sortBy, sortOrder, limit); + return ler.getByCriteria(team, teamId, providerId, locationId, baseEntityId, serverVersion, sortBy, sortOrder, + limit); } @View(name = "all_events_by_event_type_and_version", map = "function(doc) { if (doc.type === 'Event'){ emit([doc.eventType, doc.version], null); } }") @@ -165,14 +171,81 @@ public List findEventByEventTypeBetweenTwoDates(String eventType) { System.err.println("calendar.getTime():" + calendar.getTime().getTime()); ComplexKey start = ComplexKey.of(eventType, calendar.getTime().getTime()); ComplexKey end = ComplexKey.of(eventType, System.currentTimeMillis()); - List events = db.queryView(createQuery("all_events_by_event_type_and_version").startKey(start).endKey(end) - .includeDocs(true), Event.class); + List events = db.queryView( + createQuery("all_events_by_event_type_and_version").startKey(start).endKey(end).includeDocs(true), Event.class); return events; } @View(name = "events_by_provider_and_entity_type", map = "function(doc) { if (doc.type === 'Event' && (doc.entityType=='child' || doc.entityType=='mother')) { emit(doc.providerId, null); } }") - public List findByProviderAndEntityType(String provider) { + public List findByProvider(String provider) { return db.queryView(createQuery("events_by_provider_and_entity_type").key(provider).includeDocs(true), Event.class); } + + @View(name = "events_not_in_OpenMRS", map = "function(doc) { if (doc.type === 'Event' && doc.serverVersion) { var noId = true; for(var key in doc.identifiers) {if(key == 'OPENMRS_UUID') {noId = false;}}if(noId){emit([doc.serverVersion], null); }} }") + public List notInOpenMRSByServerVersion(long serverVersion, Calendar calendar) { + long serverStartKey = serverVersion + 1; + long serverEndKey = calendar.getTimeInMillis(); + if (serverStartKey < serverEndKey) { + ComplexKey startKey = ComplexKey.of(serverStartKey); + ComplexKey endKey = ComplexKey.of(serverEndKey); + return db.queryView( + createQuery("events_not_in_OpenMRS").startKey(startKey).endKey(endKey).limit(1000).includeDocs(true), + Event.class); + } + return new ArrayList<>(); + } + + @View(name = "events_by_type_not_in_OpenMRS", map = "function(doc) { if (doc.type === 'Event' && doc.serverVersion) { var noId = true; for(var key in doc.identifiers) {if(key == 'OPENMRS_UUID') {noId = false;}}if(noId){emit([doc.eventType, doc.serverVersion], null); }} }") + public List notInOpenMRSByServerVersionAndType(String type, long serverVersion, Calendar calendar) { + long serverStartKey = serverVersion + 1; + long serverEndKey = calendar.getTimeInMillis(); + if (serverStartKey < serverEndKey) { + ComplexKey startKey = ComplexKey.of(type, serverStartKey); + ComplexKey endKey = ComplexKey.of(type, serverEndKey); + return db.queryView( + createQuery("events_by_type_not_in_OpenMRS").startKey(startKey).endKey(endKey).limit(1000).includeDocs(true), + Event.class); + } + return new ArrayList<>(); + } + + public synchronized Event addEvent(CouchDbConnector targetDb, Event event) { + // Event e = find(targetDb,event); + // if(e != null){ + // throw new IllegalArgumentException("An event already exists with given list of identifiers. Consider updating data.["+e+"]"); + // } + if (event.getFormSubmissionId() != null && getByBaseEntityAndFormSubmissionId(targetDb, event.getBaseEntityId(), + event.getFormSubmissionId()) != null) { + throw new IllegalArgumentException( + "An event already exists with given baseEntity and formSubmission combination. Consider updating"); + } + + event.setDateCreated(new DateTime()); + + add(targetDb, event); + return event; + } + + public Event getByBaseEntityAndFormSubmissionId(CouchDbConnector targetDb, String baseEntityId, + String formSubmissionId) { + try { + List events = findByBaseEntityAndFormSubmissionId(targetDb, baseEntityId, formSubmissionId); + if (events.size() > 1) { + throw new IllegalArgumentException(); + } + if (events.size() == 0) { + return null; + } + return events.get(0); + } + catch (IllegalArgumentException e) { + throw new IllegalStateException("Multiple events for baseEntityId and formSubmissionId combination (" + + baseEntityId + "," + formSubmissionId + ")"); + } + catch (Exception e) { + return null; + } + } + } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/AllLocations.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllLocations.java similarity index 97% rename from opensrp-core/src/main/java/org/opensrp/repository/AllLocations.java rename to opensrp-core/src/main/java/org/opensrp/repository/couch/AllLocations.java index 63f11b2b96..c2a48d625a 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/AllLocations.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllLocations.java @@ -1,4 +1,4 @@ -package org.opensrp.repository; +package org.opensrp.repository.couch; import java.util.List; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/AllProviders.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllProviders.java similarity index 97% rename from opensrp-core/src/main/java/org/opensrp/repository/AllProviders.java rename to opensrp-core/src/main/java/org/opensrp/repository/couch/AllProviders.java index 9d4b674204..ca2ef095a7 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/AllProviders.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllProviders.java @@ -1,4 +1,4 @@ -package org.opensrp.repository; +package org.opensrp.repository.couch; import java.util.List; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/AllReports.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllReports.java similarity index 95% rename from opensrp-core/src/main/java/org/opensrp/repository/AllReports.java rename to opensrp-core/src/main/java/org/opensrp/repository/couch/AllReports.java index e8ef7c0190..38d38b2502 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/AllReports.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllReports.java @@ -1,4 +1,4 @@ -package org.opensrp.repository; +package org.opensrp.repository.couch; import java.util.List; @@ -10,13 +10,14 @@ import org.motechproject.dao.MotechBaseRepository; import org.opensrp.common.AllConstants; import org.opensrp.domain.Report; +import org.opensrp.repository.ReportsRepository; import org.opensrp.repository.lucene.LuceneReportRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Repository; @Repository -public class AllReports extends MotechBaseRepository { +public class AllReports extends MotechBaseRepository implements ReportsRepository{ private LuceneReportRepository lrr; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/AllStocks.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllStocks.java similarity index 94% rename from opensrp-core/src/main/java/org/opensrp/repository/AllStocks.java rename to opensrp-core/src/main/java/org/opensrp/repository/couch/AllStocks.java index 689b17e89b..728f9d52cc 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/AllStocks.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllStocks.java @@ -1,4 +1,4 @@ -package org.opensrp.repository; +package org.opensrp.repository.couch; import java.util.List; @@ -11,13 +11,14 @@ import org.motechproject.dao.MotechBaseRepository; import org.opensrp.common.AllConstants; import org.opensrp.domain.Stock; +import org.opensrp.repository.StocksRepository; import org.opensrp.repository.lucene.LuceneStockRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Repository; @Repository -public class AllStocks extends MotechBaseRepository { +public class AllStocks extends MotechBaseRepository implements StocksRepository { private LuceneStockRepository lsr; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/AllUsers.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllUsers.java similarity index 97% rename from opensrp-core/src/main/java/org/opensrp/repository/AllUsers.java rename to opensrp-core/src/main/java/org/opensrp/repository/couch/AllUsers.java index dca575457a..0e7ce49f47 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/AllUsers.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllUsers.java @@ -1,4 +1,4 @@ -package org.opensrp.repository; +package org.opensrp.repository.couch; import java.util.List; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/MultimediaRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/MultimediaRepositoryImpl.java new file mode 100644 index 0000000000..fcbe4e7f7d --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/MultimediaRepositoryImpl.java @@ -0,0 +1,38 @@ +package org.opensrp.repository.couch; + +import java.util.List; + +import org.ektorp.CouchDbConnector; +import org.ektorp.support.GenerateView; +import org.ektorp.support.View; +import org.motechproject.dao.MotechBaseRepository; +import org.opensrp.common.AllConstants; +import org.opensrp.domain.Multimedia; +import org.opensrp.repository.MultimediaRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Repository; + +@Repository +public class MultimediaRepositoryImpl extends MotechBaseRepository implements MultimediaRepository { + + @Autowired + protected MultimediaRepositoryImpl(@Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) CouchDbConnector db) { + super(Multimedia.class, db); + } + + @GenerateView + public Multimedia findByCaseId(String entityId) { + List files = queryView("by_caseId", entityId); + if (files == null || files.isEmpty()) { + return null; + } + return files.get(0); + } + + @View(name = "all_multimedia_files", map = "function(doc) { if (doc.type === 'Multimedia' && doc.providerId) { emit(doc.providerId, doc); } }") + public List all(String providerId) { + return db.queryView(createQuery("all_multimedia_files").key(providerId).includeDocs(true), Multimedia.class); + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/SearchRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/SearchRepositoryImpl.java new file mode 100644 index 0000000000..8525b168d7 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/SearchRepositoryImpl.java @@ -0,0 +1,38 @@ +package org.opensrp.repository.couch; + +import java.util.List; +import java.util.Map; + +import org.ektorp.CouchDbConnector; +import org.joda.time.DateTime; +import org.motechproject.dao.MotechBaseRepository; +import org.opensrp.common.AllConstants; +import org.opensrp.domain.Client; +import org.opensrp.domain.Search; +import org.opensrp.repository.SearchRepository; +import org.opensrp.repository.lucene.LuceneSearchRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.stereotype.Repository; + +@Repository +public class SearchRepositoryImpl extends MotechBaseRepository implements SearchRepository { + + private LuceneSearchRepository sr; + + @Autowired + protected SearchRepositoryImpl(@Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) CouchDbConnector db, + LuceneSearchRepository sr) { + super(Search.class, db); + this.sr = sr; + } + + public List findByCriteria(String nameLike, String firstName, String middleName, String lastName, String gender, + Map identifiers, Map attributes, + DateTime birthdateFrom, DateTime birthdateTo, DateTime lastEditFrom, + DateTime lastEditTo, Integer limit) { + return sr.getByCriteria(nameLike, firstName, middleName, lastName, gender, identifiers, attributes, birthdateFrom, + birthdateTo, lastEditFrom, lastEditTo, limit); + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/UniqueIdRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/UniqueIdRepository.java similarity index 98% rename from opensrp-core/src/main/java/org/opensrp/repository/UniqueIdRepository.java rename to opensrp-core/src/main/java/org/opensrp/repository/couch/UniqueIdRepository.java index 213c4455ec..c6825b7cf1 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/UniqueIdRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/UniqueIdRepository.java @@ -1,4 +1,4 @@ -package org.opensrp.repository; +package org.opensrp.repository.couch; import org.opensrp.domain.UniqueId; import org.springframework.beans.factory.annotation.Autowired; diff --git a/opensrp-core/src/main/java/org/opensrp/service/BaseEntityService.java b/opensrp-core/src/main/java/org/opensrp/service/BaseEntityService.java index 1b4c0b5e44..2af0991bd3 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/BaseEntityService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/BaseEntityService.java @@ -3,17 +3,17 @@ import java.util.List; import org.opensrp.domain.BaseEntity; -import org.opensrp.repository.AllBaseEntities; +import org.opensrp.repository.BaseEntitiesRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class BaseEntityService { - private final AllBaseEntities allBaseEntities; + private final BaseEntitiesRepository allBaseEntities; @Autowired - public BaseEntityService(AllBaseEntities allBaseEntities ) { + public BaseEntityService(BaseEntitiesRepository allBaseEntities ) { this.allBaseEntities = allBaseEntities; } diff --git a/opensrp-core/src/main/java/org/opensrp/service/ClientService.java b/opensrp-core/src/main/java/org/opensrp/service/ClientService.java index 4763ef31b9..1b1d3511cb 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/ClientService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/ClientService.java @@ -4,13 +4,12 @@ import java.util.Arrays; import java.util.List; -import org.ektorp.CouchDbConnector; import org.joda.time.DateTime; import org.json.JSONException; import org.json.JSONObject; import org.opensrp.domain.Address; import org.opensrp.domain.Client; -import org.opensrp.repository.AllClients; +import org.opensrp.repository.ClientsRepository; import org.opensrp.util.DateTimeTypeConverter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -21,10 +20,10 @@ @Service public class ClientService { - private final AllClients allClients; + private final ClientsRepository allClients; @Autowired - public ClientService(AllClients allClients) { + public ClientService(ClientsRepository allClients) { this.allClients = allClients; } @@ -109,21 +108,6 @@ public Client addClient(Client client) { return client; } - public Client addClient(CouchDbConnector targetDb, Client client) { - if (client.getBaseEntityId() == null) { - throw new RuntimeException("No baseEntityId"); - } - Client c = findClient(targetDb, client); - if (c != null) { - throw new IllegalArgumentException( - "A client already exists with given list of identifiers. Consider updating data.[" + c + "]"); - } - - client.setDateCreated(new DateTime()); - allClients.add(targetDb, client); - return client; - } - public Client findClient(Client client) { // find by auto assigned entity id Client c = allClients.findByBaseEntityId(client.getBaseEntityId()); @@ -145,40 +129,7 @@ public Client findClient(Client client) { return c; } - /** - * Find a client from the specified db - * - * @param targetDb - * @param client - * @return - */ - public Client findClient(CouchDbConnector targetDb, Client client) { - // find by auto assigned entity id - try { - Client c = allClients.findByBaseEntityId(client.getBaseEntityId()); - if (c != null) { - return c; - } - - //still not found!! search by generic identifiers - - for (String idt : client.getIdentifiers().keySet()) { - List cl = allClients.findAllByIdentifier(targetDb, client.getIdentifier(idt)); - if (cl.size() > 1) { - throw new IllegalArgumentException( - "Multiple clients with identifier type " + idt + " and ID " + client.getIdentifier(idt) - + " exist."); - } else if (cl.size() != 0) { - return cl.get(0); - } - } - return c; - } - catch (Exception e) { - - return null; - } - } + public Client find(String uniqueId) { // find by document id diff --git a/opensrp-core/src/main/java/org/opensrp/service/ConfigService.java b/opensrp-core/src/main/java/org/opensrp/service/ConfigService.java index 2446bca596..a810fb07b6 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/ConfigService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/ConfigService.java @@ -2,10 +2,8 @@ import java.util.List; -import com.fasterxml.jackson.databind.node.ObjectNode; -import org.ektorp.CouchDbConnector; import org.opensrp.domain.AppStateToken; -import org.opensrp.repository.AllAppStateTokens; +import org.opensrp.repository.AppStateTokensRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -13,51 +11,36 @@ @Service public class ConfigService { - - private final AllAppStateTokens allAppStateTokens; - + + private final AppStateTokensRepository allAppStateTokens; + @Autowired - public ConfigService(AllAppStateTokens allAppStateTokens) { + public ConfigService(AppStateTokensRepository allAppStateTokens) { this.allAppStateTokens = allAppStateTokens; } - + /** * @param tokenName - * @return AppStateToken with given name. Since model is supposed to keep track of system`s state at any given time it throws IllegalStateException incase multiple Tokens found with same name. + * @return AppStateToken with given name. Since model is supposed to keep track of system`s + * state at any given time it throws IllegalStateException incase multiple Tokens found + * with same name. */ public AppStateToken getAppStateTokenByName(Enum tokenName) { List ol = allAppStateTokens.findByName(tokenName.name()); return getUniqueAppStateTokeFromTokenList(ol, tokenName); } - - /** - * Gets appstatetoken from the specified database - * - * @param db - * @param tokenName - * @return AppStateToken with given name. Since model is supposed to keep track of system`s state at any given time it throws IllegalStateException incase multiple Tokens found with same name. - */ - public AppStateToken getAppStateTokenByName(CouchDbConnector db, Enum tokenName) { - List ol = allAppStateTokens.findByName(db, tokenName.name()); - return getUniqueAppStateTokeFromTokenList(ol, tokenName); - } - + public void updateAppStateToken(Enum tokenName, Object value) { List ol = allAppStateTokens.findByName(tokenName.name()); AppStateToken ast = updateUniqueAppStateToken(ol, tokenName, value); allAppStateTokens.update(ast); } - - public void updateAppStateToken(CouchDbConnector db, Enum tokenName, Object value) { - List ol = allAppStateTokens.findByName(db, tokenName.name()); - AppStateToken ast = updateUniqueAppStateToken(ol, tokenName, value); - allAppStateTokens.update(db, ast); - } - + /** - * Registers a new token to manage the specified variable state (by token name) of App. - * Throws IllegalArgumentException if tokenName or description is not provided or if name is not unique - * i.e. already exists in system and flag suppressExceptionIfExists is false. + * Registers a new token to manage the specified variable state (by token name) of App. Throws + * IllegalArgumentException if tokenName or description is not provided or if name is not unique + * >>>>>>> bda3b96... Define interfaces for Repositories. Services to use interfaces i.e. + * already exists in system and flag suppressExceptionIfExists is false. * * @param tokenName * @param defaultValue @@ -67,79 +50,53 @@ public void updateAppStateToken(CouchDbConnector db, Enum tokenName, Object v */ public AppStateToken registerAppStateToken(Enum tokenName, Object defaultValue, String description, boolean suppressExceptionIfExists) { - + checkIfNameAndDescriptionExist(tokenName, description); - + List atl = allAppStateTokens.findByName(tokenName.name()); - + AppStateToken existingAppStateToken = checkIfTokenAlreadyExist(atl, tokenName, suppressExceptionIfExists); - + if (existingAppStateToken != null) { return existingAppStateToken; } - + AppStateToken token = new AppStateToken(tokenName.name(), defaultValue, 0L, description); allAppStateTokens.add(token); return token; } - - /** - * Registers a new token to manage the specified variable state (by token name) of App. The token is registered in the specified db - * - * @param db - * @param tokenName - * @param defaultValue - * @param description - * @param suppressExceptionIfExists - * @return - */ - public AppStateToken registerAppStateToken(CouchDbConnector db, Enum tokenName, Object defaultValue, - String description, boolean suppressExceptionIfExists) { - checkIfNameAndDescriptionExist(tokenName, description); - - List atl = allAppStateTokens.findByName(db, tokenName.name()); - AppStateToken existingAppStateToken = checkIfTokenAlreadyExist(atl, tokenName, suppressExceptionIfExists); - - if (existingAppStateToken != null) { - return existingAppStateToken; - } - - AppStateToken token = new AppStateToken(tokenName.name(), defaultValue, 0L, description); - allAppStateTokens.add(db, token); - return token; - } - - private AppStateToken getUniqueAppStateTokeFromTokenList(List appStateTokens, Enum tokenName) { + + private AppStateToken getUniqueAppStateTokeFromTokenList(List appStateTokens, Enum tokenName) { if (appStateTokens.size() > 1) { throw new IllegalStateException("System was found to have multiple token with same name (" + tokenName.name() - + "). This can lead to potential critical inconsistencies."); + + "). This can lead to potential critical inconsistencies."); } - + return appStateTokens.size() == 0 ? null : appStateTokens.get(0); } - + private AppStateToken updateUniqueAppStateToken(List allAppStateTokens, Enum tokenName, Object value) { if (allAppStateTokens.size() > 1) { throw new IllegalStateException("System was found to have multiple token with same name (" + tokenName.name() - + "). This can lead to potential critical inconsistencies."); + + "). This can lead to potential critical inconsistencies."); } - + if (allAppStateTokens.size() == 0) { throw new IllegalStateException("Property with name (" + tokenName.name() + ") not found."); } - + AppStateToken ast = allAppStateTokens.get(0); ast.setValue(value); ast.setLastEditDate(System.currentTimeMillis()); return ast; } - + private void checkIfNameAndDescriptionExist(Enum tokenName, String description) { if (tokenName == null || StringUtils.isEmptyOrWhitespaceOnly(description)) { throw new IllegalArgumentException("Token name and description must be provided"); } } - + private AppStateToken checkIfTokenAlreadyExist(List appStateTokens, Enum tokenName, boolean suppressExceptionIfExists) { if (appStateTokens.size() > 0) { diff --git a/opensrp-core/src/main/java/org/opensrp/service/ErrorTraceService.java b/opensrp-core/src/main/java/org/opensrp/service/ErrorTraceService.java index 2cafde1ec5..b9fe128922 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/ErrorTraceService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/ErrorTraceService.java @@ -1,41 +1,39 @@ package org.opensrp.service; -import java.util.ArrayList; -import java.util.Date; import java.util.List; import org.ektorp.DocumentNotFoundException; import org.joda.time.DateTime; import org.opensrp.domain.ErrorTrace; -import org.opensrp.repository.AllErrorTrace; +import org.opensrp.repository.ErrorTraceRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; /** - * @author muhammad.ahmed@ihsinformatics.com - * Created on May 25, 2015 + * @author muhammad.ahmed@ihsinformatics.com Created on May 25, 2015 */ @Service public class ErrorTraceService { - - private final AllErrorTrace allErrorTrace; - + + private final ErrorTraceRepository allErrorTrace; + @Autowired - public ErrorTraceService(AllErrorTrace allErrorTrace) { + public ErrorTraceService(ErrorTraceRepository allErrorTrace) { this.allErrorTrace = allErrorTrace; } - + public void addError(ErrorTrace entity) { allErrorTrace.add(entity); } - + /** * @param errorType * @param documentType * @param recordId * @param stackTrace - * @param retryURL this method is used for logs and it should be called on Exception Catch . - * retryURL should be given by developer, it is for resubmission or retry of that particular record . + * @param retryURL this method is used for logs and it should be called on Exception Catch . + * retryURL should be given by developer, it is for resubmission or retry of that + * particular record . */ public void log(String errorType, String documentType, String recordId, String stackTrace, String retryURL) { ErrorTrace error = new ErrorTrace(); @@ -46,53 +44,53 @@ public void log(String errorType, String documentType, String recordId, String s error.setRetryUrl(retryURL); error.setDateOccurred(DateTime.now()); addError(error); - + } - + public void updateError(ErrorTrace entity) { allErrorTrace.update(entity); } - + public List getAllErrors() throws DocumentNotFoundException { - + List allErrorList = allErrorTrace.findAllErrors(); if (null == allErrorList || allErrorList.isEmpty()) { return null; - + } - + return allErrorList; - + } - + public List getAllSolvedErrors() throws DocumentNotFoundException { - + List allErrorList = allErrorTrace.findAllSolvedErrors(); if (null == allErrorList || allErrorList.isEmpty()) { return null; - + } - + return allErrorList; - + } - + public List getAllUnsolvedErrors() throws DocumentNotFoundException { - + List allErrorList = allErrorTrace.findAllUnSolvedErrors(); if (null == allErrorList || allErrorList.isEmpty()) { return null; - + } - + return allErrorList; - + } - + public ErrorTrace getError(String id) throws DocumentNotFoundException { - + return allErrorTrace.findById(id); - + } - + } diff --git a/opensrp-core/src/main/java/org/opensrp/service/EventService.java b/opensrp-core/src/main/java/org/opensrp/service/EventService.java index 0bced0e67c..85824c1c00 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/EventService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/EventService.java @@ -6,14 +6,13 @@ import java.util.List; import java.util.Map; -import org.ektorp.CouchDbConnector; import org.joda.time.DateTime; import org.json.JSONException; import org.json.JSONObject; import org.opensrp.common.AllConstants.Client; import org.opensrp.domain.Event; import org.opensrp.domain.Obs; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.EventsRepository; import org.opensrp.util.DateTimeTypeConverter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -26,12 +25,12 @@ @Service public class EventService { - private final AllEvents allEvents; + private final EventsRepository allEvents; private ClientService clientService; @Autowired - public EventService(AllEvents allEvents, ClientService clientService) { + public EventService(EventsRepository allEvents, ClientService clientService) { this.allEvents = allEvents; this.clientService = clientService; } @@ -59,20 +58,6 @@ public Event getByBaseEntityAndFormSubmissionId(String baseEntityId, String form } } - public Event getByBaseEntityAndFormSubmissionId(CouchDbConnector targetDb, String baseEntityId, String formSubmissionId) { - try { - List el = allEvents.findByBaseEntityAndFormSubmissionId(targetDb, baseEntityId, formSubmissionId); - return getUniqueEventFromEventList(el); - } - catch (IllegalArgumentException e) { - throw new IllegalStateException("Multiple events for baseEntityId and formSubmissionId combination (" - + baseEntityId + "," + formSubmissionId + ")"); - } - catch (Exception e) { - return null; - } - } - public List findByBaseEntityId(String baseEntityId) { return allEvents.findByBaseEntityId(baseEntityId); } @@ -191,23 +176,6 @@ public synchronized Event processOutOfArea(Event event) { return event; } - public synchronized Event addEvent(CouchDbConnector targetDb, Event event) { - // Event e = find(targetDb,event); - // if(e != null){ - // throw new IllegalArgumentException("An event already exists with given list of identifiers. Consider updating data.["+e+"]"); - // } - if (event.getFormSubmissionId() != null - && getByBaseEntityAndFormSubmissionId(targetDb, event.getBaseEntityId(), event.getFormSubmissionId()) != null) { - throw new IllegalArgumentException( - "An event already exists with given baseEntity and formSubmission combination. Consider updating"); - } - - event.setDateCreated(new DateTime()); - - allEvents.add(targetDb, event); - return event; - } - public synchronized Event addorUpdateEvent(Event event) { Event existingEvent = findById(event.getId()); if (existingEvent != null) { @@ -329,6 +297,6 @@ private Event getUniqueEventFromEventList(List events) throws IllegalArgu } public List findByProviderAndEntityType(String provider) { - return allEvents.findByProviderAndEntityType(provider); + return allEvents.findByProvider(provider); } } diff --git a/opensrp-core/src/main/java/org/opensrp/service/FormSubmissionDataMigrationService.java b/opensrp-core/src/main/java/org/opensrp/service/FormSubmissionDataMigrationService.java index 03ad6ec08a..299b300ea0 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/FormSubmissionDataMigrationService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/FormSubmissionDataMigrationService.java @@ -2,7 +2,6 @@ import java.util.List; - import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.ektorp.CouchDbConnector; @@ -11,6 +10,7 @@ import org.opensrp.domain.AppStateToken; import org.opensrp.form.domain.FormSubmission; import org.opensrp.form.service.FormSubmissionService; +import org.opensrp.repository.couch.AllAppStateTokens; import org.opensrp.service.formSubmission.FormSubmissionProcessor; import org.opensrp.util.Utils; import org.opensrp.util.Utils.DatabaseConnectionParams; @@ -18,54 +18,60 @@ import org.springframework.stereotype.Service; /** - * - * @author onamacuser This service fetches existing form submissions data from - * couchdb and converts them to events and clients - * + * @author onamacuser This service fetches existing form submissions data from couchdb and converts + * them to events and clients */ @Service public class FormSubmissionDataMigrationService { + protected final Log logger = LogFactory.getLog(getClass()); - + @Autowired FormSubmissionService formSubmissionService; + @Autowired FormSubmissionProcessor processor; + @Autowired private ConfigService configService; + + @Autowired + private AllAppStateTokens allAppStateTokens; + private volatile int BATCH_SIZE = 100; - + //private static final int THREADS_COUNT = 5; - + private enum MigrationType { TO_LOCAL_DB, TO_REMOTE_DB } - + /** - * Based on the last processed form submission version process any newly - * added or updated formsubmissions. This method assumes the data is in the - * db the app is currently running on + * Based on the last processed form submission version process any newly added or updated + * formsubmissions. This method assumes the data is in the db the app is currently running on * * @return */ public void migrateFormSubmissions() { //ExecutorService executor = Executors.newFixedThreadPool(THREADS_COUNT); - + try { configService.registerAppStateToken(AllConstants.Config.FORM_ENTITY_PARSER_LAST_MIGRATED_FORM_SUBMISSION, 0, - "Token to keep track of forms processed for client n event parsing and schedule handling", true); - + "Token to keep track of forms processed for client n event parsing and schedule handling", true); + boolean processSubmissions = true; - + while (processSubmissions) { long lastMigratedFsVersion = getVersion(); - - List formSubmissions = formSubmissionService.getAllSubmissions(lastMigratedFsVersion, BATCH_SIZE); + + List formSubmissions = formSubmissionService.getAllSubmissions(lastMigratedFsVersion, + BATCH_SIZE); processSubmissions = formSubmissions != null && !formSubmissions.isEmpty(); - + if (processSubmissions) { - - Runnable migrateFormSubmissionsTask = new MigrateFormSubmissionsTask(MigrationType.TO_LOCAL_DB, formSubmissions); + + Runnable migrateFormSubmissionsTask = new MigrateFormSubmissionsTask(MigrationType.TO_LOCAL_DB, + formSubmissions); //executor.execute(migrateFormSubmissionsTask); migrateFormSubmissionsTask.run(); } @@ -73,41 +79,44 @@ public void migrateFormSubmissions() { // This will make the executor accept no new threads // and finish all existing threads in the queue //executor.shutdown(); - } catch (Exception e) { + } + catch (Exception e) { logger.error("", e); //executor.shutdown(); } } - + /** - * This method pulls form submissions from the source db and saves the - * broken down submissions (to EC model) to the target db + * This method pulls form submissions from the source db and saves the broken down submissions + * (to EC model) to the target db * * @param sourceDbParams * @param targetDbParams */ public void migrateFormSubmissions(DatabaseConnectionParams sourceDbParams, DatabaseConnectionParams targetDbParams) { //ExecutorService executor = Executors.newFixedThreadPool(THREADS_COUNT); - + try { - CouchDbConnector sourceDb = Utils.connectToDB(sourceDbParams); CouchDbConnector targetDb = Utils.connectToDB(targetDbParams); - configService.registerAppStateToken(sourceDb,AllConstants.Config.FORM_ENTITY_PARSER_LAST_MIGRATED_FORM_SUBMISSION, 0, - "Token to keep track of forms processed for client n event parsing and schedule handling", true); - + allAppStateTokens.registerAppStateToken(sourceDb, + AllConstants.Config.FORM_ENTITY_PARSER_LAST_MIGRATED_FORM_SUBMISSION, 0, + "Token to keep track of forms processed for client n event parsing and schedule handling", true); + boolean processSubmissions = true; - + while (processSubmissions) { long lastMigratedFsVersion = getVersion(sourceDb); - List formSubmissions = formSubmissionService.getAllSubmissions(sourceDb, lastMigratedFsVersion, BATCH_SIZE); + List formSubmissions = formSubmissionService.getAllSubmissions(sourceDb, + lastMigratedFsVersion, BATCH_SIZE); processSubmissions = formSubmissions != null && !formSubmissions.isEmpty(); - + if (processSubmissions) { - - Runnable migrateFormSubmissionsTask = new MigrateFormSubmissionsTask(sourceDb, targetDb, MigrationType.TO_REMOTE_DB, formSubmissions); + + Runnable migrateFormSubmissionsTask = new MigrateFormSubmissionsTask(sourceDb, targetDb, + MigrationType.TO_REMOTE_DB, formSubmissions); //executor.execute(migrateFormSubmissionsTask); migrateFormSubmissionsTask.run(); } @@ -115,86 +124,99 @@ public void migrateFormSubmissions(DatabaseConnectionParams sourceDbParams, Data // This will make the executor accept no new threads // and finish all existing threads in the queue //executor.shutdown(); - - } catch (Exception e) { + + } + catch (Exception e) { logger.error("", e); //executor.shutdown(); } - + } - + private long getVersion() { - AppStateToken token = configService.getAppStateTokenByName(AllConstants.Config.FORM_ENTITY_PARSER_LAST_MIGRATED_FORM_SUBMISSION); + AppStateToken token = configService + .getAppStateTokenByName(AllConstants.Config.FORM_ENTITY_PARSER_LAST_MIGRATED_FORM_SUBMISSION); return token == null ? 0L : token.longValue(); } + private long getVersion(CouchDbConnector db) { - AppStateToken token = configService.getAppStateTokenByName(db,AllConstants.Config.FORM_ENTITY_PARSER_LAST_MIGRATED_FORM_SUBMISSION); + AppStateToken token = allAppStateTokens.getAppStateTokenByName(db, + AllConstants.Config.FORM_ENTITY_PARSER_LAST_MIGRATED_FORM_SUBMISSION); return token == null ? 0L : token.longValue(); } - + /** * Worker thread to break down formsubmissions to ec data. * * @author onamacuser - * */ class MigrateFormSubmissionsTask implements Runnable { - + MigrationType type; + List formSubmissions; + CouchDbConnector sourceDb; + CouchDbConnector targetDb; - + MigrateFormSubmissionsTask(MigrationType _type, List _formSubmissions) { type = _type; formSubmissions = _formSubmissions; } - - MigrateFormSubmissionsTask(CouchDbConnector _sourceDb, CouchDbConnector _targetDb, MigrationType _type, List _formSubmissions) { + + MigrateFormSubmissionsTask(CouchDbConnector _sourceDb, CouchDbConnector _targetDb, MigrationType _type, + List _formSubmissions) { type = _type; formSubmissions = _formSubmissions; sourceDb = _sourceDb; targetDb = _targetDb; } - + @Override public void run() { switch (type) { - case TO_LOCAL_DB: - - try { - // break down the submissions to ec model - for (FormSubmission submission : formSubmissions) { - - configService.updateAppStateToken(AllConstants.Config.FORM_ENTITY_PARSER_LAST_MIGRATED_FORM_SUBMISSION, submission.serverVersion()); - processor.makeModelEntities(submission); + case TO_LOCAL_DB: + + try { + // break down the submissions to ec model + for (FormSubmission submission : formSubmissions) { + + configService.updateAppStateToken( + AllConstants.Config.FORM_ENTITY_PARSER_LAST_MIGRATED_FORM_SUBMISSION, + submission.serverVersion()); + processor.makeModelEntities(submission); + } } - } catch (Exception e) { - logger.error("", e); - - } - break; - - case TO_REMOTE_DB: - - try { - // break down the submissions to ec model - for (FormSubmission submission : formSubmissions) { - configService.updateAppStateToken(sourceDb,AllConstants.Config.FORM_ENTITY_PARSER_LAST_MIGRATED_FORM_SUBMISSION, submission.serverVersion()); - processor.makeModelEntities(targetDb, submission); + catch (Exception e) { + logger.error("", e); } - } catch (JSONException e) { - logger.error("", e); - - } - break; - default: - logger.debug("Unknown migration type"); - break; - + break; + + case TO_REMOTE_DB: + + try { + // break down the submissions to ec model + for (FormSubmission submission : formSubmissions) { + allAppStateTokens.updateAppStateToken(sourceDb, + AllConstants.Config.FORM_ENTITY_PARSER_LAST_MIGRATED_FORM_SUBMISSION, + submission.serverVersion()); + processor.makeModelEntities(targetDb, submission); + + } + } + catch (JSONException e) { + logger.error("", e); + + } + break; + default: + logger.debug("Unknown migration type"); + break; + } } - + } } diff --git a/opensrp-core/src/main/java/org/opensrp/service/LocationService.java b/opensrp-core/src/main/java/org/opensrp/service/LocationService.java index fad5c3633a..7b8a1de175 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/LocationService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/LocationService.java @@ -4,7 +4,7 @@ import java.util.List; import org.opensrp.api.domain.Location; -import org.opensrp.repository.AllLocations; +import org.opensrp.repository.couch.AllLocations; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/opensrp-core/src/main/java/org/opensrp/service/MultimediaService.java b/opensrp-core/src/main/java/org/opensrp/service/MultimediaService.java index 5920e6ad1b..d9e8aecc8b 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/MultimediaService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/MultimediaService.java @@ -123,6 +123,8 @@ public boolean uploadFile(MultimediaDTO multimediaDTO, MultipartFile multimediaF } } + + @SuppressWarnings("unused") private void makeMultimediaDir(String dirPath) { File file = new File(dirPath); if (!file.exists()) diff --git a/opensrp-core/src/main/java/org/opensrp/service/OpenmrsIDService.java b/opensrp-core/src/main/java/org/opensrp/service/OpenmrsIDService.java index 0bd25bdd83..4ff79ed468 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/OpenmrsIDService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/OpenmrsIDService.java @@ -16,7 +16,7 @@ import org.json.JSONObject; import org.opensrp.domain.Client; import org.opensrp.domain.UniqueId; -import org.opensrp.repository.UniqueIdRepository; +import org.opensrp.repository.couch.UniqueIdRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; diff --git a/opensrp-core/src/main/java/org/opensrp/service/ProviderService.java b/opensrp-core/src/main/java/org/opensrp/service/ProviderService.java index 37dcf1ef7f..3f230de04d 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/ProviderService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/ProviderService.java @@ -3,7 +3,7 @@ import java.util.List; import org.opensrp.domain.Provider; -import org.opensrp.repository.AllProviders; +import org.opensrp.repository.couch.AllProviders; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/opensrp-core/src/main/java/org/opensrp/service/ReportService.java b/opensrp-core/src/main/java/org/opensrp/service/ReportService.java index ba86c2f9cd..a3c2579a25 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/ReportService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/ReportService.java @@ -1,9 +1,10 @@ package org.opensrp.service; import java.util.List; + import org.joda.time.DateTime; import org.opensrp.domain.Report; -import org.opensrp.repository.AllReports; +import org.opensrp.repository.ReportsRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -11,32 +12,32 @@ @Service public class ReportService { - - private final AllReports allReports; - + + private final ReportsRepository allReports; + private static Logger logger = LoggerFactory.getLogger(ReportService.class.toString()); - + @Autowired - public ReportService(AllReports allReports) { + public ReportService(ReportsRepository allReports) { this.allReports = allReports; } - + public List findAllByIdentifier(String identifier) { return allReports.findAllByIdentifier(identifier); } - + public List findByServerVersion(long serverVersion) { return allReports.findByServerVersion(serverVersion); } - + public Report getById(String id) { return allReports.findById(id); } - + public List getAll() { return allReports.getAll(); } - + public Report find(String uniqueId) { List reportList = allReports.findAllByIdentifier(uniqueId); if (reportList.size() > 1) { @@ -46,7 +47,7 @@ public Report find(String uniqueId) { } return null; } - + public Report find(Report report) { for (String idt : report.getIdentifiers().keySet()) { List reportList = allReports.findAllByIdentifier(report.getIdentifier(idt)); @@ -59,7 +60,7 @@ public Report find(Report report) { } return null; } - + public Report findById(String reportId) { try { if (reportId == null || reportId.isEmpty()) { @@ -72,7 +73,7 @@ public Report findById(String reportId) { } return null; } - + public synchronized Report addReport(Report report) { Report existingReport = find(report); if (existingReport != null) { @@ -80,30 +81,30 @@ public synchronized Report addReport(Report report) { "An report already exists with given list of identifiers. Consider updating data.[" + existingReport + "]"); } - + if (report.getFormSubmissionId() != null && getByBaseEntityAndFormSubmissionId(report.getBaseEntityId(), report.getFormSubmissionId()) != null) { throw new IllegalArgumentException( "An report already exists with given baseEntity and formSubmission combination. Consider updating"); } - + report.setDateCreated(DateTime.now()); allReports.add(report); return report; } - + public void updateReport(Report updatedReport) { // If update is on original entity if (updatedReport.isNew()) { throw new IllegalArgumentException( "Report to be updated is not an existing and persisting domain object. Update database object instead of new pojo"); } - + updatedReport.setDateEdited(DateTime.now()); - + allReports.update(updatedReport); } - + public synchronized Report addorUpdateReport(Report report) { Report existingReport = findById(report.getId()); if (existingReport != null) { @@ -111,16 +112,16 @@ public synchronized Report addorUpdateReport(Report report) { report.setServerVersion(null); report.setRevision(existingReport.getRevision()); allReports.update(report); - + } else { report.setDateCreated(DateTime.now()); allReports.add(report); - + } - + return report; } - + public Report getByBaseEntityAndFormSubmissionId(String baseEntityId, String formSubmissionId) { List reportList = allReports.findByBaseEntityAndFormSubmissionId(baseEntityId, formSubmissionId); if (reportList.size() > 1) { @@ -132,19 +133,19 @@ public Report getByBaseEntityAndFormSubmissionId(String baseEntityId, String for } return reportList.get(0); } - + public List findByBaseEntityId(String baseEntityId) { return allReports.findByBaseEntityId(baseEntityId); } - + public List findReports(String team, String providerId, String locationId, Long serverVersion, String sortBy, String sortOrder, int limit) { return allReports.findReports(team, providerId, locationId, null, serverVersion, sortBy, sortOrder, limit); } - + public List findReports(String team, String providerId, String locationId, String baseEntityId, Long serverVersion, String sortBy, String sortOrder, int limit) { return allReports.findReports(team, providerId, locationId, baseEntityId, serverVersion, sortBy, sortOrder, limit); } - + } diff --git a/opensrp-core/src/main/java/org/opensrp/service/StockService.java b/opensrp-core/src/main/java/org/opensrp/service/StockService.java index f7e298924b..571683de02 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/StockService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/StockService.java @@ -2,20 +2,19 @@ import java.util.List; -import org.ektorp.CouchDbConnector; import org.joda.time.DateTime; import org.opensrp.domain.Stock; -import org.opensrp.repository.AllStocks; +import org.opensrp.repository.StocksRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class StockService { - private final AllStocks allStocks; + private final StocksRepository allStocks; @Autowired - public StockService(AllStocks allStocks) { + public StockService(StocksRepository allStocks) { this.allStocks = allStocks; } @@ -49,13 +48,6 @@ public List findAllStocks() { return allStocks.findAllStocks(); } - public synchronized Stock addStock(CouchDbConnector targetDb, Stock stock) { - - stock.setDateCreated(new DateTime()); - allStocks.add(targetDb, stock); - return stock; - } - public Stock find(Stock stock) { Stock st = allStocks.findById(stock.getId()); if (st != null) { diff --git a/opensrp-core/src/main/java/org/opensrp/service/UserService.java b/opensrp-core/src/main/java/org/opensrp/service/UserService.java index 9aded0cf55..35302bccde 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/UserService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/UserService.java @@ -3,7 +3,7 @@ import java.util.List; import org.opensrp.domain.User; -import org.opensrp.repository.AllUsers; +import org.opensrp.repository.couch.AllUsers; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; diff --git a/opensrp-core/src/main/java/org/opensrp/service/formSubmission/EventsListener.java b/opensrp-core/src/main/java/org/opensrp/service/formSubmission/EventsListener.java index 54383316ca..ef597d4c96 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/formSubmission/EventsListener.java +++ b/opensrp-core/src/main/java/org/opensrp/service/formSubmission/EventsListener.java @@ -18,8 +18,8 @@ import org.opensrp.domain.ErrorTrace; import org.opensrp.domain.Event; import org.opensrp.form.domain.FormSubmission; -import org.opensrp.repository.AllClients; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.couch.AllClients; +import org.opensrp.repository.couch.AllEvents; import org.opensrp.service.ConfigService; import org.opensrp.service.ErrorTraceService; import org.opensrp.service.EventService; diff --git a/opensrp-core/src/main/java/org/opensrp/service/formSubmission/FormSubmissionProcessor.java b/opensrp-core/src/main/java/org/opensrp/service/formSubmission/FormSubmissionProcessor.java index 3e78275af3..1a9cc98672 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/formSubmission/FormSubmissionProcessor.java +++ b/opensrp-core/src/main/java/org/opensrp/service/formSubmission/FormSubmissionProcessor.java @@ -1,14 +1,20 @@ package org.opensrp.service.formSubmission; -import com.google.gson.Gson; -import com.mysql.jdbc.StringUtils; +import java.io.IOException; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.ektorp.CouchDbConnector; +import org.joda.time.DateTime; import org.joda.time.LocalDate; import org.json.JSONException; import org.opensrp.domain.Client; import org.opensrp.domain.Event; import org.opensrp.form.domain.FormSubmission; import org.opensrp.form.domain.SubFormData; +import org.opensrp.repository.couch.AllClients; +import org.opensrp.repository.couch.AllEvents; import org.opensrp.scheduler.HealthSchedulerService; import org.opensrp.scheduler.Schedule; import org.opensrp.scheduler.Schedule.ActionType; @@ -22,161 +28,257 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import java.io.IOException; -import java.util.HashMap; -import java.util.List; -import java.util.Map; +import com.google.gson.Gson; +import com.mysql.jdbc.StringUtils; @Service public class FormSubmissionProcessor { - private static Logger logger = LoggerFactory.getLogger(FormSubmissionListener.class.toString()); - - private ZiggyService ziggyService; - private FormSubmissionRouter formSubmissionRouter; - private FormEntityConverter formEntityConverter; - private ClientService clientService; - private EventService eventService; - private HealthSchedulerService scheduleService; - - @Autowired - public FormSubmissionProcessor(ZiggyService ziggyService, FormSubmissionRouter formSubmissionRouter, - FormEntityConverter formEntityConverter, HealthSchedulerService scheduleService, - ClientService clientService, EventService eventService) throws IOException { - this.ziggyService = ziggyService; - this.formSubmissionRouter = formSubmissionRouter; - this.formEntityConverter = formEntityConverter; - this.scheduleService = scheduleService; - this.clientService = clientService; - this.eventService = eventService; - } - - public void processFormSubmission(FormSubmission submission) throws Exception { - // parse and into client and event model - logger.info("Creating model entities"); - makeModelEntities(submission); - logger.info("Handling xls configured schedules"); - handleSchedules(submission); - if (ziggyService.isZiggyCompliant(submission.bindType())) { - passToZiggy(submission); - //and skip form submission routing as ziggy does it automatically - } else {//if not ziggy entity call custom route handler explicitly - logger.info("Routing to custom handler"); - formSubmissionRouter.route(submission); - } - } - - void handleSchedules(FormSubmission submission) throws JSONException, IOException { - List schl = scheduleService.findAutomatedSchedules(submission.formName()); - for (Schedule sch : schl) { - Map entsch = getEntitiesQualifyingForSchedule(submission, sch); - System.out.println("creating schedule for : " + entsch); - System.out.println(new Gson().toJson(sch)); - - for (String enid : entsch.keySet()) { - if (sch.action().equals(ActionType.enroll)) { - scheduleService.enrollIntoSchedule(enid, sch.schedule(), - sch.milestone(), entsch.get(enid), submission.instanceId()); - } else if (sch.action().equals(ActionType.fulfill)) { - scheduleService.fullfillMilestoneAndCloseAlert(enid, submission.anmId(), sch.schedule() - , LocalDate.parse(entsch.get(enid)), submission.instanceId()); - } else if (sch.action().equals(ActionType.unenroll)) { - scheduleService.unEnrollFromSchedule(enid, submission.anmId(), sch.schedule(), submission.instanceId()); - } else if (sch.action().equals(ActionType.unenroll) && sch.schedule().equalsIgnoreCase("*")) { - scheduleService.unEnrollFromAllSchedules(enid, submission.instanceId()); - } - } - } - } - - Map getEntitiesQualifyingForSchedule(FormSubmission submission, Schedule schedule) throws JSONException { - Map entityIds = new HashMap(); - if (schedule.applicableForEntity(submission.bindType())) { - String res = evaluateScheduleFor(schedule, submission.instance().form().getFieldsAsMap()); - if (!StringUtils.isEmptyOrWhitespaceOnly(res)) { - entityIds.put(submission.entityId(), res); - } - } - - if (submission.subForms() != null) { - for (SubFormData subFormData : submission.subForms()) { - if (schedule.applicableForEntity(subFormData.bindType())) { - for (Map instance : subFormData.instances()) { - String res = evaluateScheduleFor(schedule, instance); - if (!StringUtils.isEmptyOrWhitespaceOnly(res)) { - entityIds.put(instance.get("id"), res); - } - } - } - } - } - return entityIds; - } - - String evaluateScheduleFor(Schedule schedule, Map flvl) { - //find first field in submission that qualifies triggerdate field and has a value - for (String tf : schedule.triggerDateFields()) { - String flv = flvl.get(tf); - // if field has value and schedule flag field is empty or has value 1 or true - if (!StringUtils.isEmptyOrWhitespaceOnly(flv) && schedule.passesValidations(flvl)) { - return flv; - } - } - return null; - } - - public void makeModelEntities(FormSubmission submission) throws JSONException { - if (submission.getInstanceId().equalsIgnoreCase("b7dfb183-97a9-4bd1-8f1c-d85f88189d6a")) { - logger.debug("" + submission.getInstanceId()); - } - Client c = formEntityConverter.getClientFromFormSubmission(submission); - Event e = formEntityConverter.getEventFromFormSubmission(submission); - Map> dep = formEntityConverter.getDependentClientsFromFormSubmission(submission); - - if (clientService.findClient(c) != null) { - clientService.mergeClient(c); - } else clientService.addClient(c); - - eventService.addEvent(e); - // TODO relationships b/w entities - - for (Map cm : dep.values()) { - Client cin = (Client) cm.get("client"); - Event evin = (Event) cm.get("event"); - clientService.addClient(cin); - eventService.addEvent(evin); - } - } - - /** - * Break down form submission and save it to a target db - * - * @param targetDb - * @param submission - * @throws JSONException - */ - public void makeModelEntities(CouchDbConnector targetDb, FormSubmission submission) throws JSONException { - Client c = formEntityConverter.getClientFromFormSubmission(submission); - Event e = formEntityConverter.getEventFromFormSubmission(submission); - Map> dep = formEntityConverter.getDependentClientsFromFormSubmission(submission); - - if (clientService.findClient(targetDb, c) != null) { - clientService.mergeClient(c); - } else clientService.addClient(targetDb, c); - - eventService.addEvent(targetDb, e); - // TODO relationships b/w entities - - for (Map cm : dep.values()) { - Client cin = (Client) cm.get("client"); - Event evin = (Event) cm.get("event"); - clientService.addClient(targetDb, cin); - eventService.addEvent(targetDb, evin); - } - } - - private void passToZiggy(FormSubmission submission) { - String params = Utils.getZiggyParams(submission); - ziggyService.saveForm(params, new Gson().toJson(submission.instance())); - } - + + private static Logger logger = LoggerFactory.getLogger(FormSubmissionListener.class.toString()); + + private ZiggyService ziggyService; + + private FormSubmissionRouter formSubmissionRouter; + + private FormEntityConverter formEntityConverter; + + private ClientService clientService; + + private EventService eventService; + + private HealthSchedulerService scheduleService; + + private final AllClients allClients; + + private final AllEvents allEvents; + + @Autowired + public FormSubmissionProcessor(ZiggyService ziggyService, FormSubmissionRouter formSubmissionRouter, + FormEntityConverter formEntityConverter, HealthSchedulerService scheduleService, ClientService clientService, + AllClients allClients, EventService eventService,AllEvents allEvents) throws IOException { + this.ziggyService = ziggyService; + this.formSubmissionRouter = formSubmissionRouter; + this.formEntityConverter = formEntityConverter; + this.scheduleService = scheduleService; + this.clientService = clientService; + this.eventService = eventService; + this.allClients = allClients; + this.allEvents=allEvents; + } + + public void processFormSubmission(FormSubmission submission) throws Exception { + // parse and into client and event model + logger.info("Creating model entities"); + makeModelEntities(submission); + logger.info("Handling xls configured schedules"); + handleSchedules(submission); + if (ziggyService.isZiggyCompliant(submission.bindType())) { + passToZiggy(submission); + //and skip form submission routing as ziggy does it automatically + } else {//if not ziggy entity call custom route handler explicitly + logger.info("Routing to custom handler"); + formSubmissionRouter.route(submission); + } + } + + void handleSchedules(FormSubmission submission) throws JSONException, IOException { + List schl = scheduleService.findAutomatedSchedules(submission.formName()); + for (Schedule sch : schl) { + Map entsch = getEntitiesQualifyingForSchedule(submission, sch); + System.out.println("creating schedule for : " + entsch); + System.out.println(new Gson().toJson(sch)); + + for (String enid : entsch.keySet()) { + if (sch.action().equals(ActionType.enroll)) { + scheduleService.enrollIntoSchedule(enid, sch.schedule(), sch.milestone(), entsch.get(enid), + submission.instanceId()); + } else if (sch.action().equals(ActionType.fulfill)) { + scheduleService.fullfillMilestoneAndCloseAlert(enid, submission.anmId(), sch.schedule(), + LocalDate.parse(entsch.get(enid)), submission.instanceId()); + } else if (sch.action().equals(ActionType.unenroll)) { + scheduleService.unEnrollFromSchedule(enid, submission.anmId(), sch.schedule(), submission.instanceId()); + } else if (sch.action().equals(ActionType.unenroll) && sch.schedule().equalsIgnoreCase("*")) { + scheduleService.unEnrollFromAllSchedules(enid, submission.instanceId()); + } + } + } + } + + Map getEntitiesQualifyingForSchedule(FormSubmission submission, Schedule schedule) throws JSONException { + Map entityIds = new HashMap(); + if (schedule.applicableForEntity(submission.bindType())) { + String res = evaluateScheduleFor(schedule, submission.instance().form().getFieldsAsMap()); + if (!StringUtils.isEmptyOrWhitespaceOnly(res)) { + entityIds.put(submission.entityId(), res); + } + } + + if (submission.subForms() != null) { + for (SubFormData subFormData : submission.subForms()) { + if (schedule.applicableForEntity(subFormData.bindType())) { + for (Map instance : subFormData.instances()) { + String res = evaluateScheduleFor(schedule, instance); + if (!StringUtils.isEmptyOrWhitespaceOnly(res)) { + entityIds.put(instance.get("id"), res); + } + } + } + } + } + return entityIds; + } + + String evaluateScheduleFor(Schedule schedule, Map flvl) { + //find first field in submission that qualifies triggerdate field and has a value + for (String tf : schedule.triggerDateFields()) { + String flv = flvl.get(tf); + // if field has value and schedule flag field is empty or has value 1 or true + if (!StringUtils.isEmptyOrWhitespaceOnly(flv) && schedule.passesValidations(flvl)) { + return flv; + } + } + return null; + } + + public void makeModelEntities(FormSubmission submission) throws JSONException { + if (submission.getInstanceId().equalsIgnoreCase("b7dfb183-97a9-4bd1-8f1c-d85f88189d6a")) { + logger.debug("" + submission.getInstanceId()); + } + Client c = formEntityConverter.getClientFromFormSubmission(submission); + Event e = formEntityConverter.getEventFromFormSubmission(submission); + Map> dep = formEntityConverter.getDependentClientsFromFormSubmission(submission); + + if (clientService.findClient(c) != null) { + clientService.mergeClient(c); + } else + clientService.addClient(c); + + eventService.addEvent(e); + // TODO relationships b/w entities + + for (Map cm : dep.values()) { + Client cin = (Client) cm.get("client"); + Event evin = (Event) cm.get("event"); + clientService.addClient(cin); + eventService.addEvent(evin); + } + } + + /** + * Find a client from the specified db + * + * @param targetDb + * @param client + * @return + */ + public Client findClient(CouchDbConnector targetDb, Client client) { + // find by auto assigned entity id + try { + Client c = allClients.findByBaseEntityId(client.getBaseEntityId()); + if (c != null) { + return c; + } + + //still not found!! search by generic identifiers + + for (String idt : client.getIdentifiers().keySet()) { + List cl = allClients.findAllByIdentifier(targetDb, client.getIdentifier(idt)); + if (cl.size() > 1) { + throw new IllegalArgumentException("Multiple clients with identifier type " + idt + " and ID " + + client.getIdentifier(idt) + " exist."); + } else if (cl.size() != 0) { + return cl.get(0); + } + } + return c; + } + catch (Exception e) { + + return null; + } + } + + public Client addClient(CouchDbConnector targetDb, Client client) { + if (client.getBaseEntityId() == null) { + throw new RuntimeException("No baseEntityId"); + } + Client c = findClient(targetDb, client); + if (c != null) { + throw new IllegalArgumentException( + "A client already exists with given list of identifiers. Consider updating data.[" + c + "]"); + } + + client.setDateCreated(new DateTime()); + allClients.add(targetDb, client); + return client; + } + + public synchronized Event addEvent(CouchDbConnector targetDb, Event event) { + // Event e = find(targetDb,event); + // if(e != null){ + // throw new IllegalArgumentException("An event already exists with given list of identifiers. Consider updating data.["+e+"]"); + // } + if (event.getFormSubmissionId() != null && getByBaseEntityAndFormSubmissionId(targetDb, event.getBaseEntityId(), + event.getFormSubmissionId()) != null) { + throw new IllegalArgumentException( + "An event already exists with given baseEntity and formSubmission combination. Consider updating"); + } + + event.setDateCreated(new DateTime()); + + allEvents.add(targetDb, event); + return event; + } + + public Event getByBaseEntityAndFormSubmissionId(CouchDbConnector targetDb, String baseEntityId, + String formSubmissionId) { + try { + List el = allEvents.findByBaseEntityAndFormSubmissionId(targetDb, baseEntityId, formSubmissionId); + if (el.size() > 1) { + throw new IllegalStateException("Multiple events for baseEntityId and formSubmissionId combination (" + + baseEntityId + "," + formSubmissionId + ")"); + } + if (el.size() == 0) { + return null; + } + return el.get(0); + } + catch (Exception e) { + return null; + } + } + + /** + * Break down form submission and save it to a target db + * + * @param targetDb + * @param submission + * @throws JSONException + */ + public void makeModelEntities(CouchDbConnector targetDb, FormSubmission submission) throws JSONException { + Client c = formEntityConverter.getClientFromFormSubmission(submission); + Event e = formEntityConverter.getEventFromFormSubmission(submission); + Map> dep = formEntityConverter.getDependentClientsFromFormSubmission(submission); + + if (findClient(targetDb, c) != null) { + clientService.mergeClient(c); + } else + addClient(targetDb, c); + + addEvent(targetDb, e); + // TODO relationships b/w entities + + for (Map cm : dep.values()) { + Client cin = (Client) cm.get("client"); + Event evin = (Event) cm.get("event"); + addClient(targetDb, cin); + addEvent(targetDb, evin); + } + } + + private void passToZiggy(FormSubmission submission) { + String params = Utils.getZiggyParams(submission); + ziggyService.saveForm(params, new Gson().toJson(submission.instance())); + } + } diff --git a/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java b/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java index 16a9ef4339..644573b338 100644 --- a/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java +++ b/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java @@ -1,7 +1,10 @@ package org.opensrp; import static org.mockito.Matchers.any; -import static org.mockito.Mockito.*; +import static org.mockito.Matchers.eq; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; import static org.mockito.MockitoAnnotations.initMocks; import java.io.IOException; @@ -17,6 +20,8 @@ import org.opensrp.form.domain.FormSubmission; import org.opensrp.form.domain.SubFormData; import org.opensrp.form.service.FormAttributeParser; +import org.opensrp.repository.couch.AllClients; +import org.opensrp.repository.couch.AllEvents; import org.opensrp.scheduler.HealthSchedulerService; import org.opensrp.scheduler.Schedule; import org.opensrp.scheduler.Schedule.ActionType; @@ -26,7 +31,6 @@ import org.opensrp.service.formSubmission.FormSubmissionProcessor; import org.opensrp.service.formSubmission.handler.FormSubmissionRouter; import org.opensrp.service.formSubmission.ziggy.ZiggyService; -import org.opensrp.util.ScheduleBuilder; import org.opensrp.util.TestResourceLoader; public class FormSubmissionProcessorTest extends TestResourceLoader{ @@ -49,13 +53,17 @@ public FormSubmissionProcessorTest() throws IOException { private ClientService clientService; @Mock private EventService eventService; + @Mock + private AllClients allClients; + @Mock + private AllEvents allEvents; @Before public void setup() throws IOException{ initMocks(this); FormEntityConverter fec = new FormEntityConverter(new FormAttributeParser("/form")); fsp = new FormSubmissionProcessor(ziggyService, formSubmissionRouter, - fec, scheduleService, clientService, eventService); + fec, scheduleService, clientService,allClients, eventService,allEvents); } @Test diff --git a/opensrp-core/src/test/java/org/opensrp/MultimediaServiceTest.java b/opensrp-core/src/test/java/org/opensrp/MultimediaServiceTest.java index 645e08033e..034b45466c 100644 --- a/opensrp-core/src/test/java/org/opensrp/MultimediaServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/MultimediaServiceTest.java @@ -10,8 +10,8 @@ import org.junit.Assert; import org.junit.Before; -import org.junit.Test; import org.junit.Ignore; +import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; import org.opensrp.domain.Multimedia; diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllBaseEntitiesIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllBaseEntitiesIntegrationTest.java index 8ffff25d67..e04d3e9f97 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllBaseEntitiesIntegrationTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/it/AllBaseEntitiesIntegrationTest.java @@ -16,8 +16,8 @@ import org.opensrp.domain.Address; import org.opensrp.domain.BaseEntity; import org.opensrp.domain.Client; -import org.opensrp.repository.AllBaseEntities; -import org.opensrp.repository.AllClients; +import org.opensrp.repository.couch.AllBaseEntities; +import org.opensrp.repository.couch.AllClients; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.test.context.ContextConfiguration; diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllClientsIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllClientsIntegrationTest.java index d2008baf9c..dd7dcff739 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllClientsIntegrationTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/it/AllClientsIntegrationTest.java @@ -36,7 +36,7 @@ import org.opensrp.common.Gender; import org.opensrp.domain.Address; import org.opensrp.domain.Client; -import org.opensrp.repository.AllClients; +import org.opensrp.repository.couch.AllClients; import org.opensrp.service.ClientService; import org.opensrp.util.DateTimeTypeConverter; import org.springframework.beans.factory.annotation.Autowired; diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllErrorTraceIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllErrorTraceIntegrationTest.java index 75641379dc..6bd0797dd2 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllErrorTraceIntegrationTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/it/AllErrorTraceIntegrationTest.java @@ -9,7 +9,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.opensrp.domain.ErrorTrace; -import org.opensrp.repository.AllErrorTrace; +import org.opensrp.repository.couch.AllErrorTrace; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllEventsIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllEventsIntegrationTest.java index 5a0d70741e..5a1b4d36a8 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllEventsIntegrationTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/it/AllEventsIntegrationTest.java @@ -13,7 +13,7 @@ import org.junit.runner.RunWith; import org.opensrp.domain.Event; import org.opensrp.domain.Obs; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.couch.AllEvents; import org.opensrp.service.EventService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllLocationsIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllLocationsIntegrationTest.java index 267a9f0f94..50361371db 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllLocationsIntegrationTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/it/AllLocationsIntegrationTest.java @@ -13,7 +13,7 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.opensrp.domain.Address; -import org.opensrp.repository.AllLocations; +import org.opensrp.repository.couch.AllLocations; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllProvidersIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllProvidersIntegrationTest.java index 725396ac4f..3bebe595f1 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllProvidersIntegrationTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/it/AllProvidersIntegrationTest.java @@ -10,7 +10,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.opensrp.repository.AllProviders; +import org.opensrp.repository.couch.AllProviders; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllUsersIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllUsersIntegrationTest.java index 476d34bd22..4a8aecfaa7 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllUsersIntegrationTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/it/AllUsersIntegrationTest.java @@ -10,8 +10,8 @@ import org.junit.runner.RunWith; import org.opensrp.domain.BaseEntity; import org.opensrp.domain.User; -import org.opensrp.repository.AllBaseEntities; -import org.opensrp.repository.AllUsers; +import org.opensrp.repository.couch.AllBaseEntities; +import org.opensrp.repository.couch.AllUsers; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/ConfigServiceIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/ConfigServiceIntegrationTest.java index 9c11b10174..7d2bfe6858 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/ConfigServiceIntegrationTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/it/ConfigServiceIntegrationTest.java @@ -10,7 +10,7 @@ import org.junit.runner.RunWith; import org.junit.runners.MethodSorters; import org.opensrp.common.AllConstants.Config; -import org.opensrp.repository.AllAppStateTokens; +import org.opensrp.repository.couch.AllAppStateTokens; import org.opensrp.service.ConfigService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java index 55fa56269b..647c24e86e 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java @@ -1,6 +1,9 @@ package org.opensrp.repository.it; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertTrue; import static org.mockito.Mockito.when; import static org.mockito.MockitoAnnotations.initMocks; @@ -25,8 +28,8 @@ import org.opensrp.domain.Event; import org.opensrp.form.domain.FormSubmission; import org.opensrp.form.service.FormSubmissionService; -import org.opensrp.repository.AllClients; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.couch.AllClients; +import org.opensrp.repository.couch.AllEvents; import org.opensrp.scheduler.Action; import org.opensrp.scheduler.Alert; import org.opensrp.scheduler.AlertCreationAction; @@ -51,62 +54,77 @@ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -public class FormLifeCycleTest extends TestResourceLoader{ +public class FormLifeCycleTest extends TestResourceLoader { + public FormLifeCycleTest() throws IOException { super(); } private List docsToRemove = new ArrayList<>(); - + @Autowired - @Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) + @Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) private CouchDbConnector db; + @Autowired private FormSubmissionProcessor fsp; + @Autowired private ZiggyService ziggyService; + @Autowired private FormSubmissionRouter formSubmissionRouter; + @Autowired private FormEntityConverter formEntityConverter; + /*@Autowired private ActionService actionService; @Autowired private ScheduleService schService;*/ @Autowired private HealthSchedulerService scheduleService; + @Autowired private ClientService clientService; + @Autowired private EventService eventService; + @Autowired private HandlerMapper hmap; + @Autowired private EntityDataMap edmap; - + @Mock private FormSubmissionService formSubmissionService; - private AlertCreationAction reminderAction; - - private DateTime dueWindowStart; - private DateTime lateWindowStart; - private DateTime maxWindowStart; - - @Autowired - private AllActions allActions; - @Autowired - private AllAlerts allAlerts; - @Autowired - private AllClients allClients; - @Autowired - private AllEvents allEvents; - - @Autowired - private AllEnrollments allEnrollments; - + private AlertCreationAction reminderAction; + + private DateTime dueWindowStart; + + private DateTime lateWindowStart; + + private DateTime maxWindowStart; + + @Autowired + private AllActions allActions; + + @Autowired + private AllAlerts allAlerts; + + @Autowired + private AllClients allClients; + + @Autowired + private AllEvents allEvents; + + @Autowired + private AllEnrollments allEnrollments; + @Before - public void setup() throws IOException{ + public void setup() throws IOException { initMocks(this); allEnrollments.removeAll(); @@ -115,18 +133,19 @@ public void setup() throws IOException{ allActions.removeAll(); allAlerts.removeAll(); - fsp = new FormSubmissionProcessor(ziggyService, formSubmissionRouter, - formEntityConverter, scheduleService, clientService, eventService); + fsp = new FormSubmissionProcessor(ziggyService, formSubmissionRouter, formEntityConverter, scheduleService, + clientService, allClients, eventService, allEvents); reminderAction = new AlertCreationAction(scheduleService, formSubmissionService); - - dueWindowStart = DateTime.now(); - lateWindowStart = DateTime.now().plusDays(10); - maxWindowStart = DateTime.now().plusDays(20); + + dueWindowStart = DateTime.now(); + lateWindowStart = DateTime.now().plusDays(10); + maxWindowStart = DateTime.now().plusDays(20); } - @Ignore @Test //TODO + @Ignore + @Test //TODO public void shouldCreateClientAndEventAndSchedulesAllDynamic() throws Exception { - FormSubmission fs = getFormSubmissionFor("child_enrollment",1); + FormSubmission fs = getFormSubmissionFor("child_enrollment", 1); //child birthdate is 10/Nov/2015 fsp.processFormSubmission(fs); @@ -149,14 +168,16 @@ public void shouldCreateClientAndEventAndSchedulesAllDynamic() throws Exception assertEquals(m1schedule.getStatus(), EnrollmentStatus.ACTIVE); assertEquals(m1schedule.getLastFulfilledDate(), null); assertTrue(m1schedule.getFulfillments().isEmpty()); - + when(formSubmissionService.findByInstanceId(fs.instanceId())).thenReturn(fs); - reminderAction.invoke(ScheduleBuilder.event(fs.entityId(), "PENTAVALENT 1", "penta1", - WindowName.earliest, p1schedule.getStartOfWindowForCurrentMilestone(WindowName.due), - p1schedule.getStartOfWindowForCurrentMilestone(WindowName.late), p1schedule.getStartOfWindowForCurrentMilestone(WindowName.max)), null); + reminderAction.invoke(ScheduleBuilder.event(fs.entityId(), "PENTAVALENT 1", "penta1", WindowName.earliest, + p1schedule.getStartOfWindowForCurrentMilestone(WindowName.due), + p1schedule.getStartOfWindowForCurrentMilestone(WindowName.late), + p1schedule.getStartOfWindowForCurrentMilestone(WindowName.max)), null); - List acl = allActions.findByCaseIdScheduleAndTimeStamp(fs.entityId(), p1schedule.getScheduleName(), new DateTime(0), new DateTime(System.currentTimeMillis())); + List acl = allActions.findByCaseIdScheduleAndTimeStamp(fs.entityId(), p1schedule.getScheduleName(), + new DateTime(0), new DateTime(System.currentTimeMillis())); assertTrue(acl.size() == 1); Action ac = acl.get(0); assertEquals(fs.anmId(), ac.providerId()); @@ -167,10 +188,13 @@ public void shouldCreateClientAndEventAndSchedulesAllDynamic() throws Exception assertEquals(fs.bindType(), ac.data().get("beneficiaryType")); assertEquals(p1schedule.getScheduleName(), ac.data().get("scheduleName")); assertEquals("pentavalent_1", ac.data().get("visitCode")); - assertEquals(p1schedule.getStartOfWindowForCurrentMilestone(WindowName.due).toLocalDate().toString(), ac.data().get("startDate")); - assertEquals(p1schedule.getStartOfWindowForCurrentMilestone(WindowName.late).toLocalDate().toString(), ac.data().get("expiryDate")); + assertEquals(p1schedule.getStartOfWindowForCurrentMilestone(WindowName.due).toLocalDate().toString(), + ac.data().get("startDate")); + assertEquals(p1schedule.getStartOfWindowForCurrentMilestone(WindowName.late).toLocalDate().toString(), + ac.data().get("expiryDate")); - List all = allAlerts.findByEntityIdTriggerAndTimeStamp(fs.entityId(), p1schedule.getScheduleName(), new DateTime(0), new DateTime(System.currentTimeMillis())); + List all = allAlerts.findByEntityIdTriggerAndTimeStamp(fs.entityId(), p1schedule.getScheduleName(), + new DateTime(0), new DateTime(System.currentTimeMillis())); assertTrue(all.size() == 1); Alert al = all.get(0); assertEquals(fs.anmId(), al.providerId()); @@ -178,13 +202,15 @@ public void shouldCreateClientAndEventAndSchedulesAllDynamic() throws Exception assertEquals("upcoming", al.alertStatus()); assertEquals("notification", al.alertType()); assertEquals("pkchild", al.beneficiaryType()); - assertEquals(p1schedule.getStartOfWindowForCurrentMilestone(WindowName.late).toLocalDate().toString(), al.expiryDate()); - assertEquals(p1schedule.getStartOfWindowForCurrentMilestone(WindowName.due).toLocalDate().toString(), al.startDate()); + assertEquals(p1schedule.getStartOfWindowForCurrentMilestone(WindowName.late).toLocalDate().toString(), + al.expiryDate()); + assertEquals(p1schedule.getStartOfWindowForCurrentMilestone(WindowName.due).toLocalDate().toString(), + al.startDate()); assertEquals(true, al.isActive()); assertEquals("penta1", al.triggerCode()); assertEquals("PENTAVALENT 1", al.triggerName()); assertEquals("schedule", al.triggerType()); - + //TODO followup handling } @@ -192,6 +218,7 @@ public void shouldCreateClientAndEventAndSchedulesAllDynamic() throws Exception @Ignore //FIXME public void shouldCreateClientAndEventAndSchedulesWithRouter() throws Exception { hmap.addCustomFormSubmissionHandler("pnc_1st_registration", new CustomFormSubmissionHandler() { + @Override public void handle(FormSubmission submission) { assertEquals("pnc_1st_registration", submission.formName()); @@ -206,9 +233,11 @@ public void handle(FormSubmission submission) { } - @Test@Ignore + @Test + @Ignore public void shouldCreateClientAndEventAndSchedulesWithZiggy() throws Exception { hmap.addCustomFormSubmissionHandler("new_household_registration", new CustomFormSubmissionHandler() { + @Override public void handle(FormSubmission submission) { assertEquals("new_household_registration", submission.formName()); @@ -218,10 +247,10 @@ public void handle(FormSubmission submission) { System.out.println("I am Ziggy scheduler"); } }); - edmap.addEntity("household", Client.class); - - FormSubmission fs = getFormSubmissionFor("new_household_registration", 1); - - fsp.processFormSubmission(fs); + edmap.addEntity("household", Client.class); + + FormSubmission fs = getFormSubmissionFor("new_household_registration", 1); + + fsp.processFormSubmission(fs); } } diff --git a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java index 342c67554d..0605723799 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java @@ -1,5 +1,25 @@ package org.opensrp.repository.lucene.it; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; +import static org.opensrp.common.AllConstants.BaseEntity.MOTHERS_INDENTIFIER; +import static org.opensrp.util.SampleFullDomainObject.ATTRIBUTES_TYPE; +import static org.opensrp.util.SampleFullDomainObject.ATTRIBUTES_VALUE; +import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.EPOCH_DATE_TIME; +import static org.opensrp.util.SampleFullDomainObject.FEMALE; +import static org.opensrp.util.SampleFullDomainObject.FIRST_NAME; +import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_VALUE; +import static org.opensrp.util.SampleFullDomainObject.attributes; +import static org.opensrp.util.SampleFullDomainObject.getAddress; +import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; +import static org.utils.CouchDbAccessUtils.addObjectToRepository; + +import java.util.Collections; +import java.util.List; + import org.ektorp.DbAccessException; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; @@ -10,22 +30,10 @@ import org.opensrp.common.AllConstants; import org.opensrp.domain.Address; import org.opensrp.domain.Client; -import org.opensrp.repository.AllClients; +import org.opensrp.repository.couch.AllClients; import org.opensrp.repository.lucene.LuceneClientRepository; import org.springframework.beans.factory.annotation.Autowired; -import java.util.Collections; -import java.util.List; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; -import static org.opensrp.common.AllConstants.BaseEntity.MOTHERS_INDENTIFIER; -import static org.opensrp.util.SampleFullDomainObject.*; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - //TODO: test birthDate range public class LuceneClientRepositoryTest extends BaseIntegrationTest { diff --git a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneEventRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneEventRepositoryTest.java index 8a5743aa5a..55b3d3f0bc 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneEventRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneEventRepositoryTest.java @@ -1,5 +1,19 @@ package org.opensrp.repository.lucene.it; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.ENTITY_TYPE; +import static org.opensrp.util.SampleFullDomainObject.EPOCH_DATE_TIME; +import static org.opensrp.util.SampleFullDomainObject.EVENT_TYPE; +import static org.opensrp.util.SampleFullDomainObject.LOCATION_ID; +import static org.opensrp.util.SampleFullDomainObject.PROVIDER_ID; +import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; +import static org.utils.CouchDbAccessUtils.addObjectToRepository; + +import java.util.List; + import org.ektorp.DbAccessException; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; @@ -8,18 +22,10 @@ import org.junit.Test; import org.opensrp.BaseIntegrationTest; import org.opensrp.domain.Event; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.couch.AllEvents; import org.opensrp.repository.lucene.LuceneEventRepository; import org.springframework.beans.factory.annotation.Autowired; -import java.util.List; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.opensrp.util.SampleFullDomainObject.*; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; -import static org.utils.AssertionUtil.*; - public class LuceneEventRepositoryTest extends BaseIntegrationTest { @Autowired diff --git a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneReportRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneReportRepositoryTest.java index 701b489ed5..e9bcc730ba 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneReportRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneReportRepositoryTest.java @@ -1,6 +1,20 @@ package org.opensrp.repository.lucene.it; -import com.sun.org.apache.regexp.internal.RE; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.EPOCH_DATE_TIME; +import static org.opensrp.util.SampleFullDomainObject.LOCATION_ID; +import static org.opensrp.util.SampleFullDomainObject.PROVIDER_ID; +import static org.opensrp.util.SampleFullDomainObject.REPORT_TYPE; +import static org.opensrp.util.SampleFullDomainObject.getReport; +import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; +import static org.utils.CouchDbAccessUtils.addObjectToRepository; + +import java.util.Collections; +import java.util.List; + import org.ektorp.DbAccessException; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; @@ -9,19 +23,10 @@ import org.junit.Test; import org.opensrp.BaseIntegrationTest; import org.opensrp.domain.Report; -import org.opensrp.repository.AllReports; +import org.opensrp.repository.couch.AllReports; import org.opensrp.repository.lucene.LuceneReportRepository; import org.springframework.beans.factory.annotation.Autowired; -import java.util.Collections; -import java.util.List; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.opensrp.util.SampleFullDomainObject.*; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - public class LuceneReportRepositoryTest extends BaseIntegrationTest { @Autowired diff --git a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneSearchRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneSearchRepositoryTest.java index 5d9f19adfc..65ba1ac646 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneSearchRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneSearchRepositoryTest.java @@ -1,5 +1,25 @@ package org.opensrp.repository.lucene.it; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.ATTRIBUTES_TYPE; +import static org.opensrp.util.SampleFullDomainObject.ATTRIBUTES_VALUE; +import static org.opensrp.util.SampleFullDomainObject.EPOCH_DATE_TIME; +import static org.opensrp.util.SampleFullDomainObject.FEMALE; +import static org.opensrp.util.SampleFullDomainObject.FIRST_NAME; +import static org.opensrp.util.SampleFullDomainObject.LAST_NAME; +import static org.opensrp.util.SampleFullDomainObject.MIDDLE_NAME; +import static org.opensrp.util.SampleFullDomainObject.attributes; +import static org.opensrp.util.SampleFullDomainObject.getAddress; +import static org.opensrp.util.SampleFullDomainObject.identifier; +import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; +import static org.utils.CouchDbAccessUtils.addObjectToRepository; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.junit.After; @@ -7,22 +27,10 @@ import org.junit.Test; import org.opensrp.BaseIntegrationTest; import org.opensrp.domain.Client; -import org.opensrp.repository.AllClients; +import org.opensrp.repository.couch.AllClients; import org.opensrp.repository.lucene.LuceneSearchRepository; import org.springframework.beans.factory.annotation.Autowired; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.*; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - public class LuceneSearchRepositoryTest extends BaseIntegrationTest { @Autowired diff --git a/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java index 60ae1904eb..49570d3336 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java @@ -9,7 +9,7 @@ import org.opensrp.domain.Address; import org.opensrp.domain.Client; import org.opensrp.domain.UniqueId; -import org.opensrp.repository.UniqueIdRepository; +import org.opensrp.repository.couch.UniqueIdRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; diff --git a/opensrp-core/src/test/java/org/opensrp/service/StockServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/StockServiceTest.java index f7d8ec74bf..c88bf8be0c 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/StockServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/StockServiceTest.java @@ -8,7 +8,7 @@ import org.mockito.Mock; import org.mockito.Mockito; import org.opensrp.domain.Stock; -import org.opensrp.repository.AllStocks; +import org.opensrp.repository.couch.AllStocks; import org.opensrp.service.StockService; import static org.mockito.Mockito.verify; import static org.mockito.Mockito.when; diff --git a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/EventListenerTest.java b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/EventListenerTest.java index 3c7b57e51c..9a58f193a8 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/EventListenerTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/EventListenerTest.java @@ -12,8 +12,8 @@ import org.opensrp.domain.AppStateToken; import org.opensrp.domain.Client; import org.opensrp.domain.Event; -import org.opensrp.repository.AllClients; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.couch.AllClients; +import org.opensrp.repository.couch.AllEvents; import org.opensrp.service.ClientService; import org.opensrp.service.ConfigService; import org.opensrp.service.ErrorTraceService; diff --git a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java index 98b193f1da..0f9188330d 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java @@ -11,7 +11,6 @@ import java.io.IOException; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.mockito.InOrder; import org.mockito.InjectMocks; @@ -21,6 +20,8 @@ import org.opensrp.domain.Event; import org.opensrp.form.domain.FormSubmission; import org.opensrp.form.service.FormAttributeParser; +import org.opensrp.repository.couch.AllClients; +import org.opensrp.repository.couch.AllEvents; import org.opensrp.scheduler.HealthSchedulerService; import org.opensrp.scheduler.ScheduleConfig; import org.opensrp.scheduler.service.ActionService; @@ -60,6 +61,12 @@ public FormEntityServiceTest() throws IOException { @Mock private ActionService actionService; + @Mock + private AllClients allClients; + + @Mock + private AllEvents allEvents; + @InjectMocks private HealthSchedulerService scheduleService; @@ -70,7 +77,7 @@ public FormEntityServiceTest() throws IOException { public void setUp() throws Exception { scheduleConfig = new ScheduleConfig("/schedules/schedule-config.xls"); initMocks(this); - fsp = new FormSubmissionProcessor(ziggyService, formSubmissionRouter, formEntityConverter, scheduleService, clientService, eventService); + fsp = new FormSubmissionProcessor(ziggyService, formSubmissionRouter, formEntityConverter, scheduleService, clientService,allClients, eventService,allEvents); fec = new FormEntityConverter(new FormAttributeParser("/form")); } diff --git a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionDataMigrationIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionDataMigrationIntegrationTest.java index d8694ee631..c86498b9e2 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionDataMigrationIntegrationTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionDataMigrationIntegrationTest.java @@ -1,6 +1,8 @@ package org.opensrp.service.formSubmission; -import org.ektorp.CouchDbConnector; +import java.net.MalformedURLException; +import java.util.List; + import org.ektorp.CouchDbInstance; import org.junit.After; import org.junit.Assert; @@ -11,16 +13,13 @@ import org.opensrp.domain.AppStateToken; import org.opensrp.form.domain.FormSubmission; import org.opensrp.form.repository.AllFormSubmissions; -import org.opensrp.repository.AllAppStateTokens; +import org.opensrp.repository.couch.AllAppStateTokens; import org.opensrp.service.FormSubmissionDataMigrationService; import org.opensrp.util.Utils; import org.opensrp.util.Utils.DatabaseConnectionParams; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; -import java.net.MalformedURLException; -import java.util.List; - public class FormSubmissionDataMigrationIntegrationTest extends BaseIntegrationTest{ @Autowired FormSubmissionDataMigrationService dataMigrationService; diff --git a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionProcessorScheduleTest.java b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionProcessorScheduleTest.java index 6b6bf64d76..b21212b909 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionProcessorScheduleTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionProcessorScheduleTest.java @@ -36,7 +36,7 @@ public void setup() throws IOException, JSONException { ScheduleConfig scheduleConfig = new ScheduleConfig("/schedules/schedule-config.xls"); scheduleService = new HealthSchedulerService(null, schService, scheduleConfig); - fsp = new FormSubmissionProcessor(null, null, null, scheduleService, null, null); + fsp = new FormSubmissionProcessor(null, null, null, scheduleService, null, null,null,null); } @Test @@ -53,7 +53,7 @@ public void shouldEnrollScheduleProperly() throws IOException, JSONException { FormSubmission fs = getFormSubmissionFor("child_followup"); HealthSchedulerService mockScheduleService = mock(HealthSchedulerService.class); when(mockScheduleService.findAutomatedSchedules(fs.formName())).thenReturn(scheduleService.findAutomatedSchedules(fs.formName())); - fsp = new FormSubmissionProcessor(null, null, null, mockScheduleService, null, null); + fsp = new FormSubmissionProcessor(null, null, null, mockScheduleService, null, null,null,null); fsp.handleSchedules(fs); @@ -70,7 +70,7 @@ public void shouldEnrollScheduleForSubforms() throws IOException, JSONException FormSubmission fs = getFormSubmissionFor("new_household_registration", 2); HealthSchedulerService mockScheduleService = mock(HealthSchedulerService.class); when(mockScheduleService.findAutomatedSchedules(fs.formName())).thenReturn(scheduleService.findAutomatedSchedules(fs.formName())); - fsp = new FormSubmissionProcessor(null, null, null, mockScheduleService, null, null); + fsp = new FormSubmissionProcessor(null, null, null, mockScheduleService, null, null,null,null); fsp.handleSchedules(fs); diff --git a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/StubAllAppStateToken.java b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/StubAllAppStateToken.java index 4f23d5555b..d8c1afe678 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/StubAllAppStateToken.java +++ b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/StubAllAppStateToken.java @@ -1,7 +1,7 @@ package org.opensrp.service.formSubmission; import org.ektorp.CouchDbConnector; -import org.opensrp.repository.AllAppStateTokens; +import org.opensrp.repository.couch.AllAppStateTokens; public class StubAllAppStateToken extends AllAppStateTokens { diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/BaseEntityServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/BaseEntityServiceTest.java index e00676a9d9..8764024100 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/it/BaseEntityServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/it/BaseEntityServiceTest.java @@ -1,24 +1,29 @@ package org.opensrp.service.it; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_TYPE; +import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_VALUE; +import static org.opensrp.util.SampleFullDomainObject.getBaseEntity; +import static org.opensrp.util.SampleFullDomainObject.identifier; +import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; +import static org.utils.CouchDbAccessUtils.addObjectToRepository; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.junit.After; import org.junit.Before; import org.junit.Test; import org.opensrp.BaseIntegrationTest; import org.opensrp.domain.BaseEntity; -import org.opensrp.repository.AllBaseEntities; +import org.opensrp.repository.couch.AllBaseEntities; import org.opensrp.service.BaseEntityService; import org.springframework.beans.factory.annotation.Autowired; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.opensrp.util.SampleFullDomainObject.*; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - public class BaseEntityServiceTest extends BaseIntegrationTest { @Autowired diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/ClientServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/ClientServiceTest.java index 5ef10d5d96..8a06773943 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/it/ClientServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/it/ClientServiceTest.java @@ -1,5 +1,28 @@ package org.opensrp.service.it; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; +import static org.junit.Assert.assertNull; +import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_TYPE; +import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_VALUE; +import static org.opensrp.util.SampleFullDomainObject.LAST_NAME; +import static org.opensrp.util.SampleFullDomainObject.getClient; +import static org.opensrp.util.SampleFullDomainObject.identifier; +import static org.utils.AssertionUtil.assertNewObjectCreation; +import static org.utils.AssertionUtil.assertObjectUpdate; +import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; +import static org.utils.CouchDbAccessUtils.addObjectToRepository; +import static org.utils.CouchDbAccessUtils.getCouchDbConnector; + +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.ektorp.CouchDbConnector; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; @@ -10,24 +33,11 @@ import org.junit.Test; import org.opensrp.BaseIntegrationTest; import org.opensrp.domain.Client; -import org.opensrp.repository.AllClients; +import org.opensrp.repository.couch.AllClients; import org.opensrp.service.ClientService; import org.springframework.beans.factory.annotation.Autowired; import org.utils.CouchDbAccessUtils; -import java.io.IOException; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static java.util.Arrays.asList; -import static org.junit.Assert.*; -import static org.opensrp.util.SampleFullDomainObject.*; -import static org.utils.AssertionUtil.*; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; -import static org.utils.CouchDbAccessUtils.getCouchDbConnector; - //TODO: Write couch-lucene related method test cases e.g: findByCriteria public class ClientServiceTest extends BaseIntegrationTest { @@ -236,7 +246,7 @@ public void shouldAddWithCouchDbConnector() throws IOException { Client expectedClient = getClient(); CouchDbConnector couchDbConnector = CouchDbAccessUtils.getCouchDbConnector("opensrp"); - Client actualClient = clientService.addClient(couchDbConnector, expectedClient); + Client actualClient = allClients.addClient(couchDbConnector, expectedClient); List dbClients = allClients.getAll(); assertEquals(1, dbClients.size()); @@ -251,7 +261,7 @@ public void shouldThrowRuntimeExceptionWhileAddIfNoBaseEntityIdFoundWithCouchDbC expectedClient.setBaseEntityId(null); CouchDbConnector couchDbConnector = CouchDbAccessUtils.getCouchDbConnector("opensrp"); - clientService.addClient(couchDbConnector, expectedClient); + allClients.addClient(couchDbConnector, expectedClient); } @Test(expected = IllegalArgumentException.class) @@ -262,7 +272,7 @@ public void shouldThrowIllegalArgumentExceptionIfAClientAlreadyExistWithSameIden expectedClient.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); CouchDbConnector couchDbConnector = CouchDbAccessUtils.getCouchDbConnector("opensrp"); - clientService.addClient(couchDbConnector, expectedClient); + allClients.addClient(couchDbConnector, expectedClient); } @Test @@ -312,7 +322,7 @@ public void shouldFindFromClientObjectWithBaseIdentifierWithCouchDbConnector() t Client expectedClient = getClient(); addObjectToRepository(Collections.singletonList(expectedClient), allClients); - Client actualClient = clientService.findClient(getCouchDbConnector("opensrp"), expectedClient); + Client actualClient = allClients.findClient(getCouchDbConnector("opensrp"), expectedClient); assertEquals(expectedClient, actualClient); } @@ -323,7 +333,7 @@ public void shouldFindFromClientWithIdentifiersWithCouchDbConnector() throws IOE expectedClient.setBaseEntityId(null); addObjectToRepository(Collections.singletonList(expectedClient), allClients); - Client actualClient = clientService.findClient(getCouchDbConnector("opensrp"), expectedClient); + Client actualClient = allClients.findClient(getCouchDbConnector("opensrp"), expectedClient); assertEquals(expectedClient, actualClient); } @@ -335,7 +345,7 @@ public void shouldReturnNullIfMultipleClientFoundWithSameIdentifierWithCouchDbCo addObjectToRepository(asList(expectedClient, sameClient), allClients); expectedClient.setBaseEntityId(null); - Client client = clientService.findClient(getCouchDbConnector("opensrp"), expectedClient); + Client client = allClients.findClient(getCouchDbConnector("opensrp"), expectedClient); assertNull(client); @@ -345,7 +355,7 @@ public void shouldReturnNullIfMultipleClientFoundWithSameIdentifierWithCouchDbCo public void shouldReturnNullIfNoClientFoundWithCouchDbConnector() throws IOException { Client expectedClient = getClient(); - Client actualClient = clientService.findClient(getCouchDbConnector("opensrp"), expectedClient); + Client actualClient = allClients.findClient(getCouchDbConnector("opensrp"), expectedClient); assertNull(actualClient); } diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/ConfigServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/ConfigServiceTest.java index 82e8d991af..a887888df5 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/it/ConfigServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/it/ConfigServiceTest.java @@ -1,186 +1,190 @@ package org.opensrp.service.it; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.AppStateToken; -import org.opensrp.repository.AllAppStateTokens; -import org.opensrp.service.ConfigService; -import org.springframework.beans.factory.annotation.Autowired; - -import java.io.IOException; -import java.util.Collections; -import java.util.List; - import static java.util.Arrays.asList; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNull; -import static org.opensrp.util.SampleFullDomainObject.*; +import static org.opensrp.util.SampleFullDomainObject.APP_STATE_TOKEN_DESCRIPTION; +import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.LAST_EDIT_DATE; +import static org.opensrp.util.SampleFullDomainObject.VALUE; +import static org.opensrp.util.SampleFullDomainObject.getAppStateToken; import static org.opensrp.util.SampleFullDomainObject.AppStateTokenName.APP_STATE_TOKEN_NAME; import static org.opensrp.util.SampleFullDomainObject.AppStateTokenName.DIFFERENT_APP_STATE_TOKEN_NAME; import static org.utils.CouchDbAccessUtils.addObjectToRepository; import static org.utils.CouchDbAccessUtils.getCouchDbConnector; -public class ConfigServiceTest extends BaseIntegrationTest { +import java.io.IOException; +import java.util.Collections; +import java.util.List; +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.opensrp.BaseIntegrationTest; +import org.opensrp.domain.AppStateToken; +import org.opensrp.repository.couch.AllAppStateTokens; +import org.opensrp.service.ConfigService; +import org.springframework.beans.factory.annotation.Autowired; + +public class ConfigServiceTest extends BaseIntegrationTest { + @Autowired AllAppStateTokens allAppStateTokens; - + @Autowired ConfigService configService; - + @Before public void setUp() { allAppStateTokens.removeAll(); } - + @After public void cleanUp() { allAppStateTokens.removeAll(); } - + @Test public void shouldFindAppStateTokenByName() { AppStateToken expectedAppStateToken = getAppStateToken(); AppStateToken invalidAppStateToken = getAppStateToken(); invalidAppStateToken.setName(DIFFERENT_APP_STATE_TOKEN_NAME.name()); addObjectToRepository(asList(expectedAppStateToken, invalidAppStateToken), allAppStateTokens); - + AppStateToken actualAppStateToken = configService.getAppStateTokenByName(APP_STATE_TOKEN_NAME); - + assertEquals(expectedAppStateToken, actualAppStateToken); } - + @Test(expected = IllegalStateException.class) public void shouldThrowExceptionIfMultipleAppStateTokenWithSameNameFound() { AppStateToken expectedAppStateToken = getAppStateToken(); AppStateToken invalidAppStateToken = getAppStateToken(); addObjectToRepository(asList(expectedAppStateToken, invalidAppStateToken), allAppStateTokens); - + configService.getAppStateTokenByName(APP_STATE_TOKEN_NAME); - + } - + @Test public void shouldReturnNullIfNoTokenFound() { assertNull(configService.getAppStateTokenByName(APP_STATE_TOKEN_NAME)); } - + @Test public void shouldFindAppStateTokenByNameUsingCouchdbConnector() throws IOException { AppStateToken expectedAppStateToken = getAppStateToken(); AppStateToken invalidAppStateToken = getAppStateToken(); invalidAppStateToken.setName(DIFFERENT_APP_STATE_TOKEN_NAME.name()); addObjectToRepository(asList(expectedAppStateToken, invalidAppStateToken), allAppStateTokens); - - AppStateToken actualAppStateToken = configService - .getAppStateTokenByName(getCouchDbConnector("opensrp"), APP_STATE_TOKEN_NAME); - + + AppStateToken actualAppStateToken = allAppStateTokens.getAppStateTokenByName(getCouchDbConnector("opensrp"), + APP_STATE_TOKEN_NAME); + assertEquals(expectedAppStateToken, actualAppStateToken); } - + @Test public void shouldUpdate() { AppStateToken expectedAppStateToken = getAppStateToken(); addObjectToRepository(Collections.singletonList(expectedAppStateToken), allAppStateTokens); - + expectedAppStateToken.setValue(DIFFERENT_BASE_ENTITY_ID); - + configService.updateAppStateToken(APP_STATE_TOKEN_NAME, DIFFERENT_BASE_ENTITY_ID); - + List allTokens = allAppStateTokens.getAll(); assertEquals(1, allTokens.size()); assertNotEquals(expectedAppStateToken.getLastEditDate(), allTokens.get(0).getLastEditDate()); - + allTokens.get(0).setLastEditDate(LAST_EDIT_DATE); assertEquals(expectedAppStateToken, allTokens.get(0)); } - + @Test(expected = IllegalStateException.class) public void shouldThrowExceptionIfMultipleTokenFoundWithSameNameWhileUpdate() { AppStateToken expectedAppStateToken = getAppStateToken(); AppStateToken invalidAppStateToken = getAppStateToken(); addObjectToRepository(asList(expectedAppStateToken, invalidAppStateToken), allAppStateTokens); - + configService.updateAppStateToken(APP_STATE_TOKEN_NAME, DIFFERENT_BASE_ENTITY_ID); } - + @Test public void shouldThrowExceptionIfTokenNotFound() { - + } - + @Test public void shouldUpdateWithCouchDbConnector() throws IOException { AppStateToken expectedAppStateToken = getAppStateToken(); addObjectToRepository(Collections.singletonList(expectedAppStateToken), allAppStateTokens); - + expectedAppStateToken.setValue(DIFFERENT_BASE_ENTITY_ID); - - configService.updateAppStateToken(getCouchDbConnector("opensrp"), APP_STATE_TOKEN_NAME, DIFFERENT_BASE_ENTITY_ID); - + + allAppStateTokens.updateAppStateToken(getCouchDbConnector("opensrp"), APP_STATE_TOKEN_NAME, + DIFFERENT_BASE_ENTITY_ID); + List allTokens = allAppStateTokens.getAll(); assertEquals(1, allTokens.size()); assertNotEquals(expectedAppStateToken.getLastEditDate(), allTokens.get(0).getLastEditDate()); - + allTokens.get(0).setLastEditDate(LAST_EDIT_DATE); assertEquals(expectedAppStateToken, allTokens.get(0)); } - + @Test public void shouldRegisterNewAppStateToken() { AppStateToken expectedAppStateToken = getAppStateToken(); expectedAppStateToken.setLastEditDate(0L); - - AppStateToken actualAppStateToken = configService - .registerAppStateToken(APP_STATE_TOKEN_NAME, VALUE, APP_STATE_TOKEN_DESCRIPTION, true); - + + AppStateToken actualAppStateToken = configService.registerAppStateToken(APP_STATE_TOKEN_NAME, VALUE, + APP_STATE_TOKEN_DESCRIPTION, true); + List allTokens = allAppStateTokens.getAll(); assertEquals(1, allTokens.size()); assertEquals(expectedAppStateToken, allTokens.get(0)); assertEquals(expectedAppStateToken, actualAppStateToken); } - + @Test(expected = IllegalArgumentException.class) public void shouldThrowExceptionInRegisterIfNameIsNull() { configService.registerAppStateToken(null, VALUE, APP_STATE_TOKEN_DESCRIPTION, true); } - + @Test(expected = IllegalArgumentException.class) public void shouldThrowExceptionInRegisterIfDescriptionIsEmpty() { configService.registerAppStateToken(APP_STATE_TOKEN_NAME, VALUE, "", true); } - + @Test(expected = IllegalArgumentException.class) public void shouldThrowExceptionInRegisterIfTokenAlreadyExistAndSuppressWaringIsOff() { AppStateToken expectedAppStateToken = getAppStateToken(); addObjectToRepository(Collections.singletonList(expectedAppStateToken), allAppStateTokens); - + configService.registerAppStateToken(APP_STATE_TOKEN_NAME, VALUE, APP_STATE_TOKEN_DESCRIPTION, false); } - + @Test public void shouldReturnExistingTokenIfSuppressWarningIsOn() { AppStateToken expectedAppStateToken = getAppStateToken(); addObjectToRepository(Collections.singletonList(expectedAppStateToken), allAppStateTokens); - - AppStateToken actualAppStateToken = configService - .registerAppStateToken(APP_STATE_TOKEN_NAME, VALUE, APP_STATE_TOKEN_DESCRIPTION, true); - + + AppStateToken actualAppStateToken = configService.registerAppStateToken(APP_STATE_TOKEN_NAME, VALUE, + APP_STATE_TOKEN_DESCRIPTION, true); + assertEquals(expectedAppStateToken, actualAppStateToken); } - + @Test public void shouldRegisterNewTokenWithCouchdbConnector() throws IOException { AppStateToken expectedAppStateToken = getAppStateToken(); expectedAppStateToken.setLastEditDate(0L); - - AppStateToken actualAppStateToken = configService - .registerAppStateToken(getCouchDbConnector("opensrp"), APP_STATE_TOKEN_NAME, VALUE, - APP_STATE_TOKEN_DESCRIPTION, true); - + + AppStateToken actualAppStateToken = allAppStateTokens.registerAppStateToken(getCouchDbConnector("opensrp"), + APP_STATE_TOKEN_NAME, VALUE, APP_STATE_TOKEN_DESCRIPTION, true); + List allTokens = allAppStateTokens.getAll(); assertEquals(1, allTokens.size()); assertEquals(expectedAppStateToken, allTokens.get(0)); diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/ErrorTraceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/ErrorTraceTest.java index 621154e879..fb153e5485 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/it/ErrorTraceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/it/ErrorTraceTest.java @@ -1,17 +1,5 @@ package org.opensrp.service.it; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.ErrorTrace; -import org.opensrp.repository.AllErrorTrace; -import org.opensrp.service.ErrorTraceService; -import org.springframework.beans.factory.annotation.Autowired; - -import java.util.Collections; -import java.util.List; - import static java.util.Arrays.asList; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNotNull; @@ -21,6 +9,18 @@ import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; import static org.utils.CouchDbAccessUtils.addObjectToRepository; +import java.util.Collections; +import java.util.List; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.opensrp.BaseIntegrationTest; +import org.opensrp.domain.ErrorTrace; +import org.opensrp.repository.couch.AllErrorTrace; +import org.opensrp.service.ErrorTraceService; +import org.springframework.beans.factory.annotation.Autowired; + public class ErrorTraceTest extends BaseIntegrationTest { @Autowired diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/EventServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/EventServiceTest.java index bba85332d3..da9aba6ca4 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/it/EventServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/it/EventServiceTest.java @@ -1,56 +1,68 @@ package org.opensrp.service.it; -import org.joda.time.DateTime; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.Client; -import org.opensrp.domain.Event; -import org.opensrp.repository.AllClients; -import org.opensrp.repository.AllEvents; -import org.opensrp.service.EventService; -import org.springframework.beans.factory.annotation.Autowired; - -import java.io.IOException; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - import static java.util.Arrays.asList; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertNull; import static org.opensrp.common.AllConstants.OpenSRPEvent.Client.ZEIR_ID; -import static org.opensrp.util.SampleFullDomainObject.*; +import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.EVENT_TYPE; +import static org.opensrp.util.SampleFullDomainObject.FIELD_CODE; +import static org.opensrp.util.SampleFullDomainObject.FORM_SUBMISSION_ID; +import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_TYPE; +import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_VALUE; +import static org.opensrp.util.SampleFullDomainObject.PROVIDER_ID; +import static org.opensrp.util.SampleFullDomainObject.VALUE; +import static org.opensrp.util.SampleFullDomainObject.getClient; +import static org.opensrp.util.SampleFullDomainObject.getEvent; +import static org.opensrp.util.SampleFullDomainObject.getObs; +import static org.opensrp.util.SampleFullDomainObject.identifier; import static org.utils.AssertionUtil.assertNewObjectCreation; import static org.utils.AssertionUtil.assertObjectUpdate; import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; import static org.utils.CouchDbAccessUtils.addObjectToRepository; import static org.utils.CouchDbAccessUtils.getCouchDbConnector; -public class EventServiceTest extends BaseIntegrationTest { +import java.io.IOException; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import org.joda.time.DateTime; +import org.junit.Before; +import org.junit.Test; +import org.opensrp.BaseIntegrationTest; +import org.opensrp.domain.Client; +import org.opensrp.domain.Event; +import org.opensrp.repository.couch.AllClients; +import org.opensrp.repository.couch.AllEvents; +import org.opensrp.service.EventService; +import org.springframework.beans.factory.annotation.Autowired; + +public class EventServiceTest extends BaseIntegrationTest { + @Autowired private AllEvents allEvents; - + @Autowired private AllClients allClients; - + @Autowired private EventService eventService; - + @Before public void setUp() { allClients.removeAll(); allEvents.removeAll(); } - + @Before public void cleanUp() { allClients.removeAll(); allEvents.removeAll(); } - + @Test public void shouldFindAllByIdentifier() { Event expectedEvent = getEvent(); @@ -61,14 +73,14 @@ public void shouldFindAllByIdentifier() { identifiers.put(IDENTIFIER_TYPE, "invalidValue"); invalidEvent.setIdentifiers(identifiers); List expectedEventList = asList(expectedEvent, expectedEvent2); - + addObjectToRepository(asList(expectedEvent, expectedEvent2, invalidEvent), allEvents); - + List actualEventList = eventService.findAllByIdentifier(IDENTIFIER_VALUE); - + assertTwoListAreSameIgnoringOrder(expectedEventList, actualEventList); } - + @Test public void shouldFindAllByIdentifierTypeAndValue() { Event expectedEvent = getEvent(); @@ -79,65 +91,65 @@ public void shouldFindAllByIdentifierTypeAndValue() { identifiers.put(IDENTIFIER_TYPE, "invalidValue"); invalidEvent.setIdentifiers(identifiers); List expectedEventList = asList(expectedEvent, expectedEvent2); - + addObjectToRepository(asList(expectedEvent, expectedEvent2, invalidEvent), allEvents); - + List actualEventList = eventService.findAllByIdentifier(IDENTIFIER_TYPE, IDENTIFIER_VALUE); - + assertTwoListAreSameIgnoringOrder(expectedEventList, actualEventList); } - + @Test public void shouldFindByDocumentId() { addObjectToRepository(asList(getEvent()), allEvents); Event expectedEvent = allEvents.getAll().get(0); - + Event actualEvent = eventService.getById(expectedEvent.getId()); - + assertEquals(expectedEvent, actualEvent); } - + @Test public void shouldFindByBaseEntityAndFormSubmissionId() { Event expectedEvent = getEvent(); Event invalidEvent = getEvent(); invalidEvent.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - + addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - + Event actualEvent = eventService.getByBaseEntityAndFormSubmissionId(BASE_ENTITY_ID, FORM_SUBMISSION_ID); - + assertEquals(expectedEvent, actualEvent); } - + @Test(expected = IllegalStateException.class) public void shouldThrowExceptionIfMultipleFound() { addObjectToRepository(asList(getEvent(), getEvent()), allEvents); - + eventService.getByBaseEntityAndFormSubmissionId(BASE_ENTITY_ID, FORM_SUBMISSION_ID); } - + @Test public void shouldReturnNullIfNoEventFound() { Event actualEvent = eventService.getByBaseEntityAndFormSubmissionId(BASE_ENTITY_ID, FORM_SUBMISSION_ID); - + assertNull(actualEvent); } - + @Test public void shouldFindByBaseEntityIdAndFormSubmissionIdUsingCouchDbConnector() throws IOException { Event expectedEvent = getEvent(); Event invalidEvent = getEvent(); invalidEvent.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); - + addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - - Event actualEvent = eventService - .getByBaseEntityAndFormSubmissionId(getCouchDbConnector("opensrp"), BASE_ENTITY_ID, FORM_SUBMISSION_ID); - + + Event actualEvent = allEvents.getByBaseEntityAndFormSubmissionId(getCouchDbConnector("opensrp"), BASE_ENTITY_ID, + FORM_SUBMISSION_ID); + assertEquals(expectedEvent, actualEvent); } - + @Test public void shouldFindByBaseEntityId() { Event expectedEvent = getEvent(); @@ -145,14 +157,14 @@ public void shouldFindByBaseEntityId() { Event invalidEvent = getEvent(); invalidEvent.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); List expectedEvents = asList(expectedEvent, expectedEvent2); - + addObjectToRepository(asList(expectedEvent, expectedEvent2, invalidEvent), allEvents); - + List actualEvents = eventService.findByBaseEntityId(BASE_ENTITY_ID); - + assertTwoListAreSameIgnoringOrder(expectedEvents, actualEvents); } - + @Test public void shouldFindByFormSubmissionId() { Event expectedEvent = getEvent(); @@ -160,14 +172,14 @@ public void shouldFindByFormSubmissionId() { Event invalidEvent = getEvent(); invalidEvent.setFormSubmissionId(DIFFERENT_BASE_ENTITY_ID); List expectedEvents = asList(expectedEvent, expectedEvent2); - + addObjectToRepository(asList(expectedEvent, expectedEvent2, invalidEvent), allEvents); - + List actualEvents = eventService.findByFormSubmissionId(FORM_SUBMISSION_ID); - + assertTwoListAreSameIgnoringOrder(expectedEvents, actualEvents); } - + @Test public void shouldFindByUniqueIdIdentifier() { Event expectedEvent = getEvent(); @@ -175,14 +187,14 @@ public void shouldFindByUniqueIdIdentifier() { Map identifiers = new HashMap<>(identifier); identifiers.put(IDENTIFIER_TYPE, "invalidValue"); invalidEvent.setIdentifiers(identifiers); - + addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - + Event actualEvent = eventService.find(IDENTIFIER_VALUE); - + assertEquals(expectedEvent, actualEvent); } - + @Test(expected = IllegalArgumentException.class) public void shouldThrowExceptionIfMultipleFoundWithSameIdentifierValue() { Event expectedEvent = getEvent(); @@ -192,33 +204,33 @@ public void shouldThrowExceptionIfMultipleFoundWithSameIdentifierValue() { Map identifiers = new HashMap<>(identifier); identifiers.put(IDENTIFIER_TYPE, "invalidValue"); invalidEvent.setIdentifiers(identifiers); - + addObjectToRepository(asList(expectedEvent, expectedEvent2, invalidEvent), allEvents); - + eventService.find(IDENTIFIER_VALUE); } - + @Test public void shouldReturnNullIfNothingFoundWithIdentifier() { assertNull(eventService.find(IDENTIFIER_VALUE)); } - + @Test public void shouldFindByEventObject() { Event expectedEvent = getEvent(); - + Event invalidEvent = getEvent(); Map identifiers = new HashMap<>(identifier); identifiers.put(IDENTIFIER_TYPE, "invalidValue"); invalidEvent.setIdentifiers(identifiers); - + addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - + Event actualEvent = eventService.find(expectedEvent); - + assertEquals(expectedEvent, actualEvent); } - + @Test(expected = IllegalArgumentException.class) public void shouldThrowExceptionIfMultipleFoundWithSameEvent() { Event expectedEvent = getEvent(); @@ -228,28 +240,28 @@ public void shouldThrowExceptionIfMultipleFoundWithSameEvent() { Map identifiers = new HashMap<>(identifier); identifiers.put(IDENTIFIER_TYPE, "invalidValue"); invalidEvent.setIdentifiers(identifiers); - + addObjectToRepository(asList(expectedEvent, expectedEvent2, invalidEvent), allEvents); - + eventService.find(expectedEvent); } - + @Test public void shouldReturnNullIfNothingFoundWithSameEvent() { Event expectedEvent = getEvent(); assertNull(eventService.find(expectedEvent)); } - + @Test public void shouldFindByEventOrDocumentId() { addObjectToRepository(asList(getEvent()), allEvents); Event expectedEvent = allEvents.getAll().get(0); - + Event actualEvent = eventService.findById(expectedEvent.getId()); - + assertEquals(expectedEvent, actualEvent); } - + @Test public void shouldReturnNullForNullOrEmptyIdInFindById() { Event actualEvent = eventService.findById(""); @@ -257,28 +269,28 @@ public void shouldReturnNullForNullOrEmptyIdInFindById() { actualEvent = eventService.findById(null); assertNull(actualEvent); } - + @Test public void shouldReturnNullIfEventNotFound() { addObjectToRepository(asList(getEvent()), allEvents); - + Event actualEvent = eventService.findById(DIFFERENT_BASE_ENTITY_ID); - + assertNull(actualEvent); } - + @Test public void shouldAddEvent() { Event expectedEvent = getEvent(); - + Event actualEvent = eventService.addEvent(expectedEvent); - + List dbEvents = allEvents.getAll(); assertEquals(1, dbEvents.size()); assertEquals(expectedEvent, actualEvent); assertNewObjectCreation(expectedEvent, dbEvents.get(0)); } - + @Test(expected = IllegalArgumentException.class) public void shouldThrowExceptionIfAnEventAlreadyExistWithSameIdentifier() { Event expectedEvent = getEvent(); @@ -288,12 +300,12 @@ public void shouldThrowExceptionIfAnEventAlreadyExistWithSameIdentifier() { Map identifiers = new HashMap<>(identifier); identifiers.put(IDENTIFIER_TYPE, "invalidValue"); invalidEvent.setIdentifiers(identifiers); - + addObjectToRepository(asList(expectedEvent, expectedEvent2, invalidEvent), allEvents); - + eventService.addEvent(expectedEvent); } - + @Test(expected = IllegalArgumentException.class) public void shouldThrowExceptionIfAnEventAlreadyExistWithSameBaseEntityIdAndFormSumbissionId() { Event expectedEvent = getEvent(); @@ -301,12 +313,12 @@ public void shouldThrowExceptionIfAnEventAlreadyExistWithSameBaseEntityIdAndForm Map identifiers = new HashMap<>(identifier); identifiers.put(IDENTIFIER_TYPE, "invalidValue"); invalidEvent.setIdentifiers(identifiers); - + addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - + eventService.addEvent(expectedEvent); } - + @Test(expected = IllegalArgumentException.class) public void shouldThrowExceptionIfNullFormSubmissionId() { Event expectedEvent = getEvent(); @@ -314,39 +326,39 @@ public void shouldThrowExceptionIfNullFormSubmissionId() { Map identifiers = new HashMap<>(identifier); identifiers.put(IDENTIFIER_TYPE, "invalidValue"); invalidEvent.setIdentifiers(identifiers); - + addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - + expectedEvent.setFormSubmissionId(null); eventService.addEvent(expectedEvent); } - + @Test public void shouldAddEventWithCouchDbConnector() throws IOException { Event expectedEvent = getEvent(); - - Event actualEvent = eventService.addEvent(getCouchDbConnector("opensrp"), expectedEvent); - + + Event actualEvent = allEvents.addEvent(getCouchDbConnector("opensrp"), expectedEvent); + List dbEvents = allEvents.getAll(); assertEquals(1, dbEvents.size()); assertEquals(expectedEvent, actualEvent); assertNewObjectCreation(expectedEvent, dbEvents.get(0)); } - + @Test(expected = IllegalStateException.class) public void shouldThrowExceptionIfAnEventAlreadyExistWithSameBaseEntityIdAndFormSumbissionIdWithCouchDbConector() - throws IOException { + throws IOException { Event expectedEvent = getEvent(); Event invalidEvent = getEvent(); Map identifiers = new HashMap<>(identifier); identifiers.put(IDENTIFIER_TYPE, "invalidValue"); invalidEvent.setIdentifiers(identifiers); - + addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - - eventService.addEvent(getCouchDbConnector("opensrp"), expectedEvent); + + allEvents.addEvent(getCouchDbConnector("opensrp"), expectedEvent); } - + @Test(expected = IllegalArgumentException.class) public void shouldThrowExceptionIfNullFormSubmissionIdWithCouchDbConnector() throws IOException { Event expectedEvent = getEvent(); @@ -354,72 +366,72 @@ public void shouldThrowExceptionIfNullFormSubmissionIdWithCouchDbConnector() thr Map identifiers = new HashMap<>(identifier); identifiers.put(IDENTIFIER_TYPE, "invalidValue"); invalidEvent.setIdentifiers(identifiers); - + addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - + expectedEvent.setFormSubmissionId(null); - eventService.addEvent(getCouchDbConnector("opensrrp"), expectedEvent); + allEvents.addEvent(getCouchDbConnector("opensrrp"), expectedEvent); } - + @Test public void shouldAddIfNewEntityInAddOrUpdate() { Event expectedEvent = getEvent(); - + Event actualEvent = eventService.addorUpdateEvent(expectedEvent); - + List dbEvents = eventService.getAll(); assertEquals(1, dbEvents.size()); assertEquals(expectedEvent, actualEvent); - + assertNewObjectCreation(expectedEvent, dbEvents.get(0)); } - + @Test public void shouldUpdateIfExistingEntityInAddOrUpdate() { addObjectToRepository(Collections.singletonList(getEvent()), allEvents); Event expectedEvent = allEvents.getAll().get(0); - + Event actualEvent = eventService.addorUpdateEvent(expectedEvent); - + List dbEvents = eventService.getAll(); assertEquals(1, dbEvents.size()); assertEquals(expectedEvent, actualEvent); - + dbEvents.get(0).setServerVersion(null); assertObjectUpdate(expectedEvent, dbEvents.get(0)); } - + @Test public void shouldUpdateEvent() { addObjectToRepository(Collections.singletonList(getEvent()), allEvents); Event expectedEvent = allEvents.getAll().get(0); - + eventService.updateEvent(expectedEvent); - + List dbEvents = eventService.getAll(); assertEquals(1, dbEvents.size()); assertObjectUpdate(expectedEvent, dbEvents.get(0)); } - + @Test(expected = IllegalArgumentException.class) public void shouldThrowExceptionIfNewEventInUpdate() { Event event = getEvent(); - + eventService.updateEvent(event); } - + @Test public void shouldFindBySeverVersion() { addObjectToRepository(Collections.singletonList(getEvent()), allEvents); - + Event expectedEvent = allEvents.getAll().get(0); - + List actualEvents = allEvents.findByServerVersion(expectedEvent.getServerVersion() - 1); - + assertEquals(1, actualEvents.size()); assertEquals(expectedEvent, actualEvents.get(0)); } - + @Test public void shouldGeAllEvents() { Event expectedEvent = getEvent(); @@ -429,40 +441,40 @@ public void shouldGeAllEvents() { identifiers.put(IDENTIFIER_TYPE, "invalidValue"); expectedEvent2.setIdentifiers(identifiers); List expectedEvents = asList(expectedEvent, expectedEvent2); - + addObjectToRepository(expectedEvents, allEvents); - + List actualEvents = eventService.getAll(); - + assertTwoListAreSameIgnoringOrder(expectedEvents, actualEvents); } - + @Test public void shouldFindByObsFieldCodeKeyAndValue() { Event expectedEvent = getEvent(); - + addObjectToRepository(Collections.singletonList(expectedEvent), allEvents); - + List actualEvents = eventService.findEventsByConceptAndValue(FIELD_CODE, VALUE); - + assertEquals(1, actualEvents.size()); assertEquals(expectedEvent, actualEvents.get(0)); } - + @Test public void shouldFindByBaseEntityAndEventType() { Event expectedEvent = getEvent(); Event invalidEvent = getEvent(); invalidEvent.setEventType("diff"); - + addObjectToRepository(asList(expectedEvent, invalidEvent), allEvents); - + List actualEvents = eventService.findByBaseEntityAndType(BASE_ENTITY_ID, EVENT_TYPE); - + assertEquals(1, actualEvents.size()); assertEquals(expectedEvent, actualEvents.get(0)); } - + @Test public void shouldProcessOutOfArea() { Client client = getClient(); @@ -472,30 +484,30 @@ public void shouldProcessOutOfArea() { existingEvent.setBaseEntityId(client.getBaseEntityId()); existingEvent.setEventType("Birth Registration"); addObjectToRepository(Collections.singletonList(existingEvent), allEvents); - + //For null baseEntityId Event expectedEvent = getEvent(); expectedEvent.setBaseEntityId(null); expectedEvent.addIdentifier(ZEIR_ID.toUpperCase(), "zeirId"); Event actualEvent = eventService.processOutOfArea(expectedEvent); - + assertNull(actualEvent.getIdentifier(ZEIR_ID.toUpperCase())); assertEquals(BASE_ENTITY_ID, actualEvent.getBaseEntityId()); assertEquals(PROVIDER_ID, actualEvent.getDetails().get("out_of_catchment_provider_id")); assertEquals(expectedEvent, actualEvent); - + //For empty baseEntityId expectedEvent = getEvent(); expectedEvent.setBaseEntityId(""); expectedEvent.addIdentifier(ZEIR_ID.toUpperCase(), "zeirId"); actualEvent = eventService.processOutOfArea(expectedEvent); - + assertNull(actualEvent.getIdentifier(ZEIR_ID.toUpperCase())); assertEquals(BASE_ENTITY_ID, actualEvent.getBaseEntityId()); assertEquals(PROVIDER_ID, actualEvent.getDetails().get("out_of_catchment_provider_id")); assertEquals(expectedEvent, actualEvent); } - + @Test public void shouldNotProcessOutOfAreaIfEventHasBaseEntityId() { Client client = getClient(); @@ -505,38 +517,38 @@ public void shouldNotProcessOutOfAreaIfEventHasBaseEntityId() { existingEvent.setBaseEntityId(client.getBaseEntityId()); existingEvent.setEventType("Birth Registration"); addObjectToRepository(Collections.singletonList(existingEvent), allEvents); - + Event expectedEvent = getEvent(); expectedEvent.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); expectedEvent.addIdentifier(ZEIR_ID.toUpperCase(), "zeirId"); - + Event actualEvent = eventService.processOutOfArea(expectedEvent); - + assertEquals("zeirId", actualEvent.getIdentifier(ZEIR_ID.toUpperCase())); assertEquals(DIFFERENT_BASE_ENTITY_ID, actualEvent.getBaseEntityId()); assertNull(actualEvent.getDetails().get("out_of_catchment_provider_id")); assertEquals(expectedEvent, actualEvent); } - + @Test public void shouldNotProcessOutAreaIfNoClientFound() { Event existingEvent = getEvent(); existingEvent.setBaseEntityId(BASE_ENTITY_ID); existingEvent.setEventType("Birth Registration"); addObjectToRepository(Collections.singletonList(existingEvent), allEvents); - + Event expectedEvent = getEvent(); expectedEvent.setBaseEntityId(null); expectedEvent.addIdentifier(ZEIR_ID.toUpperCase(), "zeirId"); - + Event actualEvent = eventService.processOutOfArea(expectedEvent); - + assertEquals("zeirId", actualEvent.getIdentifier(ZEIR_ID.toUpperCase())); assertNull(actualEvent.getBaseEntityId()); assertNull(actualEvent.getDetails().get("out_of_catchment_provider_id")); assertEquals(expectedEvent, actualEvent); } - + @Test public void shouldNotProcessOutOfAreaIfNoExistingBirthRegistrationEventFound() { Client client = getClient(); @@ -545,30 +557,30 @@ public void shouldNotProcessOutOfAreaIfNoExistingBirthRegistrationEventFound() { Event existingEvent = getEvent(); existingEvent.setBaseEntityId(client.getBaseEntityId()); addObjectToRepository(Collections.singletonList(existingEvent), allEvents); - + //For null baseEntityId Event expectedEvent = getEvent(); expectedEvent.setBaseEntityId(null); expectedEvent.addIdentifier(ZEIR_ID.toUpperCase(), "zeirId"); Event actualEvent = eventService.processOutOfArea(expectedEvent); - + assertEquals("zeirId", actualEvent.getIdentifier(ZEIR_ID.toUpperCase())); assertNull(actualEvent.getBaseEntityId()); assertNull(actualEvent.getDetails().get("out_of_catchment_provider_id")); assertEquals(expectedEvent, actualEvent); } - + @Test public void shouldMergeAndUpdateExistingEvent() { addObjectToRepository(Collections.singletonList(getEvent()), allEvents); Event updatedEvent = allEvents.getAll().get(0); - + updatedEvent.addIdentifier("Second_Identifier", DIFFERENT_BASE_ENTITY_ID); updatedEvent.addObs(getObs().withComments("comments").withFieldCode(DIFFERENT_BASE_ENTITY_ID)); - + Event actualEvent = eventService.mergeEvent(updatedEvent); List dbEvents = allEvents.getAll(); - + DateTime updatedEventDate = updatedEvent.getEventDate(); updatedEvent.setEventDate(null); actualEvent.setEventDate(null); @@ -578,11 +590,11 @@ public void shouldMergeAndUpdateExistingEvent() { updatedEvent.setEventDate(updatedEventDate); assertObjectUpdate(updatedEvent, dbEvents.get(0)); } - + @Test(expected = IllegalArgumentException.class) public void shouldThrowExceptionIfExistingClientNotFound() { Event updatedEvent = getEvent(); - + eventService.mergeEvent(updatedEvent); } } diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/LocationServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/LocationServiceTest.java index 102e410cf0..924d07fe38 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/it/LocationServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/it/LocationServiceTest.java @@ -1,24 +1,24 @@ package org.opensrp.service.it; +import static org.junit.Assert.assertEquals; +import static org.opensrp.util.SampleFullDomainObject.getApiLocation; +import static org.opensrp.util.SampleFullDomainObject.getDomainLocation; +import static org.utils.AssertionUtil.assertTwoDifferentTypeLocationSame; +import static org.utils.CouchDbAccessUtils.addObjectToRepository; + +import java.util.Collections; +import java.util.List; + import org.junit.After; import org.junit.Before; import org.junit.Ignore; import org.junit.Test; import org.opensrp.BaseIntegrationTest; import org.opensrp.domain.Location; -import org.opensrp.repository.AllLocations; +import org.opensrp.repository.couch.AllLocations; import org.opensrp.service.LocationService; import org.springframework.beans.factory.annotation.Autowired; -import java.util.Collections; -import java.util.List; - -import static org.junit.Assert.assertEquals; -import static org.opensrp.util.SampleFullDomainObject.getApiLocation; -import static org.opensrp.util.SampleFullDomainObject.getDomainLocation; -import static org.utils.AssertionUtil.assertTwoDifferentTypeLocationSame; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - public class LocationServiceTest extends BaseIntegrationTest { @Autowired diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/MultimediaServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/MultimediaServiceTest.java index 622190b17c..e747d70ed0 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/it/MultimediaServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/it/MultimediaServiceTest.java @@ -1,37 +1,44 @@ package org.opensrp.service.it; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; +import static org.mockito.Mockito.mock; +import static org.mockito.Mockito.times; +import static org.mockito.Mockito.verify; +import static org.mockito.Mockito.when; +import static org.opensrp.util.SampleFullDomainObject.CASE_ID; +import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.PROVIDER_ID; +import static org.opensrp.util.SampleFullDomainObject.getMultimedia; +import static org.opensrp.util.SampleFullDomainObject.getMultimediaDTO; +import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; +import static org.utils.CouchDbAccessUtils.addObjectToRepository; + +import java.io.File; +import java.io.IOException; +import java.util.List; + import org.junit.After; import org.junit.Before; import org.junit.Test; import org.opensrp.BaseIntegrationTest; import org.opensrp.domain.Multimedia; import org.opensrp.dto.form.MultimediaDTO; -import org.opensrp.repository.MultimediaRepository; +import org.opensrp.repository.couch.MultimediaRepositoryImpl; import org.opensrp.service.MultimediaService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.web.multipart.MultipartFile; -import java.io.File; -import java.io.IOException; -import java.util.List; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; -import static org.mockito.Mockito.*; -import static org.opensrp.util.SampleFullDomainObject.*; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - /** * If tests fail check property `'multimedia.directory.name` in `opensrp.properties`. */ public class MultimediaServiceTest extends BaseIntegrationTest { @Autowired - private MultimediaRepository multimediaRepository; + private MultimediaRepositoryImpl multimediaRepository; @Autowired private MultimediaService multimediaService; diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/ProviderServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/ProviderServiceTest.java index decb410dba..0402769b9b 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/it/ProviderServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/it/ProviderServiceTest.java @@ -1,17 +1,5 @@ package org.opensrp.service.it; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.Provider; -import org.opensrp.repository.AllProviders; -import org.opensrp.service.ProviderService; -import org.springframework.beans.factory.annotation.Autowired; - -import java.util.Collections; -import java.util.List; - import static java.util.Arrays.asList; import static org.junit.Assert.assertEquals; import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; @@ -20,6 +8,18 @@ import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; import static org.utils.CouchDbAccessUtils.addObjectToRepository; +import java.util.Collections; +import java.util.List; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.opensrp.BaseIntegrationTest; +import org.opensrp.domain.Provider; +import org.opensrp.repository.couch.AllProviders; +import org.opensrp.service.ProviderService; +import org.springframework.beans.factory.annotation.Autowired; + public class ProviderServiceTest extends BaseIntegrationTest { @Autowired diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/ReportServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/ReportServiceTest.java index 7b9d948ef5..6896a1cc77 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/it/ReportServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/it/ReportServiceTest.java @@ -1,25 +1,35 @@ package org.opensrp.service.it; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.FORM_SUBMISSION_ID; +import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_TYPE; +import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_VALUE; +import static org.opensrp.util.SampleFullDomainObject.getReport; +import static org.opensrp.util.SampleFullDomainObject.identifier; +import static org.utils.AssertionUtil.assertNewObjectCreation; +import static org.utils.AssertionUtil.assertObjectUpdate; +import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; +import static org.utils.CouchDbAccessUtils.addObjectToRepository; + +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.junit.After; import org.junit.Before; import org.junit.Test; import org.opensrp.BaseIntegrationTest; import org.opensrp.domain.Report; -import org.opensrp.repository.AllReports; +import org.opensrp.repository.couch.AllReports; import org.opensrp.service.ReportService; import org.springframework.beans.factory.annotation.Autowired; -import java.util.Collections; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static java.util.Arrays.asList; -import static org.junit.Assert.*; -import static org.opensrp.util.SampleFullDomainObject.*; -import static org.utils.AssertionUtil.*; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - public class ReportServiceTest extends BaseIntegrationTest { @Autowired diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/SearchServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/SearchServiceTest.java index c7c7a15189..b9c0e9c19a 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/it/SearchServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/it/SearchServiceTest.java @@ -1,5 +1,24 @@ package org.opensrp.service.it; +import static java.util.Arrays.asList; +import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.ATTRIBUTES_TYPE; +import static org.opensrp.util.SampleFullDomainObject.ATTRIBUTES_VALUE; +import static org.opensrp.util.SampleFullDomainObject.EPOCH_DATE_TIME; +import static org.opensrp.util.SampleFullDomainObject.FEMALE; +import static org.opensrp.util.SampleFullDomainObject.FIRST_NAME; +import static org.opensrp.util.SampleFullDomainObject.LAST_NAME; +import static org.opensrp.util.SampleFullDomainObject.MIDDLE_NAME; +import static org.opensrp.util.SampleFullDomainObject.attributes; +import static org.opensrp.util.SampleFullDomainObject.getAddress; +import static org.opensrp.util.SampleFullDomainObject.identifier; +import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; +import static org.utils.CouchDbAccessUtils.addObjectToRepository; + +import java.util.HashMap; +import java.util.List; +import java.util.Map; + import org.joda.time.DateTime; import org.joda.time.DateTimeZone; import org.junit.After; @@ -7,21 +26,10 @@ import org.junit.Test; import org.opensrp.BaseIntegrationTest; import org.opensrp.domain.Client; -import org.opensrp.repository.AllClients; +import org.opensrp.repository.couch.AllClients; import org.opensrp.service.SearchService; import org.springframework.beans.factory.annotation.Autowired; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import static java.util.Arrays.asList; -import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; -import static org.opensrp.util.SampleFullDomainObject.*; -import static org.opensrp.util.SampleFullDomainObject.EPOCH_DATE_TIME; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - public class SearchServiceTest extends BaseIntegrationTest { @Autowired diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/UserServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/UserServiceTest.java index acabf09adb..e5562971c5 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/it/UserServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/it/UserServiceTest.java @@ -1,17 +1,5 @@ package org.opensrp.service.it; -import org.junit.After; -import org.junit.Before; -import org.junit.Test; -import org.opensrp.BaseIntegrationTest; -import org.opensrp.domain.User; -import org.opensrp.repository.AllUsers; -import org.opensrp.service.UserService; -import org.springframework.beans.factory.annotation.Autowired; - -import java.util.Collections; -import java.util.List; - import static java.util.Arrays.asList; import static org.junit.Assert.assertEquals; import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; @@ -20,6 +8,18 @@ import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; import static org.utils.CouchDbAccessUtils.addObjectToRepository; +import java.util.Collections; +import java.util.List; + +import org.junit.After; +import org.junit.Before; +import org.junit.Test; +import org.opensrp.BaseIntegrationTest; +import org.opensrp.domain.User; +import org.opensrp.repository.couch.AllUsers; +import org.opensrp.service.UserService; +import org.springframework.beans.factory.annotation.Autowired; + public class UserServiceTest extends BaseIntegrationTest { @Autowired diff --git a/opensrp-core/src/test/java/org/opensrp/util/SampleFullDomainObject.java b/opensrp-core/src/test/java/org/opensrp/util/SampleFullDomainObject.java index 166e772288..08be0e9de3 100644 --- a/opensrp-core/src/test/java/org/opensrp/util/SampleFullDomainObject.java +++ b/opensrp-core/src/test/java/org/opensrp/util/SampleFullDomainObject.java @@ -1,24 +1,31 @@ package org.opensrp.util; -import com.sun.org.apache.regexp.internal.RE; +import static java.util.Arrays.asList; + +import java.util.Collections; +import java.util.HashMap; +import java.util.HashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; + import org.joda.time.DateTime; import org.joda.time.DateTimeZone; -import org.opensrp.api.domain.*; -import org.opensrp.domain.*; import org.opensrp.domain.Address; +import org.opensrp.domain.AppStateToken; import org.opensrp.domain.BaseEntity; import org.opensrp.domain.Client; +import org.opensrp.domain.ErrorTrace; import org.opensrp.domain.Event; +import org.opensrp.domain.Hia2Indicator; import org.opensrp.domain.Location; +import org.opensrp.domain.Multimedia; import org.opensrp.domain.Obs; import org.opensrp.domain.Provider; +import org.opensrp.domain.Report; import org.opensrp.domain.User; import org.opensrp.dto.form.MultimediaDTO; -import java.util.*; - -import static java.util.Arrays.asList; - public class SampleFullDomainObject { //*** ADDRESS RELATED diff --git a/opensrp-interface/src/test/java/org.opensrp.dto/ActionTest.java b/opensrp-interface/src/test/java/org.opensrp.dto/ActionTest.java index 89a52f498d..d0da559def 100644 --- a/opensrp-interface/src/test/java/org.opensrp.dto/ActionTest.java +++ b/opensrp-interface/src/test/java/org.opensrp.dto/ActionTest.java @@ -1,17 +1,17 @@ package org.opensrp.dto; -import nl.jqno.equalsverifier.EqualsVerifier; -import nl.jqno.equalsverifier.Warning; -import org.junit.Test; -import org.opensrp.dto.register.PNCVisitDTO; -import org.opensrp.dto.utils.PojoTestUtils; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import java.util.HashMap; import java.util.Map; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import org.junit.Test; +import org.opensrp.dto.utils.PojoTestUtils; + +import nl.jqno.equalsverifier.EqualsVerifier; +import nl.jqno.equalsverifier.Warning; public class ActionTest { @Test diff --git a/opensrp-interface/src/test/java/org.opensrp.dto/register/ANCRegisterDTOTest.java b/opensrp-interface/src/test/java/org.opensrp.dto/register/ANCRegisterDTOTest.java index 7dc9168f62..7670484efc 100644 --- a/opensrp-interface/src/test/java/org.opensrp.dto/register/ANCRegisterDTOTest.java +++ b/opensrp-interface/src/test/java/org.opensrp.dto/register/ANCRegisterDTOTest.java @@ -1,14 +1,15 @@ package org.opensrp.dto.register; -import nl.jqno.equalsverifier.EqualsVerifier; -import nl.jqno.equalsverifier.Warning; -import org.junit.Test; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertTrue; import java.util.ArrayList; import java.util.List; -import static org.junit.Assert.assertFalse; -import static org.junit.Assert.assertTrue; +import org.junit.Test; + +import nl.jqno.equalsverifier.EqualsVerifier; +import nl.jqno.equalsverifier.Warning; /** * Created by real on 13/07/17. diff --git a/opensrp-register/src/main/java/org/opensrp/register/service/handler/VaccinesScheduleHandler.java b/opensrp-register/src/main/java/org/opensrp/register/service/handler/VaccinesScheduleHandler.java index 9c7b42d954..7dfa2e1df5 100644 --- a/opensrp-register/src/main/java/org/opensrp/register/service/handler/VaccinesScheduleHandler.java +++ b/opensrp-register/src/main/java/org/opensrp/register/service/handler/VaccinesScheduleHandler.java @@ -12,7 +12,7 @@ import org.motechproject.scheduletracking.api.domain.Enrollment; import org.opensrp.domain.Event; import org.opensrp.domain.Obs; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.couch.AllEvents; import org.opensrp.scheduler.HealthSchedulerService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; diff --git a/opensrp-register/src/test/java/org/opensrp/register/service/handler/ANCScheduleHandlerTest.java b/opensrp-register/src/test/java/org/opensrp/register/service/handler/ANCScheduleHandlerTest.java index c0eb38a021..7239272bdc 100644 --- a/opensrp-register/src/test/java/org/opensrp/register/service/handler/ANCScheduleHandlerTest.java +++ b/opensrp-register/src/test/java/org/opensrp/register/service/handler/ANCScheduleHandlerTest.java @@ -28,7 +28,7 @@ import org.opensrp.domain.Obs; import org.opensrp.register.service.handler.BaseScheduleHandler.ActionType; import org.opensrp.register.service.scheduling.AnteNatalCareSchedulesService; -import org.opensrp.repository.AllClients; +import org.opensrp.repository.couch.AllClients; import org.opensrp.scheduler.HealthSchedulerService; import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; diff --git a/opensrp-register/src/test/java/org/opensrp/register/service/handler/BNFScheduleHandlerTest.java b/opensrp-register/src/test/java/org/opensrp/register/service/handler/BNFScheduleHandlerTest.java index 84833103bc..890fb8ad07 100644 --- a/opensrp-register/src/test/java/org/opensrp/register/service/handler/BNFScheduleHandlerTest.java +++ b/opensrp-register/src/test/java/org/opensrp/register/service/handler/BNFScheduleHandlerTest.java @@ -29,7 +29,7 @@ import org.opensrp.register.service.handler.BaseScheduleHandler.ActionType; import org.opensrp.register.service.scheduling.AnteNatalCareSchedulesService; import org.opensrp.register.service.scheduling.BNFSchedulesService; -import org.opensrp.repository.AllClients; +import org.opensrp.repository.couch.AllClients; import org.opensrp.scheduler.HealthSchedulerService; import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.core.classloader.annotations.PrepareForTest; diff --git a/opensrp-register/src/test/java/org/opensrp/register/service/handler/BaseScheduleHandlerTest.java b/opensrp-register/src/test/java/org/opensrp/register/service/handler/BaseScheduleHandlerTest.java index 4a7cbf5e4e..9dceecb9e3 100644 --- a/opensrp-register/src/test/java/org/opensrp/register/service/handler/BaseScheduleHandlerTest.java +++ b/opensrp-register/src/test/java/org/opensrp/register/service/handler/BaseScheduleHandlerTest.java @@ -32,7 +32,7 @@ import org.opensrp.domain.Client; import org.opensrp.domain.Event; import org.opensrp.register.service.handler.BaseScheduleHandler.ActionType; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.couch.AllEvents; import org.opensrp.scheduler.HealthSchedulerService; import org.opensrp.service.ClientService; import org.powermock.modules.junit4.PowerMockRunner; diff --git a/opensrp-register/src/test/java/org/opensrp/register/service/handler/PNCScheduleHandlerTest.java b/opensrp-register/src/test/java/org/opensrp/register/service/handler/PNCScheduleHandlerTest.java index 477341d596..ece4ee44f1 100644 --- a/opensrp-register/src/test/java/org/opensrp/register/service/handler/PNCScheduleHandlerTest.java +++ b/opensrp-register/src/test/java/org/opensrp/register/service/handler/PNCScheduleHandlerTest.java @@ -31,7 +31,7 @@ import org.opensrp.register.service.handler.BaseScheduleHandler.ActionType; import org.opensrp.register.service.scheduling.AnteNatalCareSchedulesService; import org.opensrp.register.service.scheduling.PNCSchedulesService; -import org.opensrp.repository.AllClients; +import org.opensrp.repository.couch.AllClients; import org.opensrp.scheduler.HealthSchedulerService; import org.opensrp.scheduler.service.ScheduleService; import org.powermock.core.classloader.annotations.PowerMockIgnore; diff --git a/opensrp-register/src/test/java/org/opensrp/register/service/handler/VaccinesScheduleHandlerTest.java b/opensrp-register/src/test/java/org/opensrp/register/service/handler/VaccinesScheduleHandlerTest.java index 3e3566ee1c..7e0105d0e9 100644 --- a/opensrp-register/src/test/java/org/opensrp/register/service/handler/VaccinesScheduleHandlerTest.java +++ b/opensrp-register/src/test/java/org/opensrp/register/service/handler/VaccinesScheduleHandlerTest.java @@ -31,7 +31,7 @@ import org.opensrp.common.util.TestLoggerAppender; import org.opensrp.domain.Event; import org.opensrp.register.service.handler.BaseScheduleHandler.ActionType; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.couch.AllEvents; import org.opensrp.scheduler.HealthSchedulerService; import org.powermock.modules.junit4.PowerMockRunner; diff --git a/opensrp-web/src/main/java/org/opensrp/web/controller/ActionController.java b/opensrp-web/src/main/java/org/opensrp/web/controller/ActionController.java index 0531d5b37e..fe7e49f2d2 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/controller/ActionController.java +++ b/opensrp-web/src/main/java/org/opensrp/web/controller/ActionController.java @@ -16,7 +16,7 @@ import org.opensrp.common.AllConstants.BaseEntity; import org.opensrp.domain.Client; import org.opensrp.dto.Action; -import org.opensrp.repository.AllClients; +import org.opensrp.repository.couch.AllClients; import org.opensrp.scheduler.Alert; import org.opensrp.scheduler.repository.AllAlerts; import org.opensrp.scheduler.service.ActionService; diff --git a/opensrp-web/src/main/java/org/opensrp/web/controller/DHIS2Controller.java b/opensrp-web/src/main/java/org/opensrp/web/controller/DHIS2Controller.java index 68a58075f4..e5fcf9b066 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/controller/DHIS2Controller.java +++ b/opensrp-web/src/main/java/org/opensrp/web/controller/DHIS2Controller.java @@ -6,7 +6,7 @@ import org.json.JSONObject; import org.opensrp.connector.dhis2.DHIS2AggregateConnector; import org.opensrp.domain.Event; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.couch.AllEvents; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; diff --git a/opensrp-web/src/test/java/org/opensrp/web/controller/it/ActionControllerTest.java b/opensrp-web/src/test/java/org/opensrp/web/controller/it/ActionControllerTest.java index 8c50469501..7437ac6b34 100644 --- a/opensrp-web/src/test/java/org/opensrp/web/controller/it/ActionControllerTest.java +++ b/opensrp-web/src/test/java/org/opensrp/web/controller/it/ActionControllerTest.java @@ -1,5 +1,17 @@ package org.opensrp.web.controller.it; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.opensrp.dto.AlertStatus.normal; +import static org.opensrp.dto.BeneficiaryType.mother; +import static org.opensrp.web.rest.it.ResourceTestUtility.createActions; +import static org.opensrp.web.rest.it.ResourceTestUtility.createAlerts; +import static org.opensrp.web.rest.it.ResourceTestUtility.createClients; +import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; + +import java.util.HashMap; +import java.util.Map; + import org.codehaus.jackson.JsonNode; import org.codehaus.jackson.node.ObjectNode; import org.joda.time.DateTime; @@ -10,7 +22,7 @@ import org.opensrp.domain.Client; import org.opensrp.dto.ActionData; import org.opensrp.dto.AlertStatus; -import org.opensrp.repository.AllClients; +import org.opensrp.repository.couch.AllClients; import org.opensrp.scheduler.Action; import org.opensrp.scheduler.Alert; import org.opensrp.scheduler.repository.AllActions; @@ -19,16 +31,6 @@ import org.opensrp.web.rest.it.BaseResourceTest; import org.springframework.beans.factory.annotation.Autowired; -import java.util.HashMap; -import java.util.Map; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.opensrp.dto.AlertStatus.normal; -import static org.opensrp.dto.BeneficiaryType.mother; -import static org.opensrp.web.rest.it.ResourceTestUtility.*; -import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; - public class ActionControllerTest extends BaseResourceTest { @Autowired diff --git a/opensrp-web/src/test/java/org/opensrp/web/controller/it/ErrorTraceControllerIntegrationTest.java b/opensrp-web/src/test/java/org/opensrp/web/controller/it/ErrorTraceControllerIntegrationTest.java index 16df3f1614..5cc3504fb6 100644 --- a/opensrp-web/src/test/java/org/opensrp/web/controller/it/ErrorTraceControllerIntegrationTest.java +++ b/opensrp-web/src/test/java/org/opensrp/web/controller/it/ErrorTraceControllerIntegrationTest.java @@ -1,5 +1,14 @@ package org.opensrp.web.controller.it; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.motechproject.delivery.schedule.util.SameItems.hasSameItemsAs; +import static org.opensrp.web.rest.it.ResourceTestUtility.createErrorTraces; +import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; + +import java.util.List; +import java.util.Map; + import org.codehaus.jackson.JsonNode; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; @@ -9,22 +18,11 @@ import org.junit.Test; import org.opensrp.domain.ErrorTrace; import org.opensrp.domain.ErrorTraceForm; -import org.opensrp.repository.AllErrorTrace; +import org.opensrp.repository.couch.AllErrorTrace; import org.opensrp.web.rest.it.BaseResourceTest; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.servlet.ModelAndView; -import java.util.ArrayList; -import java.util.List; -import java.util.Map; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.motechproject.delivery.schedule.util.SameItems.hasSameItemsAs; -import static org.opensrp.web.rest.it.ResourceTestUtility.createErrorTraces; -import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; - public class ErrorTraceControllerIntegrationTest extends BaseResourceTest { private final static String BASE_URL = "/errorhandler"; diff --git a/opensrp-web/src/test/java/org/opensrp/web/controller/it/FormSubmissionIntegrationTest.java b/opensrp-web/src/test/java/org/opensrp/web/controller/it/FormSubmissionIntegrationTest.java index 5051c5b965..56ea43039d 100644 --- a/opensrp-web/src/test/java/org/opensrp/web/controller/it/FormSubmissionIntegrationTest.java +++ b/opensrp-web/src/test/java/org/opensrp/web/controller/it/FormSubmissionIntegrationTest.java @@ -1,5 +1,14 @@ package org.opensrp.web.controller.it; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; + +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.concurrent.TimeUnit; + import org.codehaus.jackson.JsonNode; import org.junit.After; import org.junit.Before; @@ -10,27 +19,18 @@ import org.opensrp.form.domain.FormSubmission; import org.opensrp.form.repository.AllFormSubmissions; import org.opensrp.form.service.FormSubmissionConverter; -import org.opensrp.repository.MultimediaRepository; +import org.opensrp.repository.couch.MultimediaRepositoryImpl; import org.opensrp.web.rest.it.BaseResourceTest; import org.opensrp.web.utils.TestResourceLoader; import org.springframework.beans.factory.annotation.Autowired; -import java.io.IOException; -import java.util.ArrayList; -import java.util.List; -import java.util.concurrent.TimeUnit; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; - public class FormSubmissionIntegrationTest extends BaseResourceTest { @Autowired private AllFormSubmissions allFormSubmissions; @Autowired - private MultimediaRepository multimediaRepository; + private MultimediaRepositoryImpl multimediaRepository; private TestResourceLoader testResourceLoader; diff --git a/opensrp-web/src/test/java/org/opensrp/web/it/AtomFeedIntegrationTest.java b/opensrp-web/src/test/java/org/opensrp/web/it/AtomFeedIntegrationTest.java index 2ebd84fb58..b598ce04cb 100644 --- a/opensrp-web/src/test/java/org/opensrp/web/it/AtomFeedIntegrationTest.java +++ b/opensrp-web/src/test/java/org/opensrp/web/it/AtomFeedIntegrationTest.java @@ -36,8 +36,8 @@ import org.opensrp.connector.openmrs.PatientAtomfeed; import org.opensrp.connector.openmrs.constants.OpenmrsConstants; import org.opensrp.connector.openmrs.service.EncounterService; -import org.opensrp.repository.AllClients; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.couch.AllClients; +import org.opensrp.repository.couch.AllEvents; import org.opensrp.service.ClientService; import org.opensrp.service.EventService; import org.opensrp.web.utils.TestResourceLoader; diff --git a/opensrp-web/src/test/java/org/opensrp/web/it/listener/ClientListenerTest.java b/opensrp-web/src/test/java/org/opensrp/web/it/listener/ClientListenerTest.java index 9aa8ea67b9..6ab0a37246 100644 --- a/opensrp-web/src/test/java/org/opensrp/web/it/listener/ClientListenerTest.java +++ b/opensrp-web/src/test/java/org/opensrp/web/it/listener/ClientListenerTest.java @@ -15,7 +15,7 @@ import org.junit.runner.RunWith; import org.opensrp.domain.Camp; import org.opensrp.repository.AllCamp; -import org.opensrp.repository.AllClients; +import org.opensrp.repository.couch.AllClients; import org.opensrp.scheduler.repository.AllActions; import org.opensrp.web.listener.RapidproMessageListener; import org.springframework.beans.factory.annotation.Autowired; diff --git a/opensrp-web/src/test/java/org/opensrp/web/rest/it/ClientResourceTest.java b/opensrp-web/src/test/java/org/opensrp/web/rest/it/ClientResourceTest.java index a93cf06872..57825c5e38 100644 --- a/opensrp-web/src/test/java/org/opensrp/web/rest/it/ClientResourceTest.java +++ b/opensrp-web/src/test/java/org/opensrp/web/rest/it/ClientResourceTest.java @@ -1,38 +1,33 @@ package org.opensrp.web.rest.it; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotSame; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; +import static org.opensrp.common.AllConstants.Client.BIRTH_DATE; +import static org.opensrp.common.AllConstants.Client.FIRST_NAME; +import static org.opensrp.common.AllConstants.Client.GENDER; +import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; + +import java.util.Collections; +import java.util.List; + import org.codehaus.jackson.JsonNode; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; -import org.json.JSONArray; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.opensrp.domain.Address; import org.opensrp.domain.Client; -import org.opensrp.repository.AllClients; +import org.opensrp.repository.couch.AllClients; import org.opensrp.service.ClientService; import org.opensrp.web.rest.ClientResource; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -import org.springframework.test.web.server.MvcResult; -import org.springframework.test.web.server.setup.MockMvcBuilders; import org.springframework.web.util.NestedServletException; -import java.util.Collections; -import java.util.List; - -import static java.util.Arrays.asList; -import static org.junit.Assert.*; -import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; -import static org.opensrp.common.AllConstants.Client.BIRTH_DATE; -import static org.opensrp.common.AllConstants.Client.FIRST_NAME; -import static org.opensrp.common.AllConstants.Client.GENDER; -import static org.opensrp.web.rest.it.ResourceTestUtility.createClients; -import static org.springframework.test.web.server.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.server.request.MockMvcRequestBuilders.post; -import static org.springframework.test.web.server.result.MockMvcResultHandlers.print; -import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; - public class ClientResourceTest extends BaseResourceTest { private final static String BASE_URL = "/rest/client/"; diff --git a/opensrp-web/src/test/java/org/opensrp/web/rest/it/EventResourceTest.java b/opensrp-web/src/test/java/org/opensrp/web/rest/it/EventResourceTest.java index 3a988c91d5..a428c5ea9d 100644 --- a/opensrp-web/src/test/java/org/opensrp/web/rest/it/EventResourceTest.java +++ b/opensrp-web/src/test/java/org/opensrp/web/rest/it/EventResourceTest.java @@ -1,5 +1,19 @@ package org.opensrp.web.rest.it; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotSame; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; +import static org.opensrp.common.AllConstants.Event.EVENT_TYPE; +import static org.opensrp.common.AllConstants.Event.PROVIDER_ID; +import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; + import org.codehaus.jackson.JsonNode; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; @@ -10,29 +24,13 @@ import org.opensrp.domain.Address; import org.opensrp.domain.Client; import org.opensrp.domain.Event; -import org.opensrp.repository.AllClients; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.couch.AllClients; +import org.opensrp.repository.couch.AllEvents; import org.opensrp.web.rest.EventResource; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -import org.springframework.test.web.server.MvcResult; import org.springframework.test.web.server.setup.MockMvcBuilders; import org.springframework.web.util.NestedServletException; -import java.util.ArrayList; -import java.util.Collections; -import java.util.List; - -import static java.util.Arrays.asList; -import static org.junit.Assert.*; -import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; -import static org.opensrp.common.AllConstants.Event.EVENT_TYPE; -import static org.opensrp.common.AllConstants.Event.PROVIDER_ID; -import static org.springframework.test.web.server.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.server.request.MockMvcRequestBuilders.post; -import static org.springframework.test.web.server.result.MockMvcResultHandlers.print; -import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; - public class EventResourceTest extends BaseResourceTest { String baseEntityId = "1"; diff --git a/opensrp-web/src/test/java/org/opensrp/web/rest/it/ProviderResourceTest.java b/opensrp-web/src/test/java/org/opensrp/web/rest/it/ProviderResourceTest.java index e734cf12c0..0a1d820e97 100644 --- a/opensrp-web/src/test/java/org/opensrp/web/rest/it/ProviderResourceTest.java +++ b/opensrp-web/src/test/java/org/opensrp/web/rest/it/ProviderResourceTest.java @@ -1,19 +1,19 @@ package org.opensrp.web.rest.it; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; +import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; + +import java.util.Map; + import org.codehaus.jackson.JsonNode; import org.junit.After; import org.junit.Before; import org.junit.Test; import org.opensrp.domain.User; -import org.opensrp.repository.AllUsers; +import org.opensrp.repository.couch.AllUsers; import org.springframework.beans.factory.annotation.Autowired; -import java.util.Map; - -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertTrue; -import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; - public class ProviderResourceTest extends BaseResourceTest { private final static String BASE_URL = "/rest/provider/"; diff --git a/opensrp-web/src/test/java/org/opensrp/web/rest/it/ReportResourceTest.java b/opensrp-web/src/test/java/org/opensrp/web/rest/it/ReportResourceTest.java index 383ec1cbc0..b748c7c537 100644 --- a/opensrp-web/src/test/java/org/opensrp/web/rest/it/ReportResourceTest.java +++ b/opensrp-web/src/test/java/org/opensrp/web/rest/it/ReportResourceTest.java @@ -1,19 +1,19 @@ package org.opensrp.web.rest.it; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; + +import java.util.List; + import org.junit.After; import org.junit.Before; import org.junit.Test; import org.opensrp.domain.Hia2Indicator; import org.opensrp.domain.Report; -import org.opensrp.repository.AllReports; +import org.opensrp.repository.couch.AllReports; import org.springframework.beans.factory.annotation.Autowired; -import java.util.List; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; - public class ReportResourceTest extends BaseResourceTest { public static final String ADD_URL = "add"; diff --git a/opensrp-web/src/test/java/org/opensrp/web/rest/it/ResourceTestUtility.java b/opensrp-web/src/test/java/org/opensrp/web/rest/it/ResourceTestUtility.java index 75d8cd2507..b63c3041d8 100644 --- a/opensrp-web/src/test/java/org/opensrp/web/rest/it/ResourceTestUtility.java +++ b/opensrp-web/src/test/java/org/opensrp/web/rest/it/ResourceTestUtility.java @@ -1,16 +1,16 @@ package org.opensrp.web.rest.it; +import java.util.List; + import org.opensrp.domain.Client; import org.opensrp.domain.ErrorTrace; -import org.opensrp.repository.AllClients; -import org.opensrp.repository.AllErrorTrace; +import org.opensrp.repository.couch.AllClients; +import org.opensrp.repository.couch.AllErrorTrace; import org.opensrp.scheduler.Action; import org.opensrp.scheduler.Alert; import org.opensrp.scheduler.repository.AllActions; import org.opensrp.scheduler.repository.AllAlerts; -import java.util.List; - public final class ResourceTestUtility { private ResourceTestUtility() { diff --git a/opensrp-web/src/test/java/org/opensrp/web/rest/it/SearchResourceTest.java b/opensrp-web/src/test/java/org/opensrp/web/rest/it/SearchResourceTest.java index 2640b2d12f..d173f5c19f 100644 --- a/opensrp-web/src/test/java/org/opensrp/web/rest/it/SearchResourceTest.java +++ b/opensrp-web/src/test/java/org/opensrp/web/rest/it/SearchResourceTest.java @@ -1,5 +1,10 @@ package org.opensrp.web.rest.it; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; + import org.codehaus.jackson.JsonNode; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; @@ -8,21 +13,10 @@ import org.junit.Test; import org.opensrp.domain.Address; import org.opensrp.domain.Client; -import org.opensrp.repository.AllClients; -import org.opensrp.repository.AllEvents; +import org.opensrp.repository.couch.AllClients; +import org.opensrp.repository.couch.AllEvents; import org.opensrp.web.rest.SearchResource; import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.http.MediaType; -import org.springframework.test.web.server.MvcResult; -import org.springframework.test.web.server.setup.MockMvcBuilders; - -import static java.util.Arrays.asList; -import static org.junit.Assert.assertEquals; -import static org.junit.Assert.assertNull; -import static org.opensrp.web.rest.it.ResourceTestUtility.createClients; -import static org.springframework.test.web.server.request.MockMvcRequestBuilders.get; -import static org.springframework.test.web.server.result.MockMvcResultHandlers.print; -import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; public class SearchResourceTest extends BaseResourceTest { diff --git a/opensrp-web/src/test/java/org/opensrp/web/rest/it/StockResourceTest.java b/opensrp-web/src/test/java/org/opensrp/web/rest/it/StockResourceTest.java index 74737cacd2..3581e7d5cb 100644 --- a/opensrp-web/src/test/java/org/opensrp/web/rest/it/StockResourceTest.java +++ b/opensrp-web/src/test/java/org/opensrp/web/rest/it/StockResourceTest.java @@ -1,6 +1,17 @@ package org.opensrp.web.rest.it; -import ch.lambdaj.function.convert.Converter; +import static ch.lambdaj.collection.LambdaCollections.with; +import static java.util.Arrays.asList; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.opensrp.common.AllConstants.Stock.PROVIDERID; +import static org.opensrp.common.AllConstants.Stock.TIMESTAMP; +import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; + +import java.util.Collections; +import java.util.List; + import org.codehaus.jackson.JsonNode; import org.joda.time.DateTime; import org.joda.time.DateTimeZone; @@ -9,20 +20,12 @@ import org.junit.Ignore; import org.junit.Test; import org.opensrp.domain.Stock; -import org.opensrp.repository.AllStocks; +import org.opensrp.repository.couch.AllStocks; import org.opensrp.web.rest.StockResource; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.web.util.NestedServletException; -import java.util.Collections; -import java.util.List; - -import static ch.lambdaj.collection.LambdaCollections.with; -import static java.util.Arrays.asList; -import static org.junit.Assert.*; -import static org.opensrp.common.AllConstants.Stock.PROVIDERID; -import static org.opensrp.common.AllConstants.Stock.TIMESTAMP; -import static org.springframework.test.web.server.result.MockMvcResultMatchers.status; +import ch.lambdaj.function.convert.Converter; /** * TODO: Solve bug at source {@link StockResource} and refactor like {@link EventResourceTest} diff --git a/opensrp-web/src/test/java/org/opensrp/web/security/DrishtiAuthenticationProviderTest.java b/opensrp-web/src/test/java/org/opensrp/web/security/DrishtiAuthenticationProviderTest.java index 50e06503e0..37592b21a3 100644 --- a/opensrp-web/src/test/java/org/opensrp/web/security/DrishtiAuthenticationProviderTest.java +++ b/opensrp-web/src/test/java/org/opensrp/web/security/DrishtiAuthenticationProviderTest.java @@ -2,7 +2,6 @@ import com.google.gson.Gson; -import org.opensrp.repository.AllUsers; import org.junit.Before; import org.junit.Ignore; import org.junit.Rule; @@ -24,6 +23,7 @@ import static org.mockito.Mockito.when; import static org.mockito.MockitoAnnotations.initMocks; +import org.opensrp.repository.couch.AllUsers; import org.opensrp.web.security.DrishtiAuthenticationProvider; public class DrishtiAuthenticationProviderTest { From 8d2b5ade12f68332353cc7a455f2903a6c390f6b Mon Sep 17 00:00:00 2001 From: Ephraim Muhia Date: Wed, 7 Mar 2018 19:00:02 +0300 Subject: [PATCH 002/133] Added mybatis migrations and mappers Signed-off-by: Ephraim Muhia --- assets/migrations/README | 38 + .../migrations/drivers/postgresql-42.2.1.jar | Bin 0 -> 794639 bytes .../environments/development.properties | 80 ++ .../migrations/generator/generatorConfig.xml | 26 + .../20180307073425_create_changelog.sql | 40 + .../20180307099840_create_core_schema.sql | 25 + .../20180307100840_create_client_table.sql | 33 + ...307115355_create_client_metadata_table.sql | 49 + .../20180307131329_create_event_table.sql | 33 + ...0307131558_create_event_metadata_table.sql | 56 + .../20180307145148_create_alert_table.sql | 33 + ...0307145358_create_alert_metadata_table.sql | 47 + .../20180307150054_create_report_table.sql | 33 + ...307150448_create_report_metadata_table.sql | 49 + .../20180307151459_create_stock_table.sql | 36 + ...0307151623_create_stock_metadata_table.sql | 44 + assets/migrations/scripts/bootstrap.sql | 52 + opensrp-core/pom.xml | 36 +- .../org/opensrp/domain/postgres/Alert.java | 69 + .../opensrp/domain/postgres/AlertExample.java | 422 ++++++ .../domain/postgres/AlertMetadata.java | 269 ++++ .../domain/postgres/AlertMetadataExample.java | 833 ++++++++++++ .../org/opensrp/domain/postgres/Client.java | 69 + .../domain/postgres/ClientExample.java | 422 ++++++ .../domain/postgres/ClientMetadata.java | 302 +++++ .../postgres/ClientMetadataExample.java | 930 ++++++++++++++ .../org/opensrp/domain/postgres/Event.java | 69 + .../opensrp/domain/postgres/EventExample.java | 422 ++++++ .../domain/postgres/EventMetadata.java | 401 ++++++ .../domain/postgres/EventMetadataExample.java | 1130 +++++++++++++++++ .../org/opensrp/domain/postgres/Report.java | 69 + .../domain/postgres/ReportExample.java | 422 ++++++ .../domain/postgres/ReportMetadata.java | 302 +++++ .../postgres/ReportMetadataExample.java | 903 +++++++++++++ .../org/opensrp/domain/postgres/Stock.java | 69 + .../opensrp/domain/postgres/StockExample.java | 422 ++++++ .../domain/postgres/StockMetadata.java | 236 ++++ .../domain/postgres/StockMetadataExample.java | 763 +++++++++++ .../postgres/mapper/AlertMapper.java | 96 ++ .../postgres/mapper/AlertMetadataMapper.java | 96 ++ .../postgres/mapper/ClientMapper.java | 96 ++ .../postgres/mapper/ClientMetadataMapper.java | 96 ++ .../postgres/mapper/EventMapper.java | 96 ++ .../postgres/mapper/EventMetadataMapper.java | 96 ++ .../postgres/mapper/ReportMapper.java | 96 ++ .../postgres/mapper/ReportMetadataMapper.java | 96 ++ .../postgres/mapper/StockMapper.java | 96 ++ .../postgres/mapper/StockMetadataMapper.java | 96 ++ .../postgres/mapper/xml/AlertMapper.xml | 239 ++++ .../mapper/xml/AlertMetadataMapper.xml | 333 +++++ .../postgres/mapper/xml/ClientMapper.xml | 239 ++++ .../mapper/xml/ClientMetadataMapper.xml | 351 +++++ .../postgres/mapper/xml/EventMapper.xml | 239 ++++ .../mapper/xml/EventMetadataMapper.xml | 398 ++++++ .../postgres/mapper/xml/ReportMapper.xml | 239 ++++ .../mapper/xml/ReportMetadataMapper.xml | 351 +++++ .../postgres/mapper/xml/StockMapper.xml | 239 ++++ .../mapper/xml/StockMetadataMapper.xml | 318 +++++ pom.xml | 56 + 59 files changed, 13180 insertions(+), 16 deletions(-) create mode 100644 assets/migrations/README create mode 100644 assets/migrations/drivers/postgresql-42.2.1.jar create mode 100644 assets/migrations/environments/development.properties create mode 100644 assets/migrations/generator/generatorConfig.xml create mode 100644 assets/migrations/scripts/20180307073425_create_changelog.sql create mode 100644 assets/migrations/scripts/20180307099840_create_core_schema.sql create mode 100644 assets/migrations/scripts/20180307100840_create_client_table.sql create mode 100644 assets/migrations/scripts/20180307115355_create_client_metadata_table.sql create mode 100644 assets/migrations/scripts/20180307131329_create_event_table.sql create mode 100644 assets/migrations/scripts/20180307131558_create_event_metadata_table.sql create mode 100644 assets/migrations/scripts/20180307145148_create_alert_table.sql create mode 100644 assets/migrations/scripts/20180307145358_create_alert_metadata_table.sql create mode 100644 assets/migrations/scripts/20180307150054_create_report_table.sql create mode 100644 assets/migrations/scripts/20180307150448_create_report_metadata_table.sql create mode 100644 assets/migrations/scripts/20180307151459_create_stock_table.sql create mode 100644 assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql create mode 100644 assets/migrations/scripts/bootstrap.sql create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml diff --git a/assets/migrations/README b/assets/migrations/README new file mode 100644 index 0000000000..55d4a963f1 --- /dev/null +++ b/assets/migrations/README @@ -0,0 +1,38 @@ +Welcome! + +This is an MyBatis Migration repository. You can specify the repository +directory when running migrations using the --path= +option. The default path is the current working directory ("./"). + +The repository base directory contains three subdirectories as follows: + +./drivers + +Place your JDBC driver .jar or .zip files in this directory. Upon running a +migration, the drivers will be dynamically loaded. + +./environments + +In the environments folder you will find .properties files that represent +your database instances. By default a development.properties file is +created for you to configure your development time database properties. +You can also create test.properties and production.properties files. +The environment can be specified when running a migration by using +the --env= option (without the path or ".properties" part). + +The default environment is "development". + +./scripts + +This directory contains your migration SQL files. These are the files +that contain your DDL to both upgrade and downgrade your database +structure. By default, the directory will contain the script to +create the changelog table, plus one empty "first" migration script. +To create a new migration script, use the "new" command. To run +all pending migrations, use the "up" command. To undo the last +migration applied, use the "down" command etc. + +For more information about commands and options, run the MyBatis +Migration script with the --help option. + +Enjoy. diff --git a/assets/migrations/drivers/postgresql-42.2.1.jar b/assets/migrations/drivers/postgresql-42.2.1.jar new file mode 100644 index 0000000000000000000000000000000000000000..e934846ce2242910f18eef5b625d318c8fcdaf3e GIT binary patch literal 794639 zcmb4qbCf8}o@Cp$?e5#Q-M4Mrwr$(CZQHhO+qRAU-n`kFIp5B{-Klf(ugdtH%u|sS zkyVj$lE5G+01yxm0BK$vQUL$uf&>5okQPxA_$4kQO7}eu000aiCkYPmj~+n(-c9a5 zz;S;Aqx{w5KfuxgGUB2lib}N7qE%{=HV3Q--PpH22=)~E%*KX8YsGL1x(SzH*d$iz zmM`-{0+NYSG^FO@<8^-DuhXYS8u^A?r(=vyQzLG6#-(Cd53y!UpTmjAjM?nO`_CRL zcJ!XP>)hkMA(^1Hp1kk2cNc9R6K|`yzywD`7~9}G^1J@6KfNEGOE5L6$RiZ(yI89G z{Iz>xJGY=L3eq@b#w2m;lPC*(AaU-)V+&f*6}m~gQBo@5GsnjJN-@)Qe74*xJlO8n zr=Npv<7?XAp0?M4nF@QG^`OX%VQQA|JR@z2jM7x&8pU2i$O(TuWYHJfdb+yph6f#@ zZ*urJ(D~pq`R_m#Whj=&JosU=6l%xyELhKeo<8aAj)zIy?cLw8q`rQAEM7JO@!94K zr8^azDHR_p9m+AX#g!i7N0=)2-IuHOEI_!jB~C@QPhIt%++lsxhZiHUjvAQ*3M8@C z?x^ADu5xB+KG+s*uM*?=b+*b!VxbwP-7(~SXL7_i_UV(O+hz-M9@zD~n5F$T3YJ~` zkuiZ?qDAMpS(2aja7;5VCRY_>f%b$%lu#jWIzqVT$TQZ~5evAm@Gr+qSWpdZILLU{ z7(%+m8-gkCk$^=PdlJECd_hWmUg)8$T16wJPr9h0bqng$j!#{3+WCf-YIAPp8QZtS zS3Q~rAgkbG)f5qo6RbucG^w4ZZx9Ar0Ao+9X@uR{Kaskar|fOyQod|nS@s<>_eep@ zD6Sa*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cntpXCIKxw z#bZ!TZ|XRDQ;(+g_cH@?IDXXCD^B$aJHu?k?aEf%LlGBM68T-F`lQ$=#a^AJQvD4e HmFoWh + + + + + + + + + +
+
+
+
+
+
+
+
+
+ + diff --git a/assets/migrations/scripts/20180307073425_create_changelog.sql b/assets/migrations/scripts/20180307073425_create_changelog.sql new file mode 100644 index 0000000000..5af2b4335f --- /dev/null +++ b/assets/migrations/scripts/20180307073425_create_changelog.sql @@ -0,0 +1,40 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // Create Changelog + +-- Default DDL for changelog table that will keep +-- a record of the migrations that have been run. + +-- You can modify this to suit your database before +-- running your first migration. + +-- Be sure that ID and DESCRIPTION fields exist in +-- BigInteger and String compatible fields respectively. + +CREATE TABLE ${changelog} ( +ID NUMERIC(20,0) NOT NULL, +APPLIED_AT VARCHAR(25) NOT NULL, +DESCRIPTION VARCHAR(255) NOT NULL +); + +ALTER TABLE ${changelog} +ADD CONSTRAINT PK_${changelog} +PRIMARY KEY (id); + +-- //@UNDO + +DROP TABLE ${changelog}; diff --git a/assets/migrations/scripts/20180307099840_create_core_schema.sql b/assets/migrations/scripts/20180307099840_create_core_schema.sql new file mode 100644 index 0000000000..3aaa1cc0e3 --- /dev/null +++ b/assets/migrations/scripts/20180307099840_create_core_schema.sql @@ -0,0 +1,25 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // create clients table +-- Migration SQL that makes the change goes here. + +CREATE SCHEMA core; + +-- //@UNDO +-- SQL to undo the change goes here. + +DROP SCHEMA core CASCADE; diff --git a/assets/migrations/scripts/20180307100840_create_client_table.sql b/assets/migrations/scripts/20180307100840_create_client_table.sql new file mode 100644 index 0000000000..603aae4a90 --- /dev/null +++ b/assets/migrations/scripts/20180307100840_create_client_table.sql @@ -0,0 +1,33 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // create client table +-- Migration SQL that makes the change goes here. + +CREATE TABLE core.client +( + id bigserial NOT NULL, + json jsonb NOT NULL, + PRIMARY KEY (id) +) +WITH ( + OIDS = FALSE +); + +-- //@UNDO +-- SQL to undo the change goes here. + +DROP TABLE core.client; diff --git a/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql b/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql new file mode 100644 index 0000000000..181936ef28 --- /dev/null +++ b/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql @@ -0,0 +1,49 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // create client metadata table +-- Migration SQL that makes the change goes here. + +CREATE TABLE core.client_metadata +( + id bigserial NOT NULL, + client_id bigint REFERENCES core.client (id), + base_entity_id character varying NOT NULL, + relational_id character varying, + openmrs_uuid character varying, + unique_id character varying, + first_name character varying, + last_name character varying, + birth_date date, + PRIMARY KEY (id) +) +WITH ( + OIDS = FALSE +); + +CREATE UNIQUE INDEX client_metadata_base_entity_id_unique_index ON core.client_metadata (base_entity_id); + +CREATE INDEX client_metadata_relational_id_index ON core.client_metadata (relational_id); +CREATE INDEX client_metadata_openmrs_uuid_index ON core.client_metadata (openmrs_uuid); +CREATE INDEX client_metadata_unique_id_index ON core.client_metadata (unique_id); +CREATE INDEX client_metadata_first_name_index ON core.client_metadata (first_name NULLS LAST); +CREATE INDEX client_metadata_last_name_index ON core.client_metadata (last_name NULLS LAST); +CREATE INDEX client_metadata_birth_date_index ON core.client_metadata (birth_date); + +-- //@UNDO +-- SQL to undo the change goes here. + +DROP TABLE core.client_metadata; diff --git a/assets/migrations/scripts/20180307131329_create_event_table.sql b/assets/migrations/scripts/20180307131329_create_event_table.sql new file mode 100644 index 0000000000..7773cc11dc --- /dev/null +++ b/assets/migrations/scripts/20180307131329_create_event_table.sql @@ -0,0 +1,33 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // create event table +-- Migration SQL that makes the change goes here. + +CREATE TABLE core.event +( + id bigserial NOT NULL, + json jsonb NOT NULL, + PRIMARY KEY (id) +) +WITH ( + OIDS = FALSE +); + +-- //@UNDO +-- SQL to undo the change goes here. + +DROP TABLE core.event; \ No newline at end of file diff --git a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql new file mode 100644 index 0000000000..7de5a46a78 --- /dev/null +++ b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql @@ -0,0 +1,56 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // create event metadata table +-- Migration SQL that makes the change goes here. + +CREATE TABLE core.event_metadata +( + id bigserial NOT NULL, + event_id bigint REFERENCES core.event (id), + base_entity_id character varying NOT NULL, + form_submission_id character varying NOT NULL, + server_version timestamp without time zone, + openmrs_uuid character varying, + event_type character varying, + event_date date, + provider_id character varying, + location_id character varying, + team character varying, + team_id character varying, + PRIMARY KEY (id) +) +WITH ( + OIDS = FALSE +); + +CREATE UNIQUE INDEX event_metadata_relational_id_unique_index ON core.event_metadata (form_submission_id); + +CREATE INDEX event_metadata_base_entity_id_index ON core.event_metadata (base_entity_id); +CREATE INDEX event_metadata_server_version_index ON core.event_metadata (server_version); +CREATE INDEX event_metadata_openmrs_uuid_index ON core.event_metadata (openmrs_uuid); +CREATE INDEX event_metadata_event_type_index ON core.event_metadata (event_type); +CREATE INDEX event_metadata_event_date_index ON core.event_metadata (event_date); +CREATE INDEX event_metadata_provider_id_index ON core.event_metadata (provider_id); +CREATE INDEX event_metadata_location_id_index ON core.event_metadata (location_id); +CREATE INDEX event_metadata_team_index ON core.event_metadata (team); +CREATE INDEX event_metadata_team_id_index ON core.event_metadata (team_id); + + +-- //@UNDO +-- SQL to undo the change goes here. + +DROP TABLE core.event_metadata; diff --git a/assets/migrations/scripts/20180307145148_create_alert_table.sql b/assets/migrations/scripts/20180307145148_create_alert_table.sql new file mode 100644 index 0000000000..cdd11e7951 --- /dev/null +++ b/assets/migrations/scripts/20180307145148_create_alert_table.sql @@ -0,0 +1,33 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // create alert table +-- Migration SQL that makes the change goes here. + +CREATE TABLE core.alert +( + id bigserial NOT NULL, + json jsonb NOT NULL, + PRIMARY KEY (id) +) +WITH ( + OIDS = FALSE +); + +-- //@UNDO +-- SQL to undo the change goes here. + +DROP TABLE core.alert; \ No newline at end of file diff --git a/assets/migrations/scripts/20180307145358_create_alert_metadata_table.sql b/assets/migrations/scripts/20180307145358_create_alert_metadata_table.sql new file mode 100644 index 0000000000..c1f249b82f --- /dev/null +++ b/assets/migrations/scripts/20180307145358_create_alert_metadata_table.sql @@ -0,0 +1,47 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // create alert metadata table +-- Migration SQL that makes the change goes here. + +CREATE TABLE core.alert_metadata +( + id bigserial NOT NULL, + alert_id bigint REFERENCES core.alert (id), + base_entity_id character varying NOT NULL, + server_version timestamp without time zone, + provider_id character varying, + location_id character varying, + team character varying, + team_id character varying, + PRIMARY KEY (id) +) +WITH ( + OIDS = FALSE +); + +CREATE INDEX alert_metadata_base_entity_id_index ON core.alert_metadata (base_entity_id); +CREATE INDEX alert_metadata_server_version_index ON core.alert_metadata (server_version); +CREATE INDEX alert_metadata_provider_id_index ON core.alert_metadata (provider_id); +CREATE INDEX alert_metadata_location_id_index ON core.alert_metadata (location_id); +CREATE INDEX alert_metadata_team_index ON core.alert_metadata (team); +CREATE INDEX alert_metadata_team_id_index ON core.alert_metadata (team_id); + + +-- //@UNDO +-- SQL to undo the change goes here. + +DROP TABLE core.alert_metadata; diff --git a/assets/migrations/scripts/20180307150054_create_report_table.sql b/assets/migrations/scripts/20180307150054_create_report_table.sql new file mode 100644 index 0000000000..350f401140 --- /dev/null +++ b/assets/migrations/scripts/20180307150054_create_report_table.sql @@ -0,0 +1,33 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // create report table +-- Migration SQL that makes the change goes here. + +CREATE TABLE core.report +( + id bigserial NOT NULL, + json jsonb NOT NULL, + PRIMARY KEY (id) +) +WITH ( + OIDS = FALSE +); + +-- //@UNDO +-- SQL to undo the change goes here. + +DROP TABLE core.report; diff --git a/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql b/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql new file mode 100644 index 0000000000..b1213adeae --- /dev/null +++ b/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql @@ -0,0 +1,49 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // create report metadata table +-- Migration SQL that makes the change goes here. + +CREATE TABLE core.report_metadata +( + id bigserial NOT NULL, + report_id bigint REFERENCES core.report (id), + base_entity_id character varying NOT NULL, + server_version timestamp without time zone, + report_type character varying, + provider_id character varying, + location_id character varying, + team character varying, + team_id character varying, + PRIMARY KEY (id) +) +WITH ( + OIDS = FALSE +); + +CREATE INDEX report_metadata_base_entity_id_index ON core.report_metadata (base_entity_id); +CREATE INDEX report_metadata_server_version_index ON core.report_metadata (server_version); +CREATE INDEX report_metadata_report_type_index ON core.report_metadata (report_type); +CREATE INDEX report_metadata_provider_id_index ON core.report_metadata (provider_id); +CREATE INDEX report_metadata_location_id_index ON core.report_metadata (location_id); +CREATE INDEX report_metadata_team_index ON core.report_metadata (team); +CREATE INDEX report_metadata_team_id_index ON core.report_metadata (team_id); + + +-- //@UNDO +-- SQL to undo the change goes here. + +DROP TABLE core.report_metadata; \ No newline at end of file diff --git a/assets/migrations/scripts/20180307151459_create_stock_table.sql b/assets/migrations/scripts/20180307151459_create_stock_table.sql new file mode 100644 index 0000000000..eab1bff6db --- /dev/null +++ b/assets/migrations/scripts/20180307151459_create_stock_table.sql @@ -0,0 +1,36 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // create stock table +-- Migration SQL that makes the change goes here. + + +CREATE TABLE core.stock +( + id bigserial NOT NULL, + json jsonb NOT NULL, + PRIMARY KEY (id) +) +WITH ( + OIDS = FALSE +); + + +-- //@UNDO +-- SQL to undo the change goes here. + + +DROP TABLE core.stock; \ No newline at end of file diff --git a/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql b/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql new file mode 100644 index 0000000000..b801005fcc --- /dev/null +++ b/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql @@ -0,0 +1,44 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // create stock metadata table +-- Migration SQL that makes the change goes here. + +CREATE TABLE core.stock_metadata +( + id bigserial NOT NULL, + stock_id bigint REFERENCES core.stock (id), + server_version timestamp without time zone, + provider_id character varying, + location_id character varying, + team character varying, + team_id character varying, + PRIMARY KEY (id) +) +WITH ( + OIDS = FALSE +); + +CREATE INDEX stock_metadata_server_version_index ON core.stock_metadata (server_version); +CREATE INDEX stock_metadata_provider_id_index ON core.stock_metadata (provider_id); +CREATE INDEX stock_metadata_location_id_index ON core.stock_metadata (location_id); +CREATE INDEX stock_metadata_team_index ON core.stock_metadata (team); +CREATE INDEX stock_metadata_team_id_index ON core.stock_metadata (team_id); + +-- //@UNDO +-- SQL to undo the change goes here. + +DROP TABLE core.stock_metadata; \ No newline at end of file diff --git a/assets/migrations/scripts/bootstrap.sql b/assets/migrations/scripts/bootstrap.sql new file mode 100644 index 0000000000..838909419e --- /dev/null +++ b/assets/migrations/scripts/bootstrap.sql @@ -0,0 +1,52 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // Bootstrap.sql + +-- This is the only SQL script file that is NOT +-- a valid migration and will not be run or tracked +-- in the changelog. There is no @UNDO section. + +-- // Do I need this file? + +-- New projects likely won't need this file. +-- Existing projects will likely need this file. +-- It's unlikely that this bootstrap should be run +-- in the production environment. + +-- // Purpose + +-- The purpose of this file is to provide a facility +-- to initialize the database to a state before MyBatis +-- SQL migrations were applied. If you already have +-- a database in production, then you probably have +-- a script that you run on your developer machine +-- to initialize the database. That script can now +-- be put in this bootstrap file (but does not have +-- to be if you are comfortable with your current process. + +-- // Running + +-- The bootstrap SQL is run with the "migrate bootstrap" +-- command. It must be run manually, it's never run as +-- part of the regular migration process and will never +-- be undone. Variables (e.g. ${variable}) are still +-- parsed in the bootstrap SQL. + +-- After the boostrap SQL has been run, you can then +-- use the migrations and the changelog for all future +-- database change management. + diff --git a/opensrp-core/pom.xml b/opensrp-core/pom.xml index 40ff3f1015..b347eff464 100644 --- a/opensrp-core/pom.xml +++ b/opensrp-core/pom.xml @@ -25,7 +25,7 @@ ../assets/schedules schedules - + ../build true @@ -207,18 +207,18 @@ org.springframework.data spring-data-jpa 1.1.0.RELEASE - - - nl.jqno.equalsverifier - equalsverifier - 2.3 - test - - - com.openpojo - openpojo - 0.8.6 - + + + nl.jqno.equalsverifier + equalsverifier + 2.3 + test + + + com.openpojo + openpojo + 0.8.6 + org.hibernate @@ -231,7 +231,11 @@ spring-orm ${spring.version} - + + org.mybatis + mybatis-spring + 1.1.0 + org.jacoco org.jacoco.agent @@ -239,7 +243,7 @@ test runtime - - + + diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java new file mode 100644 index 0000000000..03c926e769 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java @@ -0,0 +1,69 @@ +package org.opensrp.domain.postgres; + +public class Alert { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.alert.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.alert.json + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Object json; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.alert.id + * + * @return the value of core.alert.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.alert.id + * + * @param id the value for core.alert.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.alert.json + * + * @return the value of core.alert.json + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Object getJson() { + return json; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.alert.json + * + * @param json the value for core.alert.json + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setJson(Object json) { + this.json = json; + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java new file mode 100644 index 0000000000..4e3becc23e --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java @@ -0,0 +1,422 @@ +package org.opensrp.domain.postgres; + +import java.util.ArrayList; +import java.util.List; + +public class AlertExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public AlertExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andJsonIsNull() { + addCriterion("json is null"); + return (Criteria) this; + } + + public Criteria andJsonIsNotNull() { + addCriterion("json is not null"); + return (Criteria) this; + } + + public Criteria andJsonEqualTo(Object value) { + addCriterion("json =", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotEqualTo(Object value) { + addCriterion("json <>", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThan(Object value) { + addCriterion("json >", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThanOrEqualTo(Object value) { + addCriterion("json >=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThan(Object value) { + addCriterion("json <", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThanOrEqualTo(Object value) { + addCriterion("json <=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonIn(List values) { + addCriterion("json in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotIn(List values) { + addCriterion("json not in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonBetween(Object value1, Object value2) { + addCriterion("json between", value1, value2, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotBetween(Object value1, Object value2) { + addCriterion("json not between", value1, value2, "json"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.alert + * + * @mbg.generated do_not_delete_during_merge Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java new file mode 100644 index 0000000000..d77ee7a7a7 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java @@ -0,0 +1,269 @@ +package org.opensrp.domain.postgres; + +import java.util.Date; + +public class AlertMetadata { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.alert_metadata.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.alert_metadata.alert_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Long alertId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.alert_metadata.base_entity_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String baseEntityId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.alert_metadata.server_version + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Date serverVersion; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.alert_metadata.provider_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String providerId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.alert_metadata.location_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String locationId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.alert_metadata.team + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String team; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.alert_metadata.team_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String teamId; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.alert_metadata.id + * + * @return the value of core.alert_metadata.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.alert_metadata.id + * + * @param id the value for core.alert_metadata.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.alert_metadata.alert_id + * + * @return the value of core.alert_metadata.alert_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Long getAlertId() { + return alertId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.alert_metadata.alert_id + * + * @param alertId the value for core.alert_metadata.alert_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setAlertId(Long alertId) { + this.alertId = alertId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.alert_metadata.base_entity_id + * + * @return the value of core.alert_metadata.base_entity_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getBaseEntityId() { + return baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.alert_metadata.base_entity_id + * + * @param baseEntityId the value for core.alert_metadata.base_entity_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setBaseEntityId(String baseEntityId) { + this.baseEntityId = baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.alert_metadata.server_version + * + * @return the value of core.alert_metadata.server_version + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Date getServerVersion() { + return serverVersion; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.alert_metadata.server_version + * + * @param serverVersion the value for core.alert_metadata.server_version + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setServerVersion(Date serverVersion) { + this.serverVersion = serverVersion; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.alert_metadata.provider_id + * + * @return the value of core.alert_metadata.provider_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getProviderId() { + return providerId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.alert_metadata.provider_id + * + * @param providerId the value for core.alert_metadata.provider_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.alert_metadata.location_id + * + * @return the value of core.alert_metadata.location_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getLocationId() { + return locationId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.alert_metadata.location_id + * + * @param locationId the value for core.alert_metadata.location_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.alert_metadata.team + * + * @return the value of core.alert_metadata.team + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getTeam() { + return team; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.alert_metadata.team + * + * @param team the value for core.alert_metadata.team + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setTeam(String team) { + this.team = team; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.alert_metadata.team_id + * + * @return the value of core.alert_metadata.team_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getTeamId() { + return teamId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.alert_metadata.team_id + * + * @param teamId the value for core.alert_metadata.team_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setTeamId(String teamId) { + this.teamId = teamId; + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java new file mode 100644 index 0000000000..38fda17aad --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java @@ -0,0 +1,833 @@ +package org.opensrp.domain.postgres; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class AlertMetadataExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public AlertMetadataExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andAlertIdIsNull() { + addCriterion("alert_id is null"); + return (Criteria) this; + } + + public Criteria andAlertIdIsNotNull() { + addCriterion("alert_id is not null"); + return (Criteria) this; + } + + public Criteria andAlertIdEqualTo(Long value) { + addCriterion("alert_id =", value, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdNotEqualTo(Long value) { + addCriterion("alert_id <>", value, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdGreaterThan(Long value) { + addCriterion("alert_id >", value, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdGreaterThanOrEqualTo(Long value) { + addCriterion("alert_id >=", value, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdLessThan(Long value) { + addCriterion("alert_id <", value, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdLessThanOrEqualTo(Long value) { + addCriterion("alert_id <=", value, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdIn(List values) { + addCriterion("alert_id in", values, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdNotIn(List values) { + addCriterion("alert_id not in", values, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdBetween(Long value1, Long value2) { + addCriterion("alert_id between", value1, value2, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdNotBetween(Long value1, Long value2) { + addCriterion("alert_id not between", value1, value2, "alertId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNull() { + addCriterion("base_entity_id is null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNotNull() { + addCriterion("base_entity_id is not null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdEqualTo(String value) { + addCriterion("base_entity_id =", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotEqualTo(String value) { + addCriterion("base_entity_id <>", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThan(String value) { + addCriterion("base_entity_id >", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { + addCriterion("base_entity_id >=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThan(String value) { + addCriterion("base_entity_id <", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { + addCriterion("base_entity_id <=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLike(String value) { + addCriterion("base_entity_id like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotLike(String value) { + addCriterion("base_entity_id not like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIn(List values) { + addCriterion("base_entity_id in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotIn(List values) { + addCriterion("base_entity_id not in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdBetween(String value1, String value2) { + addCriterion("base_entity_id between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotBetween(String value1, String value2) { + addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNull() { + addCriterion("server_version is null"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNotNull() { + addCriterion("server_version is not null"); + return (Criteria) this; + } + + public Criteria andServerVersionEqualTo(Date value) { + addCriterion("server_version =", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotEqualTo(Date value) { + addCriterion("server_version <>", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThan(Date value) { + addCriterion("server_version >", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThanOrEqualTo(Date value) { + addCriterion("server_version >=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThan(Date value) { + addCriterion("server_version <", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThanOrEqualTo(Date value) { + addCriterion("server_version <=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionIn(List values) { + addCriterion("server_version in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotIn(List values) { + addCriterion("server_version not in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionBetween(Date value1, Date value2) { + addCriterion("server_version between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotBetween(Date value1, Date value2) { + addCriterion("server_version not between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNull() { + addCriterion("provider_id is null"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNotNull() { + addCriterion("provider_id is not null"); + return (Criteria) this; + } + + public Criteria andProviderIdEqualTo(String value) { + addCriterion("provider_id =", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotEqualTo(String value) { + addCriterion("provider_id <>", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThan(String value) { + addCriterion("provider_id >", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThanOrEqualTo(String value) { + addCriterion("provider_id >=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThan(String value) { + addCriterion("provider_id <", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThanOrEqualTo(String value) { + addCriterion("provider_id <=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLike(String value) { + addCriterion("provider_id like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotLike(String value) { + addCriterion("provider_id not like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdIn(List values) { + addCriterion("provider_id in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotIn(List values) { + addCriterion("provider_id not in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdBetween(String value1, String value2) { + addCriterion("provider_id between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotBetween(String value1, String value2) { + addCriterion("provider_id not between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNull() { + addCriterion("location_id is null"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNotNull() { + addCriterion("location_id is not null"); + return (Criteria) this; + } + + public Criteria andLocationIdEqualTo(String value) { + addCriterion("location_id =", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotEqualTo(String value) { + addCriterion("location_id <>", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThan(String value) { + addCriterion("location_id >", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThanOrEqualTo(String value) { + addCriterion("location_id >=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThan(String value) { + addCriterion("location_id <", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThanOrEqualTo(String value) { + addCriterion("location_id <=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLike(String value) { + addCriterion("location_id like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotLike(String value) { + addCriterion("location_id not like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdIn(List values) { + addCriterion("location_id in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotIn(List values) { + addCriterion("location_id not in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdBetween(String value1, String value2) { + addCriterion("location_id between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotBetween(String value1, String value2) { + addCriterion("location_id not between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andTeamIsNull() { + addCriterion("team is null"); + return (Criteria) this; + } + + public Criteria andTeamIsNotNull() { + addCriterion("team is not null"); + return (Criteria) this; + } + + public Criteria andTeamEqualTo(String value) { + addCriterion("team =", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotEqualTo(String value) { + addCriterion("team <>", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThan(String value) { + addCriterion("team >", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThanOrEqualTo(String value) { + addCriterion("team >=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThan(String value) { + addCriterion("team <", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThanOrEqualTo(String value) { + addCriterion("team <=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLike(String value) { + addCriterion("team like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotLike(String value) { + addCriterion("team not like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamIn(List values) { + addCriterion("team in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotIn(List values) { + addCriterion("team not in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamBetween(String value1, String value2) { + addCriterion("team between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotBetween(String value1, String value2) { + addCriterion("team not between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNull() { + addCriterion("team_id is null"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNotNull() { + addCriterion("team_id is not null"); + return (Criteria) this; + } + + public Criteria andTeamIdEqualTo(String value) { + addCriterion("team_id =", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotEqualTo(String value) { + addCriterion("team_id <>", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThan(String value) { + addCriterion("team_id >", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThanOrEqualTo(String value) { + addCriterion("team_id >=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThan(String value) { + addCriterion("team_id <", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThanOrEqualTo(String value) { + addCriterion("team_id <=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLike(String value) { + addCriterion("team_id like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotLike(String value) { + addCriterion("team_id not like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdIn(List values) { + addCriterion("team_id in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotIn(List values) { + addCriterion("team_id not in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdBetween(String value1, String value2) { + addCriterion("team_id between", value1, value2, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotBetween(String value1, String value2) { + addCriterion("team_id not between", value1, value2, "teamId"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.alert_metadata + * + * @mbg.generated do_not_delete_during_merge Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java new file mode 100644 index 0000000000..7854d9e414 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java @@ -0,0 +1,69 @@ +package org.opensrp.domain.postgres; + +public class Client { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.client.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.client.json + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Object json; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.client.id + * + * @return the value of core.client.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.client.id + * + * @param id the value for core.client.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.client.json + * + * @return the value of core.client.json + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Object getJson() { + return json; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.client.json + * + * @param json the value for core.client.json + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setJson(Object json) { + this.json = json; + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java new file mode 100644 index 0000000000..75c67e7c14 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java @@ -0,0 +1,422 @@ +package org.opensrp.domain.postgres; + +import java.util.ArrayList; +import java.util.List; + +public class ClientExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public ClientExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andJsonIsNull() { + addCriterion("json is null"); + return (Criteria) this; + } + + public Criteria andJsonIsNotNull() { + addCriterion("json is not null"); + return (Criteria) this; + } + + public Criteria andJsonEqualTo(Object value) { + addCriterion("json =", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotEqualTo(Object value) { + addCriterion("json <>", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThan(Object value) { + addCriterion("json >", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThanOrEqualTo(Object value) { + addCriterion("json >=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThan(Object value) { + addCriterion("json <", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThanOrEqualTo(Object value) { + addCriterion("json <=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonIn(List values) { + addCriterion("json in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotIn(List values) { + addCriterion("json not in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonBetween(Object value1, Object value2) { + addCriterion("json between", value1, value2, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotBetween(Object value1, Object value2) { + addCriterion("json not between", value1, value2, "json"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.client + * + * @mbg.generated do_not_delete_during_merge Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java new file mode 100644 index 0000000000..674a6dbaca --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java @@ -0,0 +1,302 @@ +package org.opensrp.domain.postgres; + +import java.util.Date; + +public class ClientMetadata { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.client_metadata.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.client_metadata.client_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Long clientId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.client_metadata.base_entity_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String baseEntityId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.client_metadata.relational_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String relationalId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.client_metadata.openmrs_uuid + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String openmrsUuid; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.client_metadata.unique_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String uniqueId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.client_metadata.first_name + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String firstName; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.client_metadata.last_name + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String lastName; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.client_metadata.birth_date + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Date birthDate; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.client_metadata.id + * + * @return the value of core.client_metadata.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.client_metadata.id + * + * @param id the value for core.client_metadata.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.client_metadata.client_id + * + * @return the value of core.client_metadata.client_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Long getClientId() { + return clientId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.client_metadata.client_id + * + * @param clientId the value for core.client_metadata.client_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setClientId(Long clientId) { + this.clientId = clientId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.client_metadata.base_entity_id + * + * @return the value of core.client_metadata.base_entity_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getBaseEntityId() { + return baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.client_metadata.base_entity_id + * + * @param baseEntityId the value for core.client_metadata.base_entity_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setBaseEntityId(String baseEntityId) { + this.baseEntityId = baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.client_metadata.relational_id + * + * @return the value of core.client_metadata.relational_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getRelationalId() { + return relationalId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.client_metadata.relational_id + * + * @param relationalId the value for core.client_metadata.relational_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setRelationalId(String relationalId) { + this.relationalId = relationalId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.client_metadata.openmrs_uuid + * + * @return the value of core.client_metadata.openmrs_uuid + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getOpenmrsUuid() { + return openmrsUuid; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.client_metadata.openmrs_uuid + * + * @param openmrsUuid the value for core.client_metadata.openmrs_uuid + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setOpenmrsUuid(String openmrsUuid) { + this.openmrsUuid = openmrsUuid; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.client_metadata.unique_id + * + * @return the value of core.client_metadata.unique_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getUniqueId() { + return uniqueId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.client_metadata.unique_id + * + * @param uniqueId the value for core.client_metadata.unique_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setUniqueId(String uniqueId) { + this.uniqueId = uniqueId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.client_metadata.first_name + * + * @return the value of core.client_metadata.first_name + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getFirstName() { + return firstName; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.client_metadata.first_name + * + * @param firstName the value for core.client_metadata.first_name + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.client_metadata.last_name + * + * @return the value of core.client_metadata.last_name + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getLastName() { + return lastName; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.client_metadata.last_name + * + * @param lastName the value for core.client_metadata.last_name + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setLastName(String lastName) { + this.lastName = lastName; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.client_metadata.birth_date + * + * @return the value of core.client_metadata.birth_date + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Date getBirthDate() { + return birthDate; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.client_metadata.birth_date + * + * @param birthDate the value for core.client_metadata.birth_date + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setBirthDate(Date birthDate) { + this.birthDate = birthDate; + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java new file mode 100644 index 0000000000..9da4a4030e --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java @@ -0,0 +1,930 @@ +package org.opensrp.domain.postgres; + +import java.util.ArrayList; +import java.util.Date; +import java.util.Iterator; +import java.util.List; + +public class ClientMetadataExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public ClientMetadataExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + protected void addCriterionForJDBCDate(String condition, Date value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value.getTime()), property); + } + + protected void addCriterionForJDBCDate(String condition, List values, String property) { + if (values == null || values.size() == 0) { + throw new RuntimeException("Value list for " + property + " cannot be null or empty"); + } + List dateList = new ArrayList(); + Iterator iter = values.iterator(); + while (iter.hasNext()) { + dateList.add(new java.sql.Date(iter.next().getTime())); + } + addCriterion(condition, dateList, property); + } + + protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andClientIdIsNull() { + addCriterion("client_id is null"); + return (Criteria) this; + } + + public Criteria andClientIdIsNotNull() { + addCriterion("client_id is not null"); + return (Criteria) this; + } + + public Criteria andClientIdEqualTo(Long value) { + addCriterion("client_id =", value, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdNotEqualTo(Long value) { + addCriterion("client_id <>", value, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdGreaterThan(Long value) { + addCriterion("client_id >", value, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdGreaterThanOrEqualTo(Long value) { + addCriterion("client_id >=", value, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdLessThan(Long value) { + addCriterion("client_id <", value, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdLessThanOrEqualTo(Long value) { + addCriterion("client_id <=", value, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdIn(List values) { + addCriterion("client_id in", values, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdNotIn(List values) { + addCriterion("client_id not in", values, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdBetween(Long value1, Long value2) { + addCriterion("client_id between", value1, value2, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdNotBetween(Long value1, Long value2) { + addCriterion("client_id not between", value1, value2, "clientId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNull() { + addCriterion("base_entity_id is null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNotNull() { + addCriterion("base_entity_id is not null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdEqualTo(String value) { + addCriterion("base_entity_id =", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotEqualTo(String value) { + addCriterion("base_entity_id <>", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThan(String value) { + addCriterion("base_entity_id >", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { + addCriterion("base_entity_id >=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThan(String value) { + addCriterion("base_entity_id <", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { + addCriterion("base_entity_id <=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLike(String value) { + addCriterion("base_entity_id like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotLike(String value) { + addCriterion("base_entity_id not like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIn(List values) { + addCriterion("base_entity_id in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotIn(List values) { + addCriterion("base_entity_id not in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdBetween(String value1, String value2) { + addCriterion("base_entity_id between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotBetween(String value1, String value2) { + addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andRelationalIdIsNull() { + addCriterion("relational_id is null"); + return (Criteria) this; + } + + public Criteria andRelationalIdIsNotNull() { + addCriterion("relational_id is not null"); + return (Criteria) this; + } + + public Criteria andRelationalIdEqualTo(String value) { + addCriterion("relational_id =", value, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdNotEqualTo(String value) { + addCriterion("relational_id <>", value, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdGreaterThan(String value) { + addCriterion("relational_id >", value, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdGreaterThanOrEqualTo(String value) { + addCriterion("relational_id >=", value, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdLessThan(String value) { + addCriterion("relational_id <", value, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdLessThanOrEqualTo(String value) { + addCriterion("relational_id <=", value, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdLike(String value) { + addCriterion("relational_id like", value, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdNotLike(String value) { + addCriterion("relational_id not like", value, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdIn(List values) { + addCriterion("relational_id in", values, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdNotIn(List values) { + addCriterion("relational_id not in", values, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdBetween(String value1, String value2) { + addCriterion("relational_id between", value1, value2, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdNotBetween(String value1, String value2) { + addCriterion("relational_id not between", value1, value2, "relationalId"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidIsNull() { + addCriterion("openmrs_uuid is null"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidIsNotNull() { + addCriterion("openmrs_uuid is not null"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidEqualTo(String value) { + addCriterion("openmrs_uuid =", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidNotEqualTo(String value) { + addCriterion("openmrs_uuid <>", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidGreaterThan(String value) { + addCriterion("openmrs_uuid >", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidGreaterThanOrEqualTo(String value) { + addCriterion("openmrs_uuid >=", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidLessThan(String value) { + addCriterion("openmrs_uuid <", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidLessThanOrEqualTo(String value) { + addCriterion("openmrs_uuid <=", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidLike(String value) { + addCriterion("openmrs_uuid like", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidNotLike(String value) { + addCriterion("openmrs_uuid not like", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidIn(List values) { + addCriterion("openmrs_uuid in", values, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidNotIn(List values) { + addCriterion("openmrs_uuid not in", values, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidBetween(String value1, String value2) { + addCriterion("openmrs_uuid between", value1, value2, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidNotBetween(String value1, String value2) { + addCriterion("openmrs_uuid not between", value1, value2, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andUniqueIdIsNull() { + addCriterion("unique_id is null"); + return (Criteria) this; + } + + public Criteria andUniqueIdIsNotNull() { + addCriterion("unique_id is not null"); + return (Criteria) this; + } + + public Criteria andUniqueIdEqualTo(String value) { + addCriterion("unique_id =", value, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdNotEqualTo(String value) { + addCriterion("unique_id <>", value, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdGreaterThan(String value) { + addCriterion("unique_id >", value, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdGreaterThanOrEqualTo(String value) { + addCriterion("unique_id >=", value, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdLessThan(String value) { + addCriterion("unique_id <", value, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdLessThanOrEqualTo(String value) { + addCriterion("unique_id <=", value, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdLike(String value) { + addCriterion("unique_id like", value, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdNotLike(String value) { + addCriterion("unique_id not like", value, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdIn(List values) { + addCriterion("unique_id in", values, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdNotIn(List values) { + addCriterion("unique_id not in", values, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdBetween(String value1, String value2) { + addCriterion("unique_id between", value1, value2, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdNotBetween(String value1, String value2) { + addCriterion("unique_id not between", value1, value2, "uniqueId"); + return (Criteria) this; + } + + public Criteria andFirstNameIsNull() { + addCriterion("first_name is null"); + return (Criteria) this; + } + + public Criteria andFirstNameIsNotNull() { + addCriterion("first_name is not null"); + return (Criteria) this; + } + + public Criteria andFirstNameEqualTo(String value) { + addCriterion("first_name =", value, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameNotEqualTo(String value) { + addCriterion("first_name <>", value, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameGreaterThan(String value) { + addCriterion("first_name >", value, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameGreaterThanOrEqualTo(String value) { + addCriterion("first_name >=", value, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameLessThan(String value) { + addCriterion("first_name <", value, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameLessThanOrEqualTo(String value) { + addCriterion("first_name <=", value, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameLike(String value) { + addCriterion("first_name like", value, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameNotLike(String value) { + addCriterion("first_name not like", value, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameIn(List values) { + addCriterion("first_name in", values, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameNotIn(List values) { + addCriterion("first_name not in", values, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameBetween(String value1, String value2) { + addCriterion("first_name between", value1, value2, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameNotBetween(String value1, String value2) { + addCriterion("first_name not between", value1, value2, "firstName"); + return (Criteria) this; + } + + public Criteria andLastNameIsNull() { + addCriterion("last_name is null"); + return (Criteria) this; + } + + public Criteria andLastNameIsNotNull() { + addCriterion("last_name is not null"); + return (Criteria) this; + } + + public Criteria andLastNameEqualTo(String value) { + addCriterion("last_name =", value, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameNotEqualTo(String value) { + addCriterion("last_name <>", value, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameGreaterThan(String value) { + addCriterion("last_name >", value, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameGreaterThanOrEqualTo(String value) { + addCriterion("last_name >=", value, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameLessThan(String value) { + addCriterion("last_name <", value, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameLessThanOrEqualTo(String value) { + addCriterion("last_name <=", value, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameLike(String value) { + addCriterion("last_name like", value, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameNotLike(String value) { + addCriterion("last_name not like", value, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameIn(List values) { + addCriterion("last_name in", values, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameNotIn(List values) { + addCriterion("last_name not in", values, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameBetween(String value1, String value2) { + addCriterion("last_name between", value1, value2, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameNotBetween(String value1, String value2) { + addCriterion("last_name not between", value1, value2, "lastName"); + return (Criteria) this; + } + + public Criteria andBirthDateIsNull() { + addCriterion("birth_date is null"); + return (Criteria) this; + } + + public Criteria andBirthDateIsNotNull() { + addCriterion("birth_date is not null"); + return (Criteria) this; + } + + public Criteria andBirthDateEqualTo(Date value) { + addCriterionForJDBCDate("birth_date =", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateNotEqualTo(Date value) { + addCriterionForJDBCDate("birth_date <>", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateGreaterThan(Date value) { + addCriterionForJDBCDate("birth_date >", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("birth_date >=", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateLessThan(Date value) { + addCriterionForJDBCDate("birth_date <", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("birth_date <=", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateIn(List values) { + addCriterionForJDBCDate("birth_date in", values, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateNotIn(List values) { + addCriterionForJDBCDate("birth_date not in", values, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateBetween(Date value1, Date value2) { + addCriterionForJDBCDate("birth_date between", value1, value2, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("birth_date not between", value1, value2, "birthDate"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.client_metadata + * + * @mbg.generated do_not_delete_during_merge Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java new file mode 100644 index 0000000000..d9fafd8721 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java @@ -0,0 +1,69 @@ +package org.opensrp.domain.postgres; + +public class Event { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.event.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.event.json + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Object json; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.event.id + * + * @return the value of core.event.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.event.id + * + * @param id the value for core.event.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.event.json + * + * @return the value of core.event.json + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Object getJson() { + return json; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.event.json + * + * @param json the value for core.event.json + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setJson(Object json) { + this.json = json; + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java new file mode 100644 index 0000000000..0d339bb766 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java @@ -0,0 +1,422 @@ +package org.opensrp.domain.postgres; + +import java.util.ArrayList; +import java.util.List; + +public class EventExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public EventExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andJsonIsNull() { + addCriterion("json is null"); + return (Criteria) this; + } + + public Criteria andJsonIsNotNull() { + addCriterion("json is not null"); + return (Criteria) this; + } + + public Criteria andJsonEqualTo(Object value) { + addCriterion("json =", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotEqualTo(Object value) { + addCriterion("json <>", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThan(Object value) { + addCriterion("json >", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThanOrEqualTo(Object value) { + addCriterion("json >=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThan(Object value) { + addCriterion("json <", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThanOrEqualTo(Object value) { + addCriterion("json <=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonIn(List values) { + addCriterion("json in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotIn(List values) { + addCriterion("json not in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonBetween(Object value1, Object value2) { + addCriterion("json between", value1, value2, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotBetween(Object value1, Object value2) { + addCriterion("json not between", value1, value2, "json"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.event + * + * @mbg.generated do_not_delete_during_merge Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java new file mode 100644 index 0000000000..55e327081a --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java @@ -0,0 +1,401 @@ +package org.opensrp.domain.postgres; + +import java.util.Date; + +public class EventMetadata { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.event_metadata.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.event_metadata.event_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Long eventId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.event_metadata.base_entity_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String baseEntityId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.event_metadata.form_submission_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String formSubmissionId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.event_metadata.server_version + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Date serverVersion; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.event_metadata.openmrs_uuid + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String openmrsUuid; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.event_metadata.event_type + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String eventType; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.event_metadata.event_date + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Date eventDate; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.event_metadata.provider_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String providerId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.event_metadata.location_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String locationId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.event_metadata.team + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String team; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.event_metadata.team_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String teamId; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.event_metadata.id + * + * @return the value of core.event_metadata.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.event_metadata.id + * + * @param id the value for core.event_metadata.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.event_metadata.event_id + * + * @return the value of core.event_metadata.event_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Long getEventId() { + return eventId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.event_metadata.event_id + * + * @param eventId the value for core.event_metadata.event_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setEventId(Long eventId) { + this.eventId = eventId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.event_metadata.base_entity_id + * + * @return the value of core.event_metadata.base_entity_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getBaseEntityId() { + return baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.event_metadata.base_entity_id + * + * @param baseEntityId the value for core.event_metadata.base_entity_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setBaseEntityId(String baseEntityId) { + this.baseEntityId = baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.event_metadata.form_submission_id + * + * @return the value of core.event_metadata.form_submission_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getFormSubmissionId() { + return formSubmissionId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.event_metadata.form_submission_id + * + * @param formSubmissionId the value for core.event_metadata.form_submission_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setFormSubmissionId(String formSubmissionId) { + this.formSubmissionId = formSubmissionId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.event_metadata.server_version + * + * @return the value of core.event_metadata.server_version + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Date getServerVersion() { + return serverVersion; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.event_metadata.server_version + * + * @param serverVersion the value for core.event_metadata.server_version + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setServerVersion(Date serverVersion) { + this.serverVersion = serverVersion; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.event_metadata.openmrs_uuid + * + * @return the value of core.event_metadata.openmrs_uuid + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getOpenmrsUuid() { + return openmrsUuid; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.event_metadata.openmrs_uuid + * + * @param openmrsUuid the value for core.event_metadata.openmrs_uuid + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setOpenmrsUuid(String openmrsUuid) { + this.openmrsUuid = openmrsUuid; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.event_metadata.event_type + * + * @return the value of core.event_metadata.event_type + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getEventType() { + return eventType; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.event_metadata.event_type + * + * @param eventType the value for core.event_metadata.event_type + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setEventType(String eventType) { + this.eventType = eventType; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.event_metadata.event_date + * + * @return the value of core.event_metadata.event_date + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Date getEventDate() { + return eventDate; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.event_metadata.event_date + * + * @param eventDate the value for core.event_metadata.event_date + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setEventDate(Date eventDate) { + this.eventDate = eventDate; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.event_metadata.provider_id + * + * @return the value of core.event_metadata.provider_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getProviderId() { + return providerId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.event_metadata.provider_id + * + * @param providerId the value for core.event_metadata.provider_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.event_metadata.location_id + * + * @return the value of core.event_metadata.location_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getLocationId() { + return locationId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.event_metadata.location_id + * + * @param locationId the value for core.event_metadata.location_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.event_metadata.team + * + * @return the value of core.event_metadata.team + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getTeam() { + return team; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.event_metadata.team + * + * @param team the value for core.event_metadata.team + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setTeam(String team) { + this.team = team; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.event_metadata.team_id + * + * @return the value of core.event_metadata.team_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getTeamId() { + return teamId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.event_metadata.team_id + * + * @param teamId the value for core.event_metadata.team_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setTeamId(String teamId) { + this.teamId = teamId; + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java new file mode 100644 index 0000000000..5f4ec4d2aa --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java @@ -0,0 +1,1130 @@ +package org.opensrp.domain.postgres; + +import java.util.ArrayList; +import java.util.Date; +import java.util.Iterator; +import java.util.List; + +public class EventMetadataExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public EventMetadataExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + protected void addCriterionForJDBCDate(String condition, Date value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value.getTime()), property); + } + + protected void addCriterionForJDBCDate(String condition, List values, String property) { + if (values == null || values.size() == 0) { + throw new RuntimeException("Value list for " + property + " cannot be null or empty"); + } + List dateList = new ArrayList(); + Iterator iter = values.iterator(); + while (iter.hasNext()) { + dateList.add(new java.sql.Date(iter.next().getTime())); + } + addCriterion(condition, dateList, property); + } + + protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andEventIdIsNull() { + addCriterion("event_id is null"); + return (Criteria) this; + } + + public Criteria andEventIdIsNotNull() { + addCriterion("event_id is not null"); + return (Criteria) this; + } + + public Criteria andEventIdEqualTo(Long value) { + addCriterion("event_id =", value, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdNotEqualTo(Long value) { + addCriterion("event_id <>", value, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdGreaterThan(Long value) { + addCriterion("event_id >", value, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdGreaterThanOrEqualTo(Long value) { + addCriterion("event_id >=", value, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdLessThan(Long value) { + addCriterion("event_id <", value, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdLessThanOrEqualTo(Long value) { + addCriterion("event_id <=", value, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdIn(List values) { + addCriterion("event_id in", values, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdNotIn(List values) { + addCriterion("event_id not in", values, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdBetween(Long value1, Long value2) { + addCriterion("event_id between", value1, value2, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdNotBetween(Long value1, Long value2) { + addCriterion("event_id not between", value1, value2, "eventId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNull() { + addCriterion("base_entity_id is null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNotNull() { + addCriterion("base_entity_id is not null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdEqualTo(String value) { + addCriterion("base_entity_id =", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotEqualTo(String value) { + addCriterion("base_entity_id <>", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThan(String value) { + addCriterion("base_entity_id >", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { + addCriterion("base_entity_id >=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThan(String value) { + addCriterion("base_entity_id <", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { + addCriterion("base_entity_id <=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLike(String value) { + addCriterion("base_entity_id like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotLike(String value) { + addCriterion("base_entity_id not like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIn(List values) { + addCriterion("base_entity_id in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotIn(List values) { + addCriterion("base_entity_id not in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdBetween(String value1, String value2) { + addCriterion("base_entity_id between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotBetween(String value1, String value2) { + addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdIsNull() { + addCriterion("form_submission_id is null"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdIsNotNull() { + addCriterion("form_submission_id is not null"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdEqualTo(String value) { + addCriterion("form_submission_id =", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdNotEqualTo(String value) { + addCriterion("form_submission_id <>", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdGreaterThan(String value) { + addCriterion("form_submission_id >", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdGreaterThanOrEqualTo(String value) { + addCriterion("form_submission_id >=", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdLessThan(String value) { + addCriterion("form_submission_id <", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdLessThanOrEqualTo(String value) { + addCriterion("form_submission_id <=", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdLike(String value) { + addCriterion("form_submission_id like", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdNotLike(String value) { + addCriterion("form_submission_id not like", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdIn(List values) { + addCriterion("form_submission_id in", values, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdNotIn(List values) { + addCriterion("form_submission_id not in", values, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdBetween(String value1, String value2) { + addCriterion("form_submission_id between", value1, value2, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdNotBetween(String value1, String value2) { + addCriterion("form_submission_id not between", value1, value2, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNull() { + addCriterion("server_version is null"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNotNull() { + addCriterion("server_version is not null"); + return (Criteria) this; + } + + public Criteria andServerVersionEqualTo(Date value) { + addCriterion("server_version =", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotEqualTo(Date value) { + addCriterion("server_version <>", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThan(Date value) { + addCriterion("server_version >", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThanOrEqualTo(Date value) { + addCriterion("server_version >=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThan(Date value) { + addCriterion("server_version <", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThanOrEqualTo(Date value) { + addCriterion("server_version <=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionIn(List values) { + addCriterion("server_version in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotIn(List values) { + addCriterion("server_version not in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionBetween(Date value1, Date value2) { + addCriterion("server_version between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotBetween(Date value1, Date value2) { + addCriterion("server_version not between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidIsNull() { + addCriterion("openmrs_uuid is null"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidIsNotNull() { + addCriterion("openmrs_uuid is not null"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidEqualTo(String value) { + addCriterion("openmrs_uuid =", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidNotEqualTo(String value) { + addCriterion("openmrs_uuid <>", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidGreaterThan(String value) { + addCriterion("openmrs_uuid >", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidGreaterThanOrEqualTo(String value) { + addCriterion("openmrs_uuid >=", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidLessThan(String value) { + addCriterion("openmrs_uuid <", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidLessThanOrEqualTo(String value) { + addCriterion("openmrs_uuid <=", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidLike(String value) { + addCriterion("openmrs_uuid like", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidNotLike(String value) { + addCriterion("openmrs_uuid not like", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidIn(List values) { + addCriterion("openmrs_uuid in", values, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidNotIn(List values) { + addCriterion("openmrs_uuid not in", values, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidBetween(String value1, String value2) { + addCriterion("openmrs_uuid between", value1, value2, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidNotBetween(String value1, String value2) { + addCriterion("openmrs_uuid not between", value1, value2, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andEventTypeIsNull() { + addCriterion("event_type is null"); + return (Criteria) this; + } + + public Criteria andEventTypeIsNotNull() { + addCriterion("event_type is not null"); + return (Criteria) this; + } + + public Criteria andEventTypeEqualTo(String value) { + addCriterion("event_type =", value, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeNotEqualTo(String value) { + addCriterion("event_type <>", value, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeGreaterThan(String value) { + addCriterion("event_type >", value, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeGreaterThanOrEqualTo(String value) { + addCriterion("event_type >=", value, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeLessThan(String value) { + addCriterion("event_type <", value, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeLessThanOrEqualTo(String value) { + addCriterion("event_type <=", value, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeLike(String value) { + addCriterion("event_type like", value, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeNotLike(String value) { + addCriterion("event_type not like", value, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeIn(List values) { + addCriterion("event_type in", values, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeNotIn(List values) { + addCriterion("event_type not in", values, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeBetween(String value1, String value2) { + addCriterion("event_type between", value1, value2, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeNotBetween(String value1, String value2) { + addCriterion("event_type not between", value1, value2, "eventType"); + return (Criteria) this; + } + + public Criteria andEventDateIsNull() { + addCriterion("event_date is null"); + return (Criteria) this; + } + + public Criteria andEventDateIsNotNull() { + addCriterion("event_date is not null"); + return (Criteria) this; + } + + public Criteria andEventDateEqualTo(Date value) { + addCriterionForJDBCDate("event_date =", value, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateNotEqualTo(Date value) { + addCriterionForJDBCDate("event_date <>", value, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateGreaterThan(Date value) { + addCriterionForJDBCDate("event_date >", value, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("event_date >=", value, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateLessThan(Date value) { + addCriterionForJDBCDate("event_date <", value, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("event_date <=", value, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateIn(List values) { + addCriterionForJDBCDate("event_date in", values, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateNotIn(List values) { + addCriterionForJDBCDate("event_date not in", values, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateBetween(Date value1, Date value2) { + addCriterionForJDBCDate("event_date between", value1, value2, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("event_date not between", value1, value2, "eventDate"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNull() { + addCriterion("provider_id is null"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNotNull() { + addCriterion("provider_id is not null"); + return (Criteria) this; + } + + public Criteria andProviderIdEqualTo(String value) { + addCriterion("provider_id =", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotEqualTo(String value) { + addCriterion("provider_id <>", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThan(String value) { + addCriterion("provider_id >", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThanOrEqualTo(String value) { + addCriterion("provider_id >=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThan(String value) { + addCriterion("provider_id <", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThanOrEqualTo(String value) { + addCriterion("provider_id <=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLike(String value) { + addCriterion("provider_id like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotLike(String value) { + addCriterion("provider_id not like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdIn(List values) { + addCriterion("provider_id in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotIn(List values) { + addCriterion("provider_id not in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdBetween(String value1, String value2) { + addCriterion("provider_id between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotBetween(String value1, String value2) { + addCriterion("provider_id not between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNull() { + addCriterion("location_id is null"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNotNull() { + addCriterion("location_id is not null"); + return (Criteria) this; + } + + public Criteria andLocationIdEqualTo(String value) { + addCriterion("location_id =", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotEqualTo(String value) { + addCriterion("location_id <>", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThan(String value) { + addCriterion("location_id >", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThanOrEqualTo(String value) { + addCriterion("location_id >=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThan(String value) { + addCriterion("location_id <", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThanOrEqualTo(String value) { + addCriterion("location_id <=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLike(String value) { + addCriterion("location_id like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotLike(String value) { + addCriterion("location_id not like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdIn(List values) { + addCriterion("location_id in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotIn(List values) { + addCriterion("location_id not in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdBetween(String value1, String value2) { + addCriterion("location_id between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotBetween(String value1, String value2) { + addCriterion("location_id not between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andTeamIsNull() { + addCriterion("team is null"); + return (Criteria) this; + } + + public Criteria andTeamIsNotNull() { + addCriterion("team is not null"); + return (Criteria) this; + } + + public Criteria andTeamEqualTo(String value) { + addCriterion("team =", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotEqualTo(String value) { + addCriterion("team <>", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThan(String value) { + addCriterion("team >", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThanOrEqualTo(String value) { + addCriterion("team >=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThan(String value) { + addCriterion("team <", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThanOrEqualTo(String value) { + addCriterion("team <=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLike(String value) { + addCriterion("team like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotLike(String value) { + addCriterion("team not like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamIn(List values) { + addCriterion("team in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotIn(List values) { + addCriterion("team not in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamBetween(String value1, String value2) { + addCriterion("team between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotBetween(String value1, String value2) { + addCriterion("team not between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNull() { + addCriterion("team_id is null"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNotNull() { + addCriterion("team_id is not null"); + return (Criteria) this; + } + + public Criteria andTeamIdEqualTo(String value) { + addCriterion("team_id =", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotEqualTo(String value) { + addCriterion("team_id <>", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThan(String value) { + addCriterion("team_id >", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThanOrEqualTo(String value) { + addCriterion("team_id >=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThan(String value) { + addCriterion("team_id <", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThanOrEqualTo(String value) { + addCriterion("team_id <=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLike(String value) { + addCriterion("team_id like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotLike(String value) { + addCriterion("team_id not like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdIn(List values) { + addCriterion("team_id in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotIn(List values) { + addCriterion("team_id not in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdBetween(String value1, String value2) { + addCriterion("team_id between", value1, value2, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotBetween(String value1, String value2) { + addCriterion("team_id not between", value1, value2, "teamId"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.event_metadata + * + * @mbg.generated do_not_delete_during_merge Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java new file mode 100644 index 0000000000..55cc17a01d --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java @@ -0,0 +1,69 @@ +package org.opensrp.domain.postgres; + +public class Report { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.report.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.report.json + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Object json; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.report.id + * + * @return the value of core.report.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.report.id + * + * @param id the value for core.report.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.report.json + * + * @return the value of core.report.json + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Object getJson() { + return json; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.report.json + * + * @param json the value for core.report.json + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setJson(Object json) { + this.json = json; + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java new file mode 100644 index 0000000000..ed6fae9128 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java @@ -0,0 +1,422 @@ +package org.opensrp.domain.postgres; + +import java.util.ArrayList; +import java.util.List; + +public class ReportExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public ReportExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andJsonIsNull() { + addCriterion("json is null"); + return (Criteria) this; + } + + public Criteria andJsonIsNotNull() { + addCriterion("json is not null"); + return (Criteria) this; + } + + public Criteria andJsonEqualTo(Object value) { + addCriterion("json =", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotEqualTo(Object value) { + addCriterion("json <>", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThan(Object value) { + addCriterion("json >", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThanOrEqualTo(Object value) { + addCriterion("json >=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThan(Object value) { + addCriterion("json <", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThanOrEqualTo(Object value) { + addCriterion("json <=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonIn(List values) { + addCriterion("json in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotIn(List values) { + addCriterion("json not in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonBetween(Object value1, Object value2) { + addCriterion("json between", value1, value2, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotBetween(Object value1, Object value2) { + addCriterion("json not between", value1, value2, "json"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.report + * + * @mbg.generated do_not_delete_during_merge Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java new file mode 100644 index 0000000000..42d37eb9ce --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java @@ -0,0 +1,302 @@ +package org.opensrp.domain.postgres; + +import java.util.Date; + +public class ReportMetadata { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.report_metadata.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.report_metadata.report_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Long reportId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.report_metadata.base_entity_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String baseEntityId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.report_metadata.server_version + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Date serverVersion; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.report_metadata.report_type + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String reportType; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.report_metadata.provider_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String providerId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.report_metadata.location_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String locationId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.report_metadata.team + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String team; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.report_metadata.team_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String teamId; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.report_metadata.id + * + * @return the value of core.report_metadata.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.report_metadata.id + * + * @param id the value for core.report_metadata.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.report_metadata.report_id + * + * @return the value of core.report_metadata.report_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Long getReportId() { + return reportId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.report_metadata.report_id + * + * @param reportId the value for core.report_metadata.report_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setReportId(Long reportId) { + this.reportId = reportId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.report_metadata.base_entity_id + * + * @return the value of core.report_metadata.base_entity_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getBaseEntityId() { + return baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.report_metadata.base_entity_id + * + * @param baseEntityId the value for core.report_metadata.base_entity_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setBaseEntityId(String baseEntityId) { + this.baseEntityId = baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.report_metadata.server_version + * + * @return the value of core.report_metadata.server_version + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Date getServerVersion() { + return serverVersion; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.report_metadata.server_version + * + * @param serverVersion the value for core.report_metadata.server_version + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setServerVersion(Date serverVersion) { + this.serverVersion = serverVersion; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.report_metadata.report_type + * + * @return the value of core.report_metadata.report_type + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getReportType() { + return reportType; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.report_metadata.report_type + * + * @param reportType the value for core.report_metadata.report_type + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setReportType(String reportType) { + this.reportType = reportType; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.report_metadata.provider_id + * + * @return the value of core.report_metadata.provider_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getProviderId() { + return providerId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.report_metadata.provider_id + * + * @param providerId the value for core.report_metadata.provider_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.report_metadata.location_id + * + * @return the value of core.report_metadata.location_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getLocationId() { + return locationId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.report_metadata.location_id + * + * @param locationId the value for core.report_metadata.location_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.report_metadata.team + * + * @return the value of core.report_metadata.team + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getTeam() { + return team; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.report_metadata.team + * + * @param team the value for core.report_metadata.team + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setTeam(String team) { + this.team = team; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.report_metadata.team_id + * + * @return the value of core.report_metadata.team_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getTeamId() { + return teamId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.report_metadata.team_id + * + * @param teamId the value for core.report_metadata.team_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setTeamId(String teamId) { + this.teamId = teamId; + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java new file mode 100644 index 0000000000..fd74e58e0d --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java @@ -0,0 +1,903 @@ +package org.opensrp.domain.postgres; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ReportMetadataExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public ReportMetadataExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andReportIdIsNull() { + addCriterion("report_id is null"); + return (Criteria) this; + } + + public Criteria andReportIdIsNotNull() { + addCriterion("report_id is not null"); + return (Criteria) this; + } + + public Criteria andReportIdEqualTo(Long value) { + addCriterion("report_id =", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotEqualTo(Long value) { + addCriterion("report_id <>", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThan(Long value) { + addCriterion("report_id >", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThanOrEqualTo(Long value) { + addCriterion("report_id >=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThan(Long value) { + addCriterion("report_id <", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThanOrEqualTo(Long value) { + addCriterion("report_id <=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdIn(List values) { + addCriterion("report_id in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotIn(List values) { + addCriterion("report_id not in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdBetween(Long value1, Long value2) { + addCriterion("report_id between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotBetween(Long value1, Long value2) { + addCriterion("report_id not between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNull() { + addCriterion("base_entity_id is null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNotNull() { + addCriterion("base_entity_id is not null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdEqualTo(String value) { + addCriterion("base_entity_id =", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotEqualTo(String value) { + addCriterion("base_entity_id <>", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThan(String value) { + addCriterion("base_entity_id >", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { + addCriterion("base_entity_id >=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThan(String value) { + addCriterion("base_entity_id <", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { + addCriterion("base_entity_id <=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLike(String value) { + addCriterion("base_entity_id like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotLike(String value) { + addCriterion("base_entity_id not like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIn(List values) { + addCriterion("base_entity_id in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotIn(List values) { + addCriterion("base_entity_id not in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdBetween(String value1, String value2) { + addCriterion("base_entity_id between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotBetween(String value1, String value2) { + addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNull() { + addCriterion("server_version is null"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNotNull() { + addCriterion("server_version is not null"); + return (Criteria) this; + } + + public Criteria andServerVersionEqualTo(Date value) { + addCriterion("server_version =", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotEqualTo(Date value) { + addCriterion("server_version <>", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThan(Date value) { + addCriterion("server_version >", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThanOrEqualTo(Date value) { + addCriterion("server_version >=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThan(Date value) { + addCriterion("server_version <", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThanOrEqualTo(Date value) { + addCriterion("server_version <=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionIn(List values) { + addCriterion("server_version in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotIn(List values) { + addCriterion("server_version not in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionBetween(Date value1, Date value2) { + addCriterion("server_version between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotBetween(Date value1, Date value2) { + addCriterion("server_version not between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andReportTypeIsNull() { + addCriterion("report_type is null"); + return (Criteria) this; + } + + public Criteria andReportTypeIsNotNull() { + addCriterion("report_type is not null"); + return (Criteria) this; + } + + public Criteria andReportTypeEqualTo(String value) { + addCriterion("report_type =", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeNotEqualTo(String value) { + addCriterion("report_type <>", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeGreaterThan(String value) { + addCriterion("report_type >", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeGreaterThanOrEqualTo(String value) { + addCriterion("report_type >=", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeLessThan(String value) { + addCriterion("report_type <", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeLessThanOrEqualTo(String value) { + addCriterion("report_type <=", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeLike(String value) { + addCriterion("report_type like", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeNotLike(String value) { + addCriterion("report_type not like", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeIn(List values) { + addCriterion("report_type in", values, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeNotIn(List values) { + addCriterion("report_type not in", values, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeBetween(String value1, String value2) { + addCriterion("report_type between", value1, value2, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeNotBetween(String value1, String value2) { + addCriterion("report_type not between", value1, value2, "reportType"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNull() { + addCriterion("provider_id is null"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNotNull() { + addCriterion("provider_id is not null"); + return (Criteria) this; + } + + public Criteria andProviderIdEqualTo(String value) { + addCriterion("provider_id =", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotEqualTo(String value) { + addCriterion("provider_id <>", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThan(String value) { + addCriterion("provider_id >", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThanOrEqualTo(String value) { + addCriterion("provider_id >=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThan(String value) { + addCriterion("provider_id <", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThanOrEqualTo(String value) { + addCriterion("provider_id <=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLike(String value) { + addCriterion("provider_id like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotLike(String value) { + addCriterion("provider_id not like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdIn(List values) { + addCriterion("provider_id in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotIn(List values) { + addCriterion("provider_id not in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdBetween(String value1, String value2) { + addCriterion("provider_id between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotBetween(String value1, String value2) { + addCriterion("provider_id not between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNull() { + addCriterion("location_id is null"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNotNull() { + addCriterion("location_id is not null"); + return (Criteria) this; + } + + public Criteria andLocationIdEqualTo(String value) { + addCriterion("location_id =", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotEqualTo(String value) { + addCriterion("location_id <>", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThan(String value) { + addCriterion("location_id >", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThanOrEqualTo(String value) { + addCriterion("location_id >=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThan(String value) { + addCriterion("location_id <", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThanOrEqualTo(String value) { + addCriterion("location_id <=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLike(String value) { + addCriterion("location_id like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotLike(String value) { + addCriterion("location_id not like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdIn(List values) { + addCriterion("location_id in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotIn(List values) { + addCriterion("location_id not in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdBetween(String value1, String value2) { + addCriterion("location_id between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotBetween(String value1, String value2) { + addCriterion("location_id not between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andTeamIsNull() { + addCriterion("team is null"); + return (Criteria) this; + } + + public Criteria andTeamIsNotNull() { + addCriterion("team is not null"); + return (Criteria) this; + } + + public Criteria andTeamEqualTo(String value) { + addCriterion("team =", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotEqualTo(String value) { + addCriterion("team <>", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThan(String value) { + addCriterion("team >", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThanOrEqualTo(String value) { + addCriterion("team >=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThan(String value) { + addCriterion("team <", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThanOrEqualTo(String value) { + addCriterion("team <=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLike(String value) { + addCriterion("team like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotLike(String value) { + addCriterion("team not like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamIn(List values) { + addCriterion("team in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotIn(List values) { + addCriterion("team not in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamBetween(String value1, String value2) { + addCriterion("team between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotBetween(String value1, String value2) { + addCriterion("team not between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNull() { + addCriterion("team_id is null"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNotNull() { + addCriterion("team_id is not null"); + return (Criteria) this; + } + + public Criteria andTeamIdEqualTo(String value) { + addCriterion("team_id =", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotEqualTo(String value) { + addCriterion("team_id <>", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThan(String value) { + addCriterion("team_id >", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThanOrEqualTo(String value) { + addCriterion("team_id >=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThan(String value) { + addCriterion("team_id <", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThanOrEqualTo(String value) { + addCriterion("team_id <=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLike(String value) { + addCriterion("team_id like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotLike(String value) { + addCriterion("team_id not like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdIn(List values) { + addCriterion("team_id in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotIn(List values) { + addCriterion("team_id not in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdBetween(String value1, String value2) { + addCriterion("team_id between", value1, value2, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotBetween(String value1, String value2) { + addCriterion("team_id not between", value1, value2, "teamId"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.report_metadata + * + * @mbg.generated do_not_delete_during_merge Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java new file mode 100644 index 0000000000..a87dd2104f --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java @@ -0,0 +1,69 @@ +package org.opensrp.domain.postgres; + +public class Stock { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.stock.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.stock.json + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Object json; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.stock.id + * + * @return the value of core.stock.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.stock.id + * + * @param id the value for core.stock.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.stock.json + * + * @return the value of core.stock.json + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Object getJson() { + return json; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.stock.json + * + * @param json the value for core.stock.json + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setJson(Object json) { + this.json = json; + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java new file mode 100644 index 0000000000..f6b668c77d --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java @@ -0,0 +1,422 @@ +package org.opensrp.domain.postgres; + +import java.util.ArrayList; +import java.util.List; + +public class StockExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public StockExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andJsonIsNull() { + addCriterion("json is null"); + return (Criteria) this; + } + + public Criteria andJsonIsNotNull() { + addCriterion("json is not null"); + return (Criteria) this; + } + + public Criteria andJsonEqualTo(Object value) { + addCriterion("json =", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotEqualTo(Object value) { + addCriterion("json <>", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThan(Object value) { + addCriterion("json >", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThanOrEqualTo(Object value) { + addCriterion("json >=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThan(Object value) { + addCriterion("json <", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThanOrEqualTo(Object value) { + addCriterion("json <=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonIn(List values) { + addCriterion("json in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotIn(List values) { + addCriterion("json not in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonBetween(Object value1, Object value2) { + addCriterion("json between", value1, value2, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotBetween(Object value1, Object value2) { + addCriterion("json not between", value1, value2, "json"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.stock + * + * @mbg.generated do_not_delete_during_merge Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java new file mode 100644 index 0000000000..64f4686308 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java @@ -0,0 +1,236 @@ +package org.opensrp.domain.postgres; + +import java.util.Date; + +public class StockMetadata { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.stock_metadata.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.stock_metadata.stock_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Long stockId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.stock_metadata.server_version + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private Date serverVersion; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.stock_metadata.provider_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String providerId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.stock_metadata.location_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String locationId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.stock_metadata.team + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String team; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.stock_metadata.team_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + private String teamId; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.stock_metadata.id + * + * @return the value of core.stock_metadata.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.stock_metadata.id + * + * @param id the value for core.stock_metadata.id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.stock_metadata.stock_id + * + * @return the value of core.stock_metadata.stock_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Long getStockId() { + return stockId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.stock_metadata.stock_id + * + * @param stockId the value for core.stock_metadata.stock_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setStockId(Long stockId) { + this.stockId = stockId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.stock_metadata.server_version + * + * @return the value of core.stock_metadata.server_version + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Date getServerVersion() { + return serverVersion; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.stock_metadata.server_version + * + * @param serverVersion the value for core.stock_metadata.server_version + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setServerVersion(Date serverVersion) { + this.serverVersion = serverVersion; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.stock_metadata.provider_id + * + * @return the value of core.stock_metadata.provider_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getProviderId() { + return providerId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.stock_metadata.provider_id + * + * @param providerId the value for core.stock_metadata.provider_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.stock_metadata.location_id + * + * @return the value of core.stock_metadata.location_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getLocationId() { + return locationId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.stock_metadata.location_id + * + * @param locationId the value for core.stock_metadata.location_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.stock_metadata.team + * + * @return the value of core.stock_metadata.team + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getTeam() { + return team; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.stock_metadata.team + * + * @param team the value for core.stock_metadata.team + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setTeam(String team) { + this.team = team; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.stock_metadata.team_id + * + * @return the value of core.stock_metadata.team_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getTeamId() { + return teamId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.stock_metadata.team_id + * + * @param teamId the value for core.stock_metadata.team_id + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setTeamId(String teamId) { + this.teamId = teamId; + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java new file mode 100644 index 0000000000..17d665b5fd --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java @@ -0,0 +1,763 @@ +package org.opensrp.domain.postgres; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class StockMetadataExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public StockMetadataExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andStockIdIsNull() { + addCriterion("stock_id is null"); + return (Criteria) this; + } + + public Criteria andStockIdIsNotNull() { + addCriterion("stock_id is not null"); + return (Criteria) this; + } + + public Criteria andStockIdEqualTo(Long value) { + addCriterion("stock_id =", value, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdNotEqualTo(Long value) { + addCriterion("stock_id <>", value, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdGreaterThan(Long value) { + addCriterion("stock_id >", value, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdGreaterThanOrEqualTo(Long value) { + addCriterion("stock_id >=", value, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdLessThan(Long value) { + addCriterion("stock_id <", value, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdLessThanOrEqualTo(Long value) { + addCriterion("stock_id <=", value, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdIn(List values) { + addCriterion("stock_id in", values, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdNotIn(List values) { + addCriterion("stock_id not in", values, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdBetween(Long value1, Long value2) { + addCriterion("stock_id between", value1, value2, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdNotBetween(Long value1, Long value2) { + addCriterion("stock_id not between", value1, value2, "stockId"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNull() { + addCriterion("server_version is null"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNotNull() { + addCriterion("server_version is not null"); + return (Criteria) this; + } + + public Criteria andServerVersionEqualTo(Date value) { + addCriterion("server_version =", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotEqualTo(Date value) { + addCriterion("server_version <>", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThan(Date value) { + addCriterion("server_version >", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThanOrEqualTo(Date value) { + addCriterion("server_version >=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThan(Date value) { + addCriterion("server_version <", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThanOrEqualTo(Date value) { + addCriterion("server_version <=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionIn(List values) { + addCriterion("server_version in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotIn(List values) { + addCriterion("server_version not in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionBetween(Date value1, Date value2) { + addCriterion("server_version between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotBetween(Date value1, Date value2) { + addCriterion("server_version not between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNull() { + addCriterion("provider_id is null"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNotNull() { + addCriterion("provider_id is not null"); + return (Criteria) this; + } + + public Criteria andProviderIdEqualTo(String value) { + addCriterion("provider_id =", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotEqualTo(String value) { + addCriterion("provider_id <>", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThan(String value) { + addCriterion("provider_id >", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThanOrEqualTo(String value) { + addCriterion("provider_id >=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThan(String value) { + addCriterion("provider_id <", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThanOrEqualTo(String value) { + addCriterion("provider_id <=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLike(String value) { + addCriterion("provider_id like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotLike(String value) { + addCriterion("provider_id not like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdIn(List values) { + addCriterion("provider_id in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotIn(List values) { + addCriterion("provider_id not in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdBetween(String value1, String value2) { + addCriterion("provider_id between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotBetween(String value1, String value2) { + addCriterion("provider_id not between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNull() { + addCriterion("location_id is null"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNotNull() { + addCriterion("location_id is not null"); + return (Criteria) this; + } + + public Criteria andLocationIdEqualTo(String value) { + addCriterion("location_id =", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotEqualTo(String value) { + addCriterion("location_id <>", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThan(String value) { + addCriterion("location_id >", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThanOrEqualTo(String value) { + addCriterion("location_id >=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThan(String value) { + addCriterion("location_id <", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThanOrEqualTo(String value) { + addCriterion("location_id <=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLike(String value) { + addCriterion("location_id like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotLike(String value) { + addCriterion("location_id not like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdIn(List values) { + addCriterion("location_id in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotIn(List values) { + addCriterion("location_id not in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdBetween(String value1, String value2) { + addCriterion("location_id between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotBetween(String value1, String value2) { + addCriterion("location_id not between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andTeamIsNull() { + addCriterion("team is null"); + return (Criteria) this; + } + + public Criteria andTeamIsNotNull() { + addCriterion("team is not null"); + return (Criteria) this; + } + + public Criteria andTeamEqualTo(String value) { + addCriterion("team =", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotEqualTo(String value) { + addCriterion("team <>", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThan(String value) { + addCriterion("team >", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThanOrEqualTo(String value) { + addCriterion("team >=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThan(String value) { + addCriterion("team <", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThanOrEqualTo(String value) { + addCriterion("team <=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLike(String value) { + addCriterion("team like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotLike(String value) { + addCriterion("team not like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamIn(List values) { + addCriterion("team in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotIn(List values) { + addCriterion("team not in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamBetween(String value1, String value2) { + addCriterion("team between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotBetween(String value1, String value2) { + addCriterion("team not between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNull() { + addCriterion("team_id is null"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNotNull() { + addCriterion("team_id is not null"); + return (Criteria) this; + } + + public Criteria andTeamIdEqualTo(String value) { + addCriterion("team_id =", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotEqualTo(String value) { + addCriterion("team_id <>", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThan(String value) { + addCriterion("team_id >", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThanOrEqualTo(String value) { + addCriterion("team_id >=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThan(String value) { + addCriterion("team_id <", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThanOrEqualTo(String value) { + addCriterion("team_id <=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLike(String value) { + addCriterion("team_id like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotLike(String value) { + addCriterion("team_id not like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdIn(List values) { + addCriterion("team_id in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotIn(List values) { + addCriterion("team_id not in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdBetween(String value1, String value2) { + addCriterion("team_id between", value1, value2, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotBetween(String value1, String value2) { + addCriterion("team_id not between", value1, value2, "teamId"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.stock_metadata + * + * @mbg.generated do_not_delete_during_merge Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java new file mode 100644 index 0000000000..588d541c20 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java @@ -0,0 +1,96 @@ +package org.opensrp.repository.postgres.mapper; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.Alert; +import org.opensrp.domain.postgres.AlertExample; + +public interface AlertMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + long countByExample(AlertExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByExample(AlertExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insert(Alert record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insertSelective(Alert record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + List selectByExample(AlertExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + Alert selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Alert record, @Param("example") AlertExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExample(@Param("record") Alert record, @Param("example") AlertExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKeySelective(Alert record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKey(Alert record); +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java new file mode 100644 index 0000000000..b3e3e5aa75 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java @@ -0,0 +1,96 @@ +package org.opensrp.repository.postgres.mapper; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.AlertMetadata; +import org.opensrp.domain.postgres.AlertMetadataExample; + +public interface AlertMetadataMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + long countByExample(AlertMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByExample(AlertMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insert(AlertMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insertSelective(AlertMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + List selectByExample(AlertMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + AlertMetadata selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExampleSelective(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExample(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKeySelective(AlertMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKey(AlertMetadata record); +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java new file mode 100644 index 0000000000..a66501becd --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java @@ -0,0 +1,96 @@ +package org.opensrp.repository.postgres.mapper; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.Client; +import org.opensrp.domain.postgres.ClientExample; + +public interface ClientMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + long countByExample(ClientExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByExample(ClientExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insert(Client record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insertSelective(Client record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + List selectByExample(ClientExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + Client selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Client record, @Param("example") ClientExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExample(@Param("record") Client record, @Param("example") ClientExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKeySelective(Client record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKey(Client record); +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java new file mode 100644 index 0000000000..7414915e32 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java @@ -0,0 +1,96 @@ +package org.opensrp.repository.postgres.mapper; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.ClientMetadata; +import org.opensrp.domain.postgres.ClientMetadataExample; + +public interface ClientMetadataMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + long countByExample(ClientMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByExample(ClientMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insert(ClientMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insertSelective(ClientMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + List selectByExample(ClientMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + ClientMetadata selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExampleSelective(@Param("record") ClientMetadata record, @Param("example") ClientMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExample(@Param("record") ClientMetadata record, @Param("example") ClientMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKeySelective(ClientMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKey(ClientMetadata record); +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java new file mode 100644 index 0000000000..0c7c3e7538 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java @@ -0,0 +1,96 @@ +package org.opensrp.repository.postgres.mapper; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.Event; +import org.opensrp.domain.postgres.EventExample; + +public interface EventMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + long countByExample(EventExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByExample(EventExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insert(Event record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insertSelective(Event record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + List selectByExample(EventExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + Event selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Event record, @Param("example") EventExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExample(@Param("record") Event record, @Param("example") EventExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKeySelective(Event record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKey(Event record); +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java new file mode 100644 index 0000000000..dcc4cf80ff --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java @@ -0,0 +1,96 @@ +package org.opensrp.repository.postgres.mapper; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.EventMetadata; +import org.opensrp.domain.postgres.EventMetadataExample; + +public interface EventMetadataMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + long countByExample(EventMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByExample(EventMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insert(EventMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insertSelective(EventMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + List selectByExample(EventMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + EventMetadata selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExampleSelective(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExample(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKeySelective(EventMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKey(EventMetadata record); +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java new file mode 100644 index 0000000000..2d9d9050a7 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java @@ -0,0 +1,96 @@ +package org.opensrp.repository.postgres.mapper; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.Report; +import org.opensrp.domain.postgres.ReportExample; + +public interface ReportMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + long countByExample(ReportExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByExample(ReportExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insert(Report record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insertSelective(Report record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + List selectByExample(ReportExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + Report selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Report record, @Param("example") ReportExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExample(@Param("record") Report record, @Param("example") ReportExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKeySelective(Report record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKey(Report record); +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java new file mode 100644 index 0000000000..e5cd6dde90 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java @@ -0,0 +1,96 @@ +package org.opensrp.repository.postgres.mapper; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.ReportMetadata; +import org.opensrp.domain.postgres.ReportMetadataExample; + +public interface ReportMetadataMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + long countByExample(ReportMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByExample(ReportMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insert(ReportMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insertSelective(ReportMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + List selectByExample(ReportMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + ReportMetadata selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExampleSelective(@Param("record") ReportMetadata record, @Param("example") ReportMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExample(@Param("record") ReportMetadata record, @Param("example") ReportMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKeySelective(ReportMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKey(ReportMetadata record); +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java new file mode 100644 index 0000000000..582b7490b7 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java @@ -0,0 +1,96 @@ +package org.opensrp.repository.postgres.mapper; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.Stock; +import org.opensrp.domain.postgres.StockExample; + +public interface StockMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + long countByExample(StockExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByExample(StockExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insert(Stock record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insertSelective(Stock record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + List selectByExample(StockExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + Stock selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Stock record, @Param("example") StockExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExample(@Param("record") Stock record, @Param("example") StockExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKeySelective(Stock record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKey(Stock record); +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java new file mode 100644 index 0000000000..c6545f5ebb --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java @@ -0,0 +1,96 @@ +package org.opensrp.repository.postgres.mapper; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.StockMetadata; +import org.opensrp.domain.postgres.StockMetadataExample; + +public interface StockMetadataMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + long countByExample(StockMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByExample(StockMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insert(StockMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int insertSelective(StockMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + List selectByExample(StockMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + StockMetadata selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExampleSelective(@Param("record") StockMetadata record, @Param("example") StockMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByExample(@Param("record") StockMetadata record, @Param("example") StockMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKeySelective(StockMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + */ + int updateByPrimaryKey(StockMetadata record); +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml new file mode 100644 index 0000000000..c510d8d4a0 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, json + + + + + + delete from core.alert + where id = #{id,jdbcType=BIGINT} + + + + delete from core.alert + + + + + + + insert into core.alert (id, json) + values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) + + + + insert into core.alert + + + id, + + + json, + + + + + #{id,jdbcType=BIGINT}, + + + #{json,jdbcType=OTHER}, + + + + + + + update core.alert + + + id = #{record.id,jdbcType=BIGINT}, + + + json = #{record.json,jdbcType=OTHER}, + + + + + + + + + update core.alert + set id = #{record.id,jdbcType=BIGINT}, + json = #{record.json,jdbcType=OTHER} + + + + + + + update core.alert + + + json = #{json,jdbcType=OTHER}, + + + where id = #{id,jdbcType=BIGINT} + + + + update core.alert + set json = #{json,jdbcType=OTHER} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml new file mode 100644 index 0000000000..eaedd73443 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml @@ -0,0 +1,333 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, alert_id, base_entity_id, server_version, provider_id, location_id, team, team_id + + + + + + delete from core.alert_metadata + where id = #{id,jdbcType=BIGINT} + + + + delete from core.alert_metadata + + + + + + + insert into core.alert_metadata (id, alert_id, base_entity_id, + server_version, provider_id, location_id, + team, team_id) + values (#{id,jdbcType=BIGINT}, #{alertId,jdbcType=BIGINT}, #{baseEntityId,jdbcType=VARCHAR}, + #{serverVersion,jdbcType=TIMESTAMP}, #{providerId,jdbcType=VARCHAR}, #{locationId,jdbcType=VARCHAR}, + #{team,jdbcType=VARCHAR}, #{teamId,jdbcType=VARCHAR}) + + + + insert into core.alert_metadata + + + id, + + + alert_id, + + + base_entity_id, + + + server_version, + + + provider_id, + + + location_id, + + + team, + + + team_id, + + + + + #{id,jdbcType=BIGINT}, + + + #{alertId,jdbcType=BIGINT}, + + + #{baseEntityId,jdbcType=VARCHAR}, + + + #{serverVersion,jdbcType=TIMESTAMP}, + + + #{providerId,jdbcType=VARCHAR}, + + + #{locationId,jdbcType=VARCHAR}, + + + #{team,jdbcType=VARCHAR}, + + + #{teamId,jdbcType=VARCHAR}, + + + + + + + update core.alert_metadata + + + id = #{record.id,jdbcType=BIGINT}, + + + alert_id = #{record.alertId,jdbcType=BIGINT}, + + + base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, + + + server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + + + provider_id = #{record.providerId,jdbcType=VARCHAR}, + + + location_id = #{record.locationId,jdbcType=VARCHAR}, + + + team = #{record.team,jdbcType=VARCHAR}, + + + team_id = #{record.teamId,jdbcType=VARCHAR}, + + + + + + + + + update core.alert_metadata + set id = #{record.id,jdbcType=BIGINT}, + alert_id = #{record.alertId,jdbcType=BIGINT}, + base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, + server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + provider_id = #{record.providerId,jdbcType=VARCHAR}, + location_id = #{record.locationId,jdbcType=VARCHAR}, + team = #{record.team,jdbcType=VARCHAR}, + team_id = #{record.teamId,jdbcType=VARCHAR} + + + + + + + update core.alert_metadata + + + alert_id = #{alertId,jdbcType=BIGINT}, + + + base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, + + + server_version = #{serverVersion,jdbcType=TIMESTAMP}, + + + provider_id = #{providerId,jdbcType=VARCHAR}, + + + location_id = #{locationId,jdbcType=VARCHAR}, + + + team = #{team,jdbcType=VARCHAR}, + + + team_id = #{teamId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + + update core.alert_metadata + set alert_id = #{alertId,jdbcType=BIGINT}, + base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, + server_version = #{serverVersion,jdbcType=TIMESTAMP}, + provider_id = #{providerId,jdbcType=VARCHAR}, + location_id = #{locationId,jdbcType=VARCHAR}, + team = #{team,jdbcType=VARCHAR}, + team_id = #{teamId,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml new file mode 100644 index 0000000000..69f0ab7e98 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, json + + + + + + delete from core.client + where id = #{id,jdbcType=BIGINT} + + + + delete from core.client + + + + + + + insert into core.client (id, json) + values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) + + + + insert into core.client + + + id, + + + json, + + + + + #{id,jdbcType=BIGINT}, + + + #{json,jdbcType=OTHER}, + + + + + + + update core.client + + + id = #{record.id,jdbcType=BIGINT}, + + + json = #{record.json,jdbcType=OTHER}, + + + + + + + + + update core.client + set id = #{record.id,jdbcType=BIGINT}, + json = #{record.json,jdbcType=OTHER} + + + + + + + update core.client + + + json = #{json,jdbcType=OTHER}, + + + where id = #{id,jdbcType=BIGINT} + + + + update core.client + set json = #{json,jdbcType=OTHER} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml new file mode 100644 index 0000000000..5438634306 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml @@ -0,0 +1,351 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, client_id, base_entity_id, relational_id, openmrs_uuid, unique_id, first_name, + last_name, birth_date + + + + + + delete from core.client_metadata + where id = #{id,jdbcType=BIGINT} + + + + delete from core.client_metadata + + + + + + + insert into core.client_metadata (id, client_id, base_entity_id, + relational_id, openmrs_uuid, unique_id, + first_name, last_name, birth_date + ) + values (#{id,jdbcType=BIGINT}, #{clientId,jdbcType=BIGINT}, #{baseEntityId,jdbcType=VARCHAR}, + #{relationalId,jdbcType=VARCHAR}, #{openmrsUuid,jdbcType=VARCHAR}, #{uniqueId,jdbcType=VARCHAR}, + #{firstName,jdbcType=VARCHAR}, #{lastName,jdbcType=VARCHAR}, #{birthDate,jdbcType=DATE} + ) + + + + insert into core.client_metadata + + + id, + + + client_id, + + + base_entity_id, + + + relational_id, + + + openmrs_uuid, + + + unique_id, + + + first_name, + + + last_name, + + + birth_date, + + + + + #{id,jdbcType=BIGINT}, + + + #{clientId,jdbcType=BIGINT}, + + + #{baseEntityId,jdbcType=VARCHAR}, + + + #{relationalId,jdbcType=VARCHAR}, + + + #{openmrsUuid,jdbcType=VARCHAR}, + + + #{uniqueId,jdbcType=VARCHAR}, + + + #{firstName,jdbcType=VARCHAR}, + + + #{lastName,jdbcType=VARCHAR}, + + + #{birthDate,jdbcType=DATE}, + + + + + + + update core.client_metadata + + + id = #{record.id,jdbcType=BIGINT}, + + + client_id = #{record.clientId,jdbcType=BIGINT}, + + + base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, + + + relational_id = #{record.relationalId,jdbcType=VARCHAR}, + + + openmrs_uuid = #{record.openmrsUuid,jdbcType=VARCHAR}, + + + unique_id = #{record.uniqueId,jdbcType=VARCHAR}, + + + first_name = #{record.firstName,jdbcType=VARCHAR}, + + + last_name = #{record.lastName,jdbcType=VARCHAR}, + + + birth_date = #{record.birthDate,jdbcType=DATE}, + + + + + + + + + update core.client_metadata + set id = #{record.id,jdbcType=BIGINT}, + client_id = #{record.clientId,jdbcType=BIGINT}, + base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, + relational_id = #{record.relationalId,jdbcType=VARCHAR}, + openmrs_uuid = #{record.openmrsUuid,jdbcType=VARCHAR}, + unique_id = #{record.uniqueId,jdbcType=VARCHAR}, + first_name = #{record.firstName,jdbcType=VARCHAR}, + last_name = #{record.lastName,jdbcType=VARCHAR}, + birth_date = #{record.birthDate,jdbcType=DATE} + + + + + + + update core.client_metadata + + + client_id = #{clientId,jdbcType=BIGINT}, + + + base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, + + + relational_id = #{relationalId,jdbcType=VARCHAR}, + + + openmrs_uuid = #{openmrsUuid,jdbcType=VARCHAR}, + + + unique_id = #{uniqueId,jdbcType=VARCHAR}, + + + first_name = #{firstName,jdbcType=VARCHAR}, + + + last_name = #{lastName,jdbcType=VARCHAR}, + + + birth_date = #{birthDate,jdbcType=DATE}, + + + where id = #{id,jdbcType=BIGINT} + + + + update core.client_metadata + set client_id = #{clientId,jdbcType=BIGINT}, + base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, + relational_id = #{relationalId,jdbcType=VARCHAR}, + openmrs_uuid = #{openmrsUuid,jdbcType=VARCHAR}, + unique_id = #{uniqueId,jdbcType=VARCHAR}, + first_name = #{firstName,jdbcType=VARCHAR}, + last_name = #{lastName,jdbcType=VARCHAR}, + birth_date = #{birthDate,jdbcType=DATE} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml new file mode 100644 index 0000000000..4e86eba512 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, json + + + + + + delete from core.event + where id = #{id,jdbcType=BIGINT} + + + + delete from core.event + + + + + + + insert into core.event (id, json) + values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) + + + + insert into core.event + + + id, + + + json, + + + + + #{id,jdbcType=BIGINT}, + + + #{json,jdbcType=OTHER}, + + + + + + + update core.event + + + id = #{record.id,jdbcType=BIGINT}, + + + json = #{record.json,jdbcType=OTHER}, + + + + + + + + + update core.event + set id = #{record.id,jdbcType=BIGINT}, + json = #{record.json,jdbcType=OTHER} + + + + + + + update core.event + + + json = #{json,jdbcType=OTHER}, + + + where id = #{id,jdbcType=BIGINT} + + + + update core.event + set json = #{json,jdbcType=OTHER} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml new file mode 100644 index 0000000000..b981db4fdc --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml @@ -0,0 +1,398 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, event_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, event_type, + event_date, provider_id, location_id, team, team_id + + + + + + delete from core.event_metadata + where id = #{id,jdbcType=BIGINT} + + + + delete from core.event_metadata + + + + + + + insert into core.event_metadata (id, event_id, base_entity_id, + form_submission_id, server_version, openmrs_uuid, + event_type, event_date, provider_id, + location_id, team, team_id + ) + values (#{id,jdbcType=BIGINT}, #{eventId,jdbcType=BIGINT}, #{baseEntityId,jdbcType=VARCHAR}, + #{formSubmissionId,jdbcType=VARCHAR}, #{serverVersion,jdbcType=TIMESTAMP}, #{openmrsUuid,jdbcType=VARCHAR}, + #{eventType,jdbcType=VARCHAR}, #{eventDate,jdbcType=DATE}, #{providerId,jdbcType=VARCHAR}, + #{locationId,jdbcType=VARCHAR}, #{team,jdbcType=VARCHAR}, #{teamId,jdbcType=VARCHAR} + ) + + + + insert into core.event_metadata + + + id, + + + event_id, + + + base_entity_id, + + + form_submission_id, + + + server_version, + + + openmrs_uuid, + + + event_type, + + + event_date, + + + provider_id, + + + location_id, + + + team, + + + team_id, + + + + + #{id,jdbcType=BIGINT}, + + + #{eventId,jdbcType=BIGINT}, + + + #{baseEntityId,jdbcType=VARCHAR}, + + + #{formSubmissionId,jdbcType=VARCHAR}, + + + #{serverVersion,jdbcType=TIMESTAMP}, + + + #{openmrsUuid,jdbcType=VARCHAR}, + + + #{eventType,jdbcType=VARCHAR}, + + + #{eventDate,jdbcType=DATE}, + + + #{providerId,jdbcType=VARCHAR}, + + + #{locationId,jdbcType=VARCHAR}, + + + #{team,jdbcType=VARCHAR}, + + + #{teamId,jdbcType=VARCHAR}, + + + + + + + update core.event_metadata + + + id = #{record.id,jdbcType=BIGINT}, + + + event_id = #{record.eventId,jdbcType=BIGINT}, + + + base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, + + + form_submission_id = #{record.formSubmissionId,jdbcType=VARCHAR}, + + + server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + + + openmrs_uuid = #{record.openmrsUuid,jdbcType=VARCHAR}, + + + event_type = #{record.eventType,jdbcType=VARCHAR}, + + + event_date = #{record.eventDate,jdbcType=DATE}, + + + provider_id = #{record.providerId,jdbcType=VARCHAR}, + + + location_id = #{record.locationId,jdbcType=VARCHAR}, + + + team = #{record.team,jdbcType=VARCHAR}, + + + team_id = #{record.teamId,jdbcType=VARCHAR}, + + + + + + + + + update core.event_metadata + set id = #{record.id,jdbcType=BIGINT}, + event_id = #{record.eventId,jdbcType=BIGINT}, + base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, + form_submission_id = #{record.formSubmissionId,jdbcType=VARCHAR}, + server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + openmrs_uuid = #{record.openmrsUuid,jdbcType=VARCHAR}, + event_type = #{record.eventType,jdbcType=VARCHAR}, + event_date = #{record.eventDate,jdbcType=DATE}, + provider_id = #{record.providerId,jdbcType=VARCHAR}, + location_id = #{record.locationId,jdbcType=VARCHAR}, + team = #{record.team,jdbcType=VARCHAR}, + team_id = #{record.teamId,jdbcType=VARCHAR} + + + + + + + update core.event_metadata + + + event_id = #{eventId,jdbcType=BIGINT}, + + + base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, + + + form_submission_id = #{formSubmissionId,jdbcType=VARCHAR}, + + + server_version = #{serverVersion,jdbcType=TIMESTAMP}, + + + openmrs_uuid = #{openmrsUuid,jdbcType=VARCHAR}, + + + event_type = #{eventType,jdbcType=VARCHAR}, + + + event_date = #{eventDate,jdbcType=DATE}, + + + provider_id = #{providerId,jdbcType=VARCHAR}, + + + location_id = #{locationId,jdbcType=VARCHAR}, + + + team = #{team,jdbcType=VARCHAR}, + + + team_id = #{teamId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + + update core.event_metadata + set event_id = #{eventId,jdbcType=BIGINT}, + base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, + form_submission_id = #{formSubmissionId,jdbcType=VARCHAR}, + server_version = #{serverVersion,jdbcType=TIMESTAMP}, + openmrs_uuid = #{openmrsUuid,jdbcType=VARCHAR}, + event_type = #{eventType,jdbcType=VARCHAR}, + event_date = #{eventDate,jdbcType=DATE}, + provider_id = #{providerId,jdbcType=VARCHAR}, + location_id = #{locationId,jdbcType=VARCHAR}, + team = #{team,jdbcType=VARCHAR}, + team_id = #{teamId,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml new file mode 100644 index 0000000000..45af6bf2ef --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, json + + + + + + delete from core.report + where id = #{id,jdbcType=BIGINT} + + + + delete from core.report + + + + + + + insert into core.report (id, json) + values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) + + + + insert into core.report + + + id, + + + json, + + + + + #{id,jdbcType=BIGINT}, + + + #{json,jdbcType=OTHER}, + + + + + + + update core.report + + + id = #{record.id,jdbcType=BIGINT}, + + + json = #{record.json,jdbcType=OTHER}, + + + + + + + + + update core.report + set id = #{record.id,jdbcType=BIGINT}, + json = #{record.json,jdbcType=OTHER} + + + + + + + update core.report + + + json = #{json,jdbcType=OTHER}, + + + where id = #{id,jdbcType=BIGINT} + + + + update core.report + set json = #{json,jdbcType=OTHER} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml new file mode 100644 index 0000000000..23795a824a --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml @@ -0,0 +1,351 @@ + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, report_id, base_entity_id, server_version, report_type, provider_id, location_id, + team, team_id + + + + + + delete from core.report_metadata + where id = #{id,jdbcType=BIGINT} + + + + delete from core.report_metadata + + + + + + + insert into core.report_metadata (id, report_id, base_entity_id, + server_version, report_type, provider_id, + location_id, team, team_id + ) + values (#{id,jdbcType=BIGINT}, #{reportId,jdbcType=BIGINT}, #{baseEntityId,jdbcType=VARCHAR}, + #{serverVersion,jdbcType=TIMESTAMP}, #{reportType,jdbcType=VARCHAR}, #{providerId,jdbcType=VARCHAR}, + #{locationId,jdbcType=VARCHAR}, #{team,jdbcType=VARCHAR}, #{teamId,jdbcType=VARCHAR} + ) + + + + insert into core.report_metadata + + + id, + + + report_id, + + + base_entity_id, + + + server_version, + + + report_type, + + + provider_id, + + + location_id, + + + team, + + + team_id, + + + + + #{id,jdbcType=BIGINT}, + + + #{reportId,jdbcType=BIGINT}, + + + #{baseEntityId,jdbcType=VARCHAR}, + + + #{serverVersion,jdbcType=TIMESTAMP}, + + + #{reportType,jdbcType=VARCHAR}, + + + #{providerId,jdbcType=VARCHAR}, + + + #{locationId,jdbcType=VARCHAR}, + + + #{team,jdbcType=VARCHAR}, + + + #{teamId,jdbcType=VARCHAR}, + + + + + + + update core.report_metadata + + + id = #{record.id,jdbcType=BIGINT}, + + + report_id = #{record.reportId,jdbcType=BIGINT}, + + + base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, + + + server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + + + report_type = #{record.reportType,jdbcType=VARCHAR}, + + + provider_id = #{record.providerId,jdbcType=VARCHAR}, + + + location_id = #{record.locationId,jdbcType=VARCHAR}, + + + team = #{record.team,jdbcType=VARCHAR}, + + + team_id = #{record.teamId,jdbcType=VARCHAR}, + + + + + + + + + update core.report_metadata + set id = #{record.id,jdbcType=BIGINT}, + report_id = #{record.reportId,jdbcType=BIGINT}, + base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, + server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + report_type = #{record.reportType,jdbcType=VARCHAR}, + provider_id = #{record.providerId,jdbcType=VARCHAR}, + location_id = #{record.locationId,jdbcType=VARCHAR}, + team = #{record.team,jdbcType=VARCHAR}, + team_id = #{record.teamId,jdbcType=VARCHAR} + + + + + + + update core.report_metadata + + + report_id = #{reportId,jdbcType=BIGINT}, + + + base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, + + + server_version = #{serverVersion,jdbcType=TIMESTAMP}, + + + report_type = #{reportType,jdbcType=VARCHAR}, + + + provider_id = #{providerId,jdbcType=VARCHAR}, + + + location_id = #{locationId,jdbcType=VARCHAR}, + + + team = #{team,jdbcType=VARCHAR}, + + + team_id = #{teamId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + + update core.report_metadata + set report_id = #{reportId,jdbcType=BIGINT}, + base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, + server_version = #{serverVersion,jdbcType=TIMESTAMP}, + report_type = #{reportType,jdbcType=VARCHAR}, + provider_id = #{providerId,jdbcType=VARCHAR}, + location_id = #{locationId,jdbcType=VARCHAR}, + team = #{team,jdbcType=VARCHAR}, + team_id = #{teamId,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMapper.xml new file mode 100644 index 0000000000..f0c71ed01f --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMapper.xml @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, json + + + + + + delete from core.stock + where id = #{id,jdbcType=BIGINT} + + + + delete from core.stock + + + + + + + insert into core.stock (id, json) + values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) + + + + insert into core.stock + + + id, + + + json, + + + + + #{id,jdbcType=BIGINT}, + + + #{json,jdbcType=OTHER}, + + + + + + + update core.stock + + + id = #{record.id,jdbcType=BIGINT}, + + + json = #{record.json,jdbcType=OTHER}, + + + + + + + + + update core.stock + set id = #{record.id,jdbcType=BIGINT}, + json = #{record.json,jdbcType=OTHER} + + + + + + + update core.stock + + + json = #{json,jdbcType=OTHER}, + + + where id = #{id,jdbcType=BIGINT} + + + + update core.stock + set json = #{json,jdbcType=OTHER} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml new file mode 100644 index 0000000000..901a6aa075 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml @@ -0,0 +1,318 @@ + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, stock_id, server_version, provider_id, location_id, team, team_id + + + + + + delete from core.stock_metadata + where id = #{id,jdbcType=BIGINT} + + + + delete from core.stock_metadata + + + + + + + insert into core.stock_metadata (id, stock_id, server_version, + provider_id, location_id, team, + team_id) + values (#{id,jdbcType=BIGINT}, #{stockId,jdbcType=BIGINT}, #{serverVersion,jdbcType=TIMESTAMP}, + #{providerId,jdbcType=VARCHAR}, #{locationId,jdbcType=VARCHAR}, #{team,jdbcType=VARCHAR}, + #{teamId,jdbcType=VARCHAR}) + + + + insert into core.stock_metadata + + + id, + + + stock_id, + + + server_version, + + + provider_id, + + + location_id, + + + team, + + + team_id, + + + + + #{id,jdbcType=BIGINT}, + + + #{stockId,jdbcType=BIGINT}, + + + #{serverVersion,jdbcType=TIMESTAMP}, + + + #{providerId,jdbcType=VARCHAR}, + + + #{locationId,jdbcType=VARCHAR}, + + + #{team,jdbcType=VARCHAR}, + + + #{teamId,jdbcType=VARCHAR}, + + + + + + + update core.stock_metadata + + + id = #{record.id,jdbcType=BIGINT}, + + + stock_id = #{record.stockId,jdbcType=BIGINT}, + + + server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + + + provider_id = #{record.providerId,jdbcType=VARCHAR}, + + + location_id = #{record.locationId,jdbcType=VARCHAR}, + + + team = #{record.team,jdbcType=VARCHAR}, + + + team_id = #{record.teamId,jdbcType=VARCHAR}, + + + + + + + + + update core.stock_metadata + set id = #{record.id,jdbcType=BIGINT}, + stock_id = #{record.stockId,jdbcType=BIGINT}, + server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + provider_id = #{record.providerId,jdbcType=VARCHAR}, + location_id = #{record.locationId,jdbcType=VARCHAR}, + team = #{record.team,jdbcType=VARCHAR}, + team_id = #{record.teamId,jdbcType=VARCHAR} + + + + + + + update core.stock_metadata + + + stock_id = #{stockId,jdbcType=BIGINT}, + + + server_version = #{serverVersion,jdbcType=TIMESTAMP}, + + + provider_id = #{providerId,jdbcType=VARCHAR}, + + + location_id = #{locationId,jdbcType=VARCHAR}, + + + team = #{team,jdbcType=VARCHAR}, + + + team_id = #{teamId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + + update core.stock_metadata + set stock_id = #{stockId,jdbcType=BIGINT}, + server_version = #{serverVersion,jdbcType=TIMESTAMP}, + provider_id = #{providerId,jdbcType=VARCHAR}, + location_id = #{locationId,jdbcType=VARCHAR}, + team = #{team,jdbcType=VARCHAR}, + team_id = #{teamId,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/pom.xml b/pom.xml index 072f7f946a..8dc95f796a 100644 --- a/pom.xml +++ b/pom.xml @@ -364,5 +364,61 @@ + + + + + org.eclipse.m2e + lifecycle-mapping + 1.0.0 + + + + + + + org.apache.maven.plugins + + + maven-antrun-plugin + + + [1.6,) + + + run + + + + + + + + + + org.codehaus.mojo + + + properties-maven-plugin + + + [1.0-alpha-2,) + + + + read-project-properties + + + + + + + + + + + + + From 66865e198d8c87d9bfa9fe5516ff17cf6cb30f6f Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 8 Mar 2018 09:58:21 +0300 Subject: [PATCH 003/133] Update Unit Tests Signed-off-by: Samuel Githengi --- .../org/opensrp/repository/couch/AllAppStateTokens.java | 7 +++++++ .../test/java/org/opensrp/FormSubmissionProcessorTest.java | 6 ++++++ .../java/org/opensrp/repository/it/FormLifeCycleTest.java | 6 +++--- .../service/formSubmission/FormEntityServiceTest.java | 6 ++++++ 4 files changed, 22 insertions(+), 3 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java index ce2f742cbc..6aca3174a7 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java @@ -50,6 +50,13 @@ public void update(AppStateToken entity) { * @throws UpdateConflictException if there was an update conflict. */ public void add(AppStateToken entity) { + add(db,entity); + } + + /** + * @throws UpdateConflictException if there was an update conflict. + */ + public void add(CouchDbConnector db,AppStateToken entity) { Assert.notNull(entity, "entity may not be null"); Assert.isTrue(Documents.isNew(entity), "entity must be new"); db.create(entity); diff --git a/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java b/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java index 644573b338..6495f1e9c3 100644 --- a/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java +++ b/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java @@ -58,6 +58,12 @@ public FormSubmissionProcessorTest() throws IOException { @Mock private AllEvents allEvents; + @Mock + private AllClients allClients; + + @Mock + private AllEvents allEvents; + @Before public void setup() throws IOException{ initMocks(this); diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java index 647c24e86e..aa95c10c44 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java @@ -132,9 +132,9 @@ public void setup() throws IOException { allEvents.removeAll(); allActions.removeAll(); allAlerts.removeAll(); - - fsp = new FormSubmissionProcessor(ziggyService, formSubmissionRouter, formEntityConverter, scheduleService, - clientService, allClients, eventService, allEvents); + + fsp = new FormSubmissionProcessor(ziggyService, formSubmissionRouter, + formEntityConverter, scheduleService, clientService,allClients, eventService,allEvents); reminderAction = new AlertCreationAction(scheduleService, formSubmissionService); dueWindowStart = DateTime.now(); diff --git a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java index 0f9188330d..6fa7b03e2b 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java @@ -73,6 +73,12 @@ public FormEntityServiceTest() throws IOException { @Mock private FormEntityConverter fec; + @Mock + private AllClients allClients; + + @Mock + private AllEvents allEvents; + @Before public void setUp() throws Exception { scheduleConfig = new ScheduleConfig("/schedules/schedule-config.xls"); From c4e585a27509a0dad8d06b9f09421bd7963dee61 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 8 Mar 2018 12:57:35 +0300 Subject: [PATCH 004/133] Code cleanup Signed-off-by: Samuel Githengi --- .../opensrp/repository/ClientsRepository.java | 50 ++++----- .../opensrp/repository/couch/AllClients.java | 3 +- .../repository/couch/UniqueIdRepository.java | 2 +- .../FormSubmissionProcessor.java | 2 +- .../opensrp/FormSubmissionProcessorTest.java | 8 +- .../formSubmission/FormEntityServiceTest.java | 7 +- .../handler/ANCScheduleHandlerTest.java | 21 ---- .../handler/BNFScheduleHandlerTest.java | 106 ++++++++---------- 8 files changed, 81 insertions(+), 118 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/ClientsRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/ClientsRepository.java index 333fb7872d..07bbaf3590 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/ClientsRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/ClientsRepository.java @@ -8,17 +8,17 @@ public interface ClientsRepository extends BaseRepository { - public Client findByBaseEntityId(String baseEntityId); + Client findByBaseEntityId(String baseEntityId); - public List findAllClients(); + List findAllClients(); - public List findAllByIdentifier(String identifier); + List findAllByIdentifier(String identifier); - public List findAllByIdentifier(String identifierType, String identifier); + List findAllByIdentifier(String identifierType, String identifier); - public List findAllByAttribute(String attributeType, String attribute); + List findAllByAttribute(String attributeType, String attribute); - public List findAllByMatchingName(String nameMatches); + List findAllByMatchingName(String nameMatches); /** * Find a client based on the relationship id and between a range of date created dates e.g @@ -29,33 +29,33 @@ public interface ClientsRepository extends BaseRepository { * @param dateTo * @return */ - public List findByRelationshipIdAndDateCreated(String relationalId, String dateFrom, String dateTo); + List findByRelationshipIdAndDateCreated(String relationalId, String dateFrom, String dateTo); - public List findByRela3tionshipId(String relationshipType, String entityId); + List findByRelationshipId(String relationshipType, String entityId); - public List findByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, - DateTime deathdateFrom, DateTime deathdateTo, String attributeType, - String attributeValue, String addressType, String country, String stateProvince, - String cityVillage, String countyDistrict, String subDistrict, String town, - String subTown, DateTime lastEditFrom, DateTime lastEditTo); + List findByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, + DateTime deathdateFrom, DateTime deathdateTo, String attributeType, String attributeValue, + String addressType, String country, String stateProvince, String cityVillage, + String countyDistrict, String subDistrict, String town, String subTown, + DateTime lastEditFrom, DateTime lastEditTo); - public List findByDynamicQuery(String query); + List findByDynamicQuery(String query); - public List findByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, - DateTime deathdateFrom, DateTime deathdateTo, String attributeType, - String attributeValue, DateTime lastEditFrom, DateTime lastEditTo); + List findByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, + DateTime deathdateFrom, DateTime deathdateTo, String attributeType, String attributeValue, + DateTime lastEditFrom, DateTime lastEditTo); - public List findByCriteria(String addressType, String country, String stateProvince, String cityVillage, - String countyDistrict, String subDistrict, String town, String subTown, - DateTime lastEditFrom, DateTime lastEditTo); + List findByCriteria(String addressType, String country, String stateProvince, String cityVillage, + String countyDistrict, String subDistrict, String town, String subTown, + DateTime lastEditFrom, DateTime lastEditTo); - public List findByRelationShip(String relationIndentier); + List findByRelationShip(String relationIndentier); - public List findByEmptyServerVersion(); + List findByEmptyServerVersion(); - public List findByServerVersion(long serverVersion); + List findByServerVersion(long serverVersion); - public List findByFieldValue(String field, List ids); + List findByFieldValue(String field, List ids); - public List notInOpenMRSByServerVersion(long serverVersion, Calendar calendar); + List notInOpenMRSByServerVersion(long serverVersion, Calendar calendar); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java index 13ba1c8cab..ba9e113440 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java @@ -113,8 +113,7 @@ public List findByRelationshipIdAndDateCreated(String relationalId, Stri // @View(name = "client_by_relationship", map = "function(doc) {if (doc.type === 'Client') {for(var key in doc.relationships) {emit([key, doc.relationships[key]]);}}}") // @View(name = "client_by_relationship", map = "function(doc) { if(doc.type == 'Client' && doc.relationships.mother[0]) {emit(null, doc._id)} }") @View(name = "client_by_relationship", map = "function(doc) { if(doc.type === 'Client' && doc.relationships) { for (var key in doc.relationships) { var entityid = doc.relationships[key][0]; if (key === 'mother') {emit([key, entityid], doc);}}}}") - - public List findByRela3tionshipId(String relationshipType, String entityId) { + public List findByRelationshipId(String relationshipType, String entityId) { return db.queryView(createQuery("client_by_relationship").startKey(entityId).endKey(entityId).includeDocs(true), Client.class); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/UniqueIdRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/UniqueIdRepository.java index c6825b7cf1..30f7fd2ca7 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/UniqueIdRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/UniqueIdRepository.java @@ -21,7 +21,7 @@ public class UniqueIdRepository { @Autowired - JdbcTemplate jdbcTemplate; + private JdbcTemplate jdbcTemplate; public int save(UniqueId uniqueId) throws Exception { diff --git a/opensrp-core/src/main/java/org/opensrp/service/formSubmission/FormSubmissionProcessor.java b/opensrp-core/src/main/java/org/opensrp/service/formSubmission/FormSubmissionProcessor.java index 1a9cc98672..cc567fe618 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/formSubmission/FormSubmissionProcessor.java +++ b/opensrp-core/src/main/java/org/opensrp/service/formSubmission/FormSubmissionProcessor.java @@ -200,7 +200,7 @@ public Client findClient(CouchDbConnector targetDb, Client client) { public Client addClient(CouchDbConnector targetDb, Client client) { if (client.getBaseEntityId() == null) { - throw new RuntimeException("No baseEntityId"); + throw new IllegalArgumentException("No baseEntityId"); } Client c = findClient(targetDb, client); if (c != null) { diff --git a/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java b/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java index 6495f1e9c3..55b11a0f81 100644 --- a/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java +++ b/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java @@ -35,10 +35,6 @@ public class FormSubmissionProcessorTest extends TestResourceLoader{ - public FormSubmissionProcessorTest() throws IOException { - super(); - } - @Mock private FormSubmissionProcessor fsp; @Mock @@ -64,6 +60,10 @@ public FormSubmissionProcessorTest() throws IOException { @Mock private AllEvents allEvents; + public FormSubmissionProcessorTest() throws IOException { + super(); + } + @Before public void setup() throws IOException{ initMocks(this); diff --git a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java index 6fa7b03e2b..ffd63fbdbf 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java @@ -37,9 +37,6 @@ public class FormEntityServiceTest extends TestResourceLoader{ - public FormEntityServiceTest() throws IOException { - super(); - } @Mock private ZiggyService ziggyService; @@ -79,6 +76,10 @@ public FormEntityServiceTest() throws IOException { @Mock private AllEvents allEvents; + public FormEntityServiceTest() throws IOException { + super(); + } + @Before public void setUp() throws Exception { scheduleConfig = new ScheduleConfig("/schedules/schedule-config.xls"); diff --git a/opensrp-register/src/test/java/org/opensrp/register/service/handler/ANCScheduleHandlerTest.java b/opensrp-register/src/test/java/org/opensrp/register/service/handler/ANCScheduleHandlerTest.java index 7239272bdc..7930ce3458 100644 --- a/opensrp-register/src/test/java/org/opensrp/register/service/handler/ANCScheduleHandlerTest.java +++ b/opensrp-register/src/test/java/org/opensrp/register/service/handler/ANCScheduleHandlerTest.java @@ -3,41 +3,22 @@ import static org.mockito.Mockito.inOrder; import static org.mockito.MockitoAnnotations.initMocks; -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; import java.util.List; -import org.apache.commons.io.FileUtils; -import org.codehaus.jackson.map.ObjectMapper; -import org.joda.time.DateTime; import org.joda.time.LocalDate; import org.json.JSONArray; -import org.json.JSONException; import org.json.JSONObject; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InOrder; import org.mockito.Mock; -import org.motechproject.scheduletracking.api.domain.json.ScheduleRecord; -import org.motechproject.scheduletracking.api.repository.AllSchedules; -import org.opensrp.domain.Client; import org.opensrp.domain.Event; -import org.opensrp.domain.Obs; import org.opensrp.register.service.handler.BaseScheduleHandler.ActionType; import org.opensrp.register.service.scheduling.AnteNatalCareSchedulesService; -import org.opensrp.repository.couch.AllClients; import org.opensrp.scheduler.HealthSchedulerService; import org.powermock.core.classloader.annotations.PowerMockIgnore; -import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.io.DefaultResourceLoader; -import org.springframework.core.io.ResourceLoader; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(PowerMockRunner.class) @PowerMockIgnore({ "org.apache.log4j.*", "org.apache.commons.logging.*" }) @@ -47,9 +28,7 @@ public class ANCScheduleHandlerTest extends TestResourceLoader { private ANCScheduleHandler aNCScheduleHandler; @Mock private HealthSchedulerService scheduler; - private static final String JSON_KEY_HANDLER = "handler"; private static final String JSON_KEY_TYPES = "types"; - private static final String JSON_KEY_SCHEDULE_NAME = "name"; private static final String JSON_KEY_EVENTS = "events"; @Before diff --git a/opensrp-register/src/test/java/org/opensrp/register/service/handler/BNFScheduleHandlerTest.java b/opensrp-register/src/test/java/org/opensrp/register/service/handler/BNFScheduleHandlerTest.java index 890fb8ad07..b3b472573f 100644 --- a/opensrp-register/src/test/java/org/opensrp/register/service/handler/BNFScheduleHandlerTest.java +++ b/opensrp-register/src/test/java/org/opensrp/register/service/handler/BNFScheduleHandlerTest.java @@ -3,85 +3,69 @@ import static org.mockito.Mockito.inOrder; import static org.mockito.MockitoAnnotations.initMocks; -import java.io.File; -import java.io.IOException; -import java.util.ArrayList; import java.util.List; -import org.apache.commons.io.FileUtils; -import org.codehaus.jackson.map.ObjectMapper; -import org.joda.time.DateTime; import org.joda.time.LocalDate; import org.json.JSONArray; -import org.json.JSONException; import org.json.JSONObject; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.InOrder; import org.mockito.Mock; -import org.motechproject.scheduletracking.api.domain.json.ScheduleRecord; -import org.motechproject.scheduletracking.api.repository.AllSchedules; -import org.opensrp.domain.Client; import org.opensrp.domain.Event; -import org.opensrp.domain.Obs; import org.opensrp.register.service.handler.BaseScheduleHandler.ActionType; -import org.opensrp.register.service.scheduling.AnteNatalCareSchedulesService; import org.opensrp.register.service.scheduling.BNFSchedulesService; -import org.opensrp.repository.couch.AllClients; import org.opensrp.scheduler.HealthSchedulerService; import org.powermock.core.classloader.annotations.PowerMockIgnore; -import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.core.io.DefaultResourceLoader; -import org.springframework.core.io.ResourceLoader; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; @RunWith(PowerMockRunner.class) @PowerMockIgnore({ "org.apache.log4j.*", "org.apache.commons.logging.*" }) -public class BNFScheduleHandlerTest extends TestResourceLoader { - @Mock - private BNFSchedulesService bnfSchedulesService; - private BNFScheduleHandler bnfScheduleHandler; - @Mock - private HealthSchedulerService scheduler; - private static final String JSON_KEY_TYPES = "types"; - private static final String JSON_KEY_EVENTS = "events"; +public class BNFScheduleHandlerTest extends TestResourceLoader { + + @Mock + private BNFSchedulesService bnfSchedulesService; + + private BNFScheduleHandler bnfScheduleHandler; + + @Mock + private HealthSchedulerService scheduler; + + private static final String JSON_KEY_TYPES = "types"; + + private static final String JSON_KEY_EVENTS = "events"; + + @Before + public void setUp() throws Exception { + initMocks(this); + bnfScheduleHandler = new BNFScheduleHandler(bnfSchedulesService); + } + + @Test + public void shouldTestBNFScheduleHandler() throws Exception { + Event event = geteventOfVaccination(); + JSONArray schedulesJsonObject = new JSONArray("[" + getFile() + "]"); + String scheduleName = null; + for (int i = 0; i < schedulesJsonObject.length(); i++) { + JSONObject scheduleJsonObject = schedulesJsonObject.getJSONObject(i); + JSONArray eventsJsonArray = scheduleJsonObject.getJSONArray(JSON_KEY_EVENTS); + for (int j = 0; j < eventsJsonArray.length(); j++) { + JSONObject scheduleConfigEvent = eventsJsonArray.getJSONObject(j); + JSONArray eventTypesJsonArray = scheduleConfigEvent.getJSONArray(JSON_KEY_TYPES); + List eventsList = jsonArrayToList(eventTypesJsonArray); + if (eventsList.contains(event.getEventType())) { + String action = bnfScheduleHandler.getAction(scheduleConfigEvent); + String milestone = bnfScheduleHandler.getMilestone(scheduleConfigEvent); + if (milestone.equalsIgnoreCase("opv2") && action.equalsIgnoreCase(ActionType.enroll.toString())) { + bnfScheduleHandler.handle(event, scheduleConfigEvent, scheduleName); + InOrder inOrder = inOrder(bnfSchedulesService); + inOrder.verify(bnfSchedulesService).enrollBNF(event.getBaseEntityId(), + "BirthNotificationPregnancyStatusFollowUp", LocalDate.parse("2016-07-10"), event.getId()); + } else {} + } + } + } + } - @Before - public void setUp() throws Exception { - initMocks(this); - bnfScheduleHandler = new BNFScheduleHandler(bnfSchedulesService); - } - - @Test - public void shouldTestBNFScheduleHandler() throws Exception { - Event event = geteventOfVaccination(); - JSONArray schedulesJsonObject = new JSONArray("[" + getFile() + "]"); - String scheduleName = null; - for (int i = 0; i < schedulesJsonObject.length(); i++) { - JSONObject scheduleJsonObject = schedulesJsonObject.getJSONObject(i); - JSONArray eventsJsonArray = scheduleJsonObject.getJSONArray(JSON_KEY_EVENTS); - for (int j = 0; j < eventsJsonArray.length(); j++) { - JSONObject scheduleConfigEvent = eventsJsonArray.getJSONObject(j); - JSONArray eventTypesJsonArray = scheduleConfigEvent.getJSONArray(JSON_KEY_TYPES); - List eventsList = jsonArrayToList(eventTypesJsonArray); - if (eventsList.contains(event.getEventType())) { - String action = bnfScheduleHandler.getAction(scheduleConfigEvent); - String milestone = bnfScheduleHandler.getMilestone(scheduleConfigEvent); - LocalDate date = LocalDate.parse("2016-07-10"); - if (milestone.equalsIgnoreCase("opv2") && action.equalsIgnoreCase(ActionType.enroll.toString())) { - bnfScheduleHandler.handle(event,scheduleConfigEvent, scheduleName); - InOrder inOrder = inOrder(bnfSchedulesService); - inOrder.verify(bnfSchedulesService).enrollBNF(event.getBaseEntityId(), "BirthNotificationPregnancyStatusFollowUp", LocalDate.parse("2016-07-10"), event.getId()); - } else { - } - } - } - } - } - } From da3f36c49e1abbd2e3f099b5347d7126f8d6bc55 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 8 Mar 2018 17:41:37 +0300 Subject: [PATCH 005/133] Use Beans to search for methods with very many search params Signed-off-by: Samuel Githengi --- .../opensrp/repository/ClientsRepository.java | 17 +- .../opensrp/repository/SearchRepository.java | 8 +- .../opensrp/repository/StocksRepository.java | 9 +- .../repository/couch/AllAppStateTokens.java | 8 - .../opensrp/repository/couch/AllClients.java | 35 +-- .../opensrp/repository/couch/AllStocks.java | 19 +- .../couch/SearchRepositoryImpl.java | 12 +- .../lucene/LuceneClientRepository.java | 86 +++--- .../lucene/LuceneSearchRepository.java | 54 ++-- .../org/opensrp/search/AddressSearchBean.java | 85 ++++++ .../org/opensrp/search/ClientSearchBean.java | 129 +++++++++ .../org/opensrp/search/StockSearchBean.java | 95 +++++++ .../org/opensrp/service/ClientService.java | 136 +++++---- .../org/opensrp/service/SearchService.java | 11 +- .../org/opensrp/service/StockService.java | 26 +- .../opensrp/FormSubmissionProcessorTest.java | 6 - .../it/AllClientsIntegrationTest.java | 161 +++++------ .../lucene/it/LuceneClientRepositoryTest.java | 269 ++++++++++-------- .../lucene/it/LuceneSearchRepositoryTest.java | 75 +++-- .../formSubmission/FormEntityServiceTest.java | 6 - .../opensrp/service/it/SearchServiceTest.java | 14 +- .../handler/BNFScheduleHandlerTest.java | 2 +- .../org/opensrp/web/rest/ClientResource.java | 63 ++-- .../org/opensrp/web/rest/SearchResource.java | 62 ++-- .../org/opensrp/web/rest/StockResource.java | 53 ++-- 25 files changed, 907 insertions(+), 534 deletions(-) create mode 100644 opensrp-core/src/main/java/org/opensrp/search/AddressSearchBean.java create mode 100644 opensrp-core/src/main/java/org/opensrp/search/ClientSearchBean.java create mode 100644 opensrp-core/src/main/java/org/opensrp/search/StockSearchBean.java diff --git a/opensrp-core/src/main/java/org/opensrp/repository/ClientsRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/ClientsRepository.java index 07bbaf3590..2bc3b4dfb9 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/ClientsRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/ClientsRepository.java @@ -5,6 +5,8 @@ import org.joda.time.DateTime; import org.opensrp.domain.Client; +import org.opensrp.search.AddressSearchBean; +import org.opensrp.search.ClientSearchBean; public interface ClientsRepository extends BaseRepository { @@ -33,21 +35,14 @@ public interface ClientsRepository extends BaseRepository { List findByRelationshipId(String relationshipType, String entityId); - List findByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, - DateTime deathdateFrom, DateTime deathdateTo, String attributeType, String attributeValue, - String addressType, String country, String stateProvince, String cityVillage, - String countyDistrict, String subDistrict, String town, String subTown, - DateTime lastEditFrom, DateTime lastEditTo); + List findByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean, DateTime lastEditFrom, + DateTime lastEditTo); List findByDynamicQuery(String query); - List findByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, - DateTime deathdateFrom, DateTime deathdateTo, String attributeType, String attributeValue, - DateTime lastEditFrom, DateTime lastEditTo); + List findByCriteria(ClientSearchBean searchBean); - List findByCriteria(String addressType, String country, String stateProvince, String cityVillage, - String countyDistrict, String subDistrict, String town, String subTown, - DateTime lastEditFrom, DateTime lastEditTo); + List findByCriteria(AddressSearchBean addressSearchBean, DateTime lastEditFrom, DateTime lastEditTo); List findByRelationShip(String relationIndentier); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/SearchRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/SearchRepository.java index 144e1691a0..b679ed4a36 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/SearchRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/SearchRepository.java @@ -1,14 +1,12 @@ package org.opensrp.repository; import java.util.List; -import java.util.Map; -import org.joda.time.DateTime; import org.opensrp.domain.Client; +import org.opensrp.search.ClientSearchBean; public interface SearchRepository { - List findByCriteria(String nameLike, String firstName, String middleName, String lastName, String gender, - Map identifiers, Map attributes, DateTime birthdateFrom, - DateTime birthdateTo, DateTime lastEditFrom, DateTime lastEditTo, Integer limit); + List findByCriteria(ClientSearchBean clientSearchBean, String firstName, String middleName, String lastName, + Integer limit); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/StocksRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/StocksRepository.java index 81af6cb4a0..9007d65e53 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/StocksRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/StocksRepository.java @@ -3,6 +3,7 @@ import java.util.List; import org.opensrp.domain.Stock; +import org.opensrp.search.StockSearchBean; public interface StocksRepository extends BaseRepository { @@ -12,13 +13,9 @@ public interface StocksRepository extends BaseRepository { public Stock findById(String id); - public List findStocks(String identifier, String vaccine_type_id, String transaction_type, String providerid, - String value, String date_created, String to_from, String date_updated, Long serverVersion, - String sortBy, String sortOrder, int limit); + public List findStocks(StockSearchBean searchBean, String sortBy, String sortOrder, int limit); - public List findStocks(String identifier, String vaccine_type_id, String transaction_type, String providerid, - String value, String date_created, String to_from, String date_updated, - String serverVersion); + public List findStocks(StockSearchBean searchBean); public List findAllStocks(); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java index 6aca3174a7..8cbaeae0fb 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java @@ -136,13 +136,5 @@ public void update(CouchDbConnector db, AppStateToken entity) { db.update(entity); } - /** - * @throws UpdateConflictException if there was an update conflict. - */ - public void add(CouchDbConnector db, AppStateToken entity) { - Assert.notNull(entity, "entity may not be null"); - Assert.isTrue(Documents.isNew(entity), "entity must be new"); - db.create(entity); - } } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java index ba9e113440..27ae4e7793 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java @@ -16,6 +16,8 @@ import org.opensrp.domain.Client; import org.opensrp.repository.ClientsRepository; import org.opensrp.repository.lucene.LuceneClientRepository; +import org.opensrp.search.AddressSearchBean; +import org.opensrp.search.ClientSearchBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Repository; @@ -23,7 +25,6 @@ import com.mysql.jdbc.StringUtils; @Repository - public class AllClients extends MotechBaseRepository implements ClientsRepository { private LuceneClientRepository lcr; @@ -94,7 +95,7 @@ public List findAllByMatchingName(String nameMatches) { /** * Find a client based on the relationship id and between a range of date created dates e.g * given mother's id get children born at a given time - * + * Use Beans to search for methods with very many search params * @param relationalId * @param dateFrom * @param dateTo @@ -122,32 +123,25 @@ public List findByRelationshipId(String relationshipType, String entityI // public List findByRelationshipId(String identifier) { // return db.queryView(createQuery("clients_by_relationship").key(identifier).includeDocs(true), Client.class); // } - public List findByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, - DateTime deathdateFrom, DateTime deathdateTo, String attributeType, - String attributeValue, String addressType, String country, String stateProvince, - String cityVillage, String countyDistrict, String subDistrict, String town, - String subTown, DateTime lastEditFrom, DateTime lastEditTo) { - return lcr.getByCriteria(nameLike, gender, birthdateFrom, birthdateTo, deathdateFrom, deathdateTo, attributeType, - attributeValue, addressType, country, stateProvince, cityVillage, countyDistrict, subDistrict, town, subTown, - lastEditFrom, lastEditTo, null);//db.queryView(q.includeDocs(true), Client.class); + + public List findByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean, + DateTime lastEditFrom, DateTime lastEditTo) { + return lcr.getByCriteria(searchBean, addressSearchBean, lastEditFrom, lastEditTo, null);//db.queryView(q.includeDocs(true), Client.class); + } public List findByDynamicQuery(String query) { return lcr.getByCriteria(query);//db.queryView(q.includeDocs(true), Client.class); } - public List findByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, - DateTime deathdateFrom, DateTime deathdateTo, String attributeType, - String attributeValue, DateTime lastEditFrom, DateTime lastEditTo) { - return lcr.getByCriteria(nameLike, gender, birthdateFrom, birthdateTo, deathdateFrom, deathdateTo, attributeType, - attributeValue, null, null, null, null, null, null, null, null, lastEditFrom, lastEditTo, null); + + public List findByCriteria(ClientSearchBean searchBean) { + return lcr.getByCriteria(searchBean, new AddressSearchBean(), searchBean.getLastEditFrom(), + searchBean.getLastEditTo(), null); } - public List findByCriteria(String addressType, String country, String stateProvince, String cityVillage, - String countyDistrict, String subDistrict, String town, String subTown, - DateTime lastEditFrom, DateTime lastEditTo) { - return lcr.getByCriteria(null, null, null, null, null, null, null, null, addressType, country, stateProvince, - cityVillage, countyDistrict, subDistrict, town, subTown, lastEditFrom, lastEditTo, null); + public List findByCriteria(AddressSearchBean addressSearchBean, DateTime lastEditFrom, DateTime lastEditTo) { + return lcr.getByCriteria(new ClientSearchBean(), addressSearchBean, lastEditFrom, lastEditTo, null); } public List findByRelationShip(String motherIndentier) { @@ -187,6 +181,7 @@ public List findByEmptyServerVersion() { return db.queryView(createQuery("clients_by_empty_server_version").limit(200).includeDocs(true), Client.class); } + @View(name = "clients_by__server_version", map = "function(doc) { if (doc.type === 'Client') { emit([doc.serverVersion], null); } }") public List findByServerVersion(long serverVersion) { ComplexKey startKey = ComplexKey.of(serverVersion + 1); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllStocks.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllStocks.java index 728f9d52cc..312fbe8ea8 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllStocks.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllStocks.java @@ -13,6 +13,7 @@ import org.opensrp.domain.Stock; import org.opensrp.repository.StocksRepository; import org.opensrp.repository.lucene.LuceneStockRepository; +import org.opensrp.search.StockSearchBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Repository; @@ -44,18 +45,16 @@ public Stock findById(String id) { return stock; } - public List findStocks(String identifier, String vaccine_type_id, String transaction_type, String providerid, - String value, String date_created, String to_from, String date_updated, - Long serverVersion, String sortBy, String sortOrder, int limit) { - return lsr.getByCriteria(identifier, vaccine_type_id, transaction_type, providerid, value, date_created, to_from, - date_updated, serverVersion, sortBy, sortOrder, limit); + public List findStocks(StockSearchBean searchBean, String sortBy, String sortOrder, int limit) { + return lsr.getByCriteria(searchBean.getIdentifier(), searchBean.getStockTypeId(), searchBean.getTransactionType(), + searchBean.getProviderId(), searchBean.getValue(), searchBean.getDateCreated(), searchBean.getToFrom(), + searchBean.getDateUpdated(), searchBean.getServerVersion(), sortBy, sortOrder, limit); } - public List findStocks(String identifier, String vaccine_type_id, String transaction_type, String providerid, - String value, String date_created, String to_from, String date_updated, - String serverVersion) { - return lsr.getByCriteria(identifier, vaccine_type_id, transaction_type, providerid, value, date_created, to_from, - date_updated, serverVersion); + public List findStocks(StockSearchBean searchBean) { + return lsr.getByCriteria(searchBean.getIdentifier(), searchBean.getStockTypeId(), searchBean.getTransactionType(), + searchBean.getProviderId(), searchBean.getValue(), searchBean.getDateCreated(), searchBean.getToFrom(), + searchBean.getDateUpdated(), searchBean.getServerVersion().toString()); } @View(name = "all_stocks", map = "function(doc) { if (doc.type === 'Stock') { emit(doc.dateCreated); } }") diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/SearchRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/SearchRepositoryImpl.java index 8525b168d7..4d950c4c19 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/SearchRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/SearchRepositoryImpl.java @@ -1,16 +1,15 @@ package org.opensrp.repository.couch; import java.util.List; -import java.util.Map; import org.ektorp.CouchDbConnector; -import org.joda.time.DateTime; import org.motechproject.dao.MotechBaseRepository; import org.opensrp.common.AllConstants; import org.opensrp.domain.Client; import org.opensrp.domain.Search; import org.opensrp.repository.SearchRepository; import org.opensrp.repository.lucene.LuceneSearchRepository; +import org.opensrp.search.ClientSearchBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Repository; @@ -27,12 +26,9 @@ protected SearchRepositoryImpl(@Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTO this.sr = sr; } - public List findByCriteria(String nameLike, String firstName, String middleName, String lastName, String gender, - Map identifiers, Map attributes, - DateTime birthdateFrom, DateTime birthdateTo, DateTime lastEditFrom, - DateTime lastEditTo, Integer limit) { - return sr.getByCriteria(nameLike, firstName, middleName, lastName, gender, identifiers, attributes, birthdateFrom, - birthdateTo, lastEditFrom, lastEditTo, limit); + public List findByCriteria(ClientSearchBean clientSearchBean, String firstName, String middleName, + String lastName, Integer limit) { + return sr.getByCriteria(clientSearchBean, firstName, middleName, lastName, limit); } } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java index 7434e5dad1..c31e5e516a 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java @@ -21,6 +21,8 @@ import org.joda.time.DateTime; import org.opensrp.domain.Client; +import org.opensrp.search.AddressSearchBean; +import org.opensrp.search.ClientSearchBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -48,76 +50,68 @@ protected LuceneClientRepository(LuceneDbConnector db) { super(Client.class, db); this.ldb = db; initStandardDesignDocument(); - } - - public List getByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, - DateTime deathdateFrom, DateTime deathdateTo, String attributeType, - String attributeValue, DateTime lastEditFrom, DateTime lastEditTo, + } + + public List getByCriteria(ClientSearchBean searchBean, String motherIdentifier) { - return getByCriteria(nameLike, gender, birthdateFrom, birthdateTo, deathdateFrom, deathdateTo, attributeType, - attributeValue, null, null, null, null, null, null, null, null, lastEditFrom, lastEditTo, motherIdentifier); + return getByCriteria(searchBean, new AddressSearchBean(), searchBean.getLastEditFrom(), searchBean.getLastEditTo(), motherIdentifier); } - - public List getByCriteria(String addressType, String country, String stateProvince, String cityVillage, - String countyDistrict, String subDistrict, String town, String subTown, + + public List getByCriteria(AddressSearchBean addressSearchBean, DateTime lastEditFrom, DateTime lastEditTo, String motherIdentifier) { - return getByCriteria(null, null, null, null, null, null, null, null, addressType, country, stateProvince, - cityVillage, countyDistrict, subDistrict, town, subTown, lastEditFrom, lastEditTo, motherIdentifier); + return getByCriteria(null, addressSearchBean, lastEditFrom, lastEditTo, motherIdentifier); } - - public List getByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, - DateTime deathdateFrom, DateTime deathdateTo, String attributeType, - String attributeValue, String addressType, String country, String stateProvince, - String cityVillage, String countyDistrict, String subDistrict, String town, - String subTown, DateTime lastEditFrom, DateTime lastEditTo, String motherIdentifier) { + + public List getByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean, + DateTime lastEditFrom, DateTime lastEditTo, String motherIdentifier) { // create a simple query against the view/search function that we've created LuceneQuery query = new LuceneQuery("Client", "by_all_criteria"); Query q = new Query(FilterType.OR); - if (!StringUtils.isEmptyOrWhitespaceOnly(nameLike)) { - q.like(FIRST_NAME, nameLike); - q.like(MIDDLE_NAME, nameLike); - q.like(LAST_NAME, nameLike); + if (!StringUtils.isEmptyOrWhitespaceOnly(searchBean.getNameLike())) { + q.like(FIRST_NAME, searchBean.getNameLike()); + q.like(MIDDLE_NAME, searchBean.getNameLike()); + q.like(LAST_NAME, searchBean.getNameLike()); } Query qf = new Query(FilterType.AND, q); - if (!StringUtils.isEmptyOrWhitespaceOnly(gender)) { - qf.eq(GENDER, gender); + if (!StringUtils.isEmptyOrWhitespaceOnly(searchBean.getGender())) { + qf.eq(GENDER, searchBean.getGender()); } - if (birthdateFrom != null && birthdateTo != null) { - qf.between(BIRTH_DATE, birthdateFrom, birthdateTo); + if (searchBean.getBirthdateFrom() != null && searchBean.getBirthdateTo() != null) { + qf.between(BIRTH_DATE, searchBean.getBirthdateFrom(), searchBean.getBirthdateTo()); } - if (deathdateFrom != null && deathdateTo != null) { - qf.between(DEATH_DATE, deathdateFrom, deathdateTo); + if (searchBean.getDeathdateFrom() != null && searchBean.getDeathdateTo() != null) { + qf.between(DEATH_DATE, searchBean.getDeathdateFrom(), searchBean.getDeathdateTo()); } if (lastEditFrom != null & lastEditTo != null) { qf.between(LAST_UPDATE, lastEditFrom, lastEditTo); } - if (!StringUtils.isEmptyOrWhitespaceOnly(attributeType)) { - qf.eq(attributeType, attributeValue); + if (!StringUtils.isEmptyOrWhitespaceOnly(searchBean.getAttributeValue())) { + qf.eq(searchBean.getAttributeType(), searchBean.getAttributeValue()); } - if (!StringUtils.isEmptyOrWhitespaceOnly(addressType)) { - qf.eq(ADDRESS_TYPE, addressType); + if (!StringUtils.isEmptyOrWhitespaceOnly(addressSearchBean.getAddressType())) { + qf.eq(ADDRESS_TYPE, addressSearchBean.getAddressType()); } - if (!StringUtils.isEmptyOrWhitespaceOnly(country)) { - qf.eq(COUNTRY, country); + if (!StringUtils.isEmptyOrWhitespaceOnly(addressSearchBean.getCountry())) { + qf.eq(COUNTRY, addressSearchBean.getCountry()); } - if (!StringUtils.isEmptyOrWhitespaceOnly(stateProvince)) { - qf.eq(STATE_PROVINCE, stateProvince); + if (!StringUtils.isEmptyOrWhitespaceOnly(addressSearchBean.getStateProvince())) { + qf.eq(STATE_PROVINCE, addressSearchBean.getStateProvince()); } - if (!StringUtils.isEmptyOrWhitespaceOnly(cityVillage)) { - qf.eq(CITY_VILLAGE, cityVillage); + if (!StringUtils.isEmptyOrWhitespaceOnly(addressSearchBean.getCityVillage())) { + qf.eq(CITY_VILLAGE, addressSearchBean.getCityVillage()); } - if (!StringUtils.isEmptyOrWhitespaceOnly(countyDistrict)) { - qf.eq(COUNTY_DISTRICT, countyDistrict); + if (!StringUtils.isEmptyOrWhitespaceOnly(addressSearchBean.getCountyDistrict())) { + qf.eq(COUNTY_DISTRICT, addressSearchBean.getCountyDistrict()); } - if (!StringUtils.isEmptyOrWhitespaceOnly(subDistrict)) { - qf.eq(SUB_DISTRICT, subDistrict); + if (!StringUtils.isEmptyOrWhitespaceOnly(addressSearchBean.getSubDistrict())) { + qf.eq(SUB_DISTRICT, addressSearchBean.getSubDistrict()); } - if (!StringUtils.isEmptyOrWhitespaceOnly(town)) { - qf.eq(TOWN, town); + if (!StringUtils.isEmptyOrWhitespaceOnly(addressSearchBean.getSubTown())) { + qf.eq(TOWN, addressSearchBean.getTown()); } - if (!StringUtils.isEmptyOrWhitespaceOnly(subTown)) { - qf.eq(SUB_TOWN, subTown); + if (!StringUtils.isEmptyOrWhitespaceOnly(addressSearchBean.getSubTown())) { + qf.eq(SUB_TOWN, addressSearchBean.getSubTown()); } if (StringUtils.isEmptyOrWhitespaceOnly(qf.query())) { throw new RuntimeException("Atleast one search filter must be specified"); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneSearchRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneSearchRepository.java index 8f4dc2cd07..2316633ea8 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneSearchRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneSearchRepository.java @@ -11,9 +11,9 @@ import java.util.List; import java.util.Map; -import org.joda.time.DateTime; import org.opensrp.domain.Client; import org.opensrp.domain.Search; +import org.opensrp.search.ClientSearchBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -24,8 +24,8 @@ import com.github.ldriscoll.ektorplucene.designdocument.annotation.Index; import com.mysql.jdbc.StringUtils; -@FullText({ - @Index(name = "by_all_criteria", index = "function(doc){ if(doc.type!=='Client') return null; var arr1=['firstName','middleName','lastName','gender']; var ret=new Document(); for(var i in arr1){ ret.add(doc[arr1[i]],{'field':arr1[i]}) } for (var key in doc.identifiers) { ret.add(doc.identifiers[key], {'field': key}); } for(var key in doc.attributes){ ret.add(doc.attributes[key],{'field':key}) } var bd=doc.birthdate.substring(0,19); ret.add(bd,{'field':'birthdate','type':'date'}); var crd=doc.dateCreated.substring(0,19); ret.add(crd,{'field':'lastEdited','type':'date'}); if(doc.dateEdited){ var led=doc.dateEdited.substring(0,19); ret.add(led,{'field':'lastEdited','type':'date'}) } return ret }") }) +@FullText({ + @Index(name = "by_all_criteria", index = "function(doc){ if(doc.type!=='Client') return null; var arr1=['firstName','middleName','lastName','gender']; var ret=new Document(); for(var i in arr1){ ret.add(doc[arr1[i]],{'field':arr1[i]}) } for (var key in doc.identifiers) { ret.add(doc.identifiers[key], {'field': key}); } for(var key in doc.attributes){ ret.add(doc.attributes[key],{'field':key}) } var bd=doc.birthdate.substring(0,19); ret.add(bd,{'field':'birthdate','type':'date'}); var crd=doc.dateCreated.substring(0,19); ret.add(crd,{'field':'lastEdited','type':'date'}); if(doc.dateEdited){ var led=doc.dateEdited.substring(0,19); ret.add(led,{'field':'lastEdited','type':'date'}) } return ret }") }) @Component public class LuceneSearchRepository extends CouchDbRepositorySupportWithLucene { @@ -37,20 +37,19 @@ protected LuceneSearchRepository(LuceneDbConnector db) { this.ldb = db; initStandardDesignDocument(); } - - public List getByCriteria(String nameLike, String firstName, String middleName, String lastName, String gender, - Map identifiers, Map attributes, - DateTime birthdateFrom, DateTime birthdateTo, DateTime lastEditFrom, - DateTime lastEditTo, Integer limit) { + + + public List getByCriteria(ClientSearchBean clientSearchBean, String firstName, String middleName, + String lastName, Integer limit) { // create a simple query against the view/search function that we've // created LuceneQuery query = new LuceneQuery("Search", "by_all_criteria"); Query q = new Query(FilterType.OR); - if (!StringUtils.isEmptyOrWhitespaceOnly(nameLike)) { - q.likeWithWildCard(FIRST_NAME, nameLike); - q.likeWithWildCard(MIDDLE_NAME, nameLike); - q.likeWithWildCard(LAST_NAME, nameLike); + if (!StringUtils.isEmptyOrWhitespaceOnly(clientSearchBean.getNameLike())) { + q.likeWithWildCard(FIRST_NAME, clientSearchBean.getNameLike()); + q.likeWithWildCard(MIDDLE_NAME, clientSearchBean.getNameLike()); + q.likeWithWildCard(LAST_NAME, clientSearchBean.getNameLike()); } Query qf = new Query(FilterType.AND, q); @@ -65,13 +64,14 @@ public List getByCriteria(String nameLike, String firstName, String midd if (!StringUtils.isEmptyOrWhitespaceOnly(lastName)) { qf.likeWithWildCard(LAST_NAME, lastName); } - - if (!StringUtils.isEmptyOrWhitespaceOnly(gender)) { - qf.eq(GENDER, gender); + + + if (!StringUtils.isEmptyOrWhitespaceOnly(clientSearchBean.getGender())) { + qf.eq(GENDER, clientSearchBean.getGender()); } - - if (identifiers != null && !identifiers.isEmpty()) { - for (Map.Entry entry : identifiers.entrySet()) { + + if (clientSearchBean.getIdentifiers() != null && !clientSearchBean.getIdentifiers().isEmpty()) { + for (Map.Entry entry : clientSearchBean.getIdentifiers().entrySet()) { String identifierType = entry.getKey(); String identifierValue = entry.getValue(); if (!StringUtils.isEmptyOrWhitespaceOnly(identifierType) && !StringUtils @@ -84,8 +84,8 @@ public List getByCriteria(String nameLike, String firstName, String midd String INACTIVE = "inactive"; String LOST_TO_FOLLOW_UP = "lost_to_follow_up"; Query sq = new Query(FilterType.OR); - if (attributes != null && !attributes.isEmpty()) { - for (Map.Entry entry : attributes.entrySet()) { + if (clientSearchBean.getAttributes() != null && !clientSearchBean.getAttributes().isEmpty()) { + for (Map.Entry entry : clientSearchBean.getAttributes().entrySet()) { String attributeType = entry.getKey(); String attributeValue = entry.getValue(); if (!StringUtils.isEmptyOrWhitespaceOnly(attributeType) && !StringUtils @@ -107,14 +107,14 @@ public List getByCriteria(String nameLike, String firstName, String midd } } - qf.addToQuery(sq); - - if (birthdateFrom != null && birthdateTo != null) { - qf.between(BIRTH_DATE, birthdateFrom, birthdateTo); + qf.addToQuery(sq); + + if (clientSearchBean.getBirthdateFrom() != null && clientSearchBean.getBirthdateTo() != null) { + qf.between(BIRTH_DATE, clientSearchBean.getBirthdateFrom(), clientSearchBean.getBirthdateTo()); } - - if (lastEditFrom != null & lastEditTo != null) { - qf.between(LAST_UPDATE, lastEditFrom, lastEditTo); + + if (clientSearchBean.getLastEditFrom() != null & clientSearchBean.getLastEditTo() != null) { + qf.between(LAST_UPDATE, clientSearchBean.getLastEditFrom(), clientSearchBean.getLastEditTo()); } if (StringUtils.isEmptyOrWhitespaceOnly(qf.query())) { diff --git a/opensrp-core/src/main/java/org/opensrp/search/AddressSearchBean.java b/opensrp-core/src/main/java/org/opensrp/search/AddressSearchBean.java new file mode 100644 index 0000000000..5401354852 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/search/AddressSearchBean.java @@ -0,0 +1,85 @@ +package org.opensrp.search; + +public class AddressSearchBean { + + private String addressType; + + private String country; + + private String stateProvince; + + private String cityVillage; + + private String countyDistrict; + + private String subDistrict; + + private String town; + + private String subTown; + + public String getAddressType() { + return addressType; + } + + public void setAddressType(String addressType) { + this.addressType = addressType; + } + + public String getCountry() { + return country; + } + + public void setCountry(String country) { + this.country = country; + } + + public String getStateProvince() { + return stateProvince; + } + + public void setStateProvince(String stateProvince) { + this.stateProvince = stateProvince; + } + + public String getCityVillage() { + return cityVillage; + } + + public void setCityVillage(String cityVillage) { + this.cityVillage = cityVillage; + } + + public String getCountyDistrict() { + return countyDistrict; + } + + public void setCountyDistrict(String countyDistrict) { + this.countyDistrict = countyDistrict; + } + + public String getSubDistrict() { + return subDistrict; + } + + public void setSubDistrict(String subDistrict) { + this.subDistrict = subDistrict; + } + + public String getTown() { + return town; + } + + public void setTown(String town) { + this.town = town; + } + + public String getSubTown() { + return subTown; + } + + public void setSubTown(String subTown) { + this.subTown = subTown; + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/search/ClientSearchBean.java b/opensrp-core/src/main/java/org/opensrp/search/ClientSearchBean.java new file mode 100644 index 0000000000..7bde0f3386 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/search/ClientSearchBean.java @@ -0,0 +1,129 @@ +package org.opensrp.search; + +import java.util.Map; + +import org.joda.time.DateTime; + +public class ClientSearchBean { + + private String nameLike; + + private String gender; + + private DateTime birthdateFrom; + + private DateTime birthdateTo; + + private DateTime deathdateFrom; + + private DateTime deathdateTo; + + private String attributeType; + + private String attributeValue; + + private DateTime lastEditFrom; + + private DateTime lastEditTo; + + private Map identifiers; + + private Map attributes; + + public String getNameLike() { + return nameLike; + } + + public void setNameLike(String nameLike) { + this.nameLike = nameLike; + } + + public String getGender() { + return gender; + } + + public void setGender(String gender) { + this.gender = gender; + } + + public DateTime getBirthdateFrom() { + return birthdateFrom; + } + + public void setBirthdateFrom(DateTime birthdateFrom) { + this.birthdateFrom = birthdateFrom; + } + + public DateTime getBirthdateTo() { + return birthdateTo; + } + + public void setBirthdateTo(DateTime birthdateTo) { + this.birthdateTo = birthdateTo; + } + + public DateTime getDeathdateFrom() { + return deathdateFrom; + } + + public void setDeathdateFrom(DateTime deathdateFrom) { + this.deathdateFrom = deathdateFrom; + } + + public DateTime getDeathdateTo() { + return deathdateTo; + } + + public void setDeathdateTo(DateTime deathdateTo) { + this.deathdateTo = deathdateTo; + } + + public String getAttributeType() { + return attributeType; + } + + public void setAttributeType(String attributeType) { + this.attributeType = attributeType; + } + + public String getAttributeValue() { + return attributeValue; + } + + public void setAttributeValue(String attributeValue) { + this.attributeValue = attributeValue; + } + + public DateTime getLastEditFrom() { + return lastEditFrom; + } + + public void setLastEditFrom(DateTime lastEditFrom) { + this.lastEditFrom = lastEditFrom; + } + + public DateTime getLastEditTo() { + return lastEditTo; + } + + public void setLastEditTo(DateTime lastEditTo) { + this.lastEditTo = lastEditTo; + } + + public Map getIdentifiers() { + return identifiers; + } + + public void setIdentifiers(Map identifiers) { + this.identifiers = identifiers; + } + + public Map getAttributes() { + return attributes; + } + + public void setAttributes(Map attributes) { + this.attributes = attributes; + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/search/StockSearchBean.java b/opensrp-core/src/main/java/org/opensrp/search/StockSearchBean.java new file mode 100644 index 0000000000..9fe0b8977f --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/search/StockSearchBean.java @@ -0,0 +1,95 @@ +package org.opensrp.search; + +public class StockSearchBean { + + private String identifier; + + private String stockTypeId; + + private String transactionType; + + private String providerId; + + private String value; + + private String dateCreated; + + private String toFrom; + + private String dateUpdated; + + private Long serverVersion; + + public String getIdentifier() { + return identifier; + } + + public void setIdentifier(String identifier) { + this.identifier = identifier; + } + + public String getStockTypeId() { + return stockTypeId; + } + + public void setStockTypeId(String stockTypeId) { + this.stockTypeId = stockTypeId; + } + + public String getTransactionType() { + return transactionType; + } + + public void setTransactionType(String transactionType) { + this.transactionType = transactionType; + } + + public String getProviderId() { + return providerId; + } + + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + public String getValue() { + return value; + } + + public void setValue(String value) { + this.value = value; + } + + public String getDateCreated() { + return dateCreated; + } + + public void setDateCreated(String dateCreated) { + this.dateCreated = dateCreated; + } + + public String getToFrom() { + return toFrom; + } + + public void setToFrom(String toFrom) { + this.toFrom = toFrom; + } + + public String getDateUpdated() { + return dateUpdated; + } + + public void setDateUpdated(String dateUpdated) { + this.dateUpdated = dateUpdated; + } + + public Long getServerVersion() { + return serverVersion; + } + + public void setServerVersion(Long serverVersion) { + this.serverVersion = serverVersion; + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/service/ClientService.java b/opensrp-core/src/main/java/org/opensrp/service/ClientService.java index 1b1d3511cb..f3599b8804 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/ClientService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/ClientService.java @@ -2,6 +2,7 @@ import java.lang.reflect.Field; import java.util.Arrays; +import java.util.Calendar; import java.util.List; import org.joda.time.DateTime; @@ -10,6 +11,8 @@ import org.opensrp.domain.Address; import org.opensrp.domain.Client; import org.opensrp.repository.ClientsRepository; +import org.opensrp.search.AddressSearchBean; +import org.opensrp.search.ClientSearchBean; import org.opensrp.util.DateTimeTypeConverter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -19,75 +22,65 @@ @Service public class ClientService { - + private final ClientsRepository allClients; - + @Autowired public ClientService(ClientsRepository allClients) { this.allClients = allClients; } - + public Client getByBaseEntityId(String baseEntityId) { return allClients.findByBaseEntityId(baseEntityId); } - + public List findAllClients() { return allClients.findAllClients(); } - + public List findAllByIdentifier(String identifier) { return allClients.findAllByIdentifier(identifier); } - + public List findAllByIdentifier(String identifierType, String identifier) { return allClients.findAllByIdentifier(identifierType, identifier); } - + public List findByRelationshipIdAndDateCreated(String relationalId, String dateFrom, String dateTo) { return allClients.findByRelationshipIdAndDateCreated(relationalId, dateFrom, dateTo); } - + public List findByRelationship(String relationalId) { return allClients.findByRelationShip(relationalId); } - + public List findAllByAttribute(String attributeType, String attribute) { return allClients.findAllByAttribute(attributeType, attribute); } - + public List findAllByMatchingName(String nameMatches) { return allClients.findAllByMatchingName(nameMatches); } - - public List findByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, - DateTime deathdateFrom, DateTime deathdateTo, String attributeType, - String attributeValue, String addressType, String country, String stateProvince, - String cityVillage, String countyDistrict, String subDistrict, String town, - String subTown, DateTime lastEditFrom, DateTime lastEditTo) { - return allClients - .findByCriteria(nameLike, gender, birthdateFrom, birthdateTo, deathdateFrom, deathdateTo, attributeType, - attributeValue, addressType, country, stateProvince, cityVillage, countyDistrict, subDistrict, town, - subTown, lastEditFrom, lastEditTo);//db.queryView(q.includeDocs(true), Client.class); + + public List findByCriteria(ClientSearchBean clientSearchBean, AddressSearchBean addressSearchBean, + DateTime lastEditFrom, DateTime lastEditTo) { + return allClients.findByCriteria(clientSearchBean, addressSearchBean, lastEditFrom, lastEditTo);//db.queryView(q.includeDocs(true), Client.class); } - - public List findByCriteria(String nameLike, String gender, DateTime birthdateFrom, DateTime birthdateTo, - DateTime deathdateFrom, DateTime deathdateTo, String attributeType, - String attributeValue, DateTime lastEditFrom, DateTime lastEditTo, - Long serverVersion) { - return allClients - .findByCriteria(nameLike, gender, birthdateFrom, birthdateTo, deathdateFrom, deathdateTo, attributeType, - attributeValue, null, null, null, null, null, null, null, null, lastEditFrom, lastEditTo); + + public List findByCriteria(ClientSearchBean clientSearchBean, Long serverVersion) { + return allClients.findByCriteria(clientSearchBean, new AddressSearchBean(), clientSearchBean.getLastEditFrom(), + clientSearchBean.getLastEditTo()); } /* public List findByCriteria(String addressType, String country, String stateProvince, String cityVillage, String countyDistrict, String subDistrict, String town, String subTown, DateTime lastEditFrom, DateTime lastEditTo) { return allClients.findByCriteria(null, null, null, null, null, null, null, null, addressType, country, stateProvince, cityVillage, countyDistrict, subDistrict, town, subTown, lastEditFrom, lastEditTo); }*/ - + public List findByDynamicQuery(String query) { return allClients.findByDynamicQuery(query); } - + public Client addClient(Client client) { if (client.getBaseEntityId() == null) { throw new RuntimeException("No baseEntityId"); @@ -99,45 +92,43 @@ public Client addClient(Client client) { } catch (JSONException e) { throw new IllegalArgumentException( - "A client already exists with given list of identifiers. Consider updating data.[" + c + "]"); + "A client already exists with given list of identifiers. Consider updating data.[" + c + "]"); } } - + client.setDateCreated(DateTime.now()); allClients.add(client); return client; } - + public Client findClient(Client client) { // find by auto assigned entity id Client c = allClients.findByBaseEntityId(client.getBaseEntityId()); if (c != null) { return c; } - + //still not found!! search by generic identifiers - + for (String idt : client.getIdentifiers().keySet()) { List cl = allClients.findAllByIdentifier(client.getIdentifier(idt)); if (cl.size() > 1) { throw new IllegalArgumentException( - "Multiple clients with identifier type " + idt + " and ID " + client.getIdentifier(idt) + " exist."); + "Multiple clients with identifier type " + idt + " and ID " + client.getIdentifier(idt) + " exist."); } else if (cl.size() != 0) { return cl.get(0); } } return c; } - - public Client find(String uniqueId) { // find by document id Client c = allClients.findByBaseEntityId(uniqueId); if (c != null) { return c; } - + // if not found find if it is in any identifiers TODO refactor it later List cl = allClients.findAllByIdentifier(uniqueId); if (cl.size() > 1) { @@ -145,38 +136,38 @@ public Client find(String uniqueId) { } else if (cl.size() != 0) { return cl.get(0); } - + return c; } - + public void updateClient(Client updatedClient) throws JSONException { // If update is on original entity if (updatedClient.isNew()) { throw new IllegalArgumentException( - "Client to be updated is not an existing and persisting domain object. Update database object instead of new pojo"); + "Client to be updated is not an existing and persisting domain object. Update database object instead of new pojo"); } - + if (findClient(updatedClient) == null) { throw new IllegalArgumentException("No client found with given list of identifiers. Consider adding new!"); } - + updatedClient.setDateEdited(DateTime.now()); allClients.update(updatedClient); } - + public Client mergeClient(Client updatedClient) { try { Client original = findClient(updatedClient); if (original == null) { throw new IllegalArgumentException("No client found with given list of identifiers. Consider adding new!"); } - + Gson gs = new GsonBuilder().registerTypeAdapter(DateTime.class, new DateTimeTypeConverter()).create(); JSONObject originalJo = new JSONObject(gs.toJson(original)); - + JSONObject updatedJo = new JSONObject(gs.toJson(updatedClient)); List fn = Arrays.asList(Client.class.getDeclaredFields()); - + JSONObject mergedJson = new JSONObject(); if (originalJo.length() > 0) { mergedJson = new JSONObject(originalJo, JSONObject.getNames(originalJo)); @@ -187,9 +178,9 @@ public Client mergeClient(Client updatedClient) { if (updatedJo.has(jokey)) mergedJson.put(jokey, updatedJo.get(jokey)); } - + original = gs.fromJson(mergedJson.toString(), Client.class); - + for (Address a : updatedClient.getAddresses()) { if (original.getAddress(a.getAddressType()) == null) { original.addAddress(a); @@ -205,7 +196,7 @@ public Client mergeClient(Client updatedClient) { original.addAttribute(k, updatedClient.getAttribute(k)); } } - + original.setDateEdited(DateTime.now()); allClients.update(original); return original; @@ -214,23 +205,54 @@ public Client mergeClient(Client updatedClient) { throw new RuntimeException(e); } } - + public List findByServerVersion(long serverVersion) { return allClients.findByServerVersion(serverVersion); } + + public List notInOpenMRSByServerVersion(long serverVersion, Calendar calendar) { + return allClients.notInOpenMRSByServerVersion(serverVersion, calendar); + } public List findByFieldValue(String field, List ids) { return allClients.findByFieldValue(field, ids); } - + public List findByFieldValue(String id) { return allClients.findByRelationShip(id); } - + public Client addorUpdate(Client client) { - return addorUpdate(client, true); + if (client.getBaseEntityId() == null) { + throw new RuntimeException("No baseEntityId"); + } + Client c = findClient(client); + if (c != null) { + client.setRevision(c.getRevision()); + client.setId(c.getId()); + c.setDateEdited(DateTime.now()); + client.setServerVersion(null); + client.addIdentifier("OPENMRS_UUID", c.getIdentifier("OPENMRS_UUID")); + allClients.update(client); + + } else { + + client.setDateCreated(DateTime.now()); + allClients.add(client); + } + return client; } - + + public Client imageUpdate(Client client) { + if (client.getBaseEntityId() == null) { + throw new RuntimeException("No baseEntityId"); + } + client.setDateEdited(DateTime.now()); + client.setServerVersion(null); + allClients.update(client); + return client; + } + public Client addorUpdate(Client client, boolean resetServerVersion) { if (client.getBaseEntityId() == null) { throw new RuntimeException("No baseEntityId"); @@ -244,7 +266,7 @@ public Client addorUpdate(Client client, boolean resetServerVersion) { client.setServerVersion(System.currentTimeMillis()); } allClients.update(client); - + } else { client.setDateCreated(DateTime.now()); diff --git a/opensrp-core/src/main/java/org/opensrp/service/SearchService.java b/opensrp-core/src/main/java/org/opensrp/service/SearchService.java index 9106bed039..4f752aff98 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/SearchService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/SearchService.java @@ -1,11 +1,10 @@ package org.opensrp.service; import java.util.List; -import java.util.Map; -import org.joda.time.DateTime; import org.opensrp.domain.Client; import org.opensrp.repository.SearchRepository; +import org.opensrp.search.ClientSearchBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -19,11 +18,9 @@ public SearchService(SearchRepository search) { this.search = search; } - public List searchClient(String nameLike, String firstName, String middleName, String lastName, String gender, - Map identifiers, Map attributes, - DateTime birthdateFrom, DateTime birthdateTo, DateTime lastEditFrom, DateTime lastEditTo, Integer limit) { - return search.findByCriteria(nameLike, firstName, middleName, lastName, gender, identifiers, attributes, - birthdateFrom, birthdateTo, lastEditFrom, lastEditTo, limit); + public List searchClient(ClientSearchBean clientSearchBean, String firstName, String middleName, String lastName, + Integer limit) { + return search.findByCriteria(clientSearchBean, firstName, middleName, lastName, limit); } } diff --git a/opensrp-core/src/main/java/org/opensrp/service/StockService.java b/opensrp-core/src/main/java/org/opensrp/service/StockService.java index 571683de02..b459b434a6 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/StockService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/StockService.java @@ -5,6 +5,7 @@ import org.joda.time.DateTime; import org.opensrp.domain.Stock; import org.opensrp.repository.StocksRepository; +import org.opensrp.search.StockSearchBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -30,18 +31,12 @@ public List getAll() { return allStocks.getAll(); } - public List findStocks(String identifier, String vaccine_type_id, String transaction_type, String providerid, - String value, String date_created, String to_from, String date_updated, - Long serverVersion, String sortBy, String sortOrder, int limit) { - return allStocks.findStocks(identifier, vaccine_type_id, transaction_type, providerid, value, date_created, to_from, - date_updated, serverVersion, sortBy, sortOrder, limit); + public List findStocks(StockSearchBean searchBean, String sortBy, String sortOrder, int limit) { + return allStocks.findStocks(searchBean, sortBy, sortOrder, limit); } - public List findStocks(String identifier, String vaccine_type_id, String transaction_type, String providerid, - String value, String date_created, String to_from, String date_updated, - String serverVersion) { - return allStocks.findStocks(identifier, vaccine_type_id, transaction_type, providerid, value, date_created, to_from, - date_updated, serverVersion); + public List findStocks(StockSearchBean searchBean) { + return allStocks.findStocks(searchBean); } public List findAllStocks() { @@ -60,8 +55,8 @@ public Stock find(Stock stock) { public synchronized Stock addStock(Stock stock) { Stock st = find(stock); if (st != null) { - throw new IllegalArgumentException("A stock already exists with given id. Consider updating data.[" + st.getId() - + "]"); + throw new IllegalArgumentException( + "A stock already exists with given id. Consider updating data.[" + st.getId() + "]"); } return stock; @@ -112,11 +107,8 @@ public Stock mergeStock(Stock updatedStock) { return original; } - public List findStocksBy(String identifier, String vaccine_type_id, String transaction_type, String providerid, - String value, String date_created, String to_from, String sync_status, - String date_updated, String serverVersion) { - return allStocks.findStocks(identifier, vaccine_type_id, transaction_type, providerid, value, date_created, to_from, - date_updated, serverVersion); + public List findStocksBy(StockSearchBean searchBean) { + return allStocks.findStocks(searchBean); } } diff --git a/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java b/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java index 55b11a0f81..bf0ed0fabc 100644 --- a/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java +++ b/opensrp-core/src/test/java/org/opensrp/FormSubmissionProcessorTest.java @@ -54,12 +54,6 @@ public class FormSubmissionProcessorTest extends TestResourceLoader{ @Mock private AllEvents allEvents; - @Mock - private AllClients allClients; - - @Mock - private AllEvents allEvents; - public FormSubmissionProcessorTest() throws IOException { super(); } diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllClientsIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllClientsIntegrationTest.java index dd7dcff739..16de292db1 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllClientsIntegrationTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/it/AllClientsIntegrationTest.java @@ -6,64 +6,52 @@ import static org.junit.Assert.assertTrue; import static org.mockito.MockitoAnnotations.initMocks; -import java.lang.reflect.Field; import java.net.MalformedURLException; -import java.util.Arrays; -import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import java.util.Random; -import org.apache.commons.httpclient.HttpClient; import org.apache.log4j.FileAppender; import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.log4j.PatternLayout; import org.ektorp.CouchDbConnector; -import org.ektorp.CouchDbInstance; -import org.ektorp.http.StdHttpClient; -import org.ektorp.impl.StdCouchDbConnector; -import org.ektorp.impl.StdCouchDbInstance; import org.hamcrest.Matchers; import org.joda.time.DateTime; import org.json.JSONException; -import org.json.JSONObject; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.opensrp.common.Gender; import org.opensrp.domain.Address; import org.opensrp.domain.Client; import org.opensrp.repository.couch.AllClients; +import org.opensrp.search.AddressSearchBean; +import org.opensrp.search.ClientSearchBean; import org.opensrp.service.ClientService; -import org.opensrp.util.DateTimeTypeConverter; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("classpath:test-applicationContext-opensrp.xml") public class AllClientsIntegrationTest { //TODO detailed testign - + @Autowired private ClientService clientService; - + @Autowired private AllClients ac; - + @Before public void setUp() throws Exception { System.out.println("Removing all data"); ac.removeAll(); System.out.println("Removed"); initMocks(this); - + FileAppender fa = new FileAppender(); fa.setName("FileLogger"); fa.setFile("d:\\opensrp-logger.log"); @@ -71,53 +59,58 @@ public void setUp() throws Exception { fa.setThreshold(Level.INFO); fa.setAppend(true); fa.activateOptions(); - + // add appender to any Logger (here is root) Logger.getRootLogger().addAppender(fa); } - + private void addClients() { for (int i = 0; i < 10; i++) { Client c = new Client("eid" + i).withName("fn" + i, "mn" + i, "ln" + i).withGender("MALE") - .withBirthdate(new DateTime(), false); + .withBirthdate(new DateTime(), false); c.withAddress(new Address().withAddressType("usual_residence").withCityVillage("city" + i).withTown("town" + i)); c.withAttribute("at1", "atval" + i); - + clientService.addClient(c); } } - + @Test public void shouldMergeSuccessfullyIfClientFound() throws JSONException {//TODO Client c = new Client("eid0").withName("fn", "mn", "ln").withGender("MALE").withBirthdate(new DateTime(), false); c.withAddress(new Address().withAddressType("usual_residence").withCityVillage("city").withTown("town")); c.withAttribute("at1", "atval1"); - + c = clientService.addClient(c); - + Client cu = new Client("eid0").withGender("FEMALE").withBirthdate(new DateTime(), false); cu.withAddress(new Address().withAddressType("deathplace").withCityVillage("city").withTown("town")); cu.withAttribute("at2", "atval2"); - + clientService.mergeClient(cu); } - + @Test public void shouldSearchByLastUpdatedDate() throws JSONException {//TODO DateTime start = DateTime.now(); - + addClients(); - + DateTime end = DateTime.now(); - - List cll = clientService.findByCriteria(null, null, null, null, null, null, null, null, start, end, null); + + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setLastEditFrom(start); + clientSearchBean.setLastEditTo(end); + + List cll = clientService.findByCriteria(clientSearchBean, null); + assertEquals(10, cll.size()); } - + public static void main(String[] args) { System.out.println(new DateTime("2016-01-23").toString("MMMM (yyyy)")); } - + @Test public void shouldSearchFullDataClientsIn10Sec() throws MalformedURLException { @@ -146,44 +139,48 @@ public void shouldSearchFullDataClientsIn10Sec() throws MalformedURLException { Logger.getLogger("FileLogger").info("Completed 2nd search by Couch"); Logger.getLogger("FileLogger").info("Going for First search by Lucene"); - List l = clientService - .findByCriteria("first", "MALE", new DateTime(), null, null, null, "ethnicity", "eth3", null, null, null); - Logger.getLogger("FileLogger").info("Completed First search of size " + l.size() + " by Lucene"); - + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setNameLike("first"); + clientSearchBean.setGender("MALE"); + clientSearchBean.setBirthdateFrom(new DateTime()); + clientSearchBean.setAttributeType("ethnicity"); + clientSearchBean.setAttributeValue("eth3"); + List l = clientService.findByCriteria(clientSearchBean, null); + Logger.getLogger("FileLogger").info("Completed First search of size "+l.size()+" by Lucene"); + Logger.getLogger("FileLogger").info("Going for 2nd search by Lucene"); - l = clientService - .findByCriteria("first", "MALE", new DateTime(), null, null, null, "ethnicity", "eth3", null, null, null); + l = clientService.findByCriteria(clientSearchBean, null); Logger.getLogger("FileLogger").info("Completed 2nd search of size " + l.size() + " by Lucene"); } - + void addClient(int i, boolean direct, CouchDbConnector db) { int ageInWeeks = new Random().nextInt(2860);// assuming average age of people is 55 years DateTime birthdate = new DateTime().minusWeeks(ageInWeeks); DateTime deathdate = i % 7 == 0 ? new DateTime() : null;// every 7th person died today Client c = new Client("entityId" + i, "firstName" + i, "middleName" + i, "lastName" + i, birthdate, deathdate, false, - false, i % 2 == 0 ? "FEMALE" : "MALE"); - + false, i % 2 == 0 ? "FEMALE" : "MALE"); + Map am = new HashMap<>(); Address ab = new Address("birthplace", null, null, am, null, null, null, "Sindh", "Pakistan"); ab.setCityVillage("Karachi"); ab.setTown("Korangi"); ab.setSubTown("UC" + i % 11); c.addAddress(ab); - + Address ur = new Address("usual_residence", null, null, am, null, null, "752" + new Random().nextInt(5), "Sindh", - "Pakistan"); + "Pakistan"); ur.setCityVillage("Karachi"); ur.setTown(i % 3 == 0 ? "Korangi" : "Baldia"); ur.setSubTown("UC" + i % 11); c.addAddress(ur); - + c.addAttribute("ethnicity", "eth" + i % 7); c.addAttribute("health area", "healtha" + i % 7); - + c.addIdentifier("CNIC", "1234556" + i); c.addIdentifier("NTN", "564300" + i); - + if (db != null) { db.create(c); } else if (direct) { @@ -192,79 +189,83 @@ void addClient(int i, boolean direct, CouchDbConnector db) { clientService.addClient(c); } } - + @Test public void shouldGetByDynamicView() { addClients(); - List l2 = clientService - .findByCriteria(null, "MALE", null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null); - assertTrue(l2.size() == 10); - l2 = clientService - .findByCriteria(null, "FEMALE", null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null); + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setGender("MALE"); + List l2 = clientService.findByCriteria(clientSearchBean,new AddressSearchBean(), null, null); + assertTrue(l2.size() == 10); + + clientSearchBean = new ClientSearchBean(); + clientSearchBean.setGender("FEMALE"); + l2 = clientService.findByCriteria(clientSearchBean,new AddressSearchBean(), null, null); assertTrue(l2.size() == 0); - l2 = clientService - .findByCriteria("fn1", "MALE", null, null, null, null, null, null, null, null, null, null, null, null, null, - null, null, null); + clientSearchBean = new ClientSearchBean(); + clientSearchBean.setGender("FEMALE"); + clientSearchBean.setNameLike("fn"); + l2 = clientService.findByCriteria(clientSearchBean,new AddressSearchBean(), null, null); + assertTrue(l2.size() == 10); + + clientSearchBean.setNameLike("fn1"); + l2 = clientService.findByCriteria(clientSearchBean,new AddressSearchBean(), null, null); assertTrue(l2.size() == 1); } - + @Test public void shouldFetchClientByIdentifier() { String baseEntityId = "testclient2"; Client c = new Client(baseEntityId).withBirthdate(new DateTime(), false).withFirstName("C first n") - .withLastName("C last n").withMiddleName("C middle n").withGender(Gender.MALE); - c.withAddress( - new Address("birthplace", new DateTime(System.currentTimeMillis() - 1000 * 60 * 60 * 24 * 2), DateTime.now(), - null, "lat", "lon", "75210", "Sindh", "Pakistan")); + .withLastName("C last n").withMiddleName("C middle n").withGender(Gender.MALE); + c.withAddress(new Address("birthplace", new DateTime(System.currentTimeMillis() - 1000 * 60 * 60 * 24 * 2), + DateTime.now(), null, "lat", "lon", "75210", "Sindh", "Pakistan")); c.withAttribute("ETHNICITY", "Mughal"); c.withIdentifier("Program ID", "01001222"); - + clientService.addClient(c); - + Client ce = clientService.getByBaseEntityId("testclient2"); assertEquals("testclient2", ce.getBaseEntityId()); assertTrue(Client.class.getSimpleName().equals(ce.type())); assertEquals("birthplace", ce.getAddresses().get(0).getAddressType()); assertEquals("Mughal", ce.getAttribute("ethnicity")); assertEquals("01001222", ce.getIdentifier("program id")); - + List ce2 = clientService.findAllByIdentifier("01001222"); assertTrue(ce2.size() == 1); assertEquals("testclient2", ce2.get(0).getBaseEntityId()); - + List ce3 = clientService.findAllByIdentifier("Program ID", "01001222"); assertTrue(ce3.size() == 1); assertEquals("testclient2", ce3.get(0).getBaseEntityId()); } - + @Test public void shouldFetchClientByAttribute() { String baseEntityId = "testclient2"; Client c = new Client(baseEntityId).withBirthdate(new DateTime(), false).withFirstName("C first n") - .withLastName("C last n").withMiddleName("C middle n").withGender(Gender.MALE); - c.withAddress( - new Address("birthplace", new DateTime(System.currentTimeMillis() - 1000 * 60 * 60 * 24 * 2), DateTime.now(), - null, "lat", "lon", "75210", "Sindh", "Pakistan")); + .withLastName("C last n").withMiddleName("C middle n").withGender(Gender.MALE); + c.withAddress(new Address("birthplace", new DateTime(System.currentTimeMillis() - 1000 * 60 * 60 * 24 * 2), + DateTime.now(), null, "lat", "lon", "75210", "Sindh", "Pakistan")); c.withAttribute("ETHNICITY", "Mughal"); c.withIdentifier("Program ID", "01001222"); - + clientService.addClient(c); - + c = new Client("testclient3").withBirthdate(new DateTime(), false).withFirstName("C first n") - .withLastName("C last n").withMiddleName("C middle n").withGender(Gender.MALE); + .withLastName("C last n").withMiddleName("C middle n").withGender(Gender.MALE); c.withAttribute("ETHNICITY", "Mughal"); c.addIdentifier("Program ID", "01001223"); - + clientService.addClient(c); - + List ce = clientService.findAllByAttribute("ETHNICITY", "Mughal"); assertTrue(ce.size() == 2); - assertThat(ce, Matchers.hasItem(Matchers.hasProperty("baseEntityId", equalTo("testclient2")))); - assertThat(ce, Matchers.hasItem(Matchers.hasProperty("baseEntityId", equalTo("testclient3")))); + assertThat(ce, Matchers. hasItem(Matchers. hasProperty("baseEntityId", equalTo("testclient2")))); + assertThat(ce, Matchers. hasItem(Matchers. hasProperty("baseEntityId", equalTo("testclient3")))); } - + } diff --git a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java index 0605723799..0516b3a1e3 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java @@ -32,27 +32,29 @@ import org.opensrp.domain.Client; import org.opensrp.repository.couch.AllClients; import org.opensrp.repository.lucene.LuceneClientRepository; +import org.opensrp.search.AddressSearchBean; +import org.opensrp.search.ClientSearchBean; import org.springframework.beans.factory.annotation.Autowired; //TODO: test birthDate range public class LuceneClientRepositoryTest extends BaseIntegrationTest { - + @Autowired public AllClients allClients; - + @Autowired LuceneClientRepository luceneClientRepository; - + @Before public void setUp() { allClients.removeAll(); } - + @After public void cleanUp() { //allClients.removeAll(); } - + @Test public void shouldFindBasedOnFirstNameCriteria() { Client expectedClient = new Client(BASE_ENTITY_ID); @@ -60,16 +62,16 @@ public void shouldFindBasedOnFirstNameCriteria() { expectedClient.setBirthdate(EPOCH_DATE_TIME); expectedClient.setAddresses(asList(getAddress())); expectedClient.setDateCreated(EPOCH_DATE_TIME); - + addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - List actualClients = luceneClientRepository - .getByCriteria(expectedClient.getFirstName(), null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null); - + + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setNameLike(expectedClient.getFirstName()); + List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, null); + assertEquals(expectedClient, actualClients.get(0)); } - + @Test(expected = RuntimeException.class) public void shouldThrowExceptionIfNoCriteriaIsSelected() { Client expectedClient = new Client(BASE_ENTITY_ID); @@ -77,16 +79,14 @@ public void shouldThrowExceptionIfNoCriteriaIsSelected() { expectedClient.setBirthdate(EPOCH_DATE_TIME); expectedClient.setAddresses(asList(getAddress())); expectedClient.setDateCreated(EPOCH_DATE_TIME); - + addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - List actualClients = luceneClientRepository - .getByCriteria(null, null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null); - + + List actualClients = luceneClientRepository.getByCriteria(new ClientSearchBean(), null); + assertEquals(expectedClient, actualClients.get(0)); } - + @Test(expected = NullPointerException.class) public void shouldThrowExceptionWithOutClientBirthDateField() { Client expectedClient = new Client(BASE_ENTITY_ID); @@ -94,13 +94,12 @@ public void shouldThrowExceptionWithOutClientBirthDateField() { expectedClient.setAddresses(asList(getAddress())); expectedClient.setDateCreated(EPOCH_DATE_TIME); addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - luceneClientRepository - .getByCriteria(expectedClient.getFirstName(), null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null); - + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setNameLike(expectedClient.getFirstName()); + luceneClientRepository.getByCriteria(clientSearchBean, null); + } - + @Test(expected = NullPointerException.class) public void shouldThrowExceptionWithClientNullBirthDateField() { Client expectedClient = new Client(BASE_ENTITY_ID); @@ -109,13 +108,13 @@ public void shouldThrowExceptionWithClientNullBirthDateField() { expectedClient.setDateCreated(EPOCH_DATE_TIME); expectedClient.setDateCreated(null); addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - luceneClientRepository - .getByCriteria(expectedClient.getFirstName(), null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null); - + + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setNameLike(expectedClient.getFirstName()); + luceneClientRepository.getByCriteria(clientSearchBean, null); + } - + @Test(expected = NullPointerException.class) public void shouldThrowExceptionWithOutClientDateCreatedField() { Client expectedClient = new Client(BASE_ENTITY_ID); @@ -123,12 +122,13 @@ public void shouldThrowExceptionWithOutClientDateCreatedField() { expectedClient.setAddresses(asList(getAddress())); expectedClient.setBirthdate(EPOCH_DATE_TIME); addObjectToRepository(Collections.singletonList(expectedClient), allClients); - luceneClientRepository - .getByCriteria(expectedClient.getFirstName(), null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null); - + + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setNameLike(expectedClient.getFirstName()); + luceneClientRepository.getByCriteria(clientSearchBean, null); + } - + @Test(expected = NullPointerException.class) public void shouldThrowExceptionWithClientNullDateCreatedField() { Client expectedClient = new Client(BASE_ENTITY_ID); @@ -137,54 +137,60 @@ public void shouldThrowExceptionWithClientNullDateCreatedField() { expectedClient.setBirthdate(EPOCH_DATE_TIME); expectedClient.setDateCreated(null); addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - luceneClientRepository - .getByCriteria(expectedClient.getFirstName(), null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null); - + + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setNameLike(expectedClient.getFirstName()); + luceneClientRepository.getByCriteria(clientSearchBean, null); + } - + @Test public void shouldNotFindWithOutClientAddressField() { Client expectedClient = new Client(BASE_ENTITY_ID); expectedClient.setFirstName(FIRST_NAME); - + addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - List actualClients = luceneClientRepository - .getByCriteria(expectedClient.getFirstName(), null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null); + + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setNameLike(expectedClient.getFirstName()); + List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, new AddressSearchBean(), null, + null, null); + assertTrue(actualClients.isEmpty()); } - + @Test public void shouldNotFindWithClientNullAddressField() { Client expectedClient = new Client(BASE_ENTITY_ID); expectedClient.setFirstName(FIRST_NAME); expectedClient.setAddresses(null); - + addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - List actualClients = luceneClientRepository - .getByCriteria(expectedClient.getFirstName(), null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null); + + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setNameLike(expectedClient.getFirstName()); + List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, new AddressSearchBean(), null, + null, null); + assertTrue(actualClients.isEmpty()); } - + @Test public void shouldNotFindWithClientEmptyAddressField() { Client expectedClient = new Client(BASE_ENTITY_ID); expectedClient.setFirstName(FIRST_NAME); expectedClient.setAddresses(Collections.EMPTY_LIST); - + addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - List actualClients = luceneClientRepository - .getByCriteria(expectedClient.getFirstName(), null, null, null, null, null, null, null, null, null, null, - null, null, null, null, null, null, null, null); + + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setNameLike(expectedClient.getFirstName()); + List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, new AddressSearchBean(), null, + null, null); + assertTrue(actualClients.isEmpty()); } - + //TODO:Fix source @Test public void canNotSearchWithDeathDate() { @@ -195,15 +201,17 @@ public void canNotSearchWithDeathDate() { expectedClient.setDateCreated(EPOCH_DATE_TIME); expectedClient.setDeathdate(new DateTime(DateTimeZone.UTC)); addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - List actualClients = luceneClientRepository - .getByCriteria(expectedClient.getFirstName(), null, null, null, EPOCH_DATE_TIME, - new DateTime(DateTimeZone.UTC), null, null, null, null, null, null, null, null, null, null, null, - null, null); - + + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setNameLike(expectedClient.getFirstName()); + clientSearchBean.setDeathdateFrom(EPOCH_DATE_TIME); + clientSearchBean.setDeathdateTo(new DateTime(DateTimeZone.UTC)); + List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, new AddressSearchBean(), null, + null, null); + assertEquals(0, actualClients.size()); } - + @Test public void shouldFindBasedOnAll() { addRandomInvalidClient(); @@ -216,18 +224,31 @@ public void shouldFindBasedOnAll() { expectedClient.setDateEdited(EPOCH_DATE_TIME); expectedClient.setAttributes(attributes); addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - List actualClients = luceneClientRepository - .getByCriteria(expectedClient.getFirstName(), expectedClient.getGender(), EPOCH_DATE_TIME, new DateTime(), - null, null, ATTRIBUTES_TYPE, ATTRIBUTES_VALUE, getAddress().getAddressType(), - getAddress().getCountry(), getAddress().getStateProvince(), getAddress().getCityVillage(), - getAddress().getCountyDistrict(), getAddress().getSubDistrict(), getAddress().getTown(), - getAddress().getSubTown(), EPOCH_DATE_TIME, new DateTime(DateTimeZone.UTC), null); - + + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setNameLike(expectedClient.getFirstName()); + clientSearchBean.setGender(expectedClient.getGender()); + clientSearchBean.setBirthdateFrom(EPOCH_DATE_TIME); + clientSearchBean.setBirthdateTo(new DateTime()); + clientSearchBean.setAttributeType(ATTRIBUTES_TYPE); + clientSearchBean.setAttributeValue(IDENTIFIER_VALUE); + + AddressSearchBean addressSearchBean = new AddressSearchBean(); + addressSearchBean.setAddressType(getAddress().getAddressType()); + addressSearchBean.setCountry(getAddress().getCountry()); + addressSearchBean.setStateProvince(getAddress().getStateProvince()); + addressSearchBean.setCityVillage(getAddress().getCityVillage()); + addressSearchBean.setCountyDistrict(getAddress().getCountyDistrict()); + addressSearchBean.setSubDistrict(getAddress().getSubDistrict()); + addressSearchBean.setTown(getAddress().getTown()); + addressSearchBean.setSubTown(getAddress().getSubTown()); + List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, addressSearchBean, + EPOCH_DATE_TIME, new DateTime(DateTimeZone.UTC), null); + assertEquals(1, actualClients.size()); assertEquals(expectedClient, actualClients.get(0)); } - + @Test public void shouldFindByWithOutAddressCriteria() { addRandomInvalidClient(); @@ -240,16 +261,23 @@ public void shouldFindByWithOutAddressCriteria() { expectedClient.setDateEdited(EPOCH_DATE_TIME); expectedClient.setAttributes(attributes); addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - List actualClients = luceneClientRepository - .getByCriteria(expectedClient.getFirstName(), expectedClient.getGender(), EPOCH_DATE_TIME, new DateTime(), - null, null, ATTRIBUTES_TYPE, ATTRIBUTES_VALUE, EPOCH_DATE_TIME, new DateTime(DateTimeZone.UTC), - null); - + + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setNameLike(expectedClient.getFirstName()); + clientSearchBean.setGender(expectedClient.getGender()); + clientSearchBean.setBirthdateFrom(EPOCH_DATE_TIME); + clientSearchBean.setBirthdateTo(new DateTime()); + clientSearchBean.setAttributeType(ATTRIBUTES_TYPE); + clientSearchBean.setAttributeValue(IDENTIFIER_VALUE); + clientSearchBean.setLastEditFrom(EPOCH_DATE_TIME); + clientSearchBean.setLastEditTo(new DateTime(DateTimeZone.UTC)); + + List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, null); + assertEquals(1, actualClients.size()); assertEquals(expectedClient, actualClients.get(0)); } - + @Test public void shouldFindByWithOutNameAndGenderAndBirthDateAndDeathDateAndAttributes() { addRandomInvalidClient(); @@ -262,15 +290,22 @@ public void shouldFindByWithOutNameAndGenderAndBirthDateAndDeathDateAndAttribute expectedClient.setDateEdited(EPOCH_DATE_TIME); expectedClient.setAttributes(attributes); addObjectToRepository(Collections.singletonList(expectedClient), allClients); - List actualClients = luceneClientRepository - .getByCriteria(getAddress().getAddressType(), getAddress().getCountry(), getAddress().getStateProvince(), - getAddress().getCityVillage(), getAddress().getCountyDistrict(), getAddress().getSubDistrict(), - getAddress().getTown(), getAddress().getSubTown(), EPOCH_DATE_TIME, new DateTime(DateTimeZone.UTC), - null); + + AddressSearchBean addressSearchBean = new AddressSearchBean(); + addressSearchBean.setAddressType(getAddress().getAddressType()); + addressSearchBean.setCountry(getAddress().getCountry()); + addressSearchBean.setStateProvince(getAddress().getStateProvince()); + addressSearchBean.setCityVillage(getAddress().getCityVillage()); + addressSearchBean.setCountyDistrict(getAddress().getCountyDistrict()); + addressSearchBean.setSubDistrict(getAddress().getSubDistrict()); + addressSearchBean.setTown(getAddress().getTown()); + addressSearchBean.setSubTown(getAddress().getSubTown()); + + List actualClients = luceneClientRepository.getByCriteria(addressSearchBean, EPOCH_DATE_TIME, new DateTime(DateTimeZone.UTC), null); assertEquals(1, actualClients.size()); assertEquals(expectedClient, actualClients.get(0)); } - + @Test public void shouldFindByStringQuery() { String query = "(firstName:\"firstName\"OR middleName:\"firstName\"OR lastName:\"firstName\")AND gender:female AND birthdate:[1970-01-01T00:00:00 TO 2017-08-30T10:29:01] AND lastEdited:[1970-01-01T00:00:00 TO 2017-08-30T04:29:01] AND attributesType:attributesValue AND addressType:addressType AND country:country AND stateProvince:stateProvince AND cityVillage:cityVillage AND countyDistrict:countryDistrict AND subDistrict:subDistrict AND town:town"; @@ -284,13 +319,13 @@ public void shouldFindByStringQuery() { expectedClient.setDateEdited(EPOCH_DATE_TIME); expectedClient.setAttributes(attributes); addObjectToRepository(Collections.singletonList(expectedClient), allClients); - + List actualClients = luceneClientRepository.getByCriteria(query); - + assertEquals(1, actualClients.size()); assertEquals(expectedClient, actualClients.get(0)); } - + //TODO: Fix source @Test(expected = DbAccessException.class) public void throwExcetionMotherIdentifierInRelationship() { @@ -301,11 +336,11 @@ public void throwExcetionMotherIdentifierInRelationship() { expectedClient.setDateCreated(EPOCH_DATE_TIME); expectedClient.addRelationship(MOTHERS_INDENTIFIER, IDENTIFIER_VALUE); addObjectToRepository(Collections.singletonList(expectedClient), allClients); - + List actualClients = luceneClientRepository.getByClientByMother(MOTHERS_INDENTIFIER, IDENTIFIER_VALUE); assertEquals(0, actualClients.size()); } - + @Test public void shouldFindByBaseEntityFieldAndValue() { Client expectedClient = new Client(BASE_ENTITY_ID); @@ -313,15 +348,15 @@ public void shouldFindByBaseEntityFieldAndValue() { expectedClient.setBirthdate(EPOCH_DATE_TIME); expectedClient.setAddresses(asList(getAddress())); expectedClient.setDateCreated(EPOCH_DATE_TIME); - + addObjectToRepository(Collections.singletonList(expectedClient), allClients); - - List actualClients = luceneClientRepository - .getByFieldValue(AllConstants.BaseEntity.BASE_ENTITY_ID, BASE_ENTITY_ID); + + List actualClients = luceneClientRepository.getByFieldValue(AllConstants.BaseEntity.BASE_ENTITY_ID, + BASE_ENTITY_ID); assertEquals(1, actualClients.size()); assertEquals(expectedClient, actualClients.get(0)); } - + @Test public void shouldReturnEmptyForBaseEntityFieldAndValue() { Client expectedClient = new Client(BASE_ENTITY_ID); @@ -330,13 +365,13 @@ public void shouldReturnEmptyForBaseEntityFieldAndValue() { expectedClient.setAddresses(asList(getAddress())); expectedClient.setDateCreated(EPOCH_DATE_TIME); String value = null; - + addObjectToRepository(Collections.singletonList(expectedClient), allClients); - + List actualClients = luceneClientRepository.getByFieldValue(AllConstants.BaseEntity.BASE_ENTITY_ID, value); assertEquals(0, actualClients.size()); } - + @Test public void shouldFindByBaseEntityFieldAndValues() { Client expectedClient = new Client(BASE_ENTITY_ID); @@ -344,21 +379,21 @@ public void shouldFindByBaseEntityFieldAndValues() { expectedClient.setBirthdate(EPOCH_DATE_TIME); expectedClient.setAddresses(asList(getAddress())); expectedClient.setDateCreated(EPOCH_DATE_TIME); - + Client expectedClient2 = new Client(DIFFERENT_BASE_ENTITY_ID); expectedClient2.setFirstName(FIRST_NAME); expectedClient2.setBirthdate(EPOCH_DATE_TIME); expectedClient2.setAddresses(asList(getAddress())); expectedClient2.setDateCreated(EPOCH_DATE_TIME); - + addObjectToRepository(asList(expectedClient, expectedClient2), allClients); - - List actualClients = luceneClientRepository - .getByFieldValue(AllConstants.BaseEntity.BASE_ENTITY_ID, asList(BASE_ENTITY_ID, DIFFERENT_BASE_ENTITY_ID)); + + List actualClients = luceneClientRepository.getByFieldValue(AllConstants.BaseEntity.BASE_ENTITY_ID, + asList(BASE_ENTITY_ID, DIFFERENT_BASE_ENTITY_ID)); assertEquals(2, actualClients.size()); assertTwoListAreSameIgnoringOrder(asList(expectedClient, expectedClient2), actualClients); } - + @Test public void shouldReturnEmptyForNullOrEmptyValues() { Client expectedClient = new Client(BASE_ENTITY_ID); @@ -366,25 +401,25 @@ public void shouldReturnEmptyForNullOrEmptyValues() { expectedClient.setBirthdate(EPOCH_DATE_TIME); expectedClient.setAddresses(asList(getAddress())); expectedClient.setDateCreated(EPOCH_DATE_TIME); - + Client expectedClient2 = new Client(DIFFERENT_BASE_ENTITY_ID); expectedClient2.setFirstName(FIRST_NAME); expectedClient2.setBirthdate(EPOCH_DATE_TIME); expectedClient2.setAddresses(asList(getAddress())); expectedClient2.setDateCreated(EPOCH_DATE_TIME); - + addObjectToRepository(asList(expectedClient, expectedClient2), allClients); - - List actualClients = luceneClientRepository - .getByFieldValue(AllConstants.BaseEntity.BASE_ENTITY_ID, Collections.EMPTY_LIST); + + List actualClients = luceneClientRepository.getByFieldValue(AllConstants.BaseEntity.BASE_ENTITY_ID, + Collections.EMPTY_LIST); assertEquals(0, actualClients.size()); - + List nullList = null; actualClients = luceneClientRepository.getByFieldValue(AllConstants.BaseEntity.BASE_ENTITY_ID, nullList); assertEquals(0, actualClients.size()); - + } - + private void addRandomInvalidClient() { for (int i = 0; i < 100; i++) { Client client = new Client(BASE_ENTITY_ID + i); @@ -398,5 +433,5 @@ private void addRandomInvalidClient() { addObjectToRepository(Collections.singletonList(client), allClients); } } - + } diff --git a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneSearchRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneSearchRepositoryTest.java index 65ba1ac646..d36f05ea10 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneSearchRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneSearchRepositoryTest.java @@ -8,6 +8,7 @@ import static org.opensrp.util.SampleFullDomainObject.EPOCH_DATE_TIME; import static org.opensrp.util.SampleFullDomainObject.FEMALE; import static org.opensrp.util.SampleFullDomainObject.FIRST_NAME; +import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_VALUE; import static org.opensrp.util.SampleFullDomainObject.LAST_NAME; import static org.opensrp.util.SampleFullDomainObject.MIDDLE_NAME; import static org.opensrp.util.SampleFullDomainObject.attributes; @@ -29,26 +30,27 @@ import org.opensrp.domain.Client; import org.opensrp.repository.couch.AllClients; import org.opensrp.repository.lucene.LuceneSearchRepository; +import org.opensrp.search.ClientSearchBean; import org.springframework.beans.factory.annotation.Autowired; public class LuceneSearchRepositoryTest extends BaseIntegrationTest { - + @Autowired public AllClients allClients; - + @Autowired public LuceneSearchRepository luceneSearchRepository; - + @Before public void setUp() { allClients.removeAll(); } - + @After public void cleanUp() { allClients.removeAll(); } - + @Test public void shouldSearchByAllCriteria() { Client expectedClient = createExpectedClient(); @@ -61,30 +63,40 @@ public void shouldSearchByAllCriteria() { expectedClient4.addAttribute("inactive", false); List expectedClients = asList(expectedClient, expectedClient2, expectedClient3, expectedClient4); addObjectToRepository(expectedClients, allClients); - + Map queryAttributes = new HashMap<>(); queryAttributes.put(ATTRIBUTES_TYPE, ATTRIBUTES_VALUE); queryAttributes.put("inactive", "true"); queryAttributes.put("inactive", "false"); queryAttributes.put("lost_to_follow_up", "true"); - - List actualClients = luceneSearchRepository - .getByCriteria("first", "first", "middle", "last", expectedClient.getGender(), null, null, EPOCH_DATE_TIME, - new DateTime(DateTimeZone.UTC), EPOCH_DATE_TIME, new DateTime(DateTimeZone.UTC), 10); - + + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setNameLike("first"); + clientSearchBean.setGender(expectedClient.getGender()); + clientSearchBean.setBirthdateFrom(EPOCH_DATE_TIME); + clientSearchBean.setBirthdateTo(new DateTime(DateTimeZone.UTC)); + clientSearchBean.setLastEditFrom(EPOCH_DATE_TIME); + clientSearchBean.setLastEditTo(new DateTime(DateTimeZone.UTC)); + List actualClients = luceneSearchRepository.getByCriteria(clientSearchBean, "first", "middle", "last", 10); + assertTwoListAreSameIgnoringOrder(expectedClients, actualClients); } - + @Test public void canNotSearchWithIdentifiers() { Client expectedClient = createExpectedClient(); - List actualClients = luceneSearchRepository - .getByCriteria("first", "first", "middle", "last", expectedClient.getGender(), identifier, null, - EPOCH_DATE_TIME, new DateTime(DateTimeZone.UTC), EPOCH_DATE_TIME, new DateTime(DateTimeZone.UTC), - 10); + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setNameLike("first"); + clientSearchBean.setGender(expectedClient.getGender()); + clientSearchBean.setBirthdateFrom(EPOCH_DATE_TIME); + clientSearchBean.setBirthdateTo(new DateTime(DateTimeZone.UTC)); + clientSearchBean.setIdentifiers(identifier); + clientSearchBean.setLastEditFrom(EPOCH_DATE_TIME); + clientSearchBean.setLastEditTo(new DateTime(DateTimeZone.UTC)); + List actualClients = luceneSearchRepository.getByCriteria(clientSearchBean, "first", "middle", "last", 10); assertEquals(0, actualClients.size()); } - + @Test public void canNotSearchWithAttributes() { Client expectedClient = createExpectedClient(); @@ -97,20 +109,27 @@ public void canNotSearchWithAttributes() { expectedClient4.addAttribute("inactive", false); List expectedClients = asList(expectedClient, expectedClient2, expectedClient3, expectedClient4); addObjectToRepository(expectedClients, allClients); - + Map queryAttributes = new HashMap<>(); queryAttributes.put(ATTRIBUTES_TYPE, ATTRIBUTES_VALUE); queryAttributes.put("inactive", "true"); queryAttributes.put("inactive", "false"); queryAttributes.put("lost_to_follow_up", "true"); - - List actualClients = luceneSearchRepository - .getByCriteria("first", "first", "middle", "last", expectedClient.getGender(), null, queryAttributes, - EPOCH_DATE_TIME, new DateTime(DateTimeZone.UTC), EPOCH_DATE_TIME, new DateTime(DateTimeZone.UTC), - 10); + + + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setNameLike("first"); + clientSearchBean.setGender(expectedClient.getGender()); + clientSearchBean.setBirthdateFrom(EPOCH_DATE_TIME); + clientSearchBean.setBirthdateTo(new DateTime(DateTimeZone.UTC)); + clientSearchBean.setAttributes(queryAttributes); + clientSearchBean.setLastEditFrom(EPOCH_DATE_TIME); + clientSearchBean.setLastEditTo(new DateTime(DateTimeZone.UTC)); + + List actualClients = luceneSearchRepository.getByCriteria(clientSearchBean, "first", "middle", "last", 10); assertEquals(0, actualClients.size()); } - + @Test public void shouldSearchWithStringQuery() { Client expectedClient = createExpectedClient(); @@ -123,19 +142,19 @@ public void shouldSearchWithStringQuery() { expectedClient4.addAttribute("inactive", false); List expectedClients = asList(expectedClient, expectedClient2, expectedClient3, expectedClient4); addObjectToRepository(expectedClients, allClients); - + Map queryAttributes = new HashMap<>(); queryAttributes.put(ATTRIBUTES_TYPE, ATTRIBUTES_VALUE); queryAttributes.put("inactive", "true"); queryAttributes.put("inactive", "false"); queryAttributes.put("lost_to_follow_up", "true"); - + String query = "(firstName:first* OR middleName:first* OR lastName:first* )AND firstName:first* AND middleName:middle* AND lastName:last* AND gender:female AND birthdate:[1970-01-01T00:00:00 TO 2017-09-07T10:12:18] AND lastEdited:[1970-01-01T00:00:00 TO 2017-09-07T10:12:18]"; List actualClients = luceneSearchRepository.getByCriteria(query); - + assertTwoListAreSameIgnoringOrder(expectedClients, actualClients); } - + private Client createExpectedClient() { Client expectedClient = new Client(BASE_ENTITY_ID); expectedClient.setFirstName(FIRST_NAME); diff --git a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java index ffd63fbdbf..8ba2dc522d 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormEntityServiceTest.java @@ -70,12 +70,6 @@ public class FormEntityServiceTest extends TestResourceLoader{ @Mock private FormEntityConverter fec; - @Mock - private AllClients allClients; - - @Mock - private AllEvents allEvents; - public FormEntityServiceTest() throws IOException { super(); } diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/SearchServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/SearchServiceTest.java index b9c0e9c19a..d4530fc836 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/it/SearchServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/it/SearchServiceTest.java @@ -27,6 +27,7 @@ import org.opensrp.BaseIntegrationTest; import org.opensrp.domain.Client; import org.opensrp.repository.couch.AllClients; +import org.opensrp.search.ClientSearchBean; import org.opensrp.service.SearchService; import org.springframework.beans.factory.annotation.Autowired; @@ -67,10 +68,15 @@ public void shouldSearchClient() { queryAttributes.put("inactive", "false"); queryAttributes.put("lost_to_follow_up", "true"); - List actualClients = searchService - .searchClient("first", "first", "middle", "last", expectedClient.getGender(), null, null, EPOCH_DATE_TIME, - new DateTime(DateTimeZone.UTC), EPOCH_DATE_TIME, new DateTime(DateTimeZone.UTC), 10); - + + ClientSearchBean clientSearchBean=new ClientSearchBean(); + clientSearchBean.setNameLike("first"); + clientSearchBean.setGender(expectedClient.getGender()); + clientSearchBean.setBirthdateFrom(EPOCH_DATE_TIME); + clientSearchBean.setBirthdateTo(new DateTime(DateTimeZone.UTC)); + clientSearchBean.setLastEditFrom(EPOCH_DATE_TIME); + clientSearchBean.setLastEditTo(new DateTime(DateTimeZone.UTC)); + List actualClients=searchService.searchClient(clientSearchBean, "first", "middle", "last",10); assertTwoListAreSameIgnoringOrder(expectedClients, actualClients); } diff --git a/opensrp-register/src/test/java/org/opensrp/register/service/handler/BNFScheduleHandlerTest.java b/opensrp-register/src/test/java/org/opensrp/register/service/handler/BNFScheduleHandlerTest.java index b3b472573f..8557ba07e5 100644 --- a/opensrp-register/src/test/java/org/opensrp/register/service/handler/BNFScheduleHandlerTest.java +++ b/opensrp-register/src/test/java/org/opensrp/register/service/handler/BNFScheduleHandlerTest.java @@ -62,7 +62,7 @@ public void shouldTestBNFScheduleHandler() throws Exception { InOrder inOrder = inOrder(bnfSchedulesService); inOrder.verify(bnfSchedulesService).enrollBNF(event.getBaseEntityId(), "BirthNotificationPregnancyStatusFollowUp", LocalDate.parse("2016-07-10"), event.getId()); - } else {} + } } } } diff --git a/opensrp-web/src/main/java/org/opensrp/web/rest/ClientResource.java b/opensrp-web/src/main/java/org/opensrp/web/rest/ClientResource.java index d4101912fa..67a1811621 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/rest/ClientResource.java +++ b/opensrp-web/src/main/java/org/opensrp/web/rest/ClientResource.java @@ -15,6 +15,8 @@ import org.joda.time.DateTime; import org.opensrp.domain.Client; +import org.opensrp.search.AddressSearchBean; +import org.opensrp.search.ClientSearchBean; import org.opensrp.service.ClientService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -24,24 +26,25 @@ @Controller @RequestMapping(value = "/rest/client") -public class ClientResource extends RestResource{ +public class ClientResource extends RestResource { + private ClientService clientService; @Autowired public ClientResource(ClientService clientService) { this.clientService = clientService; } - + @Override public Client getByUniqueId(String uniqueId) { return clientService.find(uniqueId); } @Override - public Client create(Client o) { + public Client create(Client o) { return clientService.addClient(o); } - + @Override public List requiredProperties() { List p = new ArrayList<>(); @@ -51,7 +54,7 @@ public List requiredProperties() { p.add(BASE_ENTITY_ID); return p; } - + @Override public Client update(Client entity) {//TODO check if send property and id matches return clientService.mergeClient(entity);//TODO update should only be based on baseEntityId @@ -59,35 +62,43 @@ public Client update(Client entity) {//TODO check if send property and id matche @Override public List search(HttpServletRequest request) throws ParseException {//TODO search should not call different url but only add params - String nameLike = getStringFilter("name", request); - String gender = getStringFilter(GENDER, request); + ClientSearchBean searchBean = new ClientSearchBean(); + searchBean.setNameLike(getStringFilter("name", request)); + searchBean.setGender(getStringFilter(GENDER, request)); DateTime[] birthdate = getDateRangeFilter(BIRTH_DATE, request);//TODO add ranges like fhir do http://hl7.org/fhir/search.html DateTime[] deathdate = getDateRangeFilter(DEATH_DATE, request); - String addressType = getStringFilter(ADDRESS_TYPE, request); - String country = getStringFilter(COUNTRY, request); - String stateProvince = getStringFilter(STATE_PROVINCE, request); - String cityVillage = getStringFilter(CITY_VILLAGE, request); - String countyDistrict = getStringFilter(COUNTY_DISTRICT, request); - String subDistrict = getStringFilter(SUB_DISTRICT, request); - String town = getStringFilter(TOWN, request); - String subTown = getStringFilter(SUB_TOWN, request); + if (birthdate != null) { + searchBean.setBirthdateFrom(birthdate[0]); + searchBean.setBirthdateTo(birthdate[1]); + } + if (deathdate != null) { + searchBean.setDeathdateFrom(deathdate[0]); + searchBean.setDeathdateTo(deathdate[1]); + } + + AddressSearchBean addressSearchBean = new AddressSearchBean(); + addressSearchBean.setAddressType(getStringFilter(ADDRESS_TYPE, request)); + addressSearchBean.setCountry(getStringFilter(COUNTRY, request)); + addressSearchBean.setStateProvince(getStringFilter(STATE_PROVINCE, request)); + addressSearchBean.setCityVillage(getStringFilter(CITY_VILLAGE, request)); + addressSearchBean.setCountyDistrict(getStringFilter(COUNTY_DISTRICT, request)); + addressSearchBean.setSubDistrict(getStringFilter(SUB_DISTRICT, request)); + addressSearchBean.setTown(getStringFilter(TOWN, request)); + addressSearchBean.setSubTown(getStringFilter(SUB_TOWN, request)); DateTime[] lastEdit = getDateRangeFilter(LAST_UPDATE, request);//TODO client by provider id //TODO lookinto Swagger https://slack-files.com/files-pri-safe/T0EPSEJE9-F0TBD0N77/integratingswagger.pdf?c=1458211183-179d2bfd2e974585c5038fba15a86bf83097810a - String attributes = getStringFilter("attribute", request); - String attributeType = StringUtils.isEmptyOrWhitespaceOnly(attributes)?null:attributes.split(":",-1)[0]; - String attributeValue = StringUtils.isEmptyOrWhitespaceOnly(attributes)?null:attributes.split(":",-1)[1]; - - return clientService.findByCriteria(nameLike, gender, - birthdate==null?null:birthdate[0], birthdate==null?null:birthdate[1], - deathdate == null?null:deathdate[0], deathdate == null?null:deathdate[1], attributeType, attributeValue, - addressType, country, stateProvince, cityVillage, countyDistrict, subDistrict, town, subTown, - lastEdit==null?null:lastEdit[0], lastEdit==null?null:lastEdit[1]); + String attributes = getStringFilter("attribute", request); + searchBean.setAttributeType(StringUtils.isEmptyOrWhitespaceOnly(attributes) ? null : attributes.split(":", -1)[0]); + searchBean.setAttributeValue(StringUtils.isEmptyOrWhitespaceOnly(attributes) ? null : attributes.split(":", -1)[1]); + + return clientService.findByCriteria(searchBean, addressSearchBean, lastEdit[0], + lastEdit == null ? null : lastEdit[1]); } - + @Override public List filter(String query) { return clientService.findByDynamicQuery(query); } - + } diff --git a/opensrp-web/src/main/java/org/opensrp/web/rest/SearchResource.java b/opensrp-web/src/main/java/org/opensrp/web/rest/SearchResource.java index dfb5898619..9a8ea9a7b0 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/rest/SearchResource.java +++ b/opensrp-web/src/main/java/org/opensrp/web/rest/SearchResource.java @@ -22,6 +22,7 @@ import org.opensrp.common.AllConstants.BaseEntity; import org.opensrp.domain.Client; import org.opensrp.domain.Event; +import org.opensrp.search.ClientSearchBean; import org.opensrp.service.ClientService; import org.opensrp.service.EventService; import org.opensrp.service.SearchService; @@ -60,13 +61,22 @@ public List search(HttpServletRequest request) throws ParseException {// String middleName = getStringFilter(MIDDLE_NAME, request); String lastName = getStringFilter(LAST_NAME, request); - String nameLike = getStringFilter("name", request); + ClientSearchBean searchBean = new ClientSearchBean(); + searchBean.setNameLike(getStringFilter("name", request)); - String gender = getStringFilter(GENDER, request); + searchBean.setGender(getStringFilter(GENDER, request)); DateTime[] birthdate = getDateRangeFilter(BIRTH_DATE, request);//TODO add ranges like fhir do http://hl7.org/fhir/search.html DateTime[] lastEdit = getDateRangeFilter(LAST_UPDATE, request);//TODO client by provider id //TODO lookinto Swagger https://slack-files.com/files-pri-safe/T0EPSEJE9-F0TBD0N77/integratingswagger.pdf?c=1458211183-179d2bfd2e974585c5038fba15a86bf83097810a + if (birthdate != null) { + searchBean.setBirthdateFrom(birthdate[0]); + searchBean.setBirthdateTo(birthdate[1]); + } + if (lastEdit != null) { + searchBean.setLastEditFrom(lastEdit[0]); + searchBean.setLastEditTo(lastEdit[1]); + } Map attributeMap = null; String attributes = getStringFilter("attribute", request); if (!StringUtils.isEmptyOrWhitespaceOnly(attributes)) { @@ -77,16 +87,15 @@ public List search(HttpServletRequest request) throws ParseException {// attributeMap.put(attributeType, attributeValue); } - return searchService.searchClient(nameLike, firstName, middleName, lastName, gender, null, attributeMap, - birthdate == null ? null : birthdate[0], birthdate == null ? null : birthdate[1], lastEdit == null ? null - : lastEdit[0], lastEdit == null ? null : lastEdit[1], null); + searchBean.setAttributes(attributeMap); + return searchService.searchClient(searchBean, firstName, middleName, lastName, null); } @RequestMapping(method = RequestMethod.GET, value = "/path") @ResponseBody private List searchPathBy(HttpServletRequest request) throws ParseException { List childMotherList = new ArrayList(); - + ClientSearchBean searchBean = new ClientSearchBean(); try { String ZEIR_ID = "zeir_id"; @@ -99,7 +108,7 @@ private List searchPathBy(HttpServletRequest request) throws ParseE String LOST_TO_FOLLOW_UP = "lost_to_follow_up"; Integer limit = getIntegerFilter("limit", request); - if(limit == null || limit.intValue() == 0){ + if (limit == null || limit.intValue() == 0) { limit = 100; } @@ -107,7 +116,7 @@ private List searchPathBy(HttpServletRequest request) throws ParseE String firstName = getStringFilter(FIRST_NAME, request); String middleName = getStringFilter(MIDDLE_NAME, request); String lastName = getStringFilter(LAST_NAME, request); - String gender = getStringFilter(GENDER, request); + searchBean.setGender(getStringFilter(GENDER, request)); String inActive = getStringFilter(INACTIVE, request); String lostToFollowUp = getStringFilter(LOST_TO_FOLLOW_UP, request); @@ -115,6 +124,15 @@ private List searchPathBy(HttpServletRequest request) throws ParseE DateTime[] lastEdit = getDateRangeFilter(LAST_UPDATE, request);//TODO client by provider id //TODO lookinto Swagger https://slack-files.com/files-pri-safe/T0EPSEJE9-F0TBD0N77/integratingswagger.pdf?c=1458211183-179d2bfd2e974585c5038fba15a86bf83097810a + if (birthdate != null) { + searchBean.setBirthdateFrom(birthdate[0]); + searchBean.setBirthdateTo(birthdate[1]); + } + if (lastEdit != null) { + searchBean.setLastEditFrom(lastEdit[0]); + searchBean.setLastEditTo(lastEdit[1]); + } + String ZEIR_ID_KEY = "ZEIR_ID"; Map identifiers = new HashMap(); if (!StringUtils.isEmptyOrWhitespaceOnly(zeirId)) { @@ -137,12 +155,13 @@ private List searchPathBy(HttpServletRequest request) throws ParseE List children = new ArrayList(); if (!StringUtils.isEmptyOrWhitespaceOnly(firstName) || !StringUtils.isEmptyOrWhitespaceOnly(middleName) - || !StringUtils.isEmptyOrWhitespaceOnly(lastName) || !StringUtils.isEmptyOrWhitespaceOnly(gender) - || !identifiers.isEmpty() || !attributes.isEmpty() || birthdate != null || lastEdit != null) { + || !StringUtils.isEmptyOrWhitespaceOnly(lastName) + || !StringUtils.isEmptyOrWhitespaceOnly(searchBean.getGender()) || !identifiers.isEmpty() + || !attributes.isEmpty() || birthdate != null || lastEdit != null) { - children = searchService.searchClient(null, firstName, middleName, lastName, gender, identifiers, - attributes, birthdate == null ? null : birthdate[0], birthdate == null ? null : birthdate[1], - lastEdit == null ? null : lastEdit[0], lastEdit == null ? null : lastEdit[1], limit); + searchBean.setIdentifiers(identifiers); + searchBean.setAttributes(attributes); + children = searchService.searchClient(searchBean, firstName, middleName, lastName, limit); } @@ -164,12 +183,12 @@ private List searchPathBy(HttpServletRequest request) throws ParseE } List mothers = new ArrayList(); - if (!StringUtils.isEmptyOrWhitespaceOnly(motherFirstName) - || !StringUtils.isEmptyOrWhitespaceOnly(motherLastName) || !motherAttributes.isEmpty()) { + if (!StringUtils.isEmptyOrWhitespaceOnly(motherFirstName) || !StringUtils.isEmptyOrWhitespaceOnly(motherLastName) + || !motherAttributes.isEmpty()) { String nameLike = null; - if ((!StringUtils.isEmptyOrWhitespaceOnly(motherFirstName) && !StringUtils - .isEmptyOrWhitespaceOnly(motherLastName)) && motherFirstName.equals(motherLastName)) { + if ((!StringUtils.isEmptyOrWhitespaceOnly(motherFirstName) + && !StringUtils.isEmptyOrWhitespaceOnly(motherLastName)) && motherFirstName.equals(motherLastName)) { if (org.apache.commons.lang3.StringUtils.containsWhitespace(motherFirstName.trim())) { String[] arr = motherFirstName.split("\\s+"); motherFirstName = arr[0]; @@ -180,9 +199,12 @@ private List searchPathBy(HttpServletRequest request) throws ParseE motherLastName = null; } } - mothers = searchService.searchClient(nameLike, motherFirstName, null, motherLastName, null, null, - motherAttributes, null, null, lastEdit == null ? null : lastEdit[0], lastEdit == null ? null - : lastEdit[1], limit); + ClientSearchBean motherSearchBean = new ClientSearchBean(); + motherSearchBean.setNameLike(nameLike); + motherSearchBean.setAttributes(motherAttributes); + motherSearchBean.setLastEditFrom(searchBean.getLastEditFrom()); + motherSearchBean.setLastEditTo(searchBean.getLastEditTo()); + mothers = searchService.searchClient(motherSearchBean, motherFirstName, null, motherLastName, limit); } diff --git a/opensrp-web/src/main/java/org/opensrp/web/rest/StockResource.java b/opensrp-web/src/main/java/org/opensrp/web/rest/StockResource.java index 949508b426..28e1c9d3bb 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/rest/StockResource.java +++ b/opensrp-web/src/main/java/org/opensrp/web/rest/StockResource.java @@ -29,6 +29,7 @@ import org.json.JSONObject; import org.opensrp.common.AllConstants.BaseEntity; import org.opensrp.domain.Stock; +import org.opensrp.search.StockSearchBean; import org.opensrp.service.StockService; import org.opensrp.util.DateTimeTypeConverter; import org.slf4j.Logger; @@ -106,18 +107,18 @@ protected ResponseEntity sync(HttpServletRequest request) { Map response = new HashMap(); try { - String identifier = getStringFilter(IDENTIFIER, request); - String vaccine_type_id = getStringFilter(VACCINE_TYPE_ID, request); - String transaction_type = getStringFilter(TRANSACTION_TYPE, request); - String providerId = getStringFilter(PROVIDERID, request); - String value = getStringFilter(VALUE, request); - String date_created = getStringFilter(DATE_CREATED, request); - String to_from = getStringFilter(TO_FROM, request); - String date_updated = getStringFilter(DATE_UPDATED, request); + StockSearchBean searchBean = new StockSearchBean(); + searchBean.setIdentifier(getStringFilter(IDENTIFIER, request)); + searchBean.setStockTypeId(getStringFilter(VACCINE_TYPE_ID, request)); + searchBean.setTransactionType(getStringFilter(TRANSACTION_TYPE, request)); + searchBean.setProviderId(getStringFilter(PROVIDERID, request)); + searchBean.setValue(getStringFilter(VALUE, request)); + searchBean.setDateCreated(getStringFilter(DATE_CREATED, request)); + searchBean.setToFrom(getStringFilter(TO_FROM, request)); + searchBean.setDateUpdated(getStringFilter(DATE_UPDATED, request)); String serverVersion = getStringFilter(BaseEntity.SERVER_VERSIOIN, request); - Long lastSyncedServerVersion = null; if (serverVersion != null) { - lastSyncedServerVersion = Long.valueOf(serverVersion) + 1; + searchBean.setServerVersion(Long.valueOf(serverVersion) + 1); } Integer limit = getIntegerFilter("limit", request); if (limit == null || limit.intValue() == 0) { @@ -125,8 +126,7 @@ protected ResponseEntity sync(HttpServletRequest request) { } List stocks = new ArrayList(); - stocks = stockService.findStocks(identifier, vaccine_type_id, transaction_type, providerId, value, date_created, - to_from, date_updated, lastSyncedServerVersion, BaseEntity.SERVER_VERSIOIN, "asc", limit); + stocks = stockService.findStocks(searchBean, BaseEntity.SERVER_VERSIOIN, "asc", limit); JsonArray stocksArray = (JsonArray) gson.toJsonTree(stocks, new TypeToken>() {}.getType()); response.put("stocks", stocksArray); @@ -187,24 +187,29 @@ public Stock update(Stock stock) { @Override public List search(HttpServletRequest request) throws ParseException { - String stockId = getStringFilter("identifier", request); - String vaccine_type_id = getStringFilter(VACCINE_TYPE_ID, request); - String transaction_type = getStringFilter(TRANSACTION_TYPE, request); - String providerId = getStringFilter(PROVIDERID, request); - String value = getStringFilter(VALUE, request); - String date_created = getStringFilter(DATE_CREATED, request); - String to_from = getStringFilter(TO_FROM, request); - String date_updated = getStringFilter(DATE_UPDATED, request); + + StockSearchBean searchBean = new StockSearchBean(); + searchBean.setIdentifier(getStringFilter(IDENTIFIER, request)); + searchBean.setStockTypeId(getStringFilter(VACCINE_TYPE_ID, request)); + searchBean.setTransactionType(getStringFilter(TRANSACTION_TYPE, request)); + searchBean.setProviderId(getStringFilter(PROVIDERID, request)); + searchBean.setValue(getStringFilter(VALUE, request)); + searchBean.setDateCreated(getStringFilter(DATE_CREATED, request)); + searchBean.setToFrom(getStringFilter(TO_FROM, request)); + searchBean.setDateUpdated(getStringFilter(DATE_UPDATED, request)); + String serverVersion = getStringFilter(TIMESTAMP, request); + if(serverVersion!=null) + searchBean.setServerVersion(Long.valueOf(serverVersion)); + - if (!StringUtils.isEmptyOrWhitespaceOnly(stockId)) { - Stock stock = stockService.find(stockId); + if (!StringUtils.isEmptyOrWhitespaceOnly(searchBean.getIdentifier())) { + Stock stock = stockService.find(searchBean.getIdentifier()); if (stock == null) { return new ArrayList<>(); } } - return stockService.findStocks(stockId, vaccine_type_id, transaction_type, providerId, value, date_created, to_from, - date_updated, serverVersion); + return stockService.findStocks(searchBean); } @Override From 015f71a8034fb94ee6b87cb0f9f752ecd88e527c Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 8 Mar 2018 18:36:14 +0300 Subject: [PATCH 006/133] Code cleanup Signed-off-by: Samuel Githengi --- .../org/opensrp/service/ClientService.java | 53 ++++++------------- .../org/opensrp/service/EventService.java | 3 ++ .../src/main/java/org/opensrp/util/Utils.java | 27 ++++++++++ .../org/opensrp/web/rest/StockResource.java | 33 ++++++------ pom.xml | 4 +- 5 files changed, 63 insertions(+), 57 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/service/ClientService.java b/opensrp-core/src/main/java/org/opensrp/service/ClientService.java index f3599b8804..fcebd2ddf0 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/ClientService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/ClientService.java @@ -1,25 +1,21 @@ package org.opensrp.service; -import java.lang.reflect.Field; import java.util.Arrays; import java.util.Calendar; import java.util.List; import org.joda.time.DateTime; import org.json.JSONException; -import org.json.JSONObject; import org.opensrp.domain.Address; import org.opensrp.domain.Client; +import org.opensrp.domain.Event; import org.opensrp.repository.ClientsRepository; import org.opensrp.search.AddressSearchBean; import org.opensrp.search.ClientSearchBean; -import org.opensrp.util.DateTimeTypeConverter; +import org.opensrp.util.Utils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; -import com.google.gson.Gson; -import com.google.gson.GsonBuilder; - @Service public class ClientService { @@ -162,40 +158,23 @@ public Client mergeClient(Client updatedClient) { throw new IllegalArgumentException("No client found with given list of identifiers. Consider adding new!"); } - Gson gs = new GsonBuilder().registerTypeAdapter(DateTime.class, new DateTimeTypeConverter()).create(); - JSONObject originalJo = new JSONObject(gs.toJson(original)); - - JSONObject updatedJo = new JSONObject(gs.toJson(updatedClient)); - List fn = Arrays.asList(Client.class.getDeclaredFields()); + original = (Client) Utils.getMergedJSON(original, updatedClient, Arrays.asList(Client.class.getDeclaredFields()), + Client.class); - JSONObject mergedJson = new JSONObject(); - if (originalJo.length() > 0) { - mergedJson = new JSONObject(originalJo, JSONObject.getNames(originalJo)); - } - if (updatedJo.length() > 0) { - for (Field key : fn) { - String jokey = key.getName(); - if (updatedJo.has(jokey)) - mergedJson.put(jokey, updatedJo.get(jokey)); - } - - original = gs.fromJson(mergedJson.toString(), Client.class); - - for (Address a : updatedClient.getAddresses()) { - if (original.getAddress(a.getAddressType()) == null) { - original.addAddress(a); - } else { - original.removeAddress(a.getAddressType()); - original.addAddress(a); - } - } - for (String k : updatedClient.getIdentifiers().keySet()) { - original.addIdentifier(k, updatedClient.getIdentifier(k)); - } - for (String k : updatedClient.getAttributes().keySet()) { - original.addAttribute(k, updatedClient.getAttribute(k)); + for (Address a : updatedClient.getAddresses()) { + if (original.getAddress(a.getAddressType()) == null) { + original.addAddress(a); + } else { + original.removeAddress(a.getAddressType()); + original.addAddress(a); } } + for (String k : updatedClient.getIdentifiers().keySet()) { + original.addIdentifier(k, updatedClient.getIdentifier(k)); + } + for (String k : updatedClient.getAttributes().keySet()) { + original.addAttribute(k, updatedClient.getAttribute(k)); + } original.setDateEdited(DateTime.now()); allClients.update(original); diff --git a/opensrp-core/src/main/java/org/opensrp/service/EventService.java b/opensrp-core/src/main/java/org/opensrp/service/EventService.java index 85824c1c00..298942f09c 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/EventService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/EventService.java @@ -247,6 +247,9 @@ public Event mergeEvent(Event updatedEvent) { original.addIdentifier(k, updatedEvent.getIdentifier(k)); } } + for (String k : updatedEvent.getIdentifiers().keySet()) { + original.addIdentifier(k, updatedEvent.getIdentifier(k)); + } original.setDateEdited(DateTime.now()); allEvents.update(original); diff --git a/opensrp-core/src/main/java/org/opensrp/util/Utils.java b/opensrp-core/src/main/java/org/opensrp/util/Utils.java index d6d8b4ee71..b0d76c5ca3 100644 --- a/opensrp-core/src/main/java/org/opensrp/util/Utils.java +++ b/opensrp-core/src/main/java/org/opensrp/util/Utils.java @@ -30,12 +30,14 @@ import org.ektorp.http.StdHttpClient; import org.ektorp.impl.StdCouchDbConnector; import org.ektorp.impl.StdCouchDbInstance; +import org.joda.time.DateTime; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; import org.opensrp.form.domain.FormSubmission; import com.google.gson.Gson; +import com.google.gson.GsonBuilder; import com.google.gson.reflect.TypeToken; import com.mysql.jdbc.StringUtils; @@ -60,6 +62,31 @@ public static List getFieldsAsList(Class cls) { } return fieldList; } + + public static Object getMergedJSON(Object original, Object updated, List fn, Class clazz) + throws JSONException { + + Gson gs = new GsonBuilder().registerTypeAdapter(DateTime.class, new DateTimeTypeConverter()).create(); + JSONObject originalJo = new JSONObject(gs.toJson(original, clazz)); + + JSONObject updatedJo = new JSONObject(gs.toJson(updated, clazz)); + + JSONObject mergedJson = new JSONObject(); + if (originalJo.length() > 0) { + mergedJson = new JSONObject(originalJo, JSONObject.getNames(originalJo)); + } + + if (updatedJo.length() > 0) { + for (Field key : fn) { + String jokey = key.getName(); + if (updatedJo.has(jokey)) + mergedJson.put(jokey, updatedJo.get(jokey)); + } + } + if (mergedJson.length() > 0) + return gs.fromJson(mergedJson.toString(), clazz); + return original; + } public static String getZiggyParams(FormSubmission formSubmission) { return new Gson().toJson(create(ANM_ID, formSubmission.anmId()).put(INSTANCE_ID, formSubmission.instanceId()).put(ENTITY_ID, formSubmission.entityId()) diff --git a/opensrp-web/src/main/java/org/opensrp/web/rest/StockResource.java b/opensrp-web/src/main/java/org/opensrp/web/rest/StockResource.java index 28e1c9d3bb..1d4ac1ab01 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/rest/StockResource.java +++ b/opensrp-web/src/main/java/org/opensrp/web/rest/StockResource.java @@ -95,6 +95,19 @@ protected ResponseEntity getAll() { } } + private StockSearchBean populateSearchBean(HttpServletRequest request) { + StockSearchBean searchBean = new StockSearchBean(); + searchBean.setIdentifier(getStringFilter(IDENTIFIER, request)); + searchBean.setStockTypeId(getStringFilter(VACCINE_TYPE_ID, request)); + searchBean.setTransactionType(getStringFilter(TRANSACTION_TYPE, request)); + searchBean.setProviderId(getStringFilter(PROVIDERID, request)); + searchBean.setValue(getStringFilter(VALUE, request)); + searchBean.setDateCreated(getStringFilter(DATE_CREATED, request)); + searchBean.setToFrom(getStringFilter(TO_FROM, request)); + searchBean.setDateUpdated(getStringFilter(DATE_UPDATED, request)); + return searchBean; + } + /** * Fetch stocks ordered by serverVersion ascending order * @@ -107,15 +120,7 @@ protected ResponseEntity sync(HttpServletRequest request) { Map response = new HashMap(); try { - StockSearchBean searchBean = new StockSearchBean(); - searchBean.setIdentifier(getStringFilter(IDENTIFIER, request)); - searchBean.setStockTypeId(getStringFilter(VACCINE_TYPE_ID, request)); - searchBean.setTransactionType(getStringFilter(TRANSACTION_TYPE, request)); - searchBean.setProviderId(getStringFilter(PROVIDERID, request)); - searchBean.setValue(getStringFilter(VALUE, request)); - searchBean.setDateCreated(getStringFilter(DATE_CREATED, request)); - searchBean.setToFrom(getStringFilter(TO_FROM, request)); - searchBean.setDateUpdated(getStringFilter(DATE_UPDATED, request)); + StockSearchBean searchBean = populateSearchBean(request); String serverVersion = getStringFilter(BaseEntity.SERVER_VERSIOIN, request); if (serverVersion != null) { searchBean.setServerVersion(Long.valueOf(serverVersion) + 1); @@ -188,15 +193,7 @@ public Stock update(Stock stock) { @Override public List search(HttpServletRequest request) throws ParseException { - StockSearchBean searchBean = new StockSearchBean(); - searchBean.setIdentifier(getStringFilter(IDENTIFIER, request)); - searchBean.setStockTypeId(getStringFilter(VACCINE_TYPE_ID, request)); - searchBean.setTransactionType(getStringFilter(TRANSACTION_TYPE, request)); - searchBean.setProviderId(getStringFilter(PROVIDERID, request)); - searchBean.setValue(getStringFilter(VALUE, request)); - searchBean.setDateCreated(getStringFilter(DATE_CREATED, request)); - searchBean.setToFrom(getStringFilter(TO_FROM, request)); - searchBean.setDateUpdated(getStringFilter(DATE_UPDATED, request)); + StockSearchBean searchBean = populateSearchBean(request); String serverVersion = getStringFilter(TIMESTAMP, request); if(serverVersion!=null) diff --git a/pom.xml b/pom.xml index 8dc95f796a..ebd2195569 100644 --- a/pom.xml +++ b/pom.xml @@ -141,7 +141,7 @@ maven-antrun-plugin 1.6 - + From 7b6fc88824d1a474c455cf9723c53a59c93746bf Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 8 Mar 2018 18:56:42 +0300 Subject: [PATCH 007/133] Code cleanup Signed-off-by: Samuel Githengi --- .../src/main/java/org/opensrp/service/ClientService.java | 1 - pom.xml | 4 ++-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/service/ClientService.java b/opensrp-core/src/main/java/org/opensrp/service/ClientService.java index fcebd2ddf0..4104187e0d 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/ClientService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/ClientService.java @@ -8,7 +8,6 @@ import org.json.JSONException; import org.opensrp.domain.Address; import org.opensrp.domain.Client; -import org.opensrp.domain.Event; import org.opensrp.repository.ClientsRepository; import org.opensrp.search.AddressSearchBean; import org.opensrp.search.ClientSearchBean; diff --git a/pom.xml b/pom.xml index ebd2195569..8dc95f796a 100644 --- a/pom.xml +++ b/pom.xml @@ -141,7 +141,7 @@ maven-antrun-plugin 1.6 - + From 48558dee674d07a6126eceaa35be4644de5988e2 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 9 Mar 2018 09:09:54 +0300 Subject: [PATCH 008/133] Fix Unit Test Signed-off-by: Samuel Githengi --- .../src/test/java/org/opensrp/api/domain/ClientTest.java | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/opensrp-api/src/test/java/org/opensrp/api/domain/ClientTest.java b/opensrp-api/src/test/java/org/opensrp/api/domain/ClientTest.java index a5f54de4aa..b4c034ccb5 100644 --- a/opensrp-api/src/test/java/org/opensrp/api/domain/ClientTest.java +++ b/opensrp-api/src/test/java/org/opensrp/api/domain/ClientTest.java @@ -61,8 +61,9 @@ public void shouldTestEvent(){ Assert.assertEquals("Robin", Client1.getFirstName()); Assert.assertNotSame("Not Same", "robins", Client1.getFirstName()); - Client1.withBirthdate(new Date(),true); - Assert.assertEquals(new Date(), Client1.getBirthdate()); + Date now=new Date(); + Client1.withBirthdate(now,true); + Assert.assertEquals(now, Client1.getBirthdate()); Date dt = new Date(); Calendar c = Calendar.getInstance(); c.setTime(dt); From e161de97125e5b3c1e434f27c8ec7ba02b159eff Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 9 Mar 2018 09:16:35 +0300 Subject: [PATCH 009/133] Fix Unit Test Signed-off-by: Samuel Githengi --- .../test/java/org/opensrp/api/domain/ClientTest.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/opensrp-api/src/test/java/org/opensrp/api/domain/ClientTest.java b/opensrp-api/src/test/java/org/opensrp/api/domain/ClientTest.java index b4c034ccb5..58ba4da4a6 100644 --- a/opensrp-api/src/test/java/org/opensrp/api/domain/ClientTest.java +++ b/opensrp-api/src/test/java/org/opensrp/api/domain/ClientTest.java @@ -7,8 +7,6 @@ import java.util.List; import java.util.Map; -import junit.framework.Assert; - import org.junit.Test; import org.opensrp.common.Gender; @@ -23,6 +21,8 @@ import com.openpojo.validation.test.impl.GetterTester; import com.openpojo.validation.test.impl.SetterTester; +import junit.framework.Assert; + public class ClientTest { @Test @@ -70,9 +70,10 @@ public void shouldTestEvent(){ c.add(Calendar.DATE, 1); dt = c.getTime(); Assert.assertNotSame("Not Same", dt, Client1.getBirthdate()); - Client1.withDeathdate(new Date(), true); - Assert.assertEquals(new Date(), Client1.getDeathdate()); + Client1.withDeathdate(now, true); + + Assert.assertEquals(now, Client1.getDeathdate()); Assert.assertNotSame("Not Same", dt, Client1.getDeathdate()); Client1.withGender("Male"); Assert.assertEquals("Male", Client1.getGender()); @@ -80,7 +81,6 @@ public void shouldTestEvent(){ Client1.withGender(Gender.FEMALE); Assert.assertEquals("FEMALE", Client1.getGender()); Assert.assertNotSame("male", dt, Client1.getGender()); - Client Client2 = new Client("ffrrr-0rrffff-ggg"); } @Test From 18e1435e387475480d40377202d764b74bfd0aa8 Mon Sep 17 00:00:00 2001 From: "Ephraim (Keyman) Muhia" Date: Fri, 9 Mar 2018 12:22:56 +0300 Subject: [PATCH 010/133] Merge pull request #405 from OpenSRP/issue399 Define Interfaces to be used by Services --- .../opensrp/repository/EventsRepository.java | 2 +- .../repository/couch/AllAppStateTokens.java | 95 ++++++++----------- .../opensrp/repository/couch/AllClients.java | 10 +- .../lucene/LuceneClientRepository.java | 2 +- .../lucene/LuceneSearchRepository.java | 10 +- .../org/opensrp/service/ClientService.java | 2 +- .../org/opensrp/service/ConfigService.java | 6 +- .../opensrp/service/ErrorTraceService.java | 6 +- .../org/opensrp/service/EventService.java | 18 ++-- .../FormSubmissionDataMigrationService.java | 2 + .../org/opensrp/MultimediaServiceTest.java | 4 +- .../repository/it/FormLifeCycleTest.java | 5 +- .../org/opensrp/web/rest/ClientResource.java | 4 +- 13 files changed, 80 insertions(+), 86 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/EventsRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/EventsRepository.java index bd08836334..e22f603b68 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/EventsRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/EventsRepository.java @@ -47,7 +47,7 @@ List findEvents(String team, String teamId, String providerId, String loc Long serverVersion, String sortBy, String sortOrder, int limit); List findEventByEventTypeBetweenTwoDates(String eventType); - + List findByProvider(String provider); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java index 8cbaeae0fb..c95570cc88 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java @@ -22,30 +22,30 @@ public class AllAppStateTokens extends MotechBaseRepository imple private CouchDbConnector db; - @Autowired - protected AllAppStateTokens(@Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) CouchDbConnector db) { - super(AppStateToken.class, db); - this.db = db; - } - - @GenerateView + @Autowired + protected AllAppStateTokens(@Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) CouchDbConnector db) { + super(AppStateToken.class, db); + this.db=db; + } + + @GenerateView public List findByName(String name) { - return queryView("by_name", name); + return queryView("by_name", name); } - - @GenerateView - public List findByName(CouchDbConnector db, String name) { - return db.queryView(createQuery("by_name").includeDocs(true).key(name), AppStateToken.class); + @GenerateView + public List findByName(CouchDbConnector db,String name) { + return db.queryView(createQuery("by_name") + .includeDocs(true) + .key(name), + AppStateToken.class); } - - /** + /** * @throws UpdateConflictException if there was an update conflict. */ public void update(AppStateToken entity) { Assert.notNull(entity, "entity may not be null"); db.update(entity); } - /** * @throws UpdateConflictException if there was an update conflict. */ @@ -61,7 +61,6 @@ public void add(CouchDbConnector db,AppStateToken entity) { Assert.isTrue(Documents.isNew(entity), "entity must be new"); db.create(entity); } - /** * Gets appstatetoken from the specified database * @@ -81,10 +80,25 @@ public AppStateToken getAppStateTokenByName(CouchDbConnector db, Enum tokenNa return ol.size() == 0 ? null : ol.get(0); } + + public void updateAppStateToken(CouchDbConnector db,Enum tokenName, Object value) { + List ol = findByName(db,tokenName.name()); + if(ol.size() > 1){ + throw new IllegalStateException("System was found to have multiple token with same name ("+tokenName.name()+"). This can lead to potential critical inconsistencies."); + } + + if(ol.size() == 0){ + throw new IllegalStateException("Property with name ("+tokenName.name()+") not found."); + } + + AppStateToken ast = ol.get(0); + ast.setValue(value); + ast.setLastEditDate(System.currentTimeMillis()); + db.update(ast); + } + /** - * Registers a new token to manage the specified variable state (by token name) of App. The - * token is registered in the specified db - * + * Registers a new token to manage the specified variable state (by token name) of App. The token is registered in the specified db * @param db * @param tokenName * @param defaultValue @@ -92,49 +106,22 @@ public AppStateToken getAppStateTokenByName(CouchDbConnector db, Enum tokenNa * @param suppressExceptionIfExists * @return */ - public AppStateToken registerAppStateToken(CouchDbConnector db, Enum tokenName, Object defaultValue, - String description, boolean suppressExceptionIfExists) { - if (tokenName == null || StringUtils.isEmptyOrWhitespaceOnly(description)) { + public AppStateToken registerAppStateToken(CouchDbConnector db,Enum tokenName, Object defaultValue, String description, boolean suppressExceptionIfExists) { + if(tokenName == null || StringUtils.isEmptyOrWhitespaceOnly(description)){ throw new IllegalArgumentException("Token name and description must be provided"); } - List atl = findByName(db, tokenName.name()); - if (atl.size() > 0) { - if (!suppressExceptionIfExists) { - throw new IllegalArgumentException("Token with given name (" + tokenName.name() + ") already exists."); + List atl = findByName(db,tokenName.name()); + if(atl.size() > 0){ + if(!suppressExceptionIfExists){ + throw new IllegalArgumentException("Token with given name ("+tokenName.name()+") already exists."); } return atl.get(0); } AppStateToken token = new AppStateToken(tokenName.name(), defaultValue, 0L, description); - add(db, token); + add(db,token); return token; } - - public void updateAppStateToken(CouchDbConnector db, Enum tokenName, Object value) { - List ol = findByName(db, tokenName.name()); - if (ol.size() > 1) { - throw new IllegalStateException("System was found to have multiple token with same name (" + tokenName.name() - + "). This can lead to potential critical inconsistencies."); - } - - if (ol.size() == 0) { - throw new IllegalStateException("Property with name (" + tokenName.name() + ") not found."); - } - - AppStateToken ast = ol.get(0); - ast.setValue(value); - ast.setLastEditDate(System.currentTimeMillis()); - update(db, ast); - } - - /** - * @throws UpdateConflictException if there was an update conflict. - */ - public void update(CouchDbConnector db, AppStateToken entity) { - Assert.notNull(entity, "entity may not be null"); - db.update(entity); - } - - + } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java index 27ae4e7793..938e47fc00 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java @@ -94,8 +94,9 @@ public List findAllByMatchingName(String nameMatches) { /** * Find a client based on the relationship id and between a range of date created dates e.g - * given mother's id get children born at a given time - * Use Beans to search for methods with very many search params + * given mother's id get children born at a given time Use Beans to search for methods with very + * many search params + * * @param relationalId * @param dateFrom * @param dateTo @@ -123,18 +124,16 @@ public List findByRelationshipId(String relationshipType, String entityI // public List findByRelationshipId(String identifier) { // return db.queryView(createQuery("clients_by_relationship").key(identifier).includeDocs(true), Client.class); // } - + public List findByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean, DateTime lastEditFrom, DateTime lastEditTo) { return lcr.getByCriteria(searchBean, addressSearchBean, lastEditFrom, lastEditTo, null);//db.queryView(q.includeDocs(true), Client.class); - } public List findByDynamicQuery(String query) { return lcr.getByCriteria(query);//db.queryView(q.includeDocs(true), Client.class); } - public List findByCriteria(ClientSearchBean searchBean) { return lcr.getByCriteria(searchBean, new AddressSearchBean(), searchBean.getLastEditFrom(), searchBean.getLastEditTo(), null); @@ -181,7 +180,6 @@ public List findByEmptyServerVersion() { return db.queryView(createQuery("clients_by_empty_server_version").limit(200).includeDocs(true), Client.class); } - @View(name = "clients_by__server_version", map = "function(doc) { if (doc.type === 'Client') { emit([doc.serverVersion], null); } }") public List findByServerVersion(long serverVersion) { ComplexKey startKey = ComplexKey.of(serverVersion + 1); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java index c31e5e516a..6880db3f02 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java @@ -62,7 +62,7 @@ public List getByCriteria(AddressSearchBean addressSearchBean, return getByCriteria(null, addressSearchBean, lastEditFrom, lastEditTo, motherIdentifier); } - public List getByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean, + public List getByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean, DateTime lastEditFrom, DateTime lastEditTo, String motherIdentifier) { // create a simple query against the view/search function that we've created LuceneQuery query = new LuceneQuery("Client", "by_all_criteria"); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneSearchRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneSearchRepository.java index 2316633ea8..bf448ed68a 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneSearchRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneSearchRepository.java @@ -23,7 +23,7 @@ import com.github.ldriscoll.ektorplucene.designdocument.annotation.FullText; import com.github.ldriscoll.ektorplucene.designdocument.annotation.Index; import com.mysql.jdbc.StringUtils; - + @FullText({ @Index(name = "by_all_criteria", index = "function(doc){ if(doc.type!=='Client') return null; var arr1=['firstName','middleName','lastName','gender']; var ret=new Document(); for(var i in arr1){ ret.add(doc[arr1[i]],{'field':arr1[i]}) } for (var key in doc.identifiers) { ret.add(doc.identifiers[key], {'field': key}); } for(var key in doc.attributes){ ret.add(doc.attributes[key],{'field':key}) } var bd=doc.birthdate.substring(0,19); ret.add(bd,{'field':'birthdate','type':'date'}); var crd=doc.dateCreated.substring(0,19); ret.add(crd,{'field':'lastEdited','type':'date'}); if(doc.dateEdited){ var led=doc.dateEdited.substring(0,19); ret.add(led,{'field':'lastEdited','type':'date'}) } return ret }") }) @Component @@ -39,7 +39,7 @@ protected LuceneSearchRepository(LuceneDbConnector db) { } - public List getByCriteria(ClientSearchBean clientSearchBean, String firstName, String middleName, + public List getByCriteria(ClientSearchBean clientSearchBean, String firstName, String middleName, String lastName, Integer limit) { // create a simple query against the view/search function that we've // created @@ -70,7 +70,7 @@ public List getByCriteria(ClientSearchBean clientSearchBean, String firs qf.eq(GENDER, clientSearchBean.getGender()); } - if (clientSearchBean.getIdentifiers() != null && !clientSearchBean.getIdentifiers().isEmpty()) { + if (clientSearchBean.getIdentifiers() != null && !clientSearchBean.getIdentifiers().isEmpty()) { for (Map.Entry entry : clientSearchBean.getIdentifiers().entrySet()) { String identifierType = entry.getKey(); String identifierValue = entry.getValue(); @@ -108,12 +108,12 @@ public List getByCriteria(ClientSearchBean clientSearchBean, String firs } qf.addToQuery(sq); - + if (clientSearchBean.getBirthdateFrom() != null && clientSearchBean.getBirthdateTo() != null) { qf.between(BIRTH_DATE, clientSearchBean.getBirthdateFrom(), clientSearchBean.getBirthdateTo()); } - if (clientSearchBean.getLastEditFrom() != null & clientSearchBean.getLastEditTo() != null) { + if (clientSearchBean.getLastEditFrom() != null & clientSearchBean.getLastEditTo() != null) { qf.between(LAST_UPDATE, clientSearchBean.getLastEditFrom(), clientSearchBean.getLastEditTo()); } diff --git a/opensrp-core/src/main/java/org/opensrp/service/ClientService.java b/opensrp-core/src/main/java/org/opensrp/service/ClientService.java index 4104187e0d..867f8d5ff4 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/ClientService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/ClientService.java @@ -191,7 +191,7 @@ public List findByServerVersion(long serverVersion) { public List notInOpenMRSByServerVersion(long serverVersion, Calendar calendar) { return allClients.notInOpenMRSByServerVersion(serverVersion, calendar); } - + public List findByFieldValue(String field, List ids) { return allClients.findByFieldValue(field, ids); } diff --git a/opensrp-core/src/main/java/org/opensrp/service/ConfigService.java b/opensrp-core/src/main/java/org/opensrp/service/ConfigService.java index a810fb07b6..779b7de1d1 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/ConfigService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/ConfigService.java @@ -15,7 +15,8 @@ public class ConfigService { private final AppStateTokensRepository allAppStateTokens; @Autowired - public ConfigService(AppStateTokensRepository allAppStateTokens) { + public ConfigService(AppStateTokensRepository allAppStateTokens) + { this.allAppStateTokens = allAppStateTokens; } @@ -65,7 +66,7 @@ public AppStateToken registerAppStateToken(Enum tokenName, Object defaultValu allAppStateTokens.add(token); return token; } - + private AppStateToken getUniqueAppStateTokeFromTokenList(List appStateTokens, Enum tokenName) { if (appStateTokens.size() > 1) { throw new IllegalStateException("System was found to have multiple token with same name (" + tokenName.name() @@ -107,4 +108,5 @@ private AppStateToken checkIfTokenAlreadyExist(List appStateToken } return null; } + } diff --git a/opensrp-core/src/main/java/org/opensrp/service/ErrorTraceService.java b/opensrp-core/src/main/java/org/opensrp/service/ErrorTraceService.java index b9fe128922..174ececbd3 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/ErrorTraceService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/ErrorTraceService.java @@ -16,10 +16,10 @@ public class ErrorTraceService { private final ErrorTraceRepository allErrorTrace; - + @Autowired - public ErrorTraceService(ErrorTraceRepository allErrorTrace) { - this.allErrorTrace = allErrorTrace; + public ErrorTraceService(ErrorTraceRepository allErrorTrace) { + this.allErrorTrace=allErrorTrace; } public void addError(ErrorTrace entity) { diff --git a/opensrp-core/src/main/java/org/opensrp/service/EventService.java b/opensrp-core/src/main/java/org/opensrp/service/EventService.java index 298942f09c..0e0834125c 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/EventService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/EventService.java @@ -1,5 +1,7 @@ package org.opensrp.service; + + import java.lang.reflect.Field; import java.util.Arrays; import java.util.HashMap; @@ -48,14 +50,15 @@ public Event getById(String id) { } public Event getByBaseEntityAndFormSubmissionId(String baseEntityId, String formSubmissionId) { - try { - List el = allEvents.findByBaseEntityAndFormSubmissionId(baseEntityId, formSubmissionId); - return getUniqueEventFromEventList(el); - } - catch (IllegalArgumentException e) { + List el = allEvents.findByBaseEntityAndFormSubmissionId(baseEntityId, formSubmissionId); + if (el.size() > 1) { throw new IllegalStateException("Multiple events for baseEntityId and formSubmissionId combination (" + baseEntityId + "," + formSubmissionId + ")"); } + if (el.size() == 0) { + return null; + } + return el.get(0); } public List findByBaseEntityId(String baseEntityId) { @@ -96,8 +99,8 @@ public Event find(Event event) { return getUniqueEventFromEventList(el); } catch (IllegalArgumentException e) { - throw new IllegalArgumentException("Multiple events with identifier type " + idt + " and ID " - + event.getIdentifier(idt) + " exist."); + throw new IllegalArgumentException( + "Multiple events with identifier type " + idt + " and ID " + event.getIdentifier(idt) + " exist."); } } return null; @@ -173,6 +176,7 @@ public synchronized Event processOutOfArea(Event event) { } } + return event; } diff --git a/opensrp-core/src/main/java/org/opensrp/service/FormSubmissionDataMigrationService.java b/opensrp-core/src/main/java/org/opensrp/service/FormSubmissionDataMigrationService.java index 299b300ea0..33c20e47a7 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/FormSubmissionDataMigrationService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/FormSubmissionDataMigrationService.java @@ -17,6 +17,8 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import com.mysql.jdbc.StringUtils; + /** * @author onamacuser This service fetches existing form submissions data from couchdb and converts * them to events and clients diff --git a/opensrp-core/src/test/java/org/opensrp/MultimediaServiceTest.java b/opensrp-core/src/test/java/org/opensrp/MultimediaServiceTest.java index 034b45466c..c530a50ce2 100644 --- a/opensrp-core/src/test/java/org/opensrp/MultimediaServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/MultimediaServiceTest.java @@ -16,7 +16,7 @@ import org.mockito.Mock; import org.opensrp.domain.Multimedia; import org.opensrp.dto.form.MultimediaDTO; -import org.opensrp.repository.MultimediaRepository; +import org.opensrp.repository.couch.MultimediaRepositoryImpl; import org.opensrp.service.MultimediaService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; @@ -33,7 +33,7 @@ public class MultimediaServiceTest { private MultimediaService multimediaService; @Autowired - private MultimediaRepository multimediaRepository; + private MultimediaRepositoryImpl multimediaRepository; @Autowired @Value("#{opensrp['multimedia.directory.name']}") diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java index aa95c10c44..dda0fc4245 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java @@ -133,8 +133,9 @@ public void setup() throws IOException { allActions.removeAll(); allAlerts.removeAll(); - fsp = new FormSubmissionProcessor(ziggyService, formSubmissionRouter, - formEntityConverter, scheduleService, clientService,allClients, eventService,allEvents); + fsp = new FormSubmissionProcessor(ziggyService, formSubmissionRouter, + formEntityConverter, scheduleService, clientService,allClients, eventService,allEvents); + reminderAction = new AlertCreationAction(scheduleService, formSubmissionService); dueWindowStart = DateTime.now(); diff --git a/opensrp-web/src/main/java/org/opensrp/web/rest/ClientResource.java b/opensrp-web/src/main/java/org/opensrp/web/rest/ClientResource.java index 67a1811621..9517992f17 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/rest/ClientResource.java +++ b/opensrp-web/src/main/java/org/opensrp/web/rest/ClientResource.java @@ -87,12 +87,12 @@ public List search(HttpServletRequest request) throws ParseException {// addressSearchBean.setSubTown(getStringFilter(SUB_TOWN, request)); DateTime[] lastEdit = getDateRangeFilter(LAST_UPDATE, request);//TODO client by provider id //TODO lookinto Swagger https://slack-files.com/files-pri-safe/T0EPSEJE9-F0TBD0N77/integratingswagger.pdf?c=1458211183-179d2bfd2e974585c5038fba15a86bf83097810a - + String attributes = getStringFilter("attribute", request); searchBean.setAttributeType(StringUtils.isEmptyOrWhitespaceOnly(attributes) ? null : attributes.split(":", -1)[0]); searchBean.setAttributeValue(StringUtils.isEmptyOrWhitespaceOnly(attributes) ? null : attributes.split(":", -1)[1]); - return clientService.findByCriteria(searchBean, addressSearchBean, lastEdit[0], + return clientService.findByCriteria(searchBean, addressSearchBean, lastEdit[0], lastEdit == null ? null : lastEdit[1]); } From 4dd4fb22f6ce46c8c70db9f47eb2ec1c894462d9 Mon Sep 17 00:00:00 2001 From: "Ephraim (Keyman) Muhia" Date: Fri, 9 Mar 2018 12:26:10 +0300 Subject: [PATCH 011/133] Merge pull request #404 from OpenSRP/issue403 Added mybatis migrations and mappers From 04f96d9c73062992ee70ac8c079fb146b5cbe30d Mon Sep 17 00:00:00 2001 From: Ephraim Muhia Date: Fri, 9 Mar 2018 14:30:14 +0300 Subject: [PATCH 012/133] Added table spaces and schemas Signed-off-by: Ephraim Muhia --- .../environments/development.properties | 7 +++- .../20180307080840_create_tablespaces.sql | 33 +++++++++++++++++++ ....sql => 20180307099840_create_schemas.sql} | 11 ++++++- .../20180307100840_create_client_table.sql | 2 +- ...307115355_create_client_metadata_table.sql | 2 +- .../20180307131329_create_event_table.sql | 2 +- ...0307131558_create_event_metadata_table.sql | 2 +- ...=> 20180307145148_create_action_table.sql} | 8 ++--- ...07145358_create_action_metadata_table.sql} | 22 ++++++------- .../20180307150054_create_report_table.sql | 2 +- ...307150448_create_report_metadata_table.sql | 2 +- .../20180307151459_create_stock_table.sql | 2 +- ...0307151623_create_stock_metadata_table.sql | 2 +- 13 files changed, 72 insertions(+), 25 deletions(-) create mode 100644 assets/migrations/scripts/20180307080840_create_tablespaces.sql rename assets/migrations/scripts/{20180307099840_create_core_schema.sql => 20180307099840_create_schemas.sql} (78%) rename assets/migrations/scripts/{20180307145148_create_alert_table.sql => 20180307145148_create_action_table.sql} (89%) rename assets/migrations/scripts/{20180307145358_create_alert_metadata_table.sql => 20180307145358_create_action_metadata_table.sql} (60%) diff --git a/assets/migrations/environments/development.properties b/assets/migrations/environments/development.properties index b178d8fc94..e3eb1b47e7 100644 --- a/assets/migrations/environments/development.properties +++ b/assets/migrations/environments/development.properties @@ -62,7 +62,7 @@ full_line_delimiter=false # script is executed in one transaction. # Few databases should need this set to true, # but some do. -auto_commit=false +auto_commit=true # Custom driver path to allow you to centralize your driver files # Default requires the drivers to be in the drivers directory of your @@ -78,3 +78,8 @@ changelog=CHANGELOG # Example: The following would be referenced in a migration file as ${ip_address} # ip_address=192.168.0.1 +core_tablespace_location='F:\\postgres\\tablespace\\core' +error_tablespace_location ='F:\\postgres\\tablespace\\error' +schedule_tablespace_location='F:\\postgres\\tablespace\\schedule' +feed_tablespace_location='F:\\postgres\\tablespace\\feed' +form_tablespace_location='F:\\postgres\\tablespace\\form' \ No newline at end of file diff --git a/assets/migrations/scripts/20180307080840_create_tablespaces.sql b/assets/migrations/scripts/20180307080840_create_tablespaces.sql new file mode 100644 index 0000000000..b2be6318dd --- /dev/null +++ b/assets/migrations/scripts/20180307080840_create_tablespaces.sql @@ -0,0 +1,33 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // create tablespaces +-- Migration SQL that makes the change goes here. + +CREATE TABLESPACE core_space LOCATION ${core_tablespace_location}; +CREATE TABLESPACE error_space LOCATION ${error_tablespace_location}; +CREATE TABLESPACE schedule_space LOCATION ${schedule_tablespace_location}; +CREATE TABLESPACE feed_space LOCATION ${feed_tablespace_location}; +CREATE TABLESPACE form_space LOCATION ${form_tablespace_location}; + +-- //@UNDO +-- SQL to undo the change goes here. + +DROP TABLESPACE core_space;; +DROP TABLESPACE error_space; +DROP TABLESPACE schedule_space; +DROP TABLESPACE feed_space; +DROP TABLESPACE form_space; diff --git a/assets/migrations/scripts/20180307099840_create_core_schema.sql b/assets/migrations/scripts/20180307099840_create_schemas.sql similarity index 78% rename from assets/migrations/scripts/20180307099840_create_core_schema.sql rename to assets/migrations/scripts/20180307099840_create_schemas.sql index 3aaa1cc0e3..94e0b127c3 100644 --- a/assets/migrations/scripts/20180307099840_create_core_schema.sql +++ b/assets/migrations/scripts/20180307099840_create_schemas.sql @@ -14,12 +14,21 @@ -- limitations under the License. -- --- // create clients table +-- // create schemas -- Migration SQL that makes the change goes here. CREATE SCHEMA core; +CREATE SCHEMA error; +CREATE SCHEMA schedule; +CREATE SCHEMA feed; +CREATE SCHEMA form; + -- //@UNDO -- SQL to undo the change goes here. DROP SCHEMA core CASCADE; +DROP SCHEMA error CASCADE; +DROP SCHEMA feed CASCADE; +DROP SCHEMA schedule CASCADE; +DROP SCHEMA form CASCADE; diff --git a/assets/migrations/scripts/20180307100840_create_client_table.sql b/assets/migrations/scripts/20180307100840_create_client_table.sql index 603aae4a90..506f366814 100644 --- a/assets/migrations/scripts/20180307100840_create_client_table.sql +++ b/assets/migrations/scripts/20180307100840_create_client_table.sql @@ -25,7 +25,7 @@ CREATE TABLE core.client ) WITH ( OIDS = FALSE -); +) TABLESPACE core_space; -- //@UNDO -- SQL to undo the change goes here. diff --git a/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql b/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql index 181936ef28..5623cb8a9a 100644 --- a/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql +++ b/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql @@ -32,7 +32,7 @@ CREATE TABLE core.client_metadata ) WITH ( OIDS = FALSE -); +) TABLESPACE core_space; CREATE UNIQUE INDEX client_metadata_base_entity_id_unique_index ON core.client_metadata (base_entity_id); diff --git a/assets/migrations/scripts/20180307131329_create_event_table.sql b/assets/migrations/scripts/20180307131329_create_event_table.sql index 7773cc11dc..ae586ebc66 100644 --- a/assets/migrations/scripts/20180307131329_create_event_table.sql +++ b/assets/migrations/scripts/20180307131329_create_event_table.sql @@ -25,7 +25,7 @@ CREATE TABLE core.event ) WITH ( OIDS = FALSE -); +)TABLESPACE core_space; -- //@UNDO -- SQL to undo the change goes here. diff --git a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql index 7de5a46a78..b2884ad612 100644 --- a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql +++ b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql @@ -35,7 +35,7 @@ CREATE TABLE core.event_metadata ) WITH ( OIDS = FALSE -); +)TABLESPACE core_space; CREATE UNIQUE INDEX event_metadata_relational_id_unique_index ON core.event_metadata (form_submission_id); diff --git a/assets/migrations/scripts/20180307145148_create_alert_table.sql b/assets/migrations/scripts/20180307145148_create_action_table.sql similarity index 89% rename from assets/migrations/scripts/20180307145148_create_alert_table.sql rename to assets/migrations/scripts/20180307145148_create_action_table.sql index cdd11e7951..ef69db9774 100644 --- a/assets/migrations/scripts/20180307145148_create_alert_table.sql +++ b/assets/migrations/scripts/20180307145148_create_action_table.sql @@ -14,10 +14,10 @@ -- limitations under the License. -- --- // create alert table +-- // create action table -- Migration SQL that makes the change goes here. -CREATE TABLE core.alert +CREATE TABLE core.action ( id bigserial NOT NULL, json jsonb NOT NULL, @@ -25,9 +25,9 @@ CREATE TABLE core.alert ) WITH ( OIDS = FALSE -); +)TABLESPACE core_space; -- //@UNDO -- SQL to undo the change goes here. -DROP TABLE core.alert; \ No newline at end of file +DROP TABLE core.action; \ No newline at end of file diff --git a/assets/migrations/scripts/20180307145358_create_alert_metadata_table.sql b/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql similarity index 60% rename from assets/migrations/scripts/20180307145358_create_alert_metadata_table.sql rename to assets/migrations/scripts/20180307145358_create_action_metadata_table.sql index c1f249b82f..1fe904db62 100644 --- a/assets/migrations/scripts/20180307145358_create_alert_metadata_table.sql +++ b/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql @@ -14,13 +14,13 @@ -- limitations under the License. -- --- // create alert metadata table +-- // create action metadata table -- Migration SQL that makes the change goes here. -CREATE TABLE core.alert_metadata +CREATE TABLE core.action_metadata ( id bigserial NOT NULL, - alert_id bigint REFERENCES core.alert (id), + action_id bigint REFERENCES core.action (id), base_entity_id character varying NOT NULL, server_version timestamp without time zone, provider_id character varying, @@ -31,17 +31,17 @@ CREATE TABLE core.alert_metadata ) WITH ( OIDS = FALSE -); +)TABLESPACE core_space; -CREATE INDEX alert_metadata_base_entity_id_index ON core.alert_metadata (base_entity_id); -CREATE INDEX alert_metadata_server_version_index ON core.alert_metadata (server_version); -CREATE INDEX alert_metadata_provider_id_index ON core.alert_metadata (provider_id); -CREATE INDEX alert_metadata_location_id_index ON core.alert_metadata (location_id); -CREATE INDEX alert_metadata_team_index ON core.alert_metadata (team); -CREATE INDEX alert_metadata_team_id_index ON core.alert_metadata (team_id); +CREATE INDEX action_metadata_base_entity_id_index ON core.action_metadata (base_entity_id); +CREATE INDEX action_metadata_server_version_index ON core.action_metadata (server_version); +CREATE INDEX action_metadata_provider_id_index ON core.action_metadata (provider_id); +CREATE INDEX action_metadata_location_id_index ON core.action_metadata (location_id); +CREATE INDEX action_metadata_team_index ON core.action_metadata (team); +CREATE INDEX action_metadata_team_id_index ON core.action_metadata (team_id); -- //@UNDO -- SQL to undo the change goes here. -DROP TABLE core.alert_metadata; +DROP TABLE core.action_metadata; diff --git a/assets/migrations/scripts/20180307150054_create_report_table.sql b/assets/migrations/scripts/20180307150054_create_report_table.sql index 350f401140..dd4b73ad17 100644 --- a/assets/migrations/scripts/20180307150054_create_report_table.sql +++ b/assets/migrations/scripts/20180307150054_create_report_table.sql @@ -25,7 +25,7 @@ CREATE TABLE core.report ) WITH ( OIDS = FALSE -); +) TABLESPACE core_space; -- //@UNDO -- SQL to undo the change goes here. diff --git a/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql b/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql index b1213adeae..16b90c7d5d 100644 --- a/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql +++ b/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql @@ -32,7 +32,7 @@ CREATE TABLE core.report_metadata ) WITH ( OIDS = FALSE -); +) TABLESPACE core_space; CREATE INDEX report_metadata_base_entity_id_index ON core.report_metadata (base_entity_id); CREATE INDEX report_metadata_server_version_index ON core.report_metadata (server_version); diff --git a/assets/migrations/scripts/20180307151459_create_stock_table.sql b/assets/migrations/scripts/20180307151459_create_stock_table.sql index eab1bff6db..6243abeb98 100644 --- a/assets/migrations/scripts/20180307151459_create_stock_table.sql +++ b/assets/migrations/scripts/20180307151459_create_stock_table.sql @@ -26,7 +26,7 @@ CREATE TABLE core.stock ) WITH ( OIDS = FALSE -); +) TABLESPACE core_space; -- //@UNDO diff --git a/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql b/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql index b801005fcc..9e66f4001c 100644 --- a/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql +++ b/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql @@ -30,7 +30,7 @@ CREATE TABLE core.stock_metadata ) WITH ( OIDS = FALSE -); +) TABLESPACE core_space; CREATE INDEX stock_metadata_server_version_index ON core.stock_metadata (server_version); CREATE INDEX stock_metadata_provider_id_index ON core.stock_metadata (provider_id); From 17634eb37ffe95bab773a82afa8eff6d645965bd Mon Sep 17 00:00:00 2001 From: Ephraim Muhia Date: Fri, 9 Mar 2018 15:28:23 +0300 Subject: [PATCH 013/133] Updated alert, action domains Signed-off-by: Ephraim Muhia --- .../migrations/generator/generatorConfig.xml | 6 +- .../20180309113602_create_alert_table.sql | 33 + ...0309113954_create_alert_metadata_table.sql | 50 + .../org/opensrp/domain/postgres/Action.java | 69 + .../domain/postgres/ActionExample.java | 422 ++++ .../domain/postgres/ActionMetadata.java | 269 ++ .../postgres/ActionMetadataExample.java | 833 +++++++ .../org/opensrp/domain/postgres/Alert.java | 12 +- .../opensrp/domain/postgres/AlertExample.java | 34 +- .../domain/postgres/AlertMetadata.java | 114 +- .../domain/postgres/AlertMetadataExample.java | 164 +- .../org/opensrp/domain/postgres/Client.java | 102 +- .../domain/postgres/ClientExample.java | 765 +++--- .../domain/postgres/ClientMetadata.java | 502 ++-- .../postgres/ClientMetadataExample.java | 1777 +++++++------- .../org/opensrp/domain/postgres/Event.java | 102 +- .../opensrp/domain/postgres/EventExample.java | 765 +++--- .../domain/postgres/EventMetadata.java | 670 +++-- .../domain/postgres/EventMetadataExample.java | 2177 ++++++++--------- .../org/opensrp/domain/postgres/Report.java | 102 +- .../domain/postgres/ReportExample.java | 765 +++--- .../domain/postgres/ReportMetadata.java | 502 ++-- .../postgres/ReportMetadataExample.java | 1725 +++++++------ .../org/opensrp/domain/postgres/Stock.java | 102 +- .../opensrp/domain/postgres/StockExample.java | 765 +++--- .../domain/postgres/StockMetadata.java | 392 ++- .../domain/postgres/StockMetadataExample.java | 1445 ++++++----- .../postgres/mapper/ActionMapper.java | 96 + .../postgres/mapper/ActionMetadataMapper.java | 96 + .../postgres/mapper/AlertMapper.java | 22 +- .../postgres/mapper/AlertMetadataMapper.java | 22 +- .../postgres/mapper/ClientMapper.java | 133 +- .../postgres/mapper/ClientMetadataMapper.java | 134 +- .../postgres/mapper/EventMapper.java | 133 +- .../postgres/mapper/EventMetadataMapper.java | 133 +- .../postgres/mapper/ReportMapper.java | 133 +- .../postgres/mapper/ReportMetadataMapper.java | 134 +- .../postgres/mapper/StockMapper.java | 133 +- .../postgres/mapper/StockMetadataMapper.java | 133 +- .../postgres/mapper/xml/ActionMapper.xml | 239 ++ .../mapper/xml/ActionMetadataMapper.xml | 333 +++ .../postgres/mapper/xml/AlertMapper.xml | 30 +- .../mapper/xml/AlertMetadataMapper.xml | 73 +- .../postgres/mapper/xml/ClientMapper.xml | 30 +- .../mapper/xml/ClientMetadataMapper.xml | 30 +- .../postgres/mapper/xml/EventMapper.xml | 30 +- .../mapper/xml/EventMetadataMapper.xml | 30 +- .../postgres/mapper/xml/ReportMapper.xml | 30 +- .../mapper/xml/ReportMetadataMapper.xml | 30 +- .../postgres/mapper/xml/StockMapper.xml | 30 +- .../mapper/xml/StockMetadataMapper.xml | 30 +- 51 files changed, 9312 insertions(+), 7569 deletions(-) create mode 100644 assets/migrations/scripts/20180309113602_create_alert_table.sql create mode 100644 assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/Action.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionExample.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml diff --git a/assets/migrations/generator/generatorConfig.xml b/assets/migrations/generator/generatorConfig.xml index f4e0bfefda..c83efb429c 100644 --- a/assets/migrations/generator/generatorConfig.xml +++ b/assets/migrations/generator/generatorConfig.xml @@ -16,11 +16,13 @@
-
-
+
+
+
+
diff --git a/assets/migrations/scripts/20180309113602_create_alert_table.sql b/assets/migrations/scripts/20180309113602_create_alert_table.sql new file mode 100644 index 0000000000..e3b6ec2387 --- /dev/null +++ b/assets/migrations/scripts/20180309113602_create_alert_table.sql @@ -0,0 +1,33 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // create alert table +-- Migration SQL that makes the change goes here. + +CREATE TABLE core.alert +( + id bigserial NOT NULL, + json jsonb NOT NULL, + PRIMARY KEY (id) +) +WITH ( + OIDS = FALSE +)TABLESPACE core_space; + +-- //@UNDO +-- SQL to undo the change goes here. + +DROP TABLE core.alert; \ No newline at end of file diff --git a/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql b/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql new file mode 100644 index 0000000000..41959539b9 --- /dev/null +++ b/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql @@ -0,0 +1,50 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // create alert metadata table +-- Migration SQL that makes the change goes here. + +CREATE TABLE core.alert_metadata +( + id bigserial NOT NULL, + alert_id bigint REFERENCES core.alert (id), + base_entity_id character varying NOT NULL, + server_version timestamp without time zone, + provider_id character varying, + location_id character varying, + team character varying, + team_id character varying, + is_active boolean, + trigger_name character varying, + PRIMARY KEY (id) +) +WITH ( + OIDS = FALSE +)TABLESPACE core_space; + +CREATE INDEX alert_metadata_base_entity_id_index ON core.alert_metadata (base_entity_id); +CREATE INDEX alert_metadata_server_version_index ON core.alert_metadata (server_version); +CREATE INDEX alert_metadata_provider_id_index ON core.alert_metadata (provider_id); +CREATE INDEX alert_metadata_location_id_index ON core.alert_metadata (location_id); +CREATE INDEX alert_metadata_team_index ON core.alert_metadata (team); +CREATE INDEX alert_metadata_team_id_index ON core.alert_metadata (team_id); +CREATE INDEX alert_metadata_is_active_index ON core.alert_metadata (is_active); +CREATE INDEX alert_metadata_trigger_name_index ON core.alert_metadata (trigger_name); + +-- //@UNDO +-- SQL to undo the change goes here. + +DROP TABLE core.alert_metadata; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Action.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Action.java new file mode 100644 index 0000000000..29c8d03029 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Action.java @@ -0,0 +1,69 @@ +package org.opensrp.domain.postgres; + +public class Action { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.action.id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.action.json + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Object json; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.action.id + * + * @return the value of core.action.id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.action.id + * + * @param id the value for core.action.id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.action.json + * + * @return the value of core.action.json + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Object getJson() { + return json; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.action.json + * + * @param json the value for core.action.json + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setJson(Object json) { + this.json = json; + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionExample.java new file mode 100644 index 0000000000..39a034fdd3 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionExample.java @@ -0,0 +1,422 @@ +package org.opensrp.domain.postgres; + +import java.util.ArrayList; +import java.util.List; + +public class ActionExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public ActionExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andJsonIsNull() { + addCriterion("json is null"); + return (Criteria) this; + } + + public Criteria andJsonIsNotNull() { + addCriterion("json is not null"); + return (Criteria) this; + } + + public Criteria andJsonEqualTo(Object value) { + addCriterion("json =", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotEqualTo(Object value) { + addCriterion("json <>", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThan(Object value) { + addCriterion("json >", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThanOrEqualTo(Object value) { + addCriterion("json >=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThan(Object value) { + addCriterion("json <", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThanOrEqualTo(Object value) { + addCriterion("json <=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonIn(List values) { + addCriterion("json in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotIn(List values) { + addCriterion("json not in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonBetween(Object value1, Object value2) { + addCriterion("json between", value1, value2, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotBetween(Object value1, Object value2) { + addCriterion("json not between", value1, value2, "json"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.action + * + * @mbg.generated do_not_delete_during_merge Fri Mar 09 15:24:01 EAT 2018 + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java new file mode 100644 index 0000000000..1d7fa8c02e --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java @@ -0,0 +1,269 @@ +package org.opensrp.domain.postgres; + +import java.util.Date; + +public class ActionMetadata { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.action_metadata.id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.action_metadata.action_id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Long actionId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.action_metadata.base_entity_id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String baseEntityId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.action_metadata.server_version + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Date serverVersion; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.action_metadata.provider_id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String providerId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.action_metadata.location_id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String locationId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.action_metadata.team + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String team; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.action_metadata.team_id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String teamId; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.action_metadata.id + * + * @return the value of core.action_metadata.id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.action_metadata.id + * + * @param id the value for core.action_metadata.id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.action_metadata.action_id + * + * @return the value of core.action_metadata.action_id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Long getActionId() { + return actionId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.action_metadata.action_id + * + * @param actionId the value for core.action_metadata.action_id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setActionId(Long actionId) { + this.actionId = actionId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.action_metadata.base_entity_id + * + * @return the value of core.action_metadata.base_entity_id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getBaseEntityId() { + return baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.action_metadata.base_entity_id + * + * @param baseEntityId the value for core.action_metadata.base_entity_id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setBaseEntityId(String baseEntityId) { + this.baseEntityId = baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.action_metadata.server_version + * + * @return the value of core.action_metadata.server_version + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Date getServerVersion() { + return serverVersion; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.action_metadata.server_version + * + * @param serverVersion the value for core.action_metadata.server_version + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setServerVersion(Date serverVersion) { + this.serverVersion = serverVersion; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.action_metadata.provider_id + * + * @return the value of core.action_metadata.provider_id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getProviderId() { + return providerId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.action_metadata.provider_id + * + * @param providerId the value for core.action_metadata.provider_id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.action_metadata.location_id + * + * @return the value of core.action_metadata.location_id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getLocationId() { + return locationId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.action_metadata.location_id + * + * @param locationId the value for core.action_metadata.location_id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.action_metadata.team + * + * @return the value of core.action_metadata.team + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getTeam() { + return team; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.action_metadata.team + * + * @param team the value for core.action_metadata.team + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setTeam(String team) { + this.team = team; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.action_metadata.team_id + * + * @return the value of core.action_metadata.team_id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getTeamId() { + return teamId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.action_metadata.team_id + * + * @param teamId the value for core.action_metadata.team_id + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setTeamId(String teamId) { + this.teamId = teamId; + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java new file mode 100644 index 0000000000..afcb045e57 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java @@ -0,0 +1,833 @@ +package org.opensrp.domain.postgres; + +import java.util.ArrayList; +import java.util.Date; +import java.util.List; + +public class ActionMetadataExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public ActionMetadataExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andActionIdIsNull() { + addCriterion("action_id is null"); + return (Criteria) this; + } + + public Criteria andActionIdIsNotNull() { + addCriterion("action_id is not null"); + return (Criteria) this; + } + + public Criteria andActionIdEqualTo(Long value) { + addCriterion("action_id =", value, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdNotEqualTo(Long value) { + addCriterion("action_id <>", value, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdGreaterThan(Long value) { + addCriterion("action_id >", value, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdGreaterThanOrEqualTo(Long value) { + addCriterion("action_id >=", value, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdLessThan(Long value) { + addCriterion("action_id <", value, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdLessThanOrEqualTo(Long value) { + addCriterion("action_id <=", value, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdIn(List values) { + addCriterion("action_id in", values, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdNotIn(List values) { + addCriterion("action_id not in", values, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdBetween(Long value1, Long value2) { + addCriterion("action_id between", value1, value2, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdNotBetween(Long value1, Long value2) { + addCriterion("action_id not between", value1, value2, "actionId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNull() { + addCriterion("base_entity_id is null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNotNull() { + addCriterion("base_entity_id is not null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdEqualTo(String value) { + addCriterion("base_entity_id =", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotEqualTo(String value) { + addCriterion("base_entity_id <>", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThan(String value) { + addCriterion("base_entity_id >", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { + addCriterion("base_entity_id >=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThan(String value) { + addCriterion("base_entity_id <", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { + addCriterion("base_entity_id <=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLike(String value) { + addCriterion("base_entity_id like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotLike(String value) { + addCriterion("base_entity_id not like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIn(List values) { + addCriterion("base_entity_id in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotIn(List values) { + addCriterion("base_entity_id not in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdBetween(String value1, String value2) { + addCriterion("base_entity_id between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotBetween(String value1, String value2) { + addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNull() { + addCriterion("server_version is null"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNotNull() { + addCriterion("server_version is not null"); + return (Criteria) this; + } + + public Criteria andServerVersionEqualTo(Date value) { + addCriterion("server_version =", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotEqualTo(Date value) { + addCriterion("server_version <>", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThan(Date value) { + addCriterion("server_version >", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThanOrEqualTo(Date value) { + addCriterion("server_version >=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThan(Date value) { + addCriterion("server_version <", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThanOrEqualTo(Date value) { + addCriterion("server_version <=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionIn(List values) { + addCriterion("server_version in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotIn(List values) { + addCriterion("server_version not in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionBetween(Date value1, Date value2) { + addCriterion("server_version between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotBetween(Date value1, Date value2) { + addCriterion("server_version not between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNull() { + addCriterion("provider_id is null"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNotNull() { + addCriterion("provider_id is not null"); + return (Criteria) this; + } + + public Criteria andProviderIdEqualTo(String value) { + addCriterion("provider_id =", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotEqualTo(String value) { + addCriterion("provider_id <>", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThan(String value) { + addCriterion("provider_id >", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThanOrEqualTo(String value) { + addCriterion("provider_id >=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThan(String value) { + addCriterion("provider_id <", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThanOrEqualTo(String value) { + addCriterion("provider_id <=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLike(String value) { + addCriterion("provider_id like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotLike(String value) { + addCriterion("provider_id not like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdIn(List values) { + addCriterion("provider_id in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotIn(List values) { + addCriterion("provider_id not in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdBetween(String value1, String value2) { + addCriterion("provider_id between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotBetween(String value1, String value2) { + addCriterion("provider_id not between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNull() { + addCriterion("location_id is null"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNotNull() { + addCriterion("location_id is not null"); + return (Criteria) this; + } + + public Criteria andLocationIdEqualTo(String value) { + addCriterion("location_id =", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotEqualTo(String value) { + addCriterion("location_id <>", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThan(String value) { + addCriterion("location_id >", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThanOrEqualTo(String value) { + addCriterion("location_id >=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThan(String value) { + addCriterion("location_id <", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThanOrEqualTo(String value) { + addCriterion("location_id <=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLike(String value) { + addCriterion("location_id like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotLike(String value) { + addCriterion("location_id not like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdIn(List values) { + addCriterion("location_id in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotIn(List values) { + addCriterion("location_id not in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdBetween(String value1, String value2) { + addCriterion("location_id between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotBetween(String value1, String value2) { + addCriterion("location_id not between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andTeamIsNull() { + addCriterion("team is null"); + return (Criteria) this; + } + + public Criteria andTeamIsNotNull() { + addCriterion("team is not null"); + return (Criteria) this; + } + + public Criteria andTeamEqualTo(String value) { + addCriterion("team =", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotEqualTo(String value) { + addCriterion("team <>", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThan(String value) { + addCriterion("team >", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThanOrEqualTo(String value) { + addCriterion("team >=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThan(String value) { + addCriterion("team <", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThanOrEqualTo(String value) { + addCriterion("team <=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLike(String value) { + addCriterion("team like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotLike(String value) { + addCriterion("team not like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamIn(List values) { + addCriterion("team in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotIn(List values) { + addCriterion("team not in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamBetween(String value1, String value2) { + addCriterion("team between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotBetween(String value1, String value2) { + addCriterion("team not between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNull() { + addCriterion("team_id is null"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNotNull() { + addCriterion("team_id is not null"); + return (Criteria) this; + } + + public Criteria andTeamIdEqualTo(String value) { + addCriterion("team_id =", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotEqualTo(String value) { + addCriterion("team_id <>", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThan(String value) { + addCriterion("team_id >", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThanOrEqualTo(String value) { + addCriterion("team_id >=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThan(String value) { + addCriterion("team_id <", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThanOrEqualTo(String value) { + addCriterion("team_id <=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLike(String value) { + addCriterion("team_id like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotLike(String value) { + addCriterion("team_id not like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdIn(List values) { + addCriterion("team_id in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotIn(List values) { + addCriterion("team_id not in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdBetween(String value1, String value2) { + addCriterion("team_id between", value1, value2, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotBetween(String value1, String value2) { + addCriterion("team_id not between", value1, value2, "teamId"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.action_metadata + * + * @mbg.generated do_not_delete_during_merge Fri Mar 09 15:24:01 EAT 2018 + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java index 03c926e769..143ef67d3a 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java @@ -6,7 +6,7 @@ public class Alert { * This field was generated by MyBatis Generator. * This field corresponds to the database column core.alert.id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ private Long id; @@ -15,7 +15,7 @@ public class Alert { * This field was generated by MyBatis Generator. * This field corresponds to the database column core.alert.json * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ private Object json; @@ -25,7 +25,7 @@ public class Alert { * * @return the value of core.alert.id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public Long getId() { return id; @@ -37,7 +37,7 @@ public Long getId() { * * @param id the value for core.alert.id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -49,7 +49,7 @@ public void setId(Long id) { * * @return the value of core.alert.json * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public Object getJson() { return json; @@ -61,7 +61,7 @@ public Object getJson() { * * @param json the value for core.alert.json * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java index 4e3becc23e..0c4bbec41b 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java @@ -8,7 +8,7 @@ public class AlertExample { * This field was generated by MyBatis Generator. * This field corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ protected String orderByClause; @@ -16,7 +16,7 @@ public class AlertExample { * This field was generated by MyBatis Generator. * This field corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ protected boolean distinct; @@ -24,7 +24,7 @@ public class AlertExample { * This field was generated by MyBatis Generator. * This field corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ protected List oredCriteria; @@ -32,7 +32,7 @@ public class AlertExample { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public AlertExample() { oredCriteria = new ArrayList(); @@ -42,7 +42,7 @@ public AlertExample() { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -52,7 +52,7 @@ public void setOrderByClause(String orderByClause) { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -62,7 +62,7 @@ public String getOrderByClause() { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -72,7 +72,7 @@ public void setDistinct(boolean distinct) { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -82,7 +82,7 @@ public boolean isDistinct() { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -92,7 +92,7 @@ public List getOredCriteria() { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -102,7 +102,7 @@ public void or(Criteria criteria) { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -114,7 +114,7 @@ public Criteria or() { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -128,7 +128,7 @@ public Criteria createCriteria() { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -139,7 +139,7 @@ protected Criteria createCriteriaInternal() { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -151,7 +151,7 @@ public void clear() { * This class was generated by MyBatis Generator. * This class corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -319,7 +319,7 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { * This class was generated by MyBatis Generator. * This class corresponds to the database table core.alert * - * @mbg.generated do_not_delete_during_merge Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated do_not_delete_during_merge Fri Mar 09 15:24:01 EAT 2018 */ public static class Criteria extends GeneratedCriteria { @@ -332,7 +332,7 @@ protected Criteria() { * This class was generated by MyBatis Generator. * This class corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java index d77ee7a7a7..dadb9cd42a 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java @@ -8,7 +8,7 @@ public class AlertMetadata { * This field was generated by MyBatis Generator. * This field corresponds to the database column core.alert_metadata.id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ private Long id; @@ -17,7 +17,7 @@ public class AlertMetadata { * This field was generated by MyBatis Generator. * This field corresponds to the database column core.alert_metadata.alert_id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ private Long alertId; @@ -26,7 +26,7 @@ public class AlertMetadata { * This field was generated by MyBatis Generator. * This field corresponds to the database column core.alert_metadata.base_entity_id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ private String baseEntityId; @@ -35,7 +35,7 @@ public class AlertMetadata { * This field was generated by MyBatis Generator. * This field corresponds to the database column core.alert_metadata.server_version * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ private Date serverVersion; @@ -44,7 +44,7 @@ public class AlertMetadata { * This field was generated by MyBatis Generator. * This field corresponds to the database column core.alert_metadata.provider_id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ private String providerId; @@ -53,7 +53,7 @@ public class AlertMetadata { * This field was generated by MyBatis Generator. * This field corresponds to the database column core.alert_metadata.location_id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ private String locationId; @@ -62,7 +62,7 @@ public class AlertMetadata { * This field was generated by MyBatis Generator. * This field corresponds to the database column core.alert_metadata.team * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ private String team; @@ -71,17 +71,35 @@ public class AlertMetadata { * This field was generated by MyBatis Generator. * This field corresponds to the database column core.alert_metadata.team_id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ private String teamId; + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.alert_metadata.is_active + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Boolean isActive; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column core.alert_metadata.trigger_name + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String triggerName; + /** * This method was generated by MyBatis Generator. * This method returns the value of the database column core.alert_metadata.id * * @return the value of core.alert_metadata.id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public Long getId() { return id; @@ -93,7 +111,7 @@ public Long getId() { * * @param id the value for core.alert_metadata.id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -105,7 +123,7 @@ public void setId(Long id) { * * @return the value of core.alert_metadata.alert_id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public Long getAlertId() { return alertId; @@ -117,7 +135,7 @@ public Long getAlertId() { * * @param alertId the value for core.alert_metadata.alert_id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void setAlertId(Long alertId) { this.alertId = alertId; @@ -129,7 +147,7 @@ public void setAlertId(Long alertId) { * * @return the value of core.alert_metadata.base_entity_id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -141,7 +159,7 @@ public String getBaseEntityId() { * * @param baseEntityId the value for core.alert_metadata.base_entity_id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -153,7 +171,7 @@ public void setBaseEntityId(String baseEntityId) { * * @return the value of core.alert_metadata.server_version * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public Date getServerVersion() { return serverVersion; @@ -165,7 +183,7 @@ public Date getServerVersion() { * * @param serverVersion the value for core.alert_metadata.server_version * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void setServerVersion(Date serverVersion) { this.serverVersion = serverVersion; @@ -177,7 +195,7 @@ public void setServerVersion(Date serverVersion) { * * @return the value of core.alert_metadata.provider_id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public String getProviderId() { return providerId; @@ -189,7 +207,7 @@ public String getProviderId() { * * @param providerId the value for core.alert_metadata.provider_id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -201,7 +219,7 @@ public void setProviderId(String providerId) { * * @return the value of core.alert_metadata.location_id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public String getLocationId() { return locationId; @@ -213,7 +231,7 @@ public String getLocationId() { * * @param locationId the value for core.alert_metadata.location_id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -225,7 +243,7 @@ public void setLocationId(String locationId) { * * @return the value of core.alert_metadata.team * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public String getTeam() { return team; @@ -237,7 +255,7 @@ public String getTeam() { * * @param team the value for core.alert_metadata.team * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -249,7 +267,7 @@ public void setTeam(String team) { * * @return the value of core.alert_metadata.team_id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public String getTeamId() { return teamId; @@ -261,9 +279,57 @@ public String getTeamId() { * * @param teamId the value for core.alert_metadata.team_id * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.alert_metadata.is_active + * + * @return the value of core.alert_metadata.is_active + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Boolean getIsActive() { + return isActive; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.alert_metadata.is_active + * + * @param isActive the value for core.alert_metadata.is_active + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setIsActive(Boolean isActive) { + this.isActive = isActive; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column core.alert_metadata.trigger_name + * + * @return the value of core.alert_metadata.trigger_name + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getTriggerName() { + return triggerName; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column core.alert_metadata.trigger_name + * + * @param triggerName the value for core.alert_metadata.trigger_name + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setTriggerName(String triggerName) { + this.triggerName = triggerName; + } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java index 38fda17aad..c48b94b43a 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java @@ -9,7 +9,7 @@ public class AlertMetadataExample { * This field was generated by MyBatis Generator. * This field corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ protected String orderByClause; @@ -17,7 +17,7 @@ public class AlertMetadataExample { * This field was generated by MyBatis Generator. * This field corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ protected boolean distinct; @@ -25,7 +25,7 @@ public class AlertMetadataExample { * This field was generated by MyBatis Generator. * This field corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ protected List oredCriteria; @@ -33,7 +33,7 @@ public class AlertMetadataExample { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public AlertMetadataExample() { oredCriteria = new ArrayList(); @@ -43,7 +43,7 @@ public AlertMetadataExample() { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -53,7 +53,7 @@ public void setOrderByClause(String orderByClause) { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -63,7 +63,7 @@ public String getOrderByClause() { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -73,7 +73,7 @@ public void setDistinct(boolean distinct) { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -83,7 +83,7 @@ public boolean isDistinct() { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -93,7 +93,7 @@ public List getOredCriteria() { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -103,7 +103,7 @@ public void or(Criteria criteria) { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -115,7 +115,7 @@ public Criteria or() { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -129,7 +129,7 @@ public Criteria createCriteria() { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -140,7 +140,7 @@ protected Criteria createCriteriaInternal() { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -152,7 +152,7 @@ public void clear() { * This class was generated by MyBatis Generator. * This class corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -724,13 +724,143 @@ public Criteria andTeamIdNotBetween(String value1, String value2) { addCriterion("team_id not between", value1, value2, "teamId"); return (Criteria) this; } + + public Criteria andIsActiveIsNull() { + addCriterion("is_active is null"); + return (Criteria) this; + } + + public Criteria andIsActiveIsNotNull() { + addCriterion("is_active is not null"); + return (Criteria) this; + } + + public Criteria andIsActiveEqualTo(Boolean value) { + addCriterion("is_active =", value, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveNotEqualTo(Boolean value) { + addCriterion("is_active <>", value, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveGreaterThan(Boolean value) { + addCriterion("is_active >", value, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveGreaterThanOrEqualTo(Boolean value) { + addCriterion("is_active >=", value, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveLessThan(Boolean value) { + addCriterion("is_active <", value, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveLessThanOrEqualTo(Boolean value) { + addCriterion("is_active <=", value, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveIn(List values) { + addCriterion("is_active in", values, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveNotIn(List values) { + addCriterion("is_active not in", values, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveBetween(Boolean value1, Boolean value2) { + addCriterion("is_active between", value1, value2, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveNotBetween(Boolean value1, Boolean value2) { + addCriterion("is_active not between", value1, value2, "isActive"); + return (Criteria) this; + } + + public Criteria andTriggerNameIsNull() { + addCriterion("trigger_name is null"); + return (Criteria) this; + } + + public Criteria andTriggerNameIsNotNull() { + addCriterion("trigger_name is not null"); + return (Criteria) this; + } + + public Criteria andTriggerNameEqualTo(String value) { + addCriterion("trigger_name =", value, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameNotEqualTo(String value) { + addCriterion("trigger_name <>", value, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameGreaterThan(String value) { + addCriterion("trigger_name >", value, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameGreaterThanOrEqualTo(String value) { + addCriterion("trigger_name >=", value, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameLessThan(String value) { + addCriterion("trigger_name <", value, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameLessThanOrEqualTo(String value) { + addCriterion("trigger_name <=", value, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameLike(String value) { + addCriterion("trigger_name like", value, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameNotLike(String value) { + addCriterion("trigger_name not like", value, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameIn(List values) { + addCriterion("trigger_name in", values, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameNotIn(List values) { + addCriterion("trigger_name not in", values, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameBetween(String value1, String value2) { + addCriterion("trigger_name between", value1, value2, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameNotBetween(String value1, String value2) { + addCriterion("trigger_name not between", value1, value2, "triggerName"); + return (Criteria) this; + } } /** * This class was generated by MyBatis Generator. * This class corresponds to the database table core.alert_metadata * - * @mbg.generated do_not_delete_during_merge Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated do_not_delete_during_merge Fri Mar 09 15:24:01 EAT 2018 */ public static class Criteria extends GeneratedCriteria { @@ -743,7 +873,7 @@ protected Criteria() { * This class was generated by MyBatis Generator. * This class corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java index 7854d9e414..e29d3399bd 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java @@ -1,69 +1,51 @@ package org.opensrp.domain.postgres; public class Client { - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.client.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Long id; - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.client.json - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Object json; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.client.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Long id; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.client.json + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Object json; - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.client.id - * - * @return the value of core.client.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Long getId() { - return id; - } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.client.id + * @return the value of core.client.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Long getId() { + return id; + } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.client.id - * - * @param id the value for core.client.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setId(Long id) { - this.id = id; - } + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.client.id + * @param id the value for core.client.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.client.json - * - * @return the value of core.client.json - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Object getJson() { - return json; - } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.client.json + * @return the value of core.client.json + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Object getJson() { + return json; + } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.client.json - * - * @param json the value for core.client.json - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setJson(Object json) { - this.json = json; - } + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.client.json + * @param json the value for core.client.json + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setJson(Object json) { + this.json = json; + } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java index 75c67e7c14..d83d7054a6 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java @@ -5,317 +5,368 @@ public class ClientExample { /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected String orderByClause; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected boolean distinct; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected List oredCriteria; - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public ClientExample() { - oredCriteria = new ArrayList(); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getOrderByClause() { - return orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public boolean isDistinct() { - return distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public List getOredCriteria() { - return oredCriteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andJsonIsNull() { - addCriterion("json is null"); - return (Criteria) this; - } - - public Criteria andJsonIsNotNull() { - addCriterion("json is not null"); - return (Criteria) this; - } - - public Criteria andJsonEqualTo(Object value) { - addCriterion("json =", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotEqualTo(Object value) { - addCriterion("json <>", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonGreaterThan(Object value) { - addCriterion("json >", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonGreaterThanOrEqualTo(Object value) { - addCriterion("json >=", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonLessThan(Object value) { - addCriterion("json <", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonLessThanOrEqualTo(Object value) { - addCriterion("json <=", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonIn(List values) { - addCriterion("json in", values, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotIn(List values) { - addCriterion("json not in", values, "json"); - return (Criteria) this; - } - - public Criteria andJsonBetween(Object value1, Object value2) { - addCriterion("json between", value1, value2, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotBetween(Object value1, Object value2) { - addCriterion("json not between", value1, value2, "json"); - return (Criteria) this; - } - } - - /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected String orderByClause; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected boolean distinct; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public ClientExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andJsonIsNull() { + addCriterion("json is null"); + return (Criteria) this; + } + + public Criteria andJsonIsNotNull() { + addCriterion("json is not null"); + return (Criteria) this; + } + + public Criteria andJsonEqualTo(Object value) { + addCriterion("json =", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotEqualTo(Object value) { + addCriterion("json <>", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThan(Object value) { + addCriterion("json >", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThanOrEqualTo(Object value) { + addCriterion("json >=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThan(Object value) { + addCriterion("json <", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThanOrEqualTo(Object value) { + addCriterion("json <=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonIn(List values) { + addCriterion("json in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotIn(List values) { + addCriterion("json not in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonBetween(Object value1, Object value2) { + addCriterion("json between", value1, value2, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotBetween(Object value1, Object value2) { + addCriterion("json not between", value1, value2, "json"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } + + /** * This class was generated by MyBatis Generator. * This class corresponds to the database table core.client * @@ -327,96 +378,4 @@ protected Criteria() { super(); } } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java index 674a6dbaca..e0d58dfc18 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java @@ -3,300 +3,212 @@ import java.util.Date; public class ClientMetadata { - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.client_metadata.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Long id; - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.client_metadata.client_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Long clientId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.client_metadata.base_entity_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String baseEntityId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.client_metadata.relational_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String relationalId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.client_metadata.openmrs_uuid - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String openmrsUuid; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.client_metadata.unique_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String uniqueId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.client_metadata.first_name - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String firstName; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.client_metadata.last_name - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String lastName; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.client_metadata.birth_date - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Date birthDate; - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.client_metadata.id - * - * @return the value of core.client_metadata.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Long getId() { - return id; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.client_metadata.id - * - * @param id the value for core.client_metadata.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setId(Long id) { - this.id = id; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.client_metadata.client_id - * - * @return the value of core.client_metadata.client_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Long getClientId() { - return clientId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.client_metadata.client_id - * - * @param clientId the value for core.client_metadata.client_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setClientId(Long clientId) { - this.clientId = clientId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.client_metadata.base_entity_id - * - * @return the value of core.client_metadata.base_entity_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getBaseEntityId() { - return baseEntityId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.client_metadata.base_entity_id - * - * @param baseEntityId the value for core.client_metadata.base_entity_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setBaseEntityId(String baseEntityId) { - this.baseEntityId = baseEntityId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.client_metadata.relational_id - * - * @return the value of core.client_metadata.relational_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getRelationalId() { - return relationalId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.client_metadata.relational_id - * - * @param relationalId the value for core.client_metadata.relational_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setRelationalId(String relationalId) { - this.relationalId = relationalId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.client_metadata.openmrs_uuid - * - * @return the value of core.client_metadata.openmrs_uuid - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getOpenmrsUuid() { - return openmrsUuid; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.client_metadata.openmrs_uuid - * - * @param openmrsUuid the value for core.client_metadata.openmrs_uuid - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setOpenmrsUuid(String openmrsUuid) { - this.openmrsUuid = openmrsUuid; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.client_metadata.unique_id - * - * @return the value of core.client_metadata.unique_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getUniqueId() { - return uniqueId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.client_metadata.unique_id - * - * @param uniqueId the value for core.client_metadata.unique_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setUniqueId(String uniqueId) { - this.uniqueId = uniqueId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.client_metadata.first_name - * - * @return the value of core.client_metadata.first_name - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getFirstName() { - return firstName; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.client_metadata.first_name - * - * @param firstName the value for core.client_metadata.first_name - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setFirstName(String firstName) { - this.firstName = firstName; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.client_metadata.last_name - * - * @return the value of core.client_metadata.last_name - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getLastName() { - return lastName; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.client_metadata.last_name - * - * @param lastName the value for core.client_metadata.last_name - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setLastName(String lastName) { - this.lastName = lastName; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.client_metadata.birth_date - * - * @return the value of core.client_metadata.birth_date - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Date getBirthDate() { - return birthDate; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.client_metadata.birth_date - * - * @param birthDate the value for core.client_metadata.birth_date - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setBirthDate(Date birthDate) { - this.birthDate = birthDate; - } + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Long id; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.client_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Long clientId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.base_entity_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String baseEntityId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.relational_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String relationalId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.openmrs_uuid + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String openmrsUuid; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.unique_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String uniqueId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.first_name + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String firstName; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.last_name + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String lastName; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.birth_date + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Date birthDate; + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.id + * @return the value of core.client_metadata.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.id + * @param id the value for core.client_metadata.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.client_id + * @return the value of core.client_metadata.client_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Long getClientId() { + return clientId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.client_id + * @param clientId the value for core.client_metadata.client_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setClientId(Long clientId) { + this.clientId = clientId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.base_entity_id + * @return the value of core.client_metadata.base_entity_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getBaseEntityId() { + return baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.base_entity_id + * @param baseEntityId the value for core.client_metadata.base_entity_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setBaseEntityId(String baseEntityId) { + this.baseEntityId = baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.relational_id + * @return the value of core.client_metadata.relational_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getRelationalId() { + return relationalId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.relational_id + * @param relationalId the value for core.client_metadata.relational_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setRelationalId(String relationalId) { + this.relationalId = relationalId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.openmrs_uuid + * @return the value of core.client_metadata.openmrs_uuid + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getOpenmrsUuid() { + return openmrsUuid; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.openmrs_uuid + * @param openmrsUuid the value for core.client_metadata.openmrs_uuid + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setOpenmrsUuid(String openmrsUuid) { + this.openmrsUuid = openmrsUuid; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.unique_id + * @return the value of core.client_metadata.unique_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getUniqueId() { + return uniqueId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.unique_id + * @param uniqueId the value for core.client_metadata.unique_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setUniqueId(String uniqueId) { + this.uniqueId = uniqueId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.first_name + * @return the value of core.client_metadata.first_name + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getFirstName() { + return firstName; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.first_name + * @param firstName the value for core.client_metadata.first_name + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.last_name + * @return the value of core.client_metadata.last_name + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getLastName() { + return lastName; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.last_name + * @param lastName the value for core.client_metadata.last_name + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setLastName(String lastName) { + this.lastName = lastName; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.birth_date + * @return the value of core.client_metadata.birth_date + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Date getBirthDate() { + return birthDate; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.birth_date + * @param birthDate the value for core.client_metadata.birth_date + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setBirthDate(Date birthDate) { + this.birthDate = birthDate; + } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java index 9da4a4030e..a939dda243 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java @@ -7,823 +7,874 @@ public class ClientMetadataExample { /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected String orderByClause; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected boolean distinct; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected List oredCriteria; - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public ClientMetadataExample() { - oredCriteria = new ArrayList(); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getOrderByClause() { - return orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public boolean isDistinct() { - return distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public List getOredCriteria() { - return oredCriteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - protected void addCriterionForJDBCDate(String condition, Date value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - addCriterion(condition, new java.sql.Date(value.getTime()), property); - } - - protected void addCriterionForJDBCDate(String condition, List values, String property) { - if (values == null || values.size() == 0) { - throw new RuntimeException("Value list for " + property + " cannot be null or empty"); - } - List dateList = new ArrayList(); - Iterator iter = values.iterator(); - while (iter.hasNext()) { - dateList.add(new java.sql.Date(iter.next().getTime())); - } - addCriterion(condition, dateList, property); - } - - protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andClientIdIsNull() { - addCriterion("client_id is null"); - return (Criteria) this; - } - - public Criteria andClientIdIsNotNull() { - addCriterion("client_id is not null"); - return (Criteria) this; - } - - public Criteria andClientIdEqualTo(Long value) { - addCriterion("client_id =", value, "clientId"); - return (Criteria) this; - } - - public Criteria andClientIdNotEqualTo(Long value) { - addCriterion("client_id <>", value, "clientId"); - return (Criteria) this; - } - - public Criteria andClientIdGreaterThan(Long value) { - addCriterion("client_id >", value, "clientId"); - return (Criteria) this; - } - - public Criteria andClientIdGreaterThanOrEqualTo(Long value) { - addCriterion("client_id >=", value, "clientId"); - return (Criteria) this; - } - - public Criteria andClientIdLessThan(Long value) { - addCriterion("client_id <", value, "clientId"); - return (Criteria) this; - } - - public Criteria andClientIdLessThanOrEqualTo(Long value) { - addCriterion("client_id <=", value, "clientId"); - return (Criteria) this; - } - - public Criteria andClientIdIn(List values) { - addCriterion("client_id in", values, "clientId"); - return (Criteria) this; - } - - public Criteria andClientIdNotIn(List values) { - addCriterion("client_id not in", values, "clientId"); - return (Criteria) this; - } - - public Criteria andClientIdBetween(Long value1, Long value2) { - addCriterion("client_id between", value1, value2, "clientId"); - return (Criteria) this; - } - - public Criteria andClientIdNotBetween(Long value1, Long value2) { - addCriterion("client_id not between", value1, value2, "clientId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdIsNull() { - addCriterion("base_entity_id is null"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdIsNotNull() { - addCriterion("base_entity_id is not null"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdEqualTo(String value) { - addCriterion("base_entity_id =", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotEqualTo(String value) { - addCriterion("base_entity_id <>", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdGreaterThan(String value) { - addCriterion("base_entity_id >", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { - addCriterion("base_entity_id >=", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdLessThan(String value) { - addCriterion("base_entity_id <", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { - addCriterion("base_entity_id <=", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdLike(String value) { - addCriterion("base_entity_id like", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotLike(String value) { - addCriterion("base_entity_id not like", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdIn(List values) { - addCriterion("base_entity_id in", values, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotIn(List values) { - addCriterion("base_entity_id not in", values, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdBetween(String value1, String value2) { - addCriterion("base_entity_id between", value1, value2, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotBetween(String value1, String value2) { - addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andRelationalIdIsNull() { - addCriterion("relational_id is null"); - return (Criteria) this; - } - - public Criteria andRelationalIdIsNotNull() { - addCriterion("relational_id is not null"); - return (Criteria) this; - } - - public Criteria andRelationalIdEqualTo(String value) { - addCriterion("relational_id =", value, "relationalId"); - return (Criteria) this; - } - - public Criteria andRelationalIdNotEqualTo(String value) { - addCriterion("relational_id <>", value, "relationalId"); - return (Criteria) this; - } - - public Criteria andRelationalIdGreaterThan(String value) { - addCriterion("relational_id >", value, "relationalId"); - return (Criteria) this; - } - - public Criteria andRelationalIdGreaterThanOrEqualTo(String value) { - addCriterion("relational_id >=", value, "relationalId"); - return (Criteria) this; - } - - public Criteria andRelationalIdLessThan(String value) { - addCriterion("relational_id <", value, "relationalId"); - return (Criteria) this; - } - - public Criteria andRelationalIdLessThanOrEqualTo(String value) { - addCriterion("relational_id <=", value, "relationalId"); - return (Criteria) this; - } - - public Criteria andRelationalIdLike(String value) { - addCriterion("relational_id like", value, "relationalId"); - return (Criteria) this; - } - - public Criteria andRelationalIdNotLike(String value) { - addCriterion("relational_id not like", value, "relationalId"); - return (Criteria) this; - } - - public Criteria andRelationalIdIn(List values) { - addCriterion("relational_id in", values, "relationalId"); - return (Criteria) this; - } - - public Criteria andRelationalIdNotIn(List values) { - addCriterion("relational_id not in", values, "relationalId"); - return (Criteria) this; - } - - public Criteria andRelationalIdBetween(String value1, String value2) { - addCriterion("relational_id between", value1, value2, "relationalId"); - return (Criteria) this; - } - - public Criteria andRelationalIdNotBetween(String value1, String value2) { - addCriterion("relational_id not between", value1, value2, "relationalId"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidIsNull() { - addCriterion("openmrs_uuid is null"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidIsNotNull() { - addCriterion("openmrs_uuid is not null"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidEqualTo(String value) { - addCriterion("openmrs_uuid =", value, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidNotEqualTo(String value) { - addCriterion("openmrs_uuid <>", value, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidGreaterThan(String value) { - addCriterion("openmrs_uuid >", value, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidGreaterThanOrEqualTo(String value) { - addCriterion("openmrs_uuid >=", value, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidLessThan(String value) { - addCriterion("openmrs_uuid <", value, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidLessThanOrEqualTo(String value) { - addCriterion("openmrs_uuid <=", value, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidLike(String value) { - addCriterion("openmrs_uuid like", value, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidNotLike(String value) { - addCriterion("openmrs_uuid not like", value, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidIn(List values) { - addCriterion("openmrs_uuid in", values, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidNotIn(List values) { - addCriterion("openmrs_uuid not in", values, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidBetween(String value1, String value2) { - addCriterion("openmrs_uuid between", value1, value2, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidNotBetween(String value1, String value2) { - addCriterion("openmrs_uuid not between", value1, value2, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andUniqueIdIsNull() { - addCriterion("unique_id is null"); - return (Criteria) this; - } - - public Criteria andUniqueIdIsNotNull() { - addCriterion("unique_id is not null"); - return (Criteria) this; - } - - public Criteria andUniqueIdEqualTo(String value) { - addCriterion("unique_id =", value, "uniqueId"); - return (Criteria) this; - } - - public Criteria andUniqueIdNotEqualTo(String value) { - addCriterion("unique_id <>", value, "uniqueId"); - return (Criteria) this; - } - - public Criteria andUniqueIdGreaterThan(String value) { - addCriterion("unique_id >", value, "uniqueId"); - return (Criteria) this; - } - - public Criteria andUniqueIdGreaterThanOrEqualTo(String value) { - addCriterion("unique_id >=", value, "uniqueId"); - return (Criteria) this; - } - - public Criteria andUniqueIdLessThan(String value) { - addCriterion("unique_id <", value, "uniqueId"); - return (Criteria) this; - } - - public Criteria andUniqueIdLessThanOrEqualTo(String value) { - addCriterion("unique_id <=", value, "uniqueId"); - return (Criteria) this; - } - - public Criteria andUniqueIdLike(String value) { - addCriterion("unique_id like", value, "uniqueId"); - return (Criteria) this; - } - - public Criteria andUniqueIdNotLike(String value) { - addCriterion("unique_id not like", value, "uniqueId"); - return (Criteria) this; - } - - public Criteria andUniqueIdIn(List values) { - addCriterion("unique_id in", values, "uniqueId"); - return (Criteria) this; - } - - public Criteria andUniqueIdNotIn(List values) { - addCriterion("unique_id not in", values, "uniqueId"); - return (Criteria) this; - } - - public Criteria andUniqueIdBetween(String value1, String value2) { - addCriterion("unique_id between", value1, value2, "uniqueId"); - return (Criteria) this; - } - - public Criteria andUniqueIdNotBetween(String value1, String value2) { - addCriterion("unique_id not between", value1, value2, "uniqueId"); - return (Criteria) this; - } - - public Criteria andFirstNameIsNull() { - addCriterion("first_name is null"); - return (Criteria) this; - } - - public Criteria andFirstNameIsNotNull() { - addCriterion("first_name is not null"); - return (Criteria) this; - } - - public Criteria andFirstNameEqualTo(String value) { - addCriterion("first_name =", value, "firstName"); - return (Criteria) this; - } - - public Criteria andFirstNameNotEqualTo(String value) { - addCriterion("first_name <>", value, "firstName"); - return (Criteria) this; - } - - public Criteria andFirstNameGreaterThan(String value) { - addCriterion("first_name >", value, "firstName"); - return (Criteria) this; - } - - public Criteria andFirstNameGreaterThanOrEqualTo(String value) { - addCriterion("first_name >=", value, "firstName"); - return (Criteria) this; - } - - public Criteria andFirstNameLessThan(String value) { - addCriterion("first_name <", value, "firstName"); - return (Criteria) this; - } - - public Criteria andFirstNameLessThanOrEqualTo(String value) { - addCriterion("first_name <=", value, "firstName"); - return (Criteria) this; - } - - public Criteria andFirstNameLike(String value) { - addCriterion("first_name like", value, "firstName"); - return (Criteria) this; - } - - public Criteria andFirstNameNotLike(String value) { - addCriterion("first_name not like", value, "firstName"); - return (Criteria) this; - } - - public Criteria andFirstNameIn(List values) { - addCriterion("first_name in", values, "firstName"); - return (Criteria) this; - } - - public Criteria andFirstNameNotIn(List values) { - addCriterion("first_name not in", values, "firstName"); - return (Criteria) this; - } - - public Criteria andFirstNameBetween(String value1, String value2) { - addCriterion("first_name between", value1, value2, "firstName"); - return (Criteria) this; - } - - public Criteria andFirstNameNotBetween(String value1, String value2) { - addCriterion("first_name not between", value1, value2, "firstName"); - return (Criteria) this; - } - - public Criteria andLastNameIsNull() { - addCriterion("last_name is null"); - return (Criteria) this; - } - - public Criteria andLastNameIsNotNull() { - addCriterion("last_name is not null"); - return (Criteria) this; - } - - public Criteria andLastNameEqualTo(String value) { - addCriterion("last_name =", value, "lastName"); - return (Criteria) this; - } - - public Criteria andLastNameNotEqualTo(String value) { - addCriterion("last_name <>", value, "lastName"); - return (Criteria) this; - } - - public Criteria andLastNameGreaterThan(String value) { - addCriterion("last_name >", value, "lastName"); - return (Criteria) this; - } - - public Criteria andLastNameGreaterThanOrEqualTo(String value) { - addCriterion("last_name >=", value, "lastName"); - return (Criteria) this; - } - - public Criteria andLastNameLessThan(String value) { - addCriterion("last_name <", value, "lastName"); - return (Criteria) this; - } - - public Criteria andLastNameLessThanOrEqualTo(String value) { - addCriterion("last_name <=", value, "lastName"); - return (Criteria) this; - } - - public Criteria andLastNameLike(String value) { - addCriterion("last_name like", value, "lastName"); - return (Criteria) this; - } - - public Criteria andLastNameNotLike(String value) { - addCriterion("last_name not like", value, "lastName"); - return (Criteria) this; - } - - public Criteria andLastNameIn(List values) { - addCriterion("last_name in", values, "lastName"); - return (Criteria) this; - } - - public Criteria andLastNameNotIn(List values) { - addCriterion("last_name not in", values, "lastName"); - return (Criteria) this; - } - - public Criteria andLastNameBetween(String value1, String value2) { - addCriterion("last_name between", value1, value2, "lastName"); - return (Criteria) this; - } - - public Criteria andLastNameNotBetween(String value1, String value2) { - addCriterion("last_name not between", value1, value2, "lastName"); - return (Criteria) this; - } - - public Criteria andBirthDateIsNull() { - addCriterion("birth_date is null"); - return (Criteria) this; - } - - public Criteria andBirthDateIsNotNull() { - addCriterion("birth_date is not null"); - return (Criteria) this; - } - - public Criteria andBirthDateEqualTo(Date value) { - addCriterionForJDBCDate("birth_date =", value, "birthDate"); - return (Criteria) this; - } - - public Criteria andBirthDateNotEqualTo(Date value) { - addCriterionForJDBCDate("birth_date <>", value, "birthDate"); - return (Criteria) this; - } - - public Criteria andBirthDateGreaterThan(Date value) { - addCriterionForJDBCDate("birth_date >", value, "birthDate"); - return (Criteria) this; - } - - public Criteria andBirthDateGreaterThanOrEqualTo(Date value) { - addCriterionForJDBCDate("birth_date >=", value, "birthDate"); - return (Criteria) this; - } - - public Criteria andBirthDateLessThan(Date value) { - addCriterionForJDBCDate("birth_date <", value, "birthDate"); - return (Criteria) this; - } - - public Criteria andBirthDateLessThanOrEqualTo(Date value) { - addCriterionForJDBCDate("birth_date <=", value, "birthDate"); - return (Criteria) this; - } - - public Criteria andBirthDateIn(List values) { - addCriterionForJDBCDate("birth_date in", values, "birthDate"); - return (Criteria) this; - } - - public Criteria andBirthDateNotIn(List values) { - addCriterionForJDBCDate("birth_date not in", values, "birthDate"); - return (Criteria) this; - } - - public Criteria andBirthDateBetween(Date value1, Date value2) { - addCriterionForJDBCDate("birth_date between", value1, value2, "birthDate"); - return (Criteria) this; - } - - public Criteria andBirthDateNotBetween(Date value1, Date value2) { - addCriterionForJDBCDate("birth_date not between", value1, value2, "birthDate"); - return (Criteria) this; - } - } - - /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected String orderByClause; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected boolean distinct; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public ClientMetadataExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + protected void addCriterionForJDBCDate(String condition, Date value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value.getTime()), property); + } + + protected void addCriterionForJDBCDate(String condition, List values, String property) { + if (values == null || values.size() == 0) { + throw new RuntimeException("Value list for " + property + " cannot be null or empty"); + } + List dateList = new ArrayList(); + Iterator iter = values.iterator(); + while (iter.hasNext()) { + dateList.add(new java.sql.Date(iter.next().getTime())); + } + addCriterion(condition, dateList, property); + } + + protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andClientIdIsNull() { + addCriterion("client_id is null"); + return (Criteria) this; + } + + public Criteria andClientIdIsNotNull() { + addCriterion("client_id is not null"); + return (Criteria) this; + } + + public Criteria andClientIdEqualTo(Long value) { + addCriterion("client_id =", value, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdNotEqualTo(Long value) { + addCriterion("client_id <>", value, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdGreaterThan(Long value) { + addCriterion("client_id >", value, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdGreaterThanOrEqualTo(Long value) { + addCriterion("client_id >=", value, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdLessThan(Long value) { + addCriterion("client_id <", value, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdLessThanOrEqualTo(Long value) { + addCriterion("client_id <=", value, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdIn(List values) { + addCriterion("client_id in", values, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdNotIn(List values) { + addCriterion("client_id not in", values, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdBetween(Long value1, Long value2) { + addCriterion("client_id between", value1, value2, "clientId"); + return (Criteria) this; + } + + public Criteria andClientIdNotBetween(Long value1, Long value2) { + addCriterion("client_id not between", value1, value2, "clientId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNull() { + addCriterion("base_entity_id is null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNotNull() { + addCriterion("base_entity_id is not null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdEqualTo(String value) { + addCriterion("base_entity_id =", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotEqualTo(String value) { + addCriterion("base_entity_id <>", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThan(String value) { + addCriterion("base_entity_id >", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { + addCriterion("base_entity_id >=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThan(String value) { + addCriterion("base_entity_id <", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { + addCriterion("base_entity_id <=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLike(String value) { + addCriterion("base_entity_id like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotLike(String value) { + addCriterion("base_entity_id not like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIn(List values) { + addCriterion("base_entity_id in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotIn(List values) { + addCriterion("base_entity_id not in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdBetween(String value1, String value2) { + addCriterion("base_entity_id between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotBetween(String value1, String value2) { + addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andRelationalIdIsNull() { + addCriterion("relational_id is null"); + return (Criteria) this; + } + + public Criteria andRelationalIdIsNotNull() { + addCriterion("relational_id is not null"); + return (Criteria) this; + } + + public Criteria andRelationalIdEqualTo(String value) { + addCriterion("relational_id =", value, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdNotEqualTo(String value) { + addCriterion("relational_id <>", value, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdGreaterThan(String value) { + addCriterion("relational_id >", value, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdGreaterThanOrEqualTo(String value) { + addCriterion("relational_id >=", value, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdLessThan(String value) { + addCriterion("relational_id <", value, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdLessThanOrEqualTo(String value) { + addCriterion("relational_id <=", value, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdLike(String value) { + addCriterion("relational_id like", value, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdNotLike(String value) { + addCriterion("relational_id not like", value, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdIn(List values) { + addCriterion("relational_id in", values, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdNotIn(List values) { + addCriterion("relational_id not in", values, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdBetween(String value1, String value2) { + addCriterion("relational_id between", value1, value2, "relationalId"); + return (Criteria) this; + } + + public Criteria andRelationalIdNotBetween(String value1, String value2) { + addCriterion("relational_id not between", value1, value2, "relationalId"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidIsNull() { + addCriterion("openmrs_uuid is null"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidIsNotNull() { + addCriterion("openmrs_uuid is not null"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidEqualTo(String value) { + addCriterion("openmrs_uuid =", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidNotEqualTo(String value) { + addCriterion("openmrs_uuid <>", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidGreaterThan(String value) { + addCriterion("openmrs_uuid >", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidGreaterThanOrEqualTo(String value) { + addCriterion("openmrs_uuid >=", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidLessThan(String value) { + addCriterion("openmrs_uuid <", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidLessThanOrEqualTo(String value) { + addCriterion("openmrs_uuid <=", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidLike(String value) { + addCriterion("openmrs_uuid like", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidNotLike(String value) { + addCriterion("openmrs_uuid not like", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidIn(List values) { + addCriterion("openmrs_uuid in", values, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidNotIn(List values) { + addCriterion("openmrs_uuid not in", values, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidBetween(String value1, String value2) { + addCriterion("openmrs_uuid between", value1, value2, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidNotBetween(String value1, String value2) { + addCriterion("openmrs_uuid not between", value1, value2, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andUniqueIdIsNull() { + addCriterion("unique_id is null"); + return (Criteria) this; + } + + public Criteria andUniqueIdIsNotNull() { + addCriterion("unique_id is not null"); + return (Criteria) this; + } + + public Criteria andUniqueIdEqualTo(String value) { + addCriterion("unique_id =", value, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdNotEqualTo(String value) { + addCriterion("unique_id <>", value, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdGreaterThan(String value) { + addCriterion("unique_id >", value, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdGreaterThanOrEqualTo(String value) { + addCriterion("unique_id >=", value, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdLessThan(String value) { + addCriterion("unique_id <", value, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdLessThanOrEqualTo(String value) { + addCriterion("unique_id <=", value, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdLike(String value) { + addCriterion("unique_id like", value, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdNotLike(String value) { + addCriterion("unique_id not like", value, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdIn(List values) { + addCriterion("unique_id in", values, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdNotIn(List values) { + addCriterion("unique_id not in", values, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdBetween(String value1, String value2) { + addCriterion("unique_id between", value1, value2, "uniqueId"); + return (Criteria) this; + } + + public Criteria andUniqueIdNotBetween(String value1, String value2) { + addCriterion("unique_id not between", value1, value2, "uniqueId"); + return (Criteria) this; + } + + public Criteria andFirstNameIsNull() { + addCriterion("first_name is null"); + return (Criteria) this; + } + + public Criteria andFirstNameIsNotNull() { + addCriterion("first_name is not null"); + return (Criteria) this; + } + + public Criteria andFirstNameEqualTo(String value) { + addCriterion("first_name =", value, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameNotEqualTo(String value) { + addCriterion("first_name <>", value, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameGreaterThan(String value) { + addCriterion("first_name >", value, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameGreaterThanOrEqualTo(String value) { + addCriterion("first_name >=", value, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameLessThan(String value) { + addCriterion("first_name <", value, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameLessThanOrEqualTo(String value) { + addCriterion("first_name <=", value, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameLike(String value) { + addCriterion("first_name like", value, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameNotLike(String value) { + addCriterion("first_name not like", value, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameIn(List values) { + addCriterion("first_name in", values, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameNotIn(List values) { + addCriterion("first_name not in", values, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameBetween(String value1, String value2) { + addCriterion("first_name between", value1, value2, "firstName"); + return (Criteria) this; + } + + public Criteria andFirstNameNotBetween(String value1, String value2) { + addCriterion("first_name not between", value1, value2, "firstName"); + return (Criteria) this; + } + + public Criteria andLastNameIsNull() { + addCriterion("last_name is null"); + return (Criteria) this; + } + + public Criteria andLastNameIsNotNull() { + addCriterion("last_name is not null"); + return (Criteria) this; + } + + public Criteria andLastNameEqualTo(String value) { + addCriterion("last_name =", value, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameNotEqualTo(String value) { + addCriterion("last_name <>", value, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameGreaterThan(String value) { + addCriterion("last_name >", value, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameGreaterThanOrEqualTo(String value) { + addCriterion("last_name >=", value, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameLessThan(String value) { + addCriterion("last_name <", value, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameLessThanOrEqualTo(String value) { + addCriterion("last_name <=", value, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameLike(String value) { + addCriterion("last_name like", value, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameNotLike(String value) { + addCriterion("last_name not like", value, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameIn(List values) { + addCriterion("last_name in", values, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameNotIn(List values) { + addCriterion("last_name not in", values, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameBetween(String value1, String value2) { + addCriterion("last_name between", value1, value2, "lastName"); + return (Criteria) this; + } + + public Criteria andLastNameNotBetween(String value1, String value2) { + addCriterion("last_name not between", value1, value2, "lastName"); + return (Criteria) this; + } + + public Criteria andBirthDateIsNull() { + addCriterion("birth_date is null"); + return (Criteria) this; + } + + public Criteria andBirthDateIsNotNull() { + addCriterion("birth_date is not null"); + return (Criteria) this; + } + + public Criteria andBirthDateEqualTo(Date value) { + addCriterionForJDBCDate("birth_date =", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateNotEqualTo(Date value) { + addCriterionForJDBCDate("birth_date <>", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateGreaterThan(Date value) { + addCriterionForJDBCDate("birth_date >", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("birth_date >=", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateLessThan(Date value) { + addCriterionForJDBCDate("birth_date <", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("birth_date <=", value, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateIn(List values) { + addCriterionForJDBCDate("birth_date in", values, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateNotIn(List values) { + addCriterionForJDBCDate("birth_date not in", values, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateBetween(Date value1, Date value2) { + addCriterionForJDBCDate("birth_date between", value1, value2, "birthDate"); + return (Criteria) this; + } + + public Criteria andBirthDateNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("birth_date not between", value1, value2, "birthDate"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } + + /** * This class was generated by MyBatis Generator. * This class corresponds to the database table core.client_metadata * @@ -835,96 +886,4 @@ protected Criteria() { super(); } } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java index d9fafd8721..3307257caa 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java @@ -1,69 +1,51 @@ package org.opensrp.domain.postgres; public class Event { - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.event.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Long id; - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.event.json - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Object json; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Long id; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event.json + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Object json; - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.event.id - * - * @return the value of core.event.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Long getId() { - return id; - } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event.id + * @return the value of core.event.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Long getId() { + return id; + } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.event.id - * - * @param id the value for core.event.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setId(Long id) { - this.id = id; - } + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event.id + * @param id the value for core.event.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.event.json - * - * @return the value of core.event.json - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Object getJson() { - return json; - } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event.json + * @return the value of core.event.json + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Object getJson() { + return json; + } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.event.json - * - * @param json the value for core.event.json - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setJson(Object json) { - this.json = json; - } + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event.json + * @param json the value for core.event.json + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setJson(Object json) { + this.json = json; + } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java index 0d339bb766..31a401710c 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java @@ -5,317 +5,368 @@ public class EventExample { /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected String orderByClause; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected boolean distinct; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected List oredCriteria; - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public EventExample() { - oredCriteria = new ArrayList(); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getOrderByClause() { - return orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public boolean isDistinct() { - return distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public List getOredCriteria() { - return oredCriteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andJsonIsNull() { - addCriterion("json is null"); - return (Criteria) this; - } - - public Criteria andJsonIsNotNull() { - addCriterion("json is not null"); - return (Criteria) this; - } - - public Criteria andJsonEqualTo(Object value) { - addCriterion("json =", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotEqualTo(Object value) { - addCriterion("json <>", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonGreaterThan(Object value) { - addCriterion("json >", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonGreaterThanOrEqualTo(Object value) { - addCriterion("json >=", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonLessThan(Object value) { - addCriterion("json <", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonLessThanOrEqualTo(Object value) { - addCriterion("json <=", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonIn(List values) { - addCriterion("json in", values, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotIn(List values) { - addCriterion("json not in", values, "json"); - return (Criteria) this; - } - - public Criteria andJsonBetween(Object value1, Object value2) { - addCriterion("json between", value1, value2, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotBetween(Object value1, Object value2) { - addCriterion("json not between", value1, value2, "json"); - return (Criteria) this; - } - } - - /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected String orderByClause; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected boolean distinct; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public EventExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andJsonIsNull() { + addCriterion("json is null"); + return (Criteria) this; + } + + public Criteria andJsonIsNotNull() { + addCriterion("json is not null"); + return (Criteria) this; + } + + public Criteria andJsonEqualTo(Object value) { + addCriterion("json =", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotEqualTo(Object value) { + addCriterion("json <>", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThan(Object value) { + addCriterion("json >", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThanOrEqualTo(Object value) { + addCriterion("json >=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThan(Object value) { + addCriterion("json <", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThanOrEqualTo(Object value) { + addCriterion("json <=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonIn(List values) { + addCriterion("json in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotIn(List values) { + addCriterion("json not in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonBetween(Object value1, Object value2) { + addCriterion("json between", value1, value2, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotBetween(Object value1, Object value2) { + addCriterion("json not between", value1, value2, "json"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } + + /** * This class was generated by MyBatis Generator. * This class corresponds to the database table core.event * @@ -327,96 +378,4 @@ protected Criteria() { super(); } } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java index 55e327081a..01178d2fc7 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java @@ -3,399 +3,281 @@ import java.util.Date; public class EventMetadata { - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.event_metadata.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Long id; - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.event_metadata.event_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Long eventId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.event_metadata.base_entity_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String baseEntityId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.event_metadata.form_submission_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String formSubmissionId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.event_metadata.server_version - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Date serverVersion; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.event_metadata.openmrs_uuid - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String openmrsUuid; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.event_metadata.event_type - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String eventType; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.event_metadata.event_date - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Date eventDate; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.event_metadata.provider_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String providerId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.event_metadata.location_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String locationId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.event_metadata.team - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String team; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.event_metadata.team_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String teamId; - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.event_metadata.id - * - * @return the value of core.event_metadata.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Long getId() { - return id; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.event_metadata.id - * - * @param id the value for core.event_metadata.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setId(Long id) { - this.id = id; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.event_metadata.event_id - * - * @return the value of core.event_metadata.event_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Long getEventId() { - return eventId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.event_metadata.event_id - * - * @param eventId the value for core.event_metadata.event_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setEventId(Long eventId) { - this.eventId = eventId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.event_metadata.base_entity_id - * - * @return the value of core.event_metadata.base_entity_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getBaseEntityId() { - return baseEntityId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.event_metadata.base_entity_id - * - * @param baseEntityId the value for core.event_metadata.base_entity_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setBaseEntityId(String baseEntityId) { - this.baseEntityId = baseEntityId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.event_metadata.form_submission_id - * - * @return the value of core.event_metadata.form_submission_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getFormSubmissionId() { - return formSubmissionId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.event_metadata.form_submission_id - * - * @param formSubmissionId the value for core.event_metadata.form_submission_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setFormSubmissionId(String formSubmissionId) { - this.formSubmissionId = formSubmissionId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.event_metadata.server_version - * - * @return the value of core.event_metadata.server_version - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Date getServerVersion() { - return serverVersion; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.event_metadata.server_version - * - * @param serverVersion the value for core.event_metadata.server_version - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setServerVersion(Date serverVersion) { - this.serverVersion = serverVersion; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.event_metadata.openmrs_uuid - * - * @return the value of core.event_metadata.openmrs_uuid - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getOpenmrsUuid() { - return openmrsUuid; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.event_metadata.openmrs_uuid - * - * @param openmrsUuid the value for core.event_metadata.openmrs_uuid - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setOpenmrsUuid(String openmrsUuid) { - this.openmrsUuid = openmrsUuid; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.event_metadata.event_type - * - * @return the value of core.event_metadata.event_type - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getEventType() { - return eventType; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.event_metadata.event_type - * - * @param eventType the value for core.event_metadata.event_type - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setEventType(String eventType) { - this.eventType = eventType; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.event_metadata.event_date - * - * @return the value of core.event_metadata.event_date - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Date getEventDate() { - return eventDate; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.event_metadata.event_date - * - * @param eventDate the value for core.event_metadata.event_date - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setEventDate(Date eventDate) { - this.eventDate = eventDate; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.event_metadata.provider_id - * - * @return the value of core.event_metadata.provider_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getProviderId() { - return providerId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.event_metadata.provider_id - * - * @param providerId the value for core.event_metadata.provider_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setProviderId(String providerId) { - this.providerId = providerId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.event_metadata.location_id - * - * @return the value of core.event_metadata.location_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getLocationId() { - return locationId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.event_metadata.location_id - * - * @param locationId the value for core.event_metadata.location_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setLocationId(String locationId) { - this.locationId = locationId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.event_metadata.team - * - * @return the value of core.event_metadata.team - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getTeam() { - return team; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.event_metadata.team - * - * @param team the value for core.event_metadata.team - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setTeam(String team) { - this.team = team; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.event_metadata.team_id - * - * @return the value of core.event_metadata.team_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getTeamId() { - return teamId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.event_metadata.team_id - * - * @param teamId the value for core.event_metadata.team_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setTeamId(String teamId) { - this.teamId = teamId; - } + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Long id; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Long eventId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.base_entity_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String baseEntityId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.form_submission_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String formSubmissionId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.server_version + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Date serverVersion; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.openmrs_uuid + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String openmrsUuid; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_type + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String eventType; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_date + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Date eventDate; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.provider_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String providerId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.location_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String locationId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.team + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String team; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.team_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String teamId; + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.id + * @return the value of core.event_metadata.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.id + * @param id the value for core.event_metadata.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_id + * @return the value of core.event_metadata.event_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Long getEventId() { + return eventId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_id + * @param eventId the value for core.event_metadata.event_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setEventId(Long eventId) { + this.eventId = eventId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.base_entity_id + * @return the value of core.event_metadata.base_entity_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getBaseEntityId() { + return baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.base_entity_id + * @param baseEntityId the value for core.event_metadata.base_entity_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setBaseEntityId(String baseEntityId) { + this.baseEntityId = baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.form_submission_id + * @return the value of core.event_metadata.form_submission_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getFormSubmissionId() { + return formSubmissionId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.form_submission_id + * @param formSubmissionId the value for core.event_metadata.form_submission_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setFormSubmissionId(String formSubmissionId) { + this.formSubmissionId = formSubmissionId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.server_version + * @return the value of core.event_metadata.server_version + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Date getServerVersion() { + return serverVersion; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.server_version + * @param serverVersion the value for core.event_metadata.server_version + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setServerVersion(Date serverVersion) { + this.serverVersion = serverVersion; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.openmrs_uuid + * @return the value of core.event_metadata.openmrs_uuid + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getOpenmrsUuid() { + return openmrsUuid; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.openmrs_uuid + * @param openmrsUuid the value for core.event_metadata.openmrs_uuid + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setOpenmrsUuid(String openmrsUuid) { + this.openmrsUuid = openmrsUuid; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_type + * @return the value of core.event_metadata.event_type + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getEventType() { + return eventType; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_type + * @param eventType the value for core.event_metadata.event_type + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setEventType(String eventType) { + this.eventType = eventType; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_date + * @return the value of core.event_metadata.event_date + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Date getEventDate() { + return eventDate; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_date + * @param eventDate the value for core.event_metadata.event_date + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setEventDate(Date eventDate) { + this.eventDate = eventDate; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.provider_id + * @return the value of core.event_metadata.provider_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getProviderId() { + return providerId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.provider_id + * @param providerId the value for core.event_metadata.provider_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.location_id + * @return the value of core.event_metadata.location_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getLocationId() { + return locationId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.location_id + * @param locationId the value for core.event_metadata.location_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.team + * @return the value of core.event_metadata.team + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getTeam() { + return team; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.team + * @param team the value for core.event_metadata.team + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setTeam(String team) { + this.team = team; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.team_id + * @return the value of core.event_metadata.team_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getTeamId() { + return teamId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.team_id + * @param teamId the value for core.event_metadata.team_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setTeamId(String teamId) { + this.teamId = teamId; + } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java index 5f4ec4d2aa..7e3ce5d147 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java @@ -7,1023 +7,1074 @@ public class EventMetadataExample { /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected String orderByClause; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected boolean distinct; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected List oredCriteria; - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public EventMetadataExample() { - oredCriteria = new ArrayList(); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getOrderByClause() { - return orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public boolean isDistinct() { - return distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public List getOredCriteria() { - return oredCriteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - protected void addCriterionForJDBCDate(String condition, Date value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - addCriterion(condition, new java.sql.Date(value.getTime()), property); - } - - protected void addCriterionForJDBCDate(String condition, List values, String property) { - if (values == null || values.size() == 0) { - throw new RuntimeException("Value list for " + property + " cannot be null or empty"); - } - List dateList = new ArrayList(); - Iterator iter = values.iterator(); - while (iter.hasNext()) { - dateList.add(new java.sql.Date(iter.next().getTime())); - } - addCriterion(condition, dateList, property); - } - - protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andEventIdIsNull() { - addCriterion("event_id is null"); - return (Criteria) this; - } - - public Criteria andEventIdIsNotNull() { - addCriterion("event_id is not null"); - return (Criteria) this; - } - - public Criteria andEventIdEqualTo(Long value) { - addCriterion("event_id =", value, "eventId"); - return (Criteria) this; - } - - public Criteria andEventIdNotEqualTo(Long value) { - addCriterion("event_id <>", value, "eventId"); - return (Criteria) this; - } - - public Criteria andEventIdGreaterThan(Long value) { - addCriterion("event_id >", value, "eventId"); - return (Criteria) this; - } - - public Criteria andEventIdGreaterThanOrEqualTo(Long value) { - addCriterion("event_id >=", value, "eventId"); - return (Criteria) this; - } - - public Criteria andEventIdLessThan(Long value) { - addCriterion("event_id <", value, "eventId"); - return (Criteria) this; - } - - public Criteria andEventIdLessThanOrEqualTo(Long value) { - addCriterion("event_id <=", value, "eventId"); - return (Criteria) this; - } - - public Criteria andEventIdIn(List values) { - addCriterion("event_id in", values, "eventId"); - return (Criteria) this; - } - - public Criteria andEventIdNotIn(List values) { - addCriterion("event_id not in", values, "eventId"); - return (Criteria) this; - } - - public Criteria andEventIdBetween(Long value1, Long value2) { - addCriterion("event_id between", value1, value2, "eventId"); - return (Criteria) this; - } - - public Criteria andEventIdNotBetween(Long value1, Long value2) { - addCriterion("event_id not between", value1, value2, "eventId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdIsNull() { - addCriterion("base_entity_id is null"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdIsNotNull() { - addCriterion("base_entity_id is not null"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdEqualTo(String value) { - addCriterion("base_entity_id =", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotEqualTo(String value) { - addCriterion("base_entity_id <>", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdGreaterThan(String value) { - addCriterion("base_entity_id >", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { - addCriterion("base_entity_id >=", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdLessThan(String value) { - addCriterion("base_entity_id <", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { - addCriterion("base_entity_id <=", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdLike(String value) { - addCriterion("base_entity_id like", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotLike(String value) { - addCriterion("base_entity_id not like", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdIn(List values) { - addCriterion("base_entity_id in", values, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotIn(List values) { - addCriterion("base_entity_id not in", values, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdBetween(String value1, String value2) { - addCriterion("base_entity_id between", value1, value2, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotBetween(String value1, String value2) { - addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andFormSubmissionIdIsNull() { - addCriterion("form_submission_id is null"); - return (Criteria) this; - } - - public Criteria andFormSubmissionIdIsNotNull() { - addCriterion("form_submission_id is not null"); - return (Criteria) this; - } - - public Criteria andFormSubmissionIdEqualTo(String value) { - addCriterion("form_submission_id =", value, "formSubmissionId"); - return (Criteria) this; - } - - public Criteria andFormSubmissionIdNotEqualTo(String value) { - addCriterion("form_submission_id <>", value, "formSubmissionId"); - return (Criteria) this; - } - - public Criteria andFormSubmissionIdGreaterThan(String value) { - addCriterion("form_submission_id >", value, "formSubmissionId"); - return (Criteria) this; - } - - public Criteria andFormSubmissionIdGreaterThanOrEqualTo(String value) { - addCriterion("form_submission_id >=", value, "formSubmissionId"); - return (Criteria) this; - } - - public Criteria andFormSubmissionIdLessThan(String value) { - addCriterion("form_submission_id <", value, "formSubmissionId"); - return (Criteria) this; - } - - public Criteria andFormSubmissionIdLessThanOrEqualTo(String value) { - addCriterion("form_submission_id <=", value, "formSubmissionId"); - return (Criteria) this; - } - - public Criteria andFormSubmissionIdLike(String value) { - addCriterion("form_submission_id like", value, "formSubmissionId"); - return (Criteria) this; - } - - public Criteria andFormSubmissionIdNotLike(String value) { - addCriterion("form_submission_id not like", value, "formSubmissionId"); - return (Criteria) this; - } - - public Criteria andFormSubmissionIdIn(List values) { - addCriterion("form_submission_id in", values, "formSubmissionId"); - return (Criteria) this; - } - - public Criteria andFormSubmissionIdNotIn(List values) { - addCriterion("form_submission_id not in", values, "formSubmissionId"); - return (Criteria) this; - } - - public Criteria andFormSubmissionIdBetween(String value1, String value2) { - addCriterion("form_submission_id between", value1, value2, "formSubmissionId"); - return (Criteria) this; - } - - public Criteria andFormSubmissionIdNotBetween(String value1, String value2) { - addCriterion("form_submission_id not between", value1, value2, "formSubmissionId"); - return (Criteria) this; - } - - public Criteria andServerVersionIsNull() { - addCriterion("server_version is null"); - return (Criteria) this; - } - - public Criteria andServerVersionIsNotNull() { - addCriterion("server_version is not null"); - return (Criteria) this; - } - - public Criteria andServerVersionEqualTo(Date value) { - addCriterion("server_version =", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionNotEqualTo(Date value) { - addCriterion("server_version <>", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionGreaterThan(Date value) { - addCriterion("server_version >", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionGreaterThanOrEqualTo(Date value) { - addCriterion("server_version >=", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionLessThan(Date value) { - addCriterion("server_version <", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionLessThanOrEqualTo(Date value) { - addCriterion("server_version <=", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionIn(List values) { - addCriterion("server_version in", values, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionNotIn(List values) { - addCriterion("server_version not in", values, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionBetween(Date value1, Date value2) { - addCriterion("server_version between", value1, value2, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionNotBetween(Date value1, Date value2) { - addCriterion("server_version not between", value1, value2, "serverVersion"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidIsNull() { - addCriterion("openmrs_uuid is null"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidIsNotNull() { - addCriterion("openmrs_uuid is not null"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidEqualTo(String value) { - addCriterion("openmrs_uuid =", value, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidNotEqualTo(String value) { - addCriterion("openmrs_uuid <>", value, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidGreaterThan(String value) { - addCriterion("openmrs_uuid >", value, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidGreaterThanOrEqualTo(String value) { - addCriterion("openmrs_uuid >=", value, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidLessThan(String value) { - addCriterion("openmrs_uuid <", value, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidLessThanOrEqualTo(String value) { - addCriterion("openmrs_uuid <=", value, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidLike(String value) { - addCriterion("openmrs_uuid like", value, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidNotLike(String value) { - addCriterion("openmrs_uuid not like", value, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidIn(List values) { - addCriterion("openmrs_uuid in", values, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidNotIn(List values) { - addCriterion("openmrs_uuid not in", values, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidBetween(String value1, String value2) { - addCriterion("openmrs_uuid between", value1, value2, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andOpenmrsUuidNotBetween(String value1, String value2) { - addCriterion("openmrs_uuid not between", value1, value2, "openmrsUuid"); - return (Criteria) this; - } - - public Criteria andEventTypeIsNull() { - addCriterion("event_type is null"); - return (Criteria) this; - } - - public Criteria andEventTypeIsNotNull() { - addCriterion("event_type is not null"); - return (Criteria) this; - } - - public Criteria andEventTypeEqualTo(String value) { - addCriterion("event_type =", value, "eventType"); - return (Criteria) this; - } - - public Criteria andEventTypeNotEqualTo(String value) { - addCriterion("event_type <>", value, "eventType"); - return (Criteria) this; - } - - public Criteria andEventTypeGreaterThan(String value) { - addCriterion("event_type >", value, "eventType"); - return (Criteria) this; - } - - public Criteria andEventTypeGreaterThanOrEqualTo(String value) { - addCriterion("event_type >=", value, "eventType"); - return (Criteria) this; - } - - public Criteria andEventTypeLessThan(String value) { - addCriterion("event_type <", value, "eventType"); - return (Criteria) this; - } - - public Criteria andEventTypeLessThanOrEqualTo(String value) { - addCriterion("event_type <=", value, "eventType"); - return (Criteria) this; - } - - public Criteria andEventTypeLike(String value) { - addCriterion("event_type like", value, "eventType"); - return (Criteria) this; - } - - public Criteria andEventTypeNotLike(String value) { - addCriterion("event_type not like", value, "eventType"); - return (Criteria) this; - } - - public Criteria andEventTypeIn(List values) { - addCriterion("event_type in", values, "eventType"); - return (Criteria) this; - } - - public Criteria andEventTypeNotIn(List values) { - addCriterion("event_type not in", values, "eventType"); - return (Criteria) this; - } - - public Criteria andEventTypeBetween(String value1, String value2) { - addCriterion("event_type between", value1, value2, "eventType"); - return (Criteria) this; - } - - public Criteria andEventTypeNotBetween(String value1, String value2) { - addCriterion("event_type not between", value1, value2, "eventType"); - return (Criteria) this; - } - - public Criteria andEventDateIsNull() { - addCriterion("event_date is null"); - return (Criteria) this; - } - - public Criteria andEventDateIsNotNull() { - addCriterion("event_date is not null"); - return (Criteria) this; - } - - public Criteria andEventDateEqualTo(Date value) { - addCriterionForJDBCDate("event_date =", value, "eventDate"); - return (Criteria) this; - } - - public Criteria andEventDateNotEqualTo(Date value) { - addCriterionForJDBCDate("event_date <>", value, "eventDate"); - return (Criteria) this; - } - - public Criteria andEventDateGreaterThan(Date value) { - addCriterionForJDBCDate("event_date >", value, "eventDate"); - return (Criteria) this; - } - - public Criteria andEventDateGreaterThanOrEqualTo(Date value) { - addCriterionForJDBCDate("event_date >=", value, "eventDate"); - return (Criteria) this; - } - - public Criteria andEventDateLessThan(Date value) { - addCriterionForJDBCDate("event_date <", value, "eventDate"); - return (Criteria) this; - } - - public Criteria andEventDateLessThanOrEqualTo(Date value) { - addCriterionForJDBCDate("event_date <=", value, "eventDate"); - return (Criteria) this; - } - - public Criteria andEventDateIn(List values) { - addCriterionForJDBCDate("event_date in", values, "eventDate"); - return (Criteria) this; - } - - public Criteria andEventDateNotIn(List values) { - addCriterionForJDBCDate("event_date not in", values, "eventDate"); - return (Criteria) this; - } - - public Criteria andEventDateBetween(Date value1, Date value2) { - addCriterionForJDBCDate("event_date between", value1, value2, "eventDate"); - return (Criteria) this; - } - - public Criteria andEventDateNotBetween(Date value1, Date value2) { - addCriterionForJDBCDate("event_date not between", value1, value2, "eventDate"); - return (Criteria) this; - } - - public Criteria andProviderIdIsNull() { - addCriterion("provider_id is null"); - return (Criteria) this; - } - - public Criteria andProviderIdIsNotNull() { - addCriterion("provider_id is not null"); - return (Criteria) this; - } - - public Criteria andProviderIdEqualTo(String value) { - addCriterion("provider_id =", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotEqualTo(String value) { - addCriterion("provider_id <>", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdGreaterThan(String value) { - addCriterion("provider_id >", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdGreaterThanOrEqualTo(String value) { - addCriterion("provider_id >=", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdLessThan(String value) { - addCriterion("provider_id <", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdLessThanOrEqualTo(String value) { - addCriterion("provider_id <=", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdLike(String value) { - addCriterion("provider_id like", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotLike(String value) { - addCriterion("provider_id not like", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdIn(List values) { - addCriterion("provider_id in", values, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotIn(List values) { - addCriterion("provider_id not in", values, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdBetween(String value1, String value2) { - addCriterion("provider_id between", value1, value2, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotBetween(String value1, String value2) { - addCriterion("provider_id not between", value1, value2, "providerId"); - return (Criteria) this; - } - - public Criteria andLocationIdIsNull() { - addCriterion("location_id is null"); - return (Criteria) this; - } - - public Criteria andLocationIdIsNotNull() { - addCriterion("location_id is not null"); - return (Criteria) this; - } - - public Criteria andLocationIdEqualTo(String value) { - addCriterion("location_id =", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotEqualTo(String value) { - addCriterion("location_id <>", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdGreaterThan(String value) { - addCriterion("location_id >", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdGreaterThanOrEqualTo(String value) { - addCriterion("location_id >=", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdLessThan(String value) { - addCriterion("location_id <", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdLessThanOrEqualTo(String value) { - addCriterion("location_id <=", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdLike(String value) { - addCriterion("location_id like", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotLike(String value) { - addCriterion("location_id not like", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdIn(List values) { - addCriterion("location_id in", values, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotIn(List values) { - addCriterion("location_id not in", values, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdBetween(String value1, String value2) { - addCriterion("location_id between", value1, value2, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotBetween(String value1, String value2) { - addCriterion("location_id not between", value1, value2, "locationId"); - return (Criteria) this; - } - - public Criteria andTeamIsNull() { - addCriterion("team is null"); - return (Criteria) this; - } - - public Criteria andTeamIsNotNull() { - addCriterion("team is not null"); - return (Criteria) this; - } - - public Criteria andTeamEqualTo(String value) { - addCriterion("team =", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotEqualTo(String value) { - addCriterion("team <>", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamGreaterThan(String value) { - addCriterion("team >", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamGreaterThanOrEqualTo(String value) { - addCriterion("team >=", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamLessThan(String value) { - addCriterion("team <", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamLessThanOrEqualTo(String value) { - addCriterion("team <=", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamLike(String value) { - addCriterion("team like", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotLike(String value) { - addCriterion("team not like", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamIn(List values) { - addCriterion("team in", values, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotIn(List values) { - addCriterion("team not in", values, "team"); - return (Criteria) this; - } - - public Criteria andTeamBetween(String value1, String value2) { - addCriterion("team between", value1, value2, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotBetween(String value1, String value2) { - addCriterion("team not between", value1, value2, "team"); - return (Criteria) this; - } - - public Criteria andTeamIdIsNull() { - addCriterion("team_id is null"); - return (Criteria) this; - } - - public Criteria andTeamIdIsNotNull() { - addCriterion("team_id is not null"); - return (Criteria) this; - } - - public Criteria andTeamIdEqualTo(String value) { - addCriterion("team_id =", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotEqualTo(String value) { - addCriterion("team_id <>", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdGreaterThan(String value) { - addCriterion("team_id >", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdGreaterThanOrEqualTo(String value) { - addCriterion("team_id >=", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdLessThan(String value) { - addCriterion("team_id <", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdLessThanOrEqualTo(String value) { - addCriterion("team_id <=", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdLike(String value) { - addCriterion("team_id like", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotLike(String value) { - addCriterion("team_id not like", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdIn(List values) { - addCriterion("team_id in", values, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotIn(List values) { - addCriterion("team_id not in", values, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdBetween(String value1, String value2) { - addCriterion("team_id between", value1, value2, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotBetween(String value1, String value2) { - addCriterion("team_id not between", value1, value2, "teamId"); - return (Criteria) this; - } - } - - /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected String orderByClause; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected boolean distinct; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public EventMetadataExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + protected void addCriterionForJDBCDate(String condition, Date value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value.getTime()), property); + } + + protected void addCriterionForJDBCDate(String condition, List values, String property) { + if (values == null || values.size() == 0) { + throw new RuntimeException("Value list for " + property + " cannot be null or empty"); + } + List dateList = new ArrayList(); + Iterator iter = values.iterator(); + while (iter.hasNext()) { + dateList.add(new java.sql.Date(iter.next().getTime())); + } + addCriterion(condition, dateList, property); + } + + protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andEventIdIsNull() { + addCriterion("event_id is null"); + return (Criteria) this; + } + + public Criteria andEventIdIsNotNull() { + addCriterion("event_id is not null"); + return (Criteria) this; + } + + public Criteria andEventIdEqualTo(Long value) { + addCriterion("event_id =", value, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdNotEqualTo(Long value) { + addCriterion("event_id <>", value, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdGreaterThan(Long value) { + addCriterion("event_id >", value, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdGreaterThanOrEqualTo(Long value) { + addCriterion("event_id >=", value, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdLessThan(Long value) { + addCriterion("event_id <", value, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdLessThanOrEqualTo(Long value) { + addCriterion("event_id <=", value, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdIn(List values) { + addCriterion("event_id in", values, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdNotIn(List values) { + addCriterion("event_id not in", values, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdBetween(Long value1, Long value2) { + addCriterion("event_id between", value1, value2, "eventId"); + return (Criteria) this; + } + + public Criteria andEventIdNotBetween(Long value1, Long value2) { + addCriterion("event_id not between", value1, value2, "eventId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNull() { + addCriterion("base_entity_id is null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNotNull() { + addCriterion("base_entity_id is not null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdEqualTo(String value) { + addCriterion("base_entity_id =", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotEqualTo(String value) { + addCriterion("base_entity_id <>", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThan(String value) { + addCriterion("base_entity_id >", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { + addCriterion("base_entity_id >=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThan(String value) { + addCriterion("base_entity_id <", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { + addCriterion("base_entity_id <=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLike(String value) { + addCriterion("base_entity_id like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotLike(String value) { + addCriterion("base_entity_id not like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIn(List values) { + addCriterion("base_entity_id in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotIn(List values) { + addCriterion("base_entity_id not in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdBetween(String value1, String value2) { + addCriterion("base_entity_id between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotBetween(String value1, String value2) { + addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdIsNull() { + addCriterion("form_submission_id is null"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdIsNotNull() { + addCriterion("form_submission_id is not null"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdEqualTo(String value) { + addCriterion("form_submission_id =", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdNotEqualTo(String value) { + addCriterion("form_submission_id <>", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdGreaterThan(String value) { + addCriterion("form_submission_id >", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdGreaterThanOrEqualTo(String value) { + addCriterion("form_submission_id >=", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdLessThan(String value) { + addCriterion("form_submission_id <", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdLessThanOrEqualTo(String value) { + addCriterion("form_submission_id <=", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdLike(String value) { + addCriterion("form_submission_id like", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdNotLike(String value) { + addCriterion("form_submission_id not like", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdIn(List values) { + addCriterion("form_submission_id in", values, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdNotIn(List values) { + addCriterion("form_submission_id not in", values, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdBetween(String value1, String value2) { + addCriterion("form_submission_id between", value1, value2, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdNotBetween(String value1, String value2) { + addCriterion("form_submission_id not between", value1, value2, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNull() { + addCriterion("server_version is null"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNotNull() { + addCriterion("server_version is not null"); + return (Criteria) this; + } + + public Criteria andServerVersionEqualTo(Date value) { + addCriterion("server_version =", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotEqualTo(Date value) { + addCriterion("server_version <>", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThan(Date value) { + addCriterion("server_version >", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThanOrEqualTo(Date value) { + addCriterion("server_version >=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThan(Date value) { + addCriterion("server_version <", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThanOrEqualTo(Date value) { + addCriterion("server_version <=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionIn(List values) { + addCriterion("server_version in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotIn(List values) { + addCriterion("server_version not in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionBetween(Date value1, Date value2) { + addCriterion("server_version between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotBetween(Date value1, Date value2) { + addCriterion("server_version not between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidIsNull() { + addCriterion("openmrs_uuid is null"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidIsNotNull() { + addCriterion("openmrs_uuid is not null"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidEqualTo(String value) { + addCriterion("openmrs_uuid =", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidNotEqualTo(String value) { + addCriterion("openmrs_uuid <>", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidGreaterThan(String value) { + addCriterion("openmrs_uuid >", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidGreaterThanOrEqualTo(String value) { + addCriterion("openmrs_uuid >=", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidLessThan(String value) { + addCriterion("openmrs_uuid <", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidLessThanOrEqualTo(String value) { + addCriterion("openmrs_uuid <=", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidLike(String value) { + addCriterion("openmrs_uuid like", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidNotLike(String value) { + addCriterion("openmrs_uuid not like", value, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidIn(List values) { + addCriterion("openmrs_uuid in", values, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidNotIn(List values) { + addCriterion("openmrs_uuid not in", values, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidBetween(String value1, String value2) { + addCriterion("openmrs_uuid between", value1, value2, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andOpenmrsUuidNotBetween(String value1, String value2) { + addCriterion("openmrs_uuid not between", value1, value2, "openmrsUuid"); + return (Criteria) this; + } + + public Criteria andEventTypeIsNull() { + addCriterion("event_type is null"); + return (Criteria) this; + } + + public Criteria andEventTypeIsNotNull() { + addCriterion("event_type is not null"); + return (Criteria) this; + } + + public Criteria andEventTypeEqualTo(String value) { + addCriterion("event_type =", value, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeNotEqualTo(String value) { + addCriterion("event_type <>", value, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeGreaterThan(String value) { + addCriterion("event_type >", value, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeGreaterThanOrEqualTo(String value) { + addCriterion("event_type >=", value, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeLessThan(String value) { + addCriterion("event_type <", value, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeLessThanOrEqualTo(String value) { + addCriterion("event_type <=", value, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeLike(String value) { + addCriterion("event_type like", value, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeNotLike(String value) { + addCriterion("event_type not like", value, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeIn(List values) { + addCriterion("event_type in", values, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeNotIn(List values) { + addCriterion("event_type not in", values, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeBetween(String value1, String value2) { + addCriterion("event_type between", value1, value2, "eventType"); + return (Criteria) this; + } + + public Criteria andEventTypeNotBetween(String value1, String value2) { + addCriterion("event_type not between", value1, value2, "eventType"); + return (Criteria) this; + } + + public Criteria andEventDateIsNull() { + addCriterion("event_date is null"); + return (Criteria) this; + } + + public Criteria andEventDateIsNotNull() { + addCriterion("event_date is not null"); + return (Criteria) this; + } + + public Criteria andEventDateEqualTo(Date value) { + addCriterionForJDBCDate("event_date =", value, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateNotEqualTo(Date value) { + addCriterionForJDBCDate("event_date <>", value, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateGreaterThan(Date value) { + addCriterionForJDBCDate("event_date >", value, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("event_date >=", value, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateLessThan(Date value) { + addCriterionForJDBCDate("event_date <", value, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("event_date <=", value, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateIn(List values) { + addCriterionForJDBCDate("event_date in", values, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateNotIn(List values) { + addCriterionForJDBCDate("event_date not in", values, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateBetween(Date value1, Date value2) { + addCriterionForJDBCDate("event_date between", value1, value2, "eventDate"); + return (Criteria) this; + } + + public Criteria andEventDateNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("event_date not between", value1, value2, "eventDate"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNull() { + addCriterion("provider_id is null"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNotNull() { + addCriterion("provider_id is not null"); + return (Criteria) this; + } + + public Criteria andProviderIdEqualTo(String value) { + addCriterion("provider_id =", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotEqualTo(String value) { + addCriterion("provider_id <>", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThan(String value) { + addCriterion("provider_id >", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThanOrEqualTo(String value) { + addCriterion("provider_id >=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThan(String value) { + addCriterion("provider_id <", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThanOrEqualTo(String value) { + addCriterion("provider_id <=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLike(String value) { + addCriterion("provider_id like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotLike(String value) { + addCriterion("provider_id not like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdIn(List values) { + addCriterion("provider_id in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotIn(List values) { + addCriterion("provider_id not in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdBetween(String value1, String value2) { + addCriterion("provider_id between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotBetween(String value1, String value2) { + addCriterion("provider_id not between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNull() { + addCriterion("location_id is null"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNotNull() { + addCriterion("location_id is not null"); + return (Criteria) this; + } + + public Criteria andLocationIdEqualTo(String value) { + addCriterion("location_id =", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotEqualTo(String value) { + addCriterion("location_id <>", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThan(String value) { + addCriterion("location_id >", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThanOrEqualTo(String value) { + addCriterion("location_id >=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThan(String value) { + addCriterion("location_id <", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThanOrEqualTo(String value) { + addCriterion("location_id <=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLike(String value) { + addCriterion("location_id like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotLike(String value) { + addCriterion("location_id not like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdIn(List values) { + addCriterion("location_id in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotIn(List values) { + addCriterion("location_id not in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdBetween(String value1, String value2) { + addCriterion("location_id between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotBetween(String value1, String value2) { + addCriterion("location_id not between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andTeamIsNull() { + addCriterion("team is null"); + return (Criteria) this; + } + + public Criteria andTeamIsNotNull() { + addCriterion("team is not null"); + return (Criteria) this; + } + + public Criteria andTeamEqualTo(String value) { + addCriterion("team =", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotEqualTo(String value) { + addCriterion("team <>", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThan(String value) { + addCriterion("team >", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThanOrEqualTo(String value) { + addCriterion("team >=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThan(String value) { + addCriterion("team <", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThanOrEqualTo(String value) { + addCriterion("team <=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLike(String value) { + addCriterion("team like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotLike(String value) { + addCriterion("team not like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamIn(List values) { + addCriterion("team in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotIn(List values) { + addCriterion("team not in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamBetween(String value1, String value2) { + addCriterion("team between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotBetween(String value1, String value2) { + addCriterion("team not between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNull() { + addCriterion("team_id is null"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNotNull() { + addCriterion("team_id is not null"); + return (Criteria) this; + } + + public Criteria andTeamIdEqualTo(String value) { + addCriterion("team_id =", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotEqualTo(String value) { + addCriterion("team_id <>", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThan(String value) { + addCriterion("team_id >", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThanOrEqualTo(String value) { + addCriterion("team_id >=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThan(String value) { + addCriterion("team_id <", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThanOrEqualTo(String value) { + addCriterion("team_id <=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLike(String value) { + addCriterion("team_id like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotLike(String value) { + addCriterion("team_id not like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdIn(List values) { + addCriterion("team_id in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotIn(List values) { + addCriterion("team_id not in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdBetween(String value1, String value2) { + addCriterion("team_id between", value1, value2, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotBetween(String value1, String value2) { + addCriterion("team_id not between", value1, value2, "teamId"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } + + /** * This class was generated by MyBatis Generator. * This class corresponds to the database table core.event_metadata * @@ -1035,96 +1086,4 @@ protected Criteria() { super(); } } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java index 55cc17a01d..7b03ab177c 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java @@ -1,69 +1,51 @@ package org.opensrp.domain.postgres; public class Report { - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.report.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Long id; - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.report.json - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Object json; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.report.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Long id; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.report.json + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Object json; - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.report.id - * - * @return the value of core.report.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Long getId() { - return id; - } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.report.id + * @return the value of core.report.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Long getId() { + return id; + } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.report.id - * - * @param id the value for core.report.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setId(Long id) { - this.id = id; - } + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.report.id + * @param id the value for core.report.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.report.json - * - * @return the value of core.report.json - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Object getJson() { - return json; - } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.report.json + * @return the value of core.report.json + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Object getJson() { + return json; + } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.report.json - * - * @param json the value for core.report.json - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setJson(Object json) { - this.json = json; - } + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.report.json + * @param json the value for core.report.json + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setJson(Object json) { + this.json = json; + } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java index ed6fae9128..e64f19be06 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java @@ -5,317 +5,368 @@ public class ReportExample { /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected String orderByClause; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected boolean distinct; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected List oredCriteria; - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public ReportExample() { - oredCriteria = new ArrayList(); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getOrderByClause() { - return orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public boolean isDistinct() { - return distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public List getOredCriteria() { - return oredCriteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andJsonIsNull() { - addCriterion("json is null"); - return (Criteria) this; - } - - public Criteria andJsonIsNotNull() { - addCriterion("json is not null"); - return (Criteria) this; - } - - public Criteria andJsonEqualTo(Object value) { - addCriterion("json =", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotEqualTo(Object value) { - addCriterion("json <>", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonGreaterThan(Object value) { - addCriterion("json >", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonGreaterThanOrEqualTo(Object value) { - addCriterion("json >=", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonLessThan(Object value) { - addCriterion("json <", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonLessThanOrEqualTo(Object value) { - addCriterion("json <=", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonIn(List values) { - addCriterion("json in", values, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotIn(List values) { - addCriterion("json not in", values, "json"); - return (Criteria) this; - } - - public Criteria andJsonBetween(Object value1, Object value2) { - addCriterion("json between", value1, value2, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotBetween(Object value1, Object value2) { - addCriterion("json not between", value1, value2, "json"); - return (Criteria) this; - } - } - - /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected String orderByClause; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected boolean distinct; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public ReportExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andJsonIsNull() { + addCriterion("json is null"); + return (Criteria) this; + } + + public Criteria andJsonIsNotNull() { + addCriterion("json is not null"); + return (Criteria) this; + } + + public Criteria andJsonEqualTo(Object value) { + addCriterion("json =", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotEqualTo(Object value) { + addCriterion("json <>", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThan(Object value) { + addCriterion("json >", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThanOrEqualTo(Object value) { + addCriterion("json >=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThan(Object value) { + addCriterion("json <", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThanOrEqualTo(Object value) { + addCriterion("json <=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonIn(List values) { + addCriterion("json in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotIn(List values) { + addCriterion("json not in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonBetween(Object value1, Object value2) { + addCriterion("json between", value1, value2, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotBetween(Object value1, Object value2) { + addCriterion("json not between", value1, value2, "json"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } + + /** * This class was generated by MyBatis Generator. * This class corresponds to the database table core.report * @@ -327,96 +378,4 @@ protected Criteria() { super(); } } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java index 42d37eb9ce..3f6ae59598 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java @@ -3,300 +3,212 @@ import java.util.Date; public class ReportMetadata { - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.report_metadata.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Long id; - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.report_metadata.report_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Long reportId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.report_metadata.base_entity_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String baseEntityId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.report_metadata.server_version - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Date serverVersion; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.report_metadata.report_type - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String reportType; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.report_metadata.provider_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String providerId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.report_metadata.location_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String locationId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.report_metadata.team - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String team; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.report_metadata.team_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String teamId; - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.report_metadata.id - * - * @return the value of core.report_metadata.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Long getId() { - return id; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.report_metadata.id - * - * @param id the value for core.report_metadata.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setId(Long id) { - this.id = id; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.report_metadata.report_id - * - * @return the value of core.report_metadata.report_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Long getReportId() { - return reportId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.report_metadata.report_id - * - * @param reportId the value for core.report_metadata.report_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setReportId(Long reportId) { - this.reportId = reportId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.report_metadata.base_entity_id - * - * @return the value of core.report_metadata.base_entity_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getBaseEntityId() { - return baseEntityId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.report_metadata.base_entity_id - * - * @param baseEntityId the value for core.report_metadata.base_entity_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setBaseEntityId(String baseEntityId) { - this.baseEntityId = baseEntityId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.report_metadata.server_version - * - * @return the value of core.report_metadata.server_version - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Date getServerVersion() { - return serverVersion; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.report_metadata.server_version - * - * @param serverVersion the value for core.report_metadata.server_version - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setServerVersion(Date serverVersion) { - this.serverVersion = serverVersion; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.report_metadata.report_type - * - * @return the value of core.report_metadata.report_type - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getReportType() { - return reportType; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.report_metadata.report_type - * - * @param reportType the value for core.report_metadata.report_type - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setReportType(String reportType) { - this.reportType = reportType; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.report_metadata.provider_id - * - * @return the value of core.report_metadata.provider_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getProviderId() { - return providerId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.report_metadata.provider_id - * - * @param providerId the value for core.report_metadata.provider_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setProviderId(String providerId) { - this.providerId = providerId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.report_metadata.location_id - * - * @return the value of core.report_metadata.location_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getLocationId() { - return locationId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.report_metadata.location_id - * - * @param locationId the value for core.report_metadata.location_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setLocationId(String locationId) { - this.locationId = locationId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.report_metadata.team - * - * @return the value of core.report_metadata.team - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getTeam() { - return team; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.report_metadata.team - * - * @param team the value for core.report_metadata.team - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setTeam(String team) { - this.team = team; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.report_metadata.team_id - * - * @return the value of core.report_metadata.team_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getTeamId() { - return teamId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.report_metadata.team_id - * - * @param teamId the value for core.report_metadata.team_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setTeamId(String teamId) { - this.teamId = teamId; - } + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Long id; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.report_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Long reportId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.base_entity_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String baseEntityId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.server_version + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Date serverVersion; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.report_type + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String reportType; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.provider_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String providerId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.location_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String locationId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.team + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String team; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.team_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String teamId; + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.id + * @return the value of core.report_metadata.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.id + * @param id the value for core.report_metadata.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.report_id + * @return the value of core.report_metadata.report_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Long getReportId() { + return reportId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.report_id + * @param reportId the value for core.report_metadata.report_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setReportId(Long reportId) { + this.reportId = reportId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.base_entity_id + * @return the value of core.report_metadata.base_entity_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getBaseEntityId() { + return baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.base_entity_id + * @param baseEntityId the value for core.report_metadata.base_entity_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setBaseEntityId(String baseEntityId) { + this.baseEntityId = baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.server_version + * @return the value of core.report_metadata.server_version + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Date getServerVersion() { + return serverVersion; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.server_version + * @param serverVersion the value for core.report_metadata.server_version + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setServerVersion(Date serverVersion) { + this.serverVersion = serverVersion; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.report_type + * @return the value of core.report_metadata.report_type + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getReportType() { + return reportType; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.report_type + * @param reportType the value for core.report_metadata.report_type + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setReportType(String reportType) { + this.reportType = reportType; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.provider_id + * @return the value of core.report_metadata.provider_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getProviderId() { + return providerId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.provider_id + * @param providerId the value for core.report_metadata.provider_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.location_id + * @return the value of core.report_metadata.location_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getLocationId() { + return locationId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.location_id + * @param locationId the value for core.report_metadata.location_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.team + * @return the value of core.report_metadata.team + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getTeam() { + return team; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.team + * @param team the value for core.report_metadata.team + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setTeam(String team) { + this.team = team; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.team_id + * @return the value of core.report_metadata.team_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getTeamId() { + return teamId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.team_id + * @param teamId the value for core.report_metadata.team_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setTeamId(String teamId) { + this.teamId = teamId; + } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java index fd74e58e0d..fee2fe07d6 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java @@ -6,797 +6,848 @@ public class ReportMetadataExample { /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected String orderByClause; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected boolean distinct; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected List oredCriteria; - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public ReportMetadataExample() { - oredCriteria = new ArrayList(); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getOrderByClause() { - return orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public boolean isDistinct() { - return distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public List getOredCriteria() { - return oredCriteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andReportIdIsNull() { - addCriterion("report_id is null"); - return (Criteria) this; - } - - public Criteria andReportIdIsNotNull() { - addCriterion("report_id is not null"); - return (Criteria) this; - } - - public Criteria andReportIdEqualTo(Long value) { - addCriterion("report_id =", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdNotEqualTo(Long value) { - addCriterion("report_id <>", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdGreaterThan(Long value) { - addCriterion("report_id >", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdGreaterThanOrEqualTo(Long value) { - addCriterion("report_id >=", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdLessThan(Long value) { - addCriterion("report_id <", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdLessThanOrEqualTo(Long value) { - addCriterion("report_id <=", value, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdIn(List values) { - addCriterion("report_id in", values, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdNotIn(List values) { - addCriterion("report_id not in", values, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdBetween(Long value1, Long value2) { - addCriterion("report_id between", value1, value2, "reportId"); - return (Criteria) this; - } - - public Criteria andReportIdNotBetween(Long value1, Long value2) { - addCriterion("report_id not between", value1, value2, "reportId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdIsNull() { - addCriterion("base_entity_id is null"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdIsNotNull() { - addCriterion("base_entity_id is not null"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdEqualTo(String value) { - addCriterion("base_entity_id =", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotEqualTo(String value) { - addCriterion("base_entity_id <>", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdGreaterThan(String value) { - addCriterion("base_entity_id >", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { - addCriterion("base_entity_id >=", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdLessThan(String value) { - addCriterion("base_entity_id <", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { - addCriterion("base_entity_id <=", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdLike(String value) { - addCriterion("base_entity_id like", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotLike(String value) { - addCriterion("base_entity_id not like", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdIn(List values) { - addCriterion("base_entity_id in", values, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotIn(List values) { - addCriterion("base_entity_id not in", values, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdBetween(String value1, String value2) { - addCriterion("base_entity_id between", value1, value2, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotBetween(String value1, String value2) { - addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andServerVersionIsNull() { - addCriterion("server_version is null"); - return (Criteria) this; - } - - public Criteria andServerVersionIsNotNull() { - addCriterion("server_version is not null"); - return (Criteria) this; - } - - public Criteria andServerVersionEqualTo(Date value) { - addCriterion("server_version =", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionNotEqualTo(Date value) { - addCriterion("server_version <>", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionGreaterThan(Date value) { - addCriterion("server_version >", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionGreaterThanOrEqualTo(Date value) { - addCriterion("server_version >=", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionLessThan(Date value) { - addCriterion("server_version <", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionLessThanOrEqualTo(Date value) { - addCriterion("server_version <=", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionIn(List values) { - addCriterion("server_version in", values, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionNotIn(List values) { - addCriterion("server_version not in", values, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionBetween(Date value1, Date value2) { - addCriterion("server_version between", value1, value2, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionNotBetween(Date value1, Date value2) { - addCriterion("server_version not between", value1, value2, "serverVersion"); - return (Criteria) this; - } - - public Criteria andReportTypeIsNull() { - addCriterion("report_type is null"); - return (Criteria) this; - } - - public Criteria andReportTypeIsNotNull() { - addCriterion("report_type is not null"); - return (Criteria) this; - } - - public Criteria andReportTypeEqualTo(String value) { - addCriterion("report_type =", value, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeNotEqualTo(String value) { - addCriterion("report_type <>", value, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeGreaterThan(String value) { - addCriterion("report_type >", value, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeGreaterThanOrEqualTo(String value) { - addCriterion("report_type >=", value, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeLessThan(String value) { - addCriterion("report_type <", value, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeLessThanOrEqualTo(String value) { - addCriterion("report_type <=", value, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeLike(String value) { - addCriterion("report_type like", value, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeNotLike(String value) { - addCriterion("report_type not like", value, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeIn(List values) { - addCriterion("report_type in", values, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeNotIn(List values) { - addCriterion("report_type not in", values, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeBetween(String value1, String value2) { - addCriterion("report_type between", value1, value2, "reportType"); - return (Criteria) this; - } - - public Criteria andReportTypeNotBetween(String value1, String value2) { - addCriterion("report_type not between", value1, value2, "reportType"); - return (Criteria) this; - } - - public Criteria andProviderIdIsNull() { - addCriterion("provider_id is null"); - return (Criteria) this; - } - - public Criteria andProviderIdIsNotNull() { - addCriterion("provider_id is not null"); - return (Criteria) this; - } - - public Criteria andProviderIdEqualTo(String value) { - addCriterion("provider_id =", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotEqualTo(String value) { - addCriterion("provider_id <>", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdGreaterThan(String value) { - addCriterion("provider_id >", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdGreaterThanOrEqualTo(String value) { - addCriterion("provider_id >=", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdLessThan(String value) { - addCriterion("provider_id <", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdLessThanOrEqualTo(String value) { - addCriterion("provider_id <=", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdLike(String value) { - addCriterion("provider_id like", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotLike(String value) { - addCriterion("provider_id not like", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdIn(List values) { - addCriterion("provider_id in", values, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotIn(List values) { - addCriterion("provider_id not in", values, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdBetween(String value1, String value2) { - addCriterion("provider_id between", value1, value2, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotBetween(String value1, String value2) { - addCriterion("provider_id not between", value1, value2, "providerId"); - return (Criteria) this; - } - - public Criteria andLocationIdIsNull() { - addCriterion("location_id is null"); - return (Criteria) this; - } - - public Criteria andLocationIdIsNotNull() { - addCriterion("location_id is not null"); - return (Criteria) this; - } - - public Criteria andLocationIdEqualTo(String value) { - addCriterion("location_id =", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotEqualTo(String value) { - addCriterion("location_id <>", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdGreaterThan(String value) { - addCriterion("location_id >", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdGreaterThanOrEqualTo(String value) { - addCriterion("location_id >=", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdLessThan(String value) { - addCriterion("location_id <", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdLessThanOrEqualTo(String value) { - addCriterion("location_id <=", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdLike(String value) { - addCriterion("location_id like", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotLike(String value) { - addCriterion("location_id not like", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdIn(List values) { - addCriterion("location_id in", values, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotIn(List values) { - addCriterion("location_id not in", values, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdBetween(String value1, String value2) { - addCriterion("location_id between", value1, value2, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotBetween(String value1, String value2) { - addCriterion("location_id not between", value1, value2, "locationId"); - return (Criteria) this; - } - - public Criteria andTeamIsNull() { - addCriterion("team is null"); - return (Criteria) this; - } - - public Criteria andTeamIsNotNull() { - addCriterion("team is not null"); - return (Criteria) this; - } - - public Criteria andTeamEqualTo(String value) { - addCriterion("team =", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotEqualTo(String value) { - addCriterion("team <>", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamGreaterThan(String value) { - addCriterion("team >", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamGreaterThanOrEqualTo(String value) { - addCriterion("team >=", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamLessThan(String value) { - addCriterion("team <", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamLessThanOrEqualTo(String value) { - addCriterion("team <=", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamLike(String value) { - addCriterion("team like", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotLike(String value) { - addCriterion("team not like", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamIn(List values) { - addCriterion("team in", values, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotIn(List values) { - addCriterion("team not in", values, "team"); - return (Criteria) this; - } - - public Criteria andTeamBetween(String value1, String value2) { - addCriterion("team between", value1, value2, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotBetween(String value1, String value2) { - addCriterion("team not between", value1, value2, "team"); - return (Criteria) this; - } - - public Criteria andTeamIdIsNull() { - addCriterion("team_id is null"); - return (Criteria) this; - } - - public Criteria andTeamIdIsNotNull() { - addCriterion("team_id is not null"); - return (Criteria) this; - } - - public Criteria andTeamIdEqualTo(String value) { - addCriterion("team_id =", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotEqualTo(String value) { - addCriterion("team_id <>", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdGreaterThan(String value) { - addCriterion("team_id >", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdGreaterThanOrEqualTo(String value) { - addCriterion("team_id >=", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdLessThan(String value) { - addCriterion("team_id <", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdLessThanOrEqualTo(String value) { - addCriterion("team_id <=", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdLike(String value) { - addCriterion("team_id like", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotLike(String value) { - addCriterion("team_id not like", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdIn(List values) { - addCriterion("team_id in", values, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotIn(List values) { - addCriterion("team_id not in", values, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdBetween(String value1, String value2) { - addCriterion("team_id between", value1, value2, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotBetween(String value1, String value2) { - addCriterion("team_id not between", value1, value2, "teamId"); - return (Criteria) this; - } - } - - /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected String orderByClause; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected boolean distinct; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public ReportMetadataExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andReportIdIsNull() { + addCriterion("report_id is null"); + return (Criteria) this; + } + + public Criteria andReportIdIsNotNull() { + addCriterion("report_id is not null"); + return (Criteria) this; + } + + public Criteria andReportIdEqualTo(Long value) { + addCriterion("report_id =", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotEqualTo(Long value) { + addCriterion("report_id <>", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThan(Long value) { + addCriterion("report_id >", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdGreaterThanOrEqualTo(Long value) { + addCriterion("report_id >=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThan(Long value) { + addCriterion("report_id <", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdLessThanOrEqualTo(Long value) { + addCriterion("report_id <=", value, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdIn(List values) { + addCriterion("report_id in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotIn(List values) { + addCriterion("report_id not in", values, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdBetween(Long value1, Long value2) { + addCriterion("report_id between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andReportIdNotBetween(Long value1, Long value2) { + addCriterion("report_id not between", value1, value2, "reportId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNull() { + addCriterion("base_entity_id is null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNotNull() { + addCriterion("base_entity_id is not null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdEqualTo(String value) { + addCriterion("base_entity_id =", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotEqualTo(String value) { + addCriterion("base_entity_id <>", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThan(String value) { + addCriterion("base_entity_id >", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { + addCriterion("base_entity_id >=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThan(String value) { + addCriterion("base_entity_id <", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { + addCriterion("base_entity_id <=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLike(String value) { + addCriterion("base_entity_id like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotLike(String value) { + addCriterion("base_entity_id not like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIn(List values) { + addCriterion("base_entity_id in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotIn(List values) { + addCriterion("base_entity_id not in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdBetween(String value1, String value2) { + addCriterion("base_entity_id between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotBetween(String value1, String value2) { + addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNull() { + addCriterion("server_version is null"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNotNull() { + addCriterion("server_version is not null"); + return (Criteria) this; + } + + public Criteria andServerVersionEqualTo(Date value) { + addCriterion("server_version =", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotEqualTo(Date value) { + addCriterion("server_version <>", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThan(Date value) { + addCriterion("server_version >", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThanOrEqualTo(Date value) { + addCriterion("server_version >=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThan(Date value) { + addCriterion("server_version <", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThanOrEqualTo(Date value) { + addCriterion("server_version <=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionIn(List values) { + addCriterion("server_version in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotIn(List values) { + addCriterion("server_version not in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionBetween(Date value1, Date value2) { + addCriterion("server_version between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotBetween(Date value1, Date value2) { + addCriterion("server_version not between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andReportTypeIsNull() { + addCriterion("report_type is null"); + return (Criteria) this; + } + + public Criteria andReportTypeIsNotNull() { + addCriterion("report_type is not null"); + return (Criteria) this; + } + + public Criteria andReportTypeEqualTo(String value) { + addCriterion("report_type =", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeNotEqualTo(String value) { + addCriterion("report_type <>", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeGreaterThan(String value) { + addCriterion("report_type >", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeGreaterThanOrEqualTo(String value) { + addCriterion("report_type >=", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeLessThan(String value) { + addCriterion("report_type <", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeLessThanOrEqualTo(String value) { + addCriterion("report_type <=", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeLike(String value) { + addCriterion("report_type like", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeNotLike(String value) { + addCriterion("report_type not like", value, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeIn(List values) { + addCriterion("report_type in", values, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeNotIn(List values) { + addCriterion("report_type not in", values, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeBetween(String value1, String value2) { + addCriterion("report_type between", value1, value2, "reportType"); + return (Criteria) this; + } + + public Criteria andReportTypeNotBetween(String value1, String value2) { + addCriterion("report_type not between", value1, value2, "reportType"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNull() { + addCriterion("provider_id is null"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNotNull() { + addCriterion("provider_id is not null"); + return (Criteria) this; + } + + public Criteria andProviderIdEqualTo(String value) { + addCriterion("provider_id =", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotEqualTo(String value) { + addCriterion("provider_id <>", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThan(String value) { + addCriterion("provider_id >", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThanOrEqualTo(String value) { + addCriterion("provider_id >=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThan(String value) { + addCriterion("provider_id <", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThanOrEqualTo(String value) { + addCriterion("provider_id <=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLike(String value) { + addCriterion("provider_id like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotLike(String value) { + addCriterion("provider_id not like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdIn(List values) { + addCriterion("provider_id in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotIn(List values) { + addCriterion("provider_id not in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdBetween(String value1, String value2) { + addCriterion("provider_id between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotBetween(String value1, String value2) { + addCriterion("provider_id not between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNull() { + addCriterion("location_id is null"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNotNull() { + addCriterion("location_id is not null"); + return (Criteria) this; + } + + public Criteria andLocationIdEqualTo(String value) { + addCriterion("location_id =", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotEqualTo(String value) { + addCriterion("location_id <>", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThan(String value) { + addCriterion("location_id >", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThanOrEqualTo(String value) { + addCriterion("location_id >=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThan(String value) { + addCriterion("location_id <", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThanOrEqualTo(String value) { + addCriterion("location_id <=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLike(String value) { + addCriterion("location_id like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotLike(String value) { + addCriterion("location_id not like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdIn(List values) { + addCriterion("location_id in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotIn(List values) { + addCriterion("location_id not in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdBetween(String value1, String value2) { + addCriterion("location_id between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotBetween(String value1, String value2) { + addCriterion("location_id not between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andTeamIsNull() { + addCriterion("team is null"); + return (Criteria) this; + } + + public Criteria andTeamIsNotNull() { + addCriterion("team is not null"); + return (Criteria) this; + } + + public Criteria andTeamEqualTo(String value) { + addCriterion("team =", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotEqualTo(String value) { + addCriterion("team <>", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThan(String value) { + addCriterion("team >", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThanOrEqualTo(String value) { + addCriterion("team >=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThan(String value) { + addCriterion("team <", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThanOrEqualTo(String value) { + addCriterion("team <=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLike(String value) { + addCriterion("team like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotLike(String value) { + addCriterion("team not like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamIn(List values) { + addCriterion("team in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotIn(List values) { + addCriterion("team not in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamBetween(String value1, String value2) { + addCriterion("team between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotBetween(String value1, String value2) { + addCriterion("team not between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNull() { + addCriterion("team_id is null"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNotNull() { + addCriterion("team_id is not null"); + return (Criteria) this; + } + + public Criteria andTeamIdEqualTo(String value) { + addCriterion("team_id =", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotEqualTo(String value) { + addCriterion("team_id <>", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThan(String value) { + addCriterion("team_id >", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThanOrEqualTo(String value) { + addCriterion("team_id >=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThan(String value) { + addCriterion("team_id <", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThanOrEqualTo(String value) { + addCriterion("team_id <=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLike(String value) { + addCriterion("team_id like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotLike(String value) { + addCriterion("team_id not like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdIn(List values) { + addCriterion("team_id in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotIn(List values) { + addCriterion("team_id not in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdBetween(String value1, String value2) { + addCriterion("team_id between", value1, value2, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotBetween(String value1, String value2) { + addCriterion("team_id not between", value1, value2, "teamId"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } + + /** * This class was generated by MyBatis Generator. * This class corresponds to the database table core.report_metadata * @@ -808,96 +859,4 @@ protected Criteria() { super(); } } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java index a87dd2104f..b440496e75 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java @@ -1,69 +1,51 @@ package org.opensrp.domain.postgres; public class Stock { - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.stock.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Long id; - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.stock.json - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Object json; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Long id; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock.json + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Object json; - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.stock.id - * - * @return the value of core.stock.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Long getId() { - return id; - } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock.id + * @return the value of core.stock.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Long getId() { + return id; + } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.stock.id - * - * @param id the value for core.stock.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setId(Long id) { - this.id = id; - } + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock.id + * @param id the value for core.stock.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.stock.json - * - * @return the value of core.stock.json - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Object getJson() { - return json; - } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock.json + * @return the value of core.stock.json + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Object getJson() { + return json; + } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.stock.json - * - * @param json the value for core.stock.json - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setJson(Object json) { - this.json = json; - } + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock.json + * @param json the value for core.stock.json + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setJson(Object json) { + this.json = json; + } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java index f6b668c77d..aaeab23a4b 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java @@ -5,317 +5,368 @@ public class StockExample { /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected String orderByClause; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected boolean distinct; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected List oredCriteria; - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public StockExample() { - oredCriteria = new ArrayList(); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getOrderByClause() { - return orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public boolean isDistinct() { - return distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public List getOredCriteria() { - return oredCriteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andJsonIsNull() { - addCriterion("json is null"); - return (Criteria) this; - } - - public Criteria andJsonIsNotNull() { - addCriterion("json is not null"); - return (Criteria) this; - } - - public Criteria andJsonEqualTo(Object value) { - addCriterion("json =", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotEqualTo(Object value) { - addCriterion("json <>", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonGreaterThan(Object value) { - addCriterion("json >", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonGreaterThanOrEqualTo(Object value) { - addCriterion("json >=", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonLessThan(Object value) { - addCriterion("json <", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonLessThanOrEqualTo(Object value) { - addCriterion("json <=", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonIn(List values) { - addCriterion("json in", values, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotIn(List values) { - addCriterion("json not in", values, "json"); - return (Criteria) this; - } - - public Criteria andJsonBetween(Object value1, Object value2) { - addCriterion("json between", value1, value2, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotBetween(Object value1, Object value2) { - addCriterion("json not between", value1, value2, "json"); - return (Criteria) this; - } - } - - /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected String orderByClause; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected boolean distinct; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public StockExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andJsonIsNull() { + addCriterion("json is null"); + return (Criteria) this; + } + + public Criteria andJsonIsNotNull() { + addCriterion("json is not null"); + return (Criteria) this; + } + + public Criteria andJsonEqualTo(Object value) { + addCriterion("json =", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotEqualTo(Object value) { + addCriterion("json <>", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThan(Object value) { + addCriterion("json >", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThanOrEqualTo(Object value) { + addCriterion("json >=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThan(Object value) { + addCriterion("json <", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThanOrEqualTo(Object value) { + addCriterion("json <=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonIn(List values) { + addCriterion("json in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotIn(List values) { + addCriterion("json not in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonBetween(Object value1, Object value2) { + addCriterion("json between", value1, value2, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotBetween(Object value1, Object value2) { + addCriterion("json not between", value1, value2, "json"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } + + /** * This class was generated by MyBatis Generator. * This class corresponds to the database table core.stock * @@ -327,96 +378,4 @@ protected Criteria() { super(); } } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java index 64f4686308..78fa3f17ea 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java @@ -3,234 +3,166 @@ import java.util.Date; public class StockMetadata { - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.stock_metadata.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Long id; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.stock_metadata.stock_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Long stockId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.stock_metadata.server_version - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private Date serverVersion; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.stock_metadata.provider_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String providerId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.stock_metadata.location_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String locationId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.stock_metadata.team - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String team; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.stock_metadata.team_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - private String teamId; - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.stock_metadata.id - * - * @return the value of core.stock_metadata.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Long getId() { - return id; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.stock_metadata.id - * - * @param id the value for core.stock_metadata.id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setId(Long id) { - this.id = id; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.stock_metadata.stock_id - * - * @return the value of core.stock_metadata.stock_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Long getStockId() { - return stockId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.stock_metadata.stock_id - * - * @param stockId the value for core.stock_metadata.stock_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setStockId(Long stockId) { - this.stockId = stockId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.stock_metadata.server_version - * - * @return the value of core.stock_metadata.server_version - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Date getServerVersion() { - return serverVersion; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.stock_metadata.server_version - * - * @param serverVersion the value for core.stock_metadata.server_version - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setServerVersion(Date serverVersion) { - this.serverVersion = serverVersion; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.stock_metadata.provider_id - * - * @return the value of core.stock_metadata.provider_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getProviderId() { - return providerId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.stock_metadata.provider_id - * - * @param providerId the value for core.stock_metadata.provider_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setProviderId(String providerId) { - this.providerId = providerId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.stock_metadata.location_id - * - * @return the value of core.stock_metadata.location_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getLocationId() { - return locationId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.stock_metadata.location_id - * - * @param locationId the value for core.stock_metadata.location_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setLocationId(String locationId) { - this.locationId = locationId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.stock_metadata.team - * - * @return the value of core.stock_metadata.team - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getTeam() { - return team; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.stock_metadata.team - * - * @param team the value for core.stock_metadata.team - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setTeam(String team) { - this.team = team; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.stock_metadata.team_id - * - * @return the value of core.stock_metadata.team_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getTeamId() { - return teamId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.stock_metadata.team_id - * - * @param teamId the value for core.stock_metadata.team_id - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setTeamId(String teamId) { - this.teamId = teamId; - } + + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Long id; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.stock_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Long stockId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.server_version + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private Date serverVersion; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.provider_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String providerId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.location_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String locationId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.team + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String team; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.team_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + private String teamId; + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.id + * @return the value of core.stock_metadata.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.id + * @param id the value for core.stock_metadata.id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.stock_id + * @return the value of core.stock_metadata.stock_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Long getStockId() { + return stockId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.stock_id + * @param stockId the value for core.stock_metadata.stock_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setStockId(Long stockId) { + this.stockId = stockId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.server_version + * @return the value of core.stock_metadata.server_version + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Date getServerVersion() { + return serverVersion; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.server_version + * @param serverVersion the value for core.stock_metadata.server_version + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setServerVersion(Date serverVersion) { + this.serverVersion = serverVersion; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.provider_id + * @return the value of core.stock_metadata.provider_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getProviderId() { + return providerId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.provider_id + * @param providerId the value for core.stock_metadata.provider_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.location_id + * @return the value of core.stock_metadata.location_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getLocationId() { + return locationId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.location_id + * @param locationId the value for core.stock_metadata.location_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.team + * @return the value of core.stock_metadata.team + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getTeam() { + return team; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.team + * @param team the value for core.stock_metadata.team + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setTeam(String team) { + this.team = team; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.team_id + * @return the value of core.stock_metadata.team_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getTeamId() { + return teamId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.team_id + * @param teamId the value for core.stock_metadata.team_id + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setTeamId(String teamId) { + this.teamId = teamId; + } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java index 17d665b5fd..340640a4f9 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java @@ -6,657 +6,708 @@ public class StockMetadataExample { /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected String orderByClause; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected boolean distinct; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected List oredCriteria; - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public StockMetadataExample() { - oredCriteria = new ArrayList(); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public String getOrderByClause() { - return orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public boolean isDistinct() { - return distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public List getOredCriteria() { - return oredCriteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andStockIdIsNull() { - addCriterion("stock_id is null"); - return (Criteria) this; - } - - public Criteria andStockIdIsNotNull() { - addCriterion("stock_id is not null"); - return (Criteria) this; - } - - public Criteria andStockIdEqualTo(Long value) { - addCriterion("stock_id =", value, "stockId"); - return (Criteria) this; - } - - public Criteria andStockIdNotEqualTo(Long value) { - addCriterion("stock_id <>", value, "stockId"); - return (Criteria) this; - } - - public Criteria andStockIdGreaterThan(Long value) { - addCriterion("stock_id >", value, "stockId"); - return (Criteria) this; - } - - public Criteria andStockIdGreaterThanOrEqualTo(Long value) { - addCriterion("stock_id >=", value, "stockId"); - return (Criteria) this; - } - - public Criteria andStockIdLessThan(Long value) { - addCriterion("stock_id <", value, "stockId"); - return (Criteria) this; - } - - public Criteria andStockIdLessThanOrEqualTo(Long value) { - addCriterion("stock_id <=", value, "stockId"); - return (Criteria) this; - } - - public Criteria andStockIdIn(List values) { - addCriterion("stock_id in", values, "stockId"); - return (Criteria) this; - } - - public Criteria andStockIdNotIn(List values) { - addCriterion("stock_id not in", values, "stockId"); - return (Criteria) this; - } - - public Criteria andStockIdBetween(Long value1, Long value2) { - addCriterion("stock_id between", value1, value2, "stockId"); - return (Criteria) this; - } - - public Criteria andStockIdNotBetween(Long value1, Long value2) { - addCriterion("stock_id not between", value1, value2, "stockId"); - return (Criteria) this; - } - - public Criteria andServerVersionIsNull() { - addCriterion("server_version is null"); - return (Criteria) this; - } - - public Criteria andServerVersionIsNotNull() { - addCriterion("server_version is not null"); - return (Criteria) this; - } - - public Criteria andServerVersionEqualTo(Date value) { - addCriterion("server_version =", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionNotEqualTo(Date value) { - addCriterion("server_version <>", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionGreaterThan(Date value) { - addCriterion("server_version >", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionGreaterThanOrEqualTo(Date value) { - addCriterion("server_version >=", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionLessThan(Date value) { - addCriterion("server_version <", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionLessThanOrEqualTo(Date value) { - addCriterion("server_version <=", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionIn(List values) { - addCriterion("server_version in", values, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionNotIn(List values) { - addCriterion("server_version not in", values, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionBetween(Date value1, Date value2) { - addCriterion("server_version between", value1, value2, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionNotBetween(Date value1, Date value2) { - addCriterion("server_version not between", value1, value2, "serverVersion"); - return (Criteria) this; - } - - public Criteria andProviderIdIsNull() { - addCriterion("provider_id is null"); - return (Criteria) this; - } - - public Criteria andProviderIdIsNotNull() { - addCriterion("provider_id is not null"); - return (Criteria) this; - } - - public Criteria andProviderIdEqualTo(String value) { - addCriterion("provider_id =", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotEqualTo(String value) { - addCriterion("provider_id <>", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdGreaterThan(String value) { - addCriterion("provider_id >", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdGreaterThanOrEqualTo(String value) { - addCriterion("provider_id >=", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdLessThan(String value) { - addCriterion("provider_id <", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdLessThanOrEqualTo(String value) { - addCriterion("provider_id <=", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdLike(String value) { - addCriterion("provider_id like", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotLike(String value) { - addCriterion("provider_id not like", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdIn(List values) { - addCriterion("provider_id in", values, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotIn(List values) { - addCriterion("provider_id not in", values, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdBetween(String value1, String value2) { - addCriterion("provider_id between", value1, value2, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotBetween(String value1, String value2) { - addCriterion("provider_id not between", value1, value2, "providerId"); - return (Criteria) this; - } - - public Criteria andLocationIdIsNull() { - addCriterion("location_id is null"); - return (Criteria) this; - } - - public Criteria andLocationIdIsNotNull() { - addCriterion("location_id is not null"); - return (Criteria) this; - } - - public Criteria andLocationIdEqualTo(String value) { - addCriterion("location_id =", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotEqualTo(String value) { - addCriterion("location_id <>", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdGreaterThan(String value) { - addCriterion("location_id >", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdGreaterThanOrEqualTo(String value) { - addCriterion("location_id >=", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdLessThan(String value) { - addCriterion("location_id <", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdLessThanOrEqualTo(String value) { - addCriterion("location_id <=", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdLike(String value) { - addCriterion("location_id like", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotLike(String value) { - addCriterion("location_id not like", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdIn(List values) { - addCriterion("location_id in", values, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotIn(List values) { - addCriterion("location_id not in", values, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdBetween(String value1, String value2) { - addCriterion("location_id between", value1, value2, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotBetween(String value1, String value2) { - addCriterion("location_id not between", value1, value2, "locationId"); - return (Criteria) this; - } - - public Criteria andTeamIsNull() { - addCriterion("team is null"); - return (Criteria) this; - } - - public Criteria andTeamIsNotNull() { - addCriterion("team is not null"); - return (Criteria) this; - } - - public Criteria andTeamEqualTo(String value) { - addCriterion("team =", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotEqualTo(String value) { - addCriterion("team <>", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamGreaterThan(String value) { - addCriterion("team >", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamGreaterThanOrEqualTo(String value) { - addCriterion("team >=", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamLessThan(String value) { - addCriterion("team <", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamLessThanOrEqualTo(String value) { - addCriterion("team <=", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamLike(String value) { - addCriterion("team like", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotLike(String value) { - addCriterion("team not like", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamIn(List values) { - addCriterion("team in", values, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotIn(List values) { - addCriterion("team not in", values, "team"); - return (Criteria) this; - } - - public Criteria andTeamBetween(String value1, String value2) { - addCriterion("team between", value1, value2, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotBetween(String value1, String value2) { - addCriterion("team not between", value1, value2, "team"); - return (Criteria) this; - } - - public Criteria andTeamIdIsNull() { - addCriterion("team_id is null"); - return (Criteria) this; - } - - public Criteria andTeamIdIsNotNull() { - addCriterion("team_id is not null"); - return (Criteria) this; - } - - public Criteria andTeamIdEqualTo(String value) { - addCriterion("team_id =", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotEqualTo(String value) { - addCriterion("team_id <>", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdGreaterThan(String value) { - addCriterion("team_id >", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdGreaterThanOrEqualTo(String value) { - addCriterion("team_id >=", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdLessThan(String value) { - addCriterion("team_id <", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdLessThanOrEqualTo(String value) { - addCriterion("team_id <=", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdLike(String value) { - addCriterion("team_id like", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotLike(String value) { - addCriterion("team_id not like", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdIn(List values) { - addCriterion("team_id in", values, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotIn(List values) { - addCriterion("team_id not in", values, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdBetween(String value1, String value2) { - addCriterion("team_id between", value1, value2, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotBetween(String value1, String value2) { - addCriterion("team_id not between", value1, value2, "teamId"); - return (Criteria) this; - } - } - - /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected String orderByClause; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected boolean distinct; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public StockMetadataExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andStockIdIsNull() { + addCriterion("stock_id is null"); + return (Criteria) this; + } + + public Criteria andStockIdIsNotNull() { + addCriterion("stock_id is not null"); + return (Criteria) this; + } + + public Criteria andStockIdEqualTo(Long value) { + addCriterion("stock_id =", value, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdNotEqualTo(Long value) { + addCriterion("stock_id <>", value, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdGreaterThan(Long value) { + addCriterion("stock_id >", value, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdGreaterThanOrEqualTo(Long value) { + addCriterion("stock_id >=", value, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdLessThan(Long value) { + addCriterion("stock_id <", value, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdLessThanOrEqualTo(Long value) { + addCriterion("stock_id <=", value, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdIn(List values) { + addCriterion("stock_id in", values, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdNotIn(List values) { + addCriterion("stock_id not in", values, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdBetween(Long value1, Long value2) { + addCriterion("stock_id between", value1, value2, "stockId"); + return (Criteria) this; + } + + public Criteria andStockIdNotBetween(Long value1, Long value2) { + addCriterion("stock_id not between", value1, value2, "stockId"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNull() { + addCriterion("server_version is null"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNotNull() { + addCriterion("server_version is not null"); + return (Criteria) this; + } + + public Criteria andServerVersionEqualTo(Date value) { + addCriterion("server_version =", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotEqualTo(Date value) { + addCriterion("server_version <>", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThan(Date value) { + addCriterion("server_version >", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThanOrEqualTo(Date value) { + addCriterion("server_version >=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThan(Date value) { + addCriterion("server_version <", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThanOrEqualTo(Date value) { + addCriterion("server_version <=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionIn(List values) { + addCriterion("server_version in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotIn(List values) { + addCriterion("server_version not in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionBetween(Date value1, Date value2) { + addCriterion("server_version between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotBetween(Date value1, Date value2) { + addCriterion("server_version not between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNull() { + addCriterion("provider_id is null"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNotNull() { + addCriterion("provider_id is not null"); + return (Criteria) this; + } + + public Criteria andProviderIdEqualTo(String value) { + addCriterion("provider_id =", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotEqualTo(String value) { + addCriterion("provider_id <>", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThan(String value) { + addCriterion("provider_id >", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThanOrEqualTo(String value) { + addCriterion("provider_id >=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThan(String value) { + addCriterion("provider_id <", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThanOrEqualTo(String value) { + addCriterion("provider_id <=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLike(String value) { + addCriterion("provider_id like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotLike(String value) { + addCriterion("provider_id not like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdIn(List values) { + addCriterion("provider_id in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotIn(List values) { + addCriterion("provider_id not in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdBetween(String value1, String value2) { + addCriterion("provider_id between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotBetween(String value1, String value2) { + addCriterion("provider_id not between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNull() { + addCriterion("location_id is null"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNotNull() { + addCriterion("location_id is not null"); + return (Criteria) this; + } + + public Criteria andLocationIdEqualTo(String value) { + addCriterion("location_id =", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotEqualTo(String value) { + addCriterion("location_id <>", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThan(String value) { + addCriterion("location_id >", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThanOrEqualTo(String value) { + addCriterion("location_id >=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThan(String value) { + addCriterion("location_id <", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThanOrEqualTo(String value) { + addCriterion("location_id <=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLike(String value) { + addCriterion("location_id like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotLike(String value) { + addCriterion("location_id not like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdIn(List values) { + addCriterion("location_id in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotIn(List values) { + addCriterion("location_id not in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdBetween(String value1, String value2) { + addCriterion("location_id between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotBetween(String value1, String value2) { + addCriterion("location_id not between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andTeamIsNull() { + addCriterion("team is null"); + return (Criteria) this; + } + + public Criteria andTeamIsNotNull() { + addCriterion("team is not null"); + return (Criteria) this; + } + + public Criteria andTeamEqualTo(String value) { + addCriterion("team =", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotEqualTo(String value) { + addCriterion("team <>", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThan(String value) { + addCriterion("team >", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThanOrEqualTo(String value) { + addCriterion("team >=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThan(String value) { + addCriterion("team <", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThanOrEqualTo(String value) { + addCriterion("team <=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLike(String value) { + addCriterion("team like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotLike(String value) { + addCriterion("team not like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamIn(List values) { + addCriterion("team in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotIn(List values) { + addCriterion("team not in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamBetween(String value1, String value2) { + addCriterion("team between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotBetween(String value1, String value2) { + addCriterion("team not between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNull() { + addCriterion("team_id is null"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNotNull() { + addCriterion("team_id is not null"); + return (Criteria) this; + } + + public Criteria andTeamIdEqualTo(String value) { + addCriterion("team_id =", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotEqualTo(String value) { + addCriterion("team_id <>", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThan(String value) { + addCriterion("team_id >", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThanOrEqualTo(String value) { + addCriterion("team_id >=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThan(String value) { + addCriterion("team_id <", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThanOrEqualTo(String value) { + addCriterion("team_id <=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLike(String value) { + addCriterion("team_id like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotLike(String value) { + addCriterion("team_id not like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdIn(List values) { + addCriterion("team_id in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotIn(List values) { + addCriterion("team_id not in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdBetween(String value1, String value2) { + addCriterion("team_id between", value1, value2, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotBetween(String value1, String value2) { + addCriterion("team_id not between", value1, value2, "teamId"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } + + /** * This class was generated by MyBatis Generator. * This class corresponds to the database table core.stock_metadata * @@ -668,96 +719,4 @@ protected Criteria() { super(); } } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java new file mode 100644 index 0000000000..68c5e46218 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java @@ -0,0 +1,96 @@ +package org.opensrp.repository.postgres.mapper; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.Action; +import org.opensrp.domain.postgres.ActionExample; + +public interface ActionMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + long countByExample(ActionExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByExample(ActionExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insert(Action record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insertSelective(Action record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + List selectByExample(ActionExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + Action selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Action record, @Param("example") ActionExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExample(@Param("record") Action record, @Param("example") ActionExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKeySelective(Action record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKey(Action record); +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java new file mode 100644 index 0000000000..dad88923d7 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java @@ -0,0 +1,96 @@ +package org.opensrp.repository.postgres.mapper; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.ActionMetadata; +import org.opensrp.domain.postgres.ActionMetadataExample; + +public interface ActionMetadataMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + long countByExample(ActionMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByExample(ActionMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insert(ActionMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insertSelective(ActionMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + List selectByExample(ActionMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + ActionMetadata selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExampleSelective(@Param("record") ActionMetadata record, @Param("example") ActionMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExample(@Param("record") ActionMetadata record, @Param("example") ActionMetadataExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKeySelective(ActionMetadata record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKey(ActionMetadata record); +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java index 588d541c20..d55379fcec 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java @@ -10,7 +10,7 @@ public interface AlertMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ long countByExample(AlertExample example); @@ -18,7 +18,7 @@ public interface AlertMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ int deleteByExample(AlertExample example); @@ -26,7 +26,7 @@ public interface AlertMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ int deleteByPrimaryKey(Long id); @@ -34,7 +34,7 @@ public interface AlertMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ int insert(Alert record); @@ -42,7 +42,7 @@ public interface AlertMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ int insertSelective(Alert record); @@ -50,7 +50,7 @@ public interface AlertMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ List selectByExample(AlertExample example); @@ -58,7 +58,7 @@ public interface AlertMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ Alert selectByPrimaryKey(Long id); @@ -66,7 +66,7 @@ public interface AlertMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ int updateByExampleSelective(@Param("record") Alert record, @Param("example") AlertExample example); @@ -74,7 +74,7 @@ public interface AlertMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ int updateByExample(@Param("record") Alert record, @Param("example") AlertExample example); @@ -82,7 +82,7 @@ public interface AlertMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ int updateByPrimaryKeySelective(Alert record); @@ -90,7 +90,7 @@ public interface AlertMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ int updateByPrimaryKey(Alert record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java index b3e3e5aa75..266753e084 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java @@ -10,7 +10,7 @@ public interface AlertMetadataMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ long countByExample(AlertMetadataExample example); @@ -18,7 +18,7 @@ public interface AlertMetadataMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ int deleteByExample(AlertMetadataExample example); @@ -26,7 +26,7 @@ public interface AlertMetadataMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ int deleteByPrimaryKey(Long id); @@ -34,7 +34,7 @@ public interface AlertMetadataMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ int insert(AlertMetadata record); @@ -42,7 +42,7 @@ public interface AlertMetadataMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ int insertSelective(AlertMetadata record); @@ -50,7 +50,7 @@ public interface AlertMetadataMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ List selectByExample(AlertMetadataExample example); @@ -58,7 +58,7 @@ public interface AlertMetadataMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ AlertMetadata selectByPrimaryKey(Long id); @@ -66,7 +66,7 @@ public interface AlertMetadataMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ int updateByExampleSelective(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); @@ -74,7 +74,7 @@ public interface AlertMetadataMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ int updateByExample(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); @@ -82,7 +82,7 @@ public interface AlertMetadataMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ int updateByPrimaryKeySelective(AlertMetadata record); @@ -90,7 +90,7 @@ public interface AlertMetadataMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table core.alert_metadata * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 */ int updateByPrimaryKey(AlertMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java index a66501becd..8dea8ccc8f 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java @@ -6,91 +6,70 @@ import org.opensrp.domain.postgres.ClientExample; public interface ClientMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - long countByExample(ClientExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int deleteByExample(ClientExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + long countByExample(ClientExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByExample(ClientExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int insert(Client record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int insertSelective(Client record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insert(Client record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - List selectByExample(ClientExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insertSelective(Client record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - Client selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + List selectByExample(ClientExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Client record, @Param("example") ClientExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + Client selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByExample(@Param("record") Client record, @Param("example") ClientExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Client record, @Param("example") ClientExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByPrimaryKeySelective(Client record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExample(@Param("record") Client record, @Param("example") ClientExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByPrimaryKey(Client record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKeySelective(Client record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKey(Client record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java index 7414915e32..f44baa61d9 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java @@ -6,91 +6,71 @@ import org.opensrp.domain.postgres.ClientMetadataExample; public interface ClientMetadataMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - long countByExample(ClientMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int deleteByExample(ClientMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + long countByExample(ClientMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByExample(ClientMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int insert(ClientMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int insertSelective(ClientMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insert(ClientMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - List selectByExample(ClientMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insertSelective(ClientMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - ClientMetadata selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + List selectByExample(ClientMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByExampleSelective(@Param("record") ClientMetadata record, @Param("example") ClientMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + ClientMetadata selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByExample(@Param("record") ClientMetadata record, @Param("example") ClientMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExampleSelective(@Param("record") ClientMetadata record, + @Param("example") ClientMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByPrimaryKeySelective(ClientMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExample(@Param("record") ClientMetadata record, @Param("example") ClientMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByPrimaryKey(ClientMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKeySelective(ClientMetadata record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKey(ClientMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java index 0c7c3e7538..b342a14aeb 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java @@ -6,91 +6,70 @@ import org.opensrp.domain.postgres.EventExample; public interface EventMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - long countByExample(EventExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int deleteByExample(EventExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + long countByExample(EventExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByExample(EventExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int insert(Event record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int insertSelective(Event record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insert(Event record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - List selectByExample(EventExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insertSelective(Event record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - Event selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + List selectByExample(EventExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Event record, @Param("example") EventExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + Event selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByExample(@Param("record") Event record, @Param("example") EventExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Event record, @Param("example") EventExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByPrimaryKeySelective(Event record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExample(@Param("record") Event record, @Param("example") EventExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByPrimaryKey(Event record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKeySelective(Event record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKey(Event record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java index dcc4cf80ff..db7c7ea425 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java @@ -6,91 +6,70 @@ import org.opensrp.domain.postgres.EventMetadataExample; public interface EventMetadataMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - long countByExample(EventMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int deleteByExample(EventMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + long countByExample(EventMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByExample(EventMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int insert(EventMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int insertSelective(EventMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insert(EventMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - List selectByExample(EventMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insertSelective(EventMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - EventMetadata selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + List selectByExample(EventMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByExampleSelective(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + EventMetadata selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByExample(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExampleSelective(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByPrimaryKeySelective(EventMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExample(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByPrimaryKey(EventMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKeySelective(EventMetadata record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKey(EventMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java index 2d9d9050a7..ede2292ccf 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java @@ -6,91 +6,70 @@ import org.opensrp.domain.postgres.ReportExample; public interface ReportMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - long countByExample(ReportExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int deleteByExample(ReportExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + long countByExample(ReportExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByExample(ReportExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int insert(Report record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int insertSelective(Report record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insert(Report record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - List selectByExample(ReportExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insertSelective(Report record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - Report selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + List selectByExample(ReportExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Report record, @Param("example") ReportExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + Report selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByExample(@Param("record") Report record, @Param("example") ReportExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Report record, @Param("example") ReportExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByPrimaryKeySelective(Report record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExample(@Param("record") Report record, @Param("example") ReportExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByPrimaryKey(Report record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKeySelective(Report record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKey(Report record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java index e5cd6dde90..7bf54aa393 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java @@ -6,91 +6,71 @@ import org.opensrp.domain.postgres.ReportMetadataExample; public interface ReportMetadataMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - long countByExample(ReportMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int deleteByExample(ReportMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + long countByExample(ReportMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByExample(ReportMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int insert(ReportMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int insertSelective(ReportMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insert(ReportMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - List selectByExample(ReportMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insertSelective(ReportMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - ReportMetadata selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + List selectByExample(ReportMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByExampleSelective(@Param("record") ReportMetadata record, @Param("example") ReportMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + ReportMetadata selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByExample(@Param("record") ReportMetadata record, @Param("example") ReportMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExampleSelective(@Param("record") ReportMetadata record, + @Param("example") ReportMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByPrimaryKeySelective(ReportMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExample(@Param("record") ReportMetadata record, @Param("example") ReportMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByPrimaryKey(ReportMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKeySelective(ReportMetadata record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKey(ReportMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java index 582b7490b7..ccfdb7ea30 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java @@ -6,91 +6,70 @@ import org.opensrp.domain.postgres.StockExample; public interface StockMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - long countByExample(StockExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int deleteByExample(StockExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + long countByExample(StockExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByExample(StockExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int insert(Stock record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int insertSelective(Stock record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insert(Stock record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - List selectByExample(StockExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insertSelective(Stock record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - Stock selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + List selectByExample(StockExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Stock record, @Param("example") StockExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + Stock selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByExample(@Param("record") Stock record, @Param("example") StockExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Stock record, @Param("example") StockExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByPrimaryKeySelective(Stock record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExample(@Param("record") Stock record, @Param("example") StockExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByPrimaryKey(Stock record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKeySelective(Stock record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKey(Stock record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java index c6545f5ebb..c34f8a7fd4 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java @@ -6,91 +6,70 @@ import org.opensrp.domain.postgres.StockMetadataExample; public interface StockMetadataMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - long countByExample(StockMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int deleteByExample(StockMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + long countByExample(StockMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByExample(StockMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int insert(StockMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int insertSelective(StockMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insert(StockMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - List selectByExample(StockMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int insertSelective(StockMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - StockMetadata selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + List selectByExample(StockMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByExampleSelective(@Param("record") StockMetadata record, @Param("example") StockMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + StockMetadata selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByExample(@Param("record") StockMetadata record, @Param("example") StockMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExampleSelective(@Param("record") StockMetadata record, @Param("example") StockMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByPrimaryKeySelective(StockMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByExample(@Param("record") StockMetadata record, @Param("example") StockMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Wed Mar 07 18:26:22 EAT 2018 - */ - int updateByPrimaryKey(StockMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKeySelective(StockMetadata record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + */ + int updateByPrimaryKey(StockMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMapper.xml new file mode 100644 index 0000000000..aaf2bc7bdd --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMapper.xml @@ -0,0 +1,239 @@ + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, json + + + + + + delete from core.action + where id = #{id,jdbcType=BIGINT} + + + + delete from core.action + + + + + + + insert into core.action (id, json) + values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) + + + + insert into core.action + + + id, + + + json, + + + + + #{id,jdbcType=BIGINT}, + + + #{json,jdbcType=OTHER}, + + + + + + + update core.action + + + id = #{record.id,jdbcType=BIGINT}, + + + json = #{record.json,jdbcType=OTHER}, + + + + + + + + + update core.action + set id = #{record.id,jdbcType=BIGINT}, + json = #{record.json,jdbcType=OTHER} + + + + + + + update core.action + + + json = #{json,jdbcType=OTHER}, + + + where id = #{id,jdbcType=BIGINT} + + + + update core.action + set json = #{json,jdbcType=OTHER} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml new file mode 100644 index 0000000000..e62dea6d3e --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml @@ -0,0 +1,333 @@ + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, action_id, base_entity_id, server_version, provider_id, location_id, team, team_id + + + + + + delete from core.action_metadata + where id = #{id,jdbcType=BIGINT} + + + + delete from core.action_metadata + + + + + + + insert into core.action_metadata (id, action_id, base_entity_id, + server_version, provider_id, location_id, + team, team_id) + values (#{id,jdbcType=BIGINT}, #{actionId,jdbcType=BIGINT}, #{baseEntityId,jdbcType=VARCHAR}, + #{serverVersion,jdbcType=TIMESTAMP}, #{providerId,jdbcType=VARCHAR}, #{locationId,jdbcType=VARCHAR}, + #{team,jdbcType=VARCHAR}, #{teamId,jdbcType=VARCHAR}) + + + + insert into core.action_metadata + + + id, + + + action_id, + + + base_entity_id, + + + server_version, + + + provider_id, + + + location_id, + + + team, + + + team_id, + + + + + #{id,jdbcType=BIGINT}, + + + #{actionId,jdbcType=BIGINT}, + + + #{baseEntityId,jdbcType=VARCHAR}, + + + #{serverVersion,jdbcType=TIMESTAMP}, + + + #{providerId,jdbcType=VARCHAR}, + + + #{locationId,jdbcType=VARCHAR}, + + + #{team,jdbcType=VARCHAR}, + + + #{teamId,jdbcType=VARCHAR}, + + + + + + + update core.action_metadata + + + id = #{record.id,jdbcType=BIGINT}, + + + action_id = #{record.actionId,jdbcType=BIGINT}, + + + base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, + + + server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + + + provider_id = #{record.providerId,jdbcType=VARCHAR}, + + + location_id = #{record.locationId,jdbcType=VARCHAR}, + + + team = #{record.team,jdbcType=VARCHAR}, + + + team_id = #{record.teamId,jdbcType=VARCHAR}, + + + + + + + + + update core.action_metadata + set id = #{record.id,jdbcType=BIGINT}, + action_id = #{record.actionId,jdbcType=BIGINT}, + base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, + server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + provider_id = #{record.providerId,jdbcType=VARCHAR}, + location_id = #{record.locationId,jdbcType=VARCHAR}, + team = #{record.team,jdbcType=VARCHAR}, + team_id = #{record.teamId,jdbcType=VARCHAR} + + + + + + + update core.action_metadata + + + action_id = #{actionId,jdbcType=BIGINT}, + + + base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, + + + server_version = #{serverVersion,jdbcType=TIMESTAMP}, + + + provider_id = #{providerId,jdbcType=VARCHAR}, + + + location_id = #{locationId,jdbcType=VARCHAR}, + + + team = #{team,jdbcType=VARCHAR}, + + + team_id = #{teamId,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + + update core.action_metadata + set action_id = #{actionId,jdbcType=BIGINT}, + base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, + server_version = #{serverVersion,jdbcType=TIMESTAMP}, + provider_id = #{providerId,jdbcType=VARCHAR}, + location_id = #{locationId,jdbcType=VARCHAR}, + team = #{team,jdbcType=VARCHAR}, + team_id = #{teamId,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml index c510d8d4a0..3e9fd36a16 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.alert where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.alert @@ -140,7 +140,7 @@ insert into core.alert (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.alert @@ -173,7 +173,7 @@ select count(*) from core.alert @@ -184,7 +184,7 @@ update core.alert @@ -203,7 +203,7 @@ update core.alert set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.alert @@ -230,7 +230,7 @@ update core.alert set json = #{json,jdbcType=OTHER} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml index eaedd73443..65c1fb76e6 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -15,12 +15,14 @@ + + @@ -54,7 +56,7 @@ @@ -88,15 +90,16 @@ - id, alert_id, base_entity_id, server_version, provider_id, location_id, team, team_id + id, alert_id, base_entity_id, server_version, provider_id, location_id, team, team_id, + is_active, trigger_name select count(*) from core.alert_metadata @@ -230,7 +247,7 @@ update core.alert_metadata @@ -258,6 +275,12 @@ team_id = #{record.teamId,jdbcType=VARCHAR}, + + is_active = #{record.isActive,jdbcType=BIT}, + + + trigger_name = #{record.triggerName,jdbcType=VARCHAR}, + @@ -267,7 +290,7 @@ update core.alert_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -277,7 +300,9 @@ provider_id = #{record.providerId,jdbcType=VARCHAR}, location_id = #{record.locationId,jdbcType=VARCHAR}, team = #{record.team,jdbcType=VARCHAR}, - team_id = #{record.teamId,jdbcType=VARCHAR} + team_id = #{record.teamId,jdbcType=VARCHAR}, + is_active = #{record.isActive,jdbcType=BIT}, + trigger_name = #{record.triggerName,jdbcType=VARCHAR} @@ -286,7 +311,7 @@ update core.alert_metadata @@ -311,6 +336,12 @@ team_id = #{teamId,jdbcType=VARCHAR}, + + is_active = #{isActive,jdbcType=BIT}, + + + trigger_name = #{triggerName,jdbcType=VARCHAR}, + where id = #{id,jdbcType=BIGINT} @@ -318,7 +349,7 @@ update core.alert_metadata set alert_id = #{alertId,jdbcType=BIGINT}, @@ -327,7 +358,9 @@ provider_id = #{providerId,jdbcType=VARCHAR}, location_id = #{locationId,jdbcType=VARCHAR}, team = #{team,jdbcType=VARCHAR}, - team_id = #{teamId,jdbcType=VARCHAR} + team_id = #{teamId,jdbcType=VARCHAR}, + is_active = #{isActive,jdbcType=BIT}, + trigger_name = #{triggerName,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml index 69f0ab7e98..f41be4c47a 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.client where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.client @@ -140,7 +140,7 @@ insert into core.client (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.client @@ -173,7 +173,7 @@ select count(*) from core.client @@ -184,7 +184,7 @@ update core.client @@ -203,7 +203,7 @@ update core.client set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.client @@ -230,7 +230,7 @@ update core.client set json = #{json,jdbcType=OTHER} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml index 5438634306..f8326be879 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -21,7 +21,7 @@ @@ -55,7 +55,7 @@ @@ -89,7 +89,7 @@ id, client_id, base_entity_id, relational_id, openmrs_uuid, unique_id, first_name, last_name, birth_date @@ -98,7 +98,7 @@ select @@ -117,7 +117,7 @@ select @@ -128,7 +128,7 @@ delete from core.client_metadata where id = #{id,jdbcType=BIGINT} @@ -137,7 +137,7 @@ delete from core.client_metadata @@ -148,7 +148,7 @@ insert into core.client_metadata (id, client_id, base_entity_id, relational_id, openmrs_uuid, unique_id, @@ -163,7 +163,7 @@ insert into core.client_metadata @@ -229,7 +229,7 @@ select count(*) from core.client_metadata @@ -240,7 +240,7 @@ update core.client_metadata @@ -280,7 +280,7 @@ update core.client_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -300,7 +300,7 @@ update core.client_metadata @@ -335,7 +335,7 @@ update core.client_metadata set client_id = #{clientId,jdbcType=BIGINT}, diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml index 4e86eba512..23ac8aa681 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.event where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.event @@ -140,7 +140,7 @@ insert into core.event (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.event @@ -173,7 +173,7 @@ select count(*) from core.event @@ -184,7 +184,7 @@ update core.event @@ -203,7 +203,7 @@ update core.event set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.event @@ -230,7 +230,7 @@ update core.event set json = #{json,jdbcType=OTHER} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml index b981db4fdc..6ff9ec423e 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -24,7 +24,7 @@ @@ -58,7 +58,7 @@ @@ -92,7 +92,7 @@ id, event_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, event_type, event_date, provider_id, location_id, team, team_id @@ -101,7 +101,7 @@ select @@ -120,7 +120,7 @@ select @@ -131,7 +131,7 @@ delete from core.event_metadata where id = #{id,jdbcType=BIGINT} @@ -140,7 +140,7 @@ delete from core.event_metadata @@ -151,7 +151,7 @@ insert into core.event_metadata (id, event_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, @@ -168,7 +168,7 @@ insert into core.event_metadata @@ -252,7 +252,7 @@ select count(*) from core.event_metadata @@ -263,7 +263,7 @@ update core.event_metadata @@ -312,7 +312,7 @@ update core.event_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -335,7 +335,7 @@ update core.event_metadata @@ -379,7 +379,7 @@ update core.event_metadata set event_id = #{eventId,jdbcType=BIGINT}, diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml index 45af6bf2ef..12d525f20e 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.report where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.report @@ -140,7 +140,7 @@ insert into core.report (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.report @@ -173,7 +173,7 @@ select count(*) from core.report @@ -184,7 +184,7 @@ update core.report @@ -203,7 +203,7 @@ update core.report set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.report @@ -230,7 +230,7 @@ update core.report set json = #{json,jdbcType=OTHER} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml index 23795a824a..191e4ee423 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -21,7 +21,7 @@ @@ -55,7 +55,7 @@ @@ -89,7 +89,7 @@ id, report_id, base_entity_id, server_version, report_type, provider_id, location_id, team, team_id @@ -98,7 +98,7 @@ select @@ -117,7 +117,7 @@ select @@ -128,7 +128,7 @@ delete from core.report_metadata where id = #{id,jdbcType=BIGINT} @@ -137,7 +137,7 @@ delete from core.report_metadata @@ -148,7 +148,7 @@ insert into core.report_metadata (id, report_id, base_entity_id, server_version, report_type, provider_id, @@ -163,7 +163,7 @@ insert into core.report_metadata @@ -229,7 +229,7 @@ select count(*) from core.report_metadata @@ -240,7 +240,7 @@ update core.report_metadata @@ -280,7 +280,7 @@ update core.report_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -300,7 +300,7 @@ update core.report_metadata @@ -335,7 +335,7 @@ update core.report_metadata set report_id = #{reportId,jdbcType=BIGINT}, diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMapper.xml index f0c71ed01f..f0795284a4 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.stock where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.stock @@ -140,7 +140,7 @@ insert into core.stock (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.stock @@ -173,7 +173,7 @@ select count(*) from core.stock @@ -184,7 +184,7 @@ update core.stock @@ -203,7 +203,7 @@ update core.stock set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.stock @@ -230,7 +230,7 @@ update core.stock set json = #{json,jdbcType=OTHER} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml index 901a6aa075..de0d738f07 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -19,7 +19,7 @@ @@ -53,7 +53,7 @@ @@ -87,7 +87,7 @@ id, stock_id, server_version, provider_id, location_id, team, team_id @@ -95,7 +95,7 @@ select @@ -114,7 +114,7 @@ select @@ -125,7 +125,7 @@ delete from core.stock_metadata where id = #{id,jdbcType=BIGINT} @@ -134,7 +134,7 @@ delete from core.stock_metadata @@ -145,7 +145,7 @@ insert into core.stock_metadata (id, stock_id, server_version, provider_id, location_id, team, @@ -158,7 +158,7 @@ insert into core.stock_metadata @@ -212,7 +212,7 @@ select count(*) from core.stock_metadata @@ -223,7 +223,7 @@ update core.stock_metadata @@ -257,7 +257,7 @@ update core.stock_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -275,7 +275,7 @@ update core.stock_metadata @@ -304,7 +304,7 @@ update core.stock_metadata set stock_id = #{stockId,jdbcType=BIGINT}, From a4e533e400724e03673c7ef7b8e54846e5e3c786 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 19 Apr 2018 18:14:12 +0300 Subject: [PATCH 014/133] Restore the Removed entities in path branch --- .../org/opensrp/api/domain/EventTest.java | 5 +-- .../scheduler/service/ActionServiceTest.java | 33 ++++++++----------- .../DrishtiAuthenticationProviderTest.java | 25 +------------- 3 files changed, 17 insertions(+), 46 deletions(-) diff --git a/opensrp-api/src/test/java/org/opensrp/api/domain/EventTest.java b/opensrp-api/src/test/java/org/opensrp/api/domain/EventTest.java index 572045a0f9..dbcfb0726f 100644 --- a/opensrp-api/src/test/java/org/opensrp/api/domain/EventTest.java +++ b/opensrp-api/src/test/java/org/opensrp/api/domain/EventTest.java @@ -33,8 +33,9 @@ public void shouldTestEvent(){ firstEvent.withBaseEntityId("baseEntityId"); firstEvent.setEntityType("entityType"); Assert.assertEquals(firstEvent.getEntityType(), "entityType"); - firstEvent.setEventDate(new DateTime()); - Assert.assertEquals(firstEvent.getEventDate(), new DateTime()); + DateTime now =new DateTime(); + firstEvent.setEventDate(now); + Assert.assertEquals(firstEvent.getEventDate(),now); firstEvent.setEventType("eventType"); Assert.assertEquals(firstEvent.getEventType(),"eventType"); firstEvent.setProviderId("providerId"); diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/service/ActionServiceTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/service/ActionServiceTest.java index 2fe75ee304..4e6312e1b1 100644 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/service/ActionServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/scheduler/service/ActionServiceTest.java @@ -1,11 +1,20 @@ package org.opensrp.scheduler.service; -import com.google.gson.Gson; +import static java.util.Arrays.asList; +import static junit.framework.Assert.assertEquals; +import static org.mockito.Mockito.verify; +import static org.mockito.MockitoAnnotations.initMocks; +import static org.opensrp.dto.AlertStatus.normal; +import static org.opensrp.scheduler.service.ActionService.ALL_PROVIDERS; +import static org.powermock.api.mockito.PowerMockito.mock; +import static org.powermock.api.mockito.PowerMockito.when; + +import java.util.Arrays; +import java.util.List; + import org.joda.time.DateTime; import org.joda.time.LocalDate; -import org.joda.time.format.DateTimeFormat; import org.junit.Before; -import org.junit.Ignore; import org.junit.Test; import org.junit.runner.RunWith; import org.mockito.Mock; @@ -15,26 +24,13 @@ import org.opensrp.dto.MonthSummaryDatum; import org.opensrp.scheduler.Action; import org.opensrp.scheduler.Alert; -import org.opensrp.scheduler.Alert.AlertType; -import org.opensrp.scheduler.Alert.TriggerType; import org.opensrp.scheduler.repository.AllActions; import org.opensrp.scheduler.repository.AllAlerts; -import org.opensrp.service.BaseEntityService; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; -import java.util.Arrays; -import java.util.List; - -import static java.util.Arrays.asList; -import static junit.framework.Assert.assertEquals; -import static org.mockito.Mockito.verify; -import static org.mockito.MockitoAnnotations.initMocks; -import static org.opensrp.dto.AlertStatus.normal; -import static org.opensrp.scheduler.service.ActionService.ALL_PROVIDERS; -import static org.powermock.api.mockito.PowerMockito.mock; -import static org.powermock.api.mockito.PowerMockito.when; +import com.google.gson.Gson; @RunWith(PowerMockRunner.class) @@ -50,9 +46,6 @@ public class ActionServiceTest { @Mock private AllAlerts allAlerts; - - @Mock - private BaseEntityService baseEntityService; private ActionService service; diff --git a/opensrp-web/src/test/java/org/opensrp/web/security/DrishtiAuthenticationProviderTest.java b/opensrp-web/src/test/java/org/opensrp/web/security/DrishtiAuthenticationProviderTest.java index 37592b21a3..d7a05d450e 100644 --- a/opensrp-web/src/test/java/org/opensrp/web/security/DrishtiAuthenticationProviderTest.java +++ b/opensrp-web/src/test/java/org/opensrp/web/security/DrishtiAuthenticationProviderTest.java @@ -1,40 +1,17 @@ package org.opensrp.web.security; -import com.google.gson.Gson; - -import org.junit.Before; -import org.junit.Ignore; import org.junit.Rule; -import org.junit.Test; import org.junit.rules.ExpectedException; import org.mockito.Mock; -import org.springframework.security.authentication.BadCredentialsException; -import org.springframework.security.authentication.UsernamePasswordAuthenticationToken; import org.springframework.security.authentication.encoding.ShaPasswordEncoder; -import org.springframework.security.core.Authentication; -import org.springframework.security.core.authority.SimpleGrantedAuthority; - -import java.util.UUID; - -import static java.util.Arrays.asList; -import static java.util.UUID.randomUUID; -import static org.junit.Assert.assertEquals; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import static org.mockito.MockitoAnnotations.initMocks; - -import org.opensrp.repository.couch.AllUsers; -import org.opensrp.web.security.DrishtiAuthenticationProvider; public class DrishtiAuthenticationProviderTest { - @Mock - private AllUsers allOpenSRPUsers; @Mock private ShaPasswordEncoder passwordEncoder; @Rule public ExpectedException exception = ExpectedException.none(); - private DrishtiAuthenticationProvider authenticationProvider; + //private DrishtiAuthenticationProvider authenticationProvider; /*@Before public void setUp() throws Exception { From 0a34f34b99683f7032b3e62f80bdbe678b6b7c2a Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 9 Mar 2018 17:12:25 +0300 Subject: [PATCH 015/133] Merge pull request #409 from OpenSRP/issue406 added tablespace for each schema From 23d535ec872ebfc82d2d02955127b1ca3d9577c7 Mon Sep 17 00:00:00 2001 From: Ephraim Muhia Date: Fri, 9 Mar 2018 18:10:52 +0300 Subject: [PATCH 016/133] Covert non client document to relational model Signed-off-by: Ephraim Muhia --- .../migrations/generator/generatorConfig.xml | 30 +- .../20180307131329_create_event_table.sql | 2 +- ...0307131558_create_event_metadata_table.sql | 4 +- .../20180307145148_create_action_table.sql | 2 +- ...307145358_create_action_metadata_table.sql | 4 +- ...307150448_create_report_metadata_table.sql | 2 +- ...0307151623_create_stock_metadata_table.sql | 2 +- .../20180309113602_create_alert_table.sql | 2 +- ...0309113954_create_alert_metadata_table.sql | 4 +- ...309132839_create_app_state_token_table.sql | 39 + ...0180309135847_create_mutli_media_table.sql | 41 + ...0180309140716_create_error_trace_table.sql | 43 + .../org/opensrp/domain/postgres/Action.java | 102 +- .../domain/postgres/ActionExample.java | 765 ++++--- .../domain/postgres/ActionMetadata.java | 446 ++-- .../postgres/ActionMetadataExample.java | 1585 +++++++------- .../org/opensrp/domain/postgres/Alert.java | 102 +- .../opensrp/domain/postgres/AlertExample.java | 765 ++++--- .../domain/postgres/AlertMetadata.java | 558 ++--- .../domain/postgres/AlertMetadataExample.java | 1845 ++++++++--------- .../domain/postgres/AppStateToken.java | 120 ++ .../domain/postgres/AppStateTokenExample.java | 591 ++++++ .../org/opensrp/domain/postgres/Client.java | 12 +- .../domain/postgres/ClientExample.java | 32 +- .../domain/postgres/ClientMetadata.java | 54 +- .../postgres/ClientMetadataExample.java | 32 +- .../opensrp/domain/postgres/ErrorTrace.java | 335 +++ .../domain/postgres/ErrorTraceExample.java | 1000 +++++++++ .../org/opensrp/domain/postgres/Event.java | 12 +- .../opensrp/domain/postgres/EventExample.java | 32 +- .../domain/postgres/EventMetadata.java | 78 +- .../domain/postgres/EventMetadataExample.java | 52 +- .../opensrp/domain/postgres/MultiMedia.java | 143 ++ .../domain/postgres/MultiMediaExample.java | 671 ++++++ .../org/opensrp/domain/postgres/Report.java | 12 +- .../domain/postgres/ReportExample.java | 32 +- .../domain/postgres/ReportMetadata.java | 60 +- .../postgres/ReportMetadataExample.java | 52 +- .../org/opensrp/domain/postgres/Stock.java | 12 +- .../opensrp/domain/postgres/StockExample.java | 32 +- .../domain/postgres/StockMetadata.java | 48 +- .../domain/postgres/StockMetadataExample.java | 52 +- .../postgres/mapper/ActionMapper.java | 133 +- .../postgres/mapper/ActionMetadataMapper.java | 134 +- .../postgres/mapper/AlertMapper.java | 133 +- .../postgres/mapper/AlertMetadataMapper.java | 133 +- .../postgres/mapper/AppStateTokenMapper.java | 75 + .../postgres/mapper/ClientMapper.java | 22 +- .../postgres/mapper/ClientMetadataMapper.java | 22 +- .../postgres/mapper/ErrorTraceMapper.java | 96 + .../postgres/mapper/EventMapper.java | 22 +- .../postgres/mapper/EventMetadataMapper.java | 22 +- .../postgres/mapper/MultiMediaMapper.java | 75 + .../postgres/mapper/ReportMapper.java | 22 +- .../postgres/mapper/ReportMetadataMapper.java | 22 +- .../postgres/mapper/StockMapper.java | 22 +- .../postgres/mapper/StockMetadataMapper.java | 22 +- .../postgres/mapper/xml/ActionMapper.xml | 30 +- .../mapper/xml/ActionMetadataMapper.xml | 44 +- .../postgres/mapper/xml/AlertMapper.xml | 30 +- .../mapper/xml/AlertMetadataMapper.xml | 44 +- .../mapper/xml/AppStateTokenMapper.xml | 286 +++ .../postgres/mapper/xml/ClientMapper.xml | 30 +- .../mapper/xml/ClientMetadataMapper.xml | 30 +- .../postgres/mapper/xml/ErrorTraceMapper.xml | 366 ++++ .../postgres/mapper/xml/EventMapper.xml | 30 +- .../mapper/xml/EventMetadataMapper.xml | 44 +- .../postgres/mapper/xml/MultiMediaMapper.xml | 303 +++ .../postgres/mapper/xml/ReportMapper.xml | 30 +- .../mapper/xml/ReportMetadataMapper.xml | 44 +- .../postgres/mapper/xml/StockMapper.xml | 30 +- .../mapper/xml/StockMetadataMapper.xml | 44 +- 72 files changed, 7939 insertions(+), 4208 deletions(-) create mode 100644 assets/migrations/scripts/20180309132839_create_app_state_token_table.sql create mode 100644 assets/migrations/scripts/20180309135847_create_mutli_media_table.sql create mode 100644 assets/migrations/scripts/20180309140716_create_error_trace_table.sql create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateToken.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateTokenExample.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMedia.java create mode 100644 opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMediaExample.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AppStateTokenMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AppStateTokenMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ErrorTraceMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/MultiMediaMapper.xml diff --git a/assets/migrations/generator/generatorConfig.xml b/assets/migrations/generator/generatorConfig.xml index c83efb429c..27c301b938 100644 --- a/assets/migrations/generator/generatorConfig.xml +++ b/assets/migrations/generator/generatorConfig.xml @@ -12,17 +12,23 @@ targetProject="opensrp-core" /> -
-
-
-
-
-
-
-
-
-
-
-
+ + diff --git a/assets/migrations/scripts/20180307131329_create_event_table.sql b/assets/migrations/scripts/20180307131329_create_event_table.sql index ae586ebc66..e20a4dcdac 100644 --- a/assets/migrations/scripts/20180307131329_create_event_table.sql +++ b/assets/migrations/scripts/20180307131329_create_event_table.sql @@ -25,7 +25,7 @@ CREATE TABLE core.event ) WITH ( OIDS = FALSE -)TABLESPACE core_space; +) TABLESPACE core_space; -- //@UNDO -- SQL to undo the change goes here. diff --git a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql index b2884ad612..0f2eb49bea 100644 --- a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql +++ b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql @@ -23,7 +23,7 @@ CREATE TABLE core.event_metadata event_id bigint REFERENCES core.event (id), base_entity_id character varying NOT NULL, form_submission_id character varying NOT NULL, - server_version timestamp without time zone, + server_version bigint, openmrs_uuid character varying, event_type character varying, event_date date, @@ -35,7 +35,7 @@ CREATE TABLE core.event_metadata ) WITH ( OIDS = FALSE -)TABLESPACE core_space; +) TABLESPACE core_space; CREATE UNIQUE INDEX event_metadata_relational_id_unique_index ON core.event_metadata (form_submission_id); diff --git a/assets/migrations/scripts/20180307145148_create_action_table.sql b/assets/migrations/scripts/20180307145148_create_action_table.sql index ef69db9774..abb04bdaf7 100644 --- a/assets/migrations/scripts/20180307145148_create_action_table.sql +++ b/assets/migrations/scripts/20180307145148_create_action_table.sql @@ -25,7 +25,7 @@ CREATE TABLE core.action ) WITH ( OIDS = FALSE -)TABLESPACE core_space; +) TABLESPACE core_space; -- //@UNDO -- SQL to undo the change goes here. diff --git a/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql b/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql index 1fe904db62..43947423ce 100644 --- a/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql +++ b/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql @@ -22,7 +22,7 @@ CREATE TABLE core.action_metadata id bigserial NOT NULL, action_id bigint REFERENCES core.action (id), base_entity_id character varying NOT NULL, - server_version timestamp without time zone, + server_version bigint, provider_id character varying, location_id character varying, team character varying, @@ -31,7 +31,7 @@ CREATE TABLE core.action_metadata ) WITH ( OIDS = FALSE -)TABLESPACE core_space; +) TABLESPACE core_space; CREATE INDEX action_metadata_base_entity_id_index ON core.action_metadata (base_entity_id); CREATE INDEX action_metadata_server_version_index ON core.action_metadata (server_version); diff --git a/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql b/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql index 16b90c7d5d..94801e9928 100644 --- a/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql +++ b/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql @@ -22,7 +22,7 @@ CREATE TABLE core.report_metadata id bigserial NOT NULL, report_id bigint REFERENCES core.report (id), base_entity_id character varying NOT NULL, - server_version timestamp without time zone, + server_version bigint, report_type character varying, provider_id character varying, location_id character varying, diff --git a/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql b/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql index 9e66f4001c..7b9c7cca57 100644 --- a/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql +++ b/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql @@ -21,7 +21,7 @@ CREATE TABLE core.stock_metadata ( id bigserial NOT NULL, stock_id bigint REFERENCES core.stock (id), - server_version timestamp without time zone, + server_version bigint, provider_id character varying, location_id character varying, team character varying, diff --git a/assets/migrations/scripts/20180309113602_create_alert_table.sql b/assets/migrations/scripts/20180309113602_create_alert_table.sql index e3b6ec2387..3b566e71f5 100644 --- a/assets/migrations/scripts/20180309113602_create_alert_table.sql +++ b/assets/migrations/scripts/20180309113602_create_alert_table.sql @@ -25,7 +25,7 @@ CREATE TABLE core.alert ) WITH ( OIDS = FALSE -)TABLESPACE core_space; +) TABLESPACE core_space; -- //@UNDO -- SQL to undo the change goes here. diff --git a/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql b/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql index 41959539b9..9c03641946 100644 --- a/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql +++ b/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql @@ -22,7 +22,7 @@ CREATE TABLE core.alert_metadata id bigserial NOT NULL, alert_id bigint REFERENCES core.alert (id), base_entity_id character varying NOT NULL, - server_version timestamp without time zone, + server_version bigint, provider_id character varying, location_id character varying, team character varying, @@ -33,7 +33,7 @@ CREATE TABLE core.alert_metadata ) WITH ( OIDS = FALSE -)TABLESPACE core_space; +) TABLESPACE core_space; CREATE INDEX alert_metadata_base_entity_id_index ON core.alert_metadata (base_entity_id); CREATE INDEX alert_metadata_server_version_index ON core.alert_metadata (server_version); diff --git a/assets/migrations/scripts/20180309132839_create_app_state_token_table.sql b/assets/migrations/scripts/20180309132839_create_app_state_token_table.sql new file mode 100644 index 0000000000..9f6a9936a8 --- /dev/null +++ b/assets/migrations/scripts/20180309132839_create_app_state_token_table.sql @@ -0,0 +1,39 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // create app state token table +-- Migration SQL that makes the change goes here. + +CREATE TABLE core.app_state_token +( + id bigserial NOT NULL, + name character varying NOT NULL, + description character varying, + value character varying, + last_edited_date bigint, + PRIMARY KEY (id) +) +WITH ( + OIDS = FALSE +) TABLESPACE core_space; + +CREATE INDEX app_state_token_name_index ON core.app_state_token (name); + + +-- //@UNDO +-- SQL to undo the change goes here. + +DROP TABLE core.app_state_token; \ No newline at end of file diff --git a/assets/migrations/scripts/20180309135847_create_mutli_media_table.sql b/assets/migrations/scripts/20180309135847_create_mutli_media_table.sql new file mode 100644 index 0000000000..5f491d9a3a --- /dev/null +++ b/assets/migrations/scripts/20180309135847_create_mutli_media_table.sql @@ -0,0 +1,41 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // create mutli_media table +-- Migration SQL that makes the change goes here. + +CREATE TABLE core.multi_media +( + id bigserial NOT NULL, + case_id character varying NOT NULL, + provider_id character varying, + content_type character varying, + file_path character varying, + file_category character varying, + PRIMARY KEY (id) +) +WITH ( + OIDS = FALSE +) TABLESPACE core_space; + +CREATE INDEX multi_media_case_id_index ON core.multi_media (case_id); +CREATE INDEX multi_media_provider_id_index ON core.multi_media (provider_id); + +-- //@UNDO +-- SQL to undo the change goes here. + +DROP TABLE core.multi_media; + diff --git a/assets/migrations/scripts/20180309140716_create_error_trace_table.sql b/assets/migrations/scripts/20180309140716_create_error_trace_table.sql new file mode 100644 index 0000000000..504f62131e --- /dev/null +++ b/assets/migrations/scripts/20180309140716_create_error_trace_table.sql @@ -0,0 +1,43 @@ +-- +-- Copyright 2010-2016 the original author or authors. +-- +-- Licensed under the Apache License, Version 2.0 (the "License"); +-- you may not use this file except in compliance with the License. +-- You may obtain a copy of the License at +-- +-- http://www.apache.org/licenses/LICENSE-2.0 +-- +-- Unless required by applicable law or agreed to in writing, software +-- distributed under the License is distributed on an "AS IS" BASIS, +-- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +-- See the License for the specific language governing permissions and +-- limitations under the License. +-- + +-- // create error trace table +-- Migration SQL that makes the change goes here. + +CREATE TABLE error.error_trace +( + id bigserial NOT NULL, + date_occurred date, + error_type character varying, + occurred_at character varying, + stack_trace character varying, + status character varying, + record_id character varying, + date_closed date, + document_type character varying, + retry_url character varying, + PRIMARY KEY (id) +) +WITH ( + OIDS = FALSE +) TABLESPACE core_space; + +CREATE INDEX error_trace_status_index ON error.error_trace (status); + +-- //@UNDO +-- SQL to undo the change goes here. + +DROP TABLE error.error_trace; \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Action.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Action.java index 29c8d03029..6bd0efe2f8 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Action.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Action.java @@ -1,69 +1,51 @@ package org.opensrp.domain.postgres; public class Action { - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.action.id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private Long id; - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.action.json - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private Object json; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.action.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private Long id; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.action.json + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private Object json; - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.action.id - * - * @return the value of core.action.id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Long getId() { - return id; - } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.action.id + * @return the value of core.action.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Long getId() { + return id; + } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.action.id - * - * @param id the value for core.action.id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setId(Long id) { - this.id = id; - } + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.action.id + * @param id the value for core.action.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.action.json - * - * @return the value of core.action.json - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Object getJson() { - return json; - } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.action.json + * @return the value of core.action.json + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Object getJson() { + return json; + } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.action.json - * - * @param json the value for core.action.json - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setJson(Object json) { - this.json = json; - } + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.action.json + * @param json the value for core.action.json + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setJson(Object json) { + this.json = json; + } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionExample.java index 39a034fdd3..feabeccad4 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionExample.java @@ -5,317 +5,368 @@ public class ActionExample { /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected String orderByClause; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected boolean distinct; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected List oredCriteria; - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public ActionExample() { - oredCriteria = new ArrayList(); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public String getOrderByClause() { - return orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public boolean isDistinct() { - return distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public List getOredCriteria() { - return oredCriteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andJsonIsNull() { - addCriterion("json is null"); - return (Criteria) this; - } - - public Criteria andJsonIsNotNull() { - addCriterion("json is not null"); - return (Criteria) this; - } - - public Criteria andJsonEqualTo(Object value) { - addCriterion("json =", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotEqualTo(Object value) { - addCriterion("json <>", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonGreaterThan(Object value) { - addCriterion("json >", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonGreaterThanOrEqualTo(Object value) { - addCriterion("json >=", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonLessThan(Object value) { - addCriterion("json <", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonLessThanOrEqualTo(Object value) { - addCriterion("json <=", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonIn(List values) { - addCriterion("json in", values, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotIn(List values) { - addCriterion("json not in", values, "json"); - return (Criteria) this; - } - - public Criteria andJsonBetween(Object value1, Object value2) { - addCriterion("json between", value1, value2, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotBetween(Object value1, Object value2) { - addCriterion("json not between", value1, value2, "json"); - return (Criteria) this; - } - } - - /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected String orderByClause; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected boolean distinct; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public ActionExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andJsonIsNull() { + addCriterion("json is null"); + return (Criteria) this; + } + + public Criteria andJsonIsNotNull() { + addCriterion("json is not null"); + return (Criteria) this; + } + + public Criteria andJsonEqualTo(Object value) { + addCriterion("json =", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotEqualTo(Object value) { + addCriterion("json <>", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThan(Object value) { + addCriterion("json >", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThanOrEqualTo(Object value) { + addCriterion("json >=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThan(Object value) { + addCriterion("json <", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThanOrEqualTo(Object value) { + addCriterion("json <=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonIn(List values) { + addCriterion("json in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotIn(List values) { + addCriterion("json not in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonBetween(Object value1, Object value2) { + addCriterion("json between", value1, value2, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotBetween(Object value1, Object value2) { + addCriterion("json not between", value1, value2, "json"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } + + /** * This class was generated by MyBatis Generator. * This class corresponds to the database table core.action * @@ -327,96 +378,4 @@ protected Criteria() { super(); } } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java index 1d7fa8c02e..176bbd9500 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java @@ -3,267 +3,189 @@ import java.util.Date; public class ActionMetadata { - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.action_metadata.id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private Long id; - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.action_metadata.action_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private Long actionId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.action_metadata.base_entity_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private String baseEntityId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.action_metadata.server_version - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private Date serverVersion; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.action_metadata.provider_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private String providerId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.action_metadata.location_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private String locationId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.action_metadata.team - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private String team; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.action_metadata.team_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private String teamId; - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.action_metadata.id - * - * @return the value of core.action_metadata.id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Long getId() { - return id; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.action_metadata.id - * - * @param id the value for core.action_metadata.id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setId(Long id) { - this.id = id; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.action_metadata.action_id - * - * @return the value of core.action_metadata.action_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Long getActionId() { - return actionId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.action_metadata.action_id - * - * @param actionId the value for core.action_metadata.action_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setActionId(Long actionId) { - this.actionId = actionId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.action_metadata.base_entity_id - * - * @return the value of core.action_metadata.base_entity_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public String getBaseEntityId() { - return baseEntityId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.action_metadata.base_entity_id - * - * @param baseEntityId the value for core.action_metadata.base_entity_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setBaseEntityId(String baseEntityId) { - this.baseEntityId = baseEntityId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.action_metadata.server_version - * - * @return the value of core.action_metadata.server_version - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Date getServerVersion() { - return serverVersion; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.action_metadata.server_version - * - * @param serverVersion the value for core.action_metadata.server_version - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setServerVersion(Date serverVersion) { - this.serverVersion = serverVersion; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.action_metadata.provider_id - * - * @return the value of core.action_metadata.provider_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public String getProviderId() { - return providerId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.action_metadata.provider_id - * - * @param providerId the value for core.action_metadata.provider_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setProviderId(String providerId) { - this.providerId = providerId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.action_metadata.location_id - * - * @return the value of core.action_metadata.location_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public String getLocationId() { - return locationId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.action_metadata.location_id - * - * @param locationId the value for core.action_metadata.location_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setLocationId(String locationId) { - this.locationId = locationId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.action_metadata.team - * - * @return the value of core.action_metadata.team - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public String getTeam() { - return team; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.action_metadata.team - * - * @param team the value for core.action_metadata.team - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setTeam(String team) { - this.team = team; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.action_metadata.team_id - * - * @return the value of core.action_metadata.team_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public String getTeamId() { - return teamId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.action_metadata.team_id - * - * @param teamId the value for core.action_metadata.team_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setTeamId(String teamId) { - this.teamId = teamId; - } + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private Long id; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.action_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private Long actionId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.base_entity_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String baseEntityId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.server_version + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private Long serverVersion; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.provider_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String providerId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.location_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String locationId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.team + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String team; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.team_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String teamId; + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.id + * @return the value of core.action_metadata.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.id + * @param id the value for core.action_metadata.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.action_id + * @return the value of core.action_metadata.action_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Long getActionId() { + return actionId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.action_id + * @param actionId the value for core.action_metadata.action_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setActionId(Long actionId) { + this.actionId = actionId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.base_entity_id + * @return the value of core.action_metadata.base_entity_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getBaseEntityId() { + return baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.base_entity_id + * @param baseEntityId the value for core.action_metadata.base_entity_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setBaseEntityId(String baseEntityId) { + this.baseEntityId = baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.server_version + * @return the value of core.action_metadata.server_version + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Long getServerVersion() { + return serverVersion; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.server_version + * @param serverVersion the value for core.action_metadata.server_version + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setServerVersion(Long serverVersion) { + this.serverVersion = serverVersion; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.provider_id + * @return the value of core.action_metadata.provider_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getProviderId() { + return providerId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.provider_id + * @param providerId the value for core.action_metadata.provider_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.location_id + * @return the value of core.action_metadata.location_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getLocationId() { + return locationId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.location_id + * @param locationId the value for core.action_metadata.location_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.team + * @return the value of core.action_metadata.team + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getTeam() { + return team; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.team + * @param team the value for core.action_metadata.team + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setTeam(String team) { + this.team = team; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.team_id + * @return the value of core.action_metadata.team_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getTeamId() { + return teamId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.team_id + * @param teamId the value for core.action_metadata.team_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setTeamId(String teamId) { + this.teamId = teamId; + } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java index afcb045e57..8e13080573 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java @@ -6,727 +6,778 @@ public class ActionMetadataExample { /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected String orderByClause; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected boolean distinct; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected List oredCriteria; - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public ActionMetadataExample() { - oredCriteria = new ArrayList(); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public String getOrderByClause() { - return orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public boolean isDistinct() { - return distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public List getOredCriteria() { - return oredCriteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andActionIdIsNull() { - addCriterion("action_id is null"); - return (Criteria) this; - } - - public Criteria andActionIdIsNotNull() { - addCriterion("action_id is not null"); - return (Criteria) this; - } - - public Criteria andActionIdEqualTo(Long value) { - addCriterion("action_id =", value, "actionId"); - return (Criteria) this; - } - - public Criteria andActionIdNotEqualTo(Long value) { - addCriterion("action_id <>", value, "actionId"); - return (Criteria) this; - } - - public Criteria andActionIdGreaterThan(Long value) { - addCriterion("action_id >", value, "actionId"); - return (Criteria) this; - } - - public Criteria andActionIdGreaterThanOrEqualTo(Long value) { - addCriterion("action_id >=", value, "actionId"); - return (Criteria) this; - } - - public Criteria andActionIdLessThan(Long value) { - addCriterion("action_id <", value, "actionId"); - return (Criteria) this; - } - - public Criteria andActionIdLessThanOrEqualTo(Long value) { - addCriterion("action_id <=", value, "actionId"); - return (Criteria) this; - } - - public Criteria andActionIdIn(List values) { - addCriterion("action_id in", values, "actionId"); - return (Criteria) this; - } - - public Criteria andActionIdNotIn(List values) { - addCriterion("action_id not in", values, "actionId"); - return (Criteria) this; - } - - public Criteria andActionIdBetween(Long value1, Long value2) { - addCriterion("action_id between", value1, value2, "actionId"); - return (Criteria) this; - } - - public Criteria andActionIdNotBetween(Long value1, Long value2) { - addCriterion("action_id not between", value1, value2, "actionId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdIsNull() { - addCriterion("base_entity_id is null"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdIsNotNull() { - addCriterion("base_entity_id is not null"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdEqualTo(String value) { - addCriterion("base_entity_id =", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotEqualTo(String value) { - addCriterion("base_entity_id <>", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdGreaterThan(String value) { - addCriterion("base_entity_id >", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { - addCriterion("base_entity_id >=", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdLessThan(String value) { - addCriterion("base_entity_id <", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { - addCriterion("base_entity_id <=", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdLike(String value) { - addCriterion("base_entity_id like", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotLike(String value) { - addCriterion("base_entity_id not like", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdIn(List values) { - addCriterion("base_entity_id in", values, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotIn(List values) { - addCriterion("base_entity_id not in", values, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdBetween(String value1, String value2) { - addCriterion("base_entity_id between", value1, value2, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotBetween(String value1, String value2) { - addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andServerVersionIsNull() { - addCriterion("server_version is null"); - return (Criteria) this; - } - - public Criteria andServerVersionIsNotNull() { - addCriterion("server_version is not null"); - return (Criteria) this; - } - - public Criteria andServerVersionEqualTo(Date value) { - addCriterion("server_version =", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionNotEqualTo(Date value) { - addCriterion("server_version <>", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionGreaterThan(Date value) { - addCriterion("server_version >", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionGreaterThanOrEqualTo(Date value) { - addCriterion("server_version >=", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionLessThan(Date value) { - addCriterion("server_version <", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionLessThanOrEqualTo(Date value) { - addCriterion("server_version <=", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionIn(List values) { - addCriterion("server_version in", values, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionNotIn(List values) { - addCriterion("server_version not in", values, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionBetween(Date value1, Date value2) { - addCriterion("server_version between", value1, value2, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionNotBetween(Date value1, Date value2) { - addCriterion("server_version not between", value1, value2, "serverVersion"); - return (Criteria) this; - } - - public Criteria andProviderIdIsNull() { - addCriterion("provider_id is null"); - return (Criteria) this; - } - - public Criteria andProviderIdIsNotNull() { - addCriterion("provider_id is not null"); - return (Criteria) this; - } - - public Criteria andProviderIdEqualTo(String value) { - addCriterion("provider_id =", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotEqualTo(String value) { - addCriterion("provider_id <>", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdGreaterThan(String value) { - addCriterion("provider_id >", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdGreaterThanOrEqualTo(String value) { - addCriterion("provider_id >=", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdLessThan(String value) { - addCriterion("provider_id <", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdLessThanOrEqualTo(String value) { - addCriterion("provider_id <=", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdLike(String value) { - addCriterion("provider_id like", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotLike(String value) { - addCriterion("provider_id not like", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdIn(List values) { - addCriterion("provider_id in", values, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotIn(List values) { - addCriterion("provider_id not in", values, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdBetween(String value1, String value2) { - addCriterion("provider_id between", value1, value2, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotBetween(String value1, String value2) { - addCriterion("provider_id not between", value1, value2, "providerId"); - return (Criteria) this; - } - - public Criteria andLocationIdIsNull() { - addCriterion("location_id is null"); - return (Criteria) this; - } - - public Criteria andLocationIdIsNotNull() { - addCriterion("location_id is not null"); - return (Criteria) this; - } - - public Criteria andLocationIdEqualTo(String value) { - addCriterion("location_id =", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotEqualTo(String value) { - addCriterion("location_id <>", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdGreaterThan(String value) { - addCriterion("location_id >", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdGreaterThanOrEqualTo(String value) { - addCriterion("location_id >=", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdLessThan(String value) { - addCriterion("location_id <", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdLessThanOrEqualTo(String value) { - addCriterion("location_id <=", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdLike(String value) { - addCriterion("location_id like", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotLike(String value) { - addCriterion("location_id not like", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdIn(List values) { - addCriterion("location_id in", values, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotIn(List values) { - addCriterion("location_id not in", values, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdBetween(String value1, String value2) { - addCriterion("location_id between", value1, value2, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotBetween(String value1, String value2) { - addCriterion("location_id not between", value1, value2, "locationId"); - return (Criteria) this; - } - - public Criteria andTeamIsNull() { - addCriterion("team is null"); - return (Criteria) this; - } - - public Criteria andTeamIsNotNull() { - addCriterion("team is not null"); - return (Criteria) this; - } - - public Criteria andTeamEqualTo(String value) { - addCriterion("team =", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotEqualTo(String value) { - addCriterion("team <>", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamGreaterThan(String value) { - addCriterion("team >", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamGreaterThanOrEqualTo(String value) { - addCriterion("team >=", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamLessThan(String value) { - addCriterion("team <", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamLessThanOrEqualTo(String value) { - addCriterion("team <=", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamLike(String value) { - addCriterion("team like", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotLike(String value) { - addCriterion("team not like", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamIn(List values) { - addCriterion("team in", values, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotIn(List values) { - addCriterion("team not in", values, "team"); - return (Criteria) this; - } - - public Criteria andTeamBetween(String value1, String value2) { - addCriterion("team between", value1, value2, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotBetween(String value1, String value2) { - addCriterion("team not between", value1, value2, "team"); - return (Criteria) this; - } - - public Criteria andTeamIdIsNull() { - addCriterion("team_id is null"); - return (Criteria) this; - } - - public Criteria andTeamIdIsNotNull() { - addCriterion("team_id is not null"); - return (Criteria) this; - } - - public Criteria andTeamIdEqualTo(String value) { - addCriterion("team_id =", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotEqualTo(String value) { - addCriterion("team_id <>", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdGreaterThan(String value) { - addCriterion("team_id >", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdGreaterThanOrEqualTo(String value) { - addCriterion("team_id >=", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdLessThan(String value) { - addCriterion("team_id <", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdLessThanOrEqualTo(String value) { - addCriterion("team_id <=", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdLike(String value) { - addCriterion("team_id like", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotLike(String value) { - addCriterion("team_id not like", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdIn(List values) { - addCriterion("team_id in", values, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotIn(List values) { - addCriterion("team_id not in", values, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdBetween(String value1, String value2) { - addCriterion("team_id between", value1, value2, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotBetween(String value1, String value2) { - addCriterion("team_id not between", value1, value2, "teamId"); - return (Criteria) this; - } - } - - /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected String orderByClause; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected boolean distinct; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public ActionMetadataExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andActionIdIsNull() { + addCriterion("action_id is null"); + return (Criteria) this; + } + + public Criteria andActionIdIsNotNull() { + addCriterion("action_id is not null"); + return (Criteria) this; + } + + public Criteria andActionIdEqualTo(Long value) { + addCriterion("action_id =", value, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdNotEqualTo(Long value) { + addCriterion("action_id <>", value, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdGreaterThan(Long value) { + addCriterion("action_id >", value, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdGreaterThanOrEqualTo(Long value) { + addCriterion("action_id >=", value, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdLessThan(Long value) { + addCriterion("action_id <", value, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdLessThanOrEqualTo(Long value) { + addCriterion("action_id <=", value, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdIn(List values) { + addCriterion("action_id in", values, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdNotIn(List values) { + addCriterion("action_id not in", values, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdBetween(Long value1, Long value2) { + addCriterion("action_id between", value1, value2, "actionId"); + return (Criteria) this; + } + + public Criteria andActionIdNotBetween(Long value1, Long value2) { + addCriterion("action_id not between", value1, value2, "actionId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNull() { + addCriterion("base_entity_id is null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNotNull() { + addCriterion("base_entity_id is not null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdEqualTo(String value) { + addCriterion("base_entity_id =", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotEqualTo(String value) { + addCriterion("base_entity_id <>", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThan(String value) { + addCriterion("base_entity_id >", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { + addCriterion("base_entity_id >=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThan(String value) { + addCriterion("base_entity_id <", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { + addCriterion("base_entity_id <=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLike(String value) { + addCriterion("base_entity_id like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotLike(String value) { + addCriterion("base_entity_id not like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIn(List values) { + addCriterion("base_entity_id in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotIn(List values) { + addCriterion("base_entity_id not in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdBetween(String value1, String value2) { + addCriterion("base_entity_id between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotBetween(String value1, String value2) { + addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNull() { + addCriterion("server_version is null"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNotNull() { + addCriterion("server_version is not null"); + return (Criteria) this; + } + + public Criteria andServerVersionEqualTo(Long value) { + addCriterion("server_version =", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotEqualTo(Long value) { + addCriterion("server_version <>", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThan(Long value) { + addCriterion("server_version >", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThanOrEqualTo(Long value) { + addCriterion("server_version >=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThan(Long value) { + addCriterion("server_version <", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThanOrEqualTo(Long value) { + addCriterion("server_version <=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionIn(List values) { + addCriterion("server_version in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotIn(List values) { + addCriterion("server_version not in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionBetween(Long value1, Long value2) { + addCriterion("server_version between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotBetween(Long value1, Long value2) { + addCriterion("server_version not between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNull() { + addCriterion("provider_id is null"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNotNull() { + addCriterion("provider_id is not null"); + return (Criteria) this; + } + + public Criteria andProviderIdEqualTo(String value) { + addCriterion("provider_id =", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotEqualTo(String value) { + addCriterion("provider_id <>", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThan(String value) { + addCriterion("provider_id >", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThanOrEqualTo(String value) { + addCriterion("provider_id >=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThan(String value) { + addCriterion("provider_id <", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThanOrEqualTo(String value) { + addCriterion("provider_id <=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLike(String value) { + addCriterion("provider_id like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotLike(String value) { + addCriterion("provider_id not like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdIn(List values) { + addCriterion("provider_id in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotIn(List values) { + addCriterion("provider_id not in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdBetween(String value1, String value2) { + addCriterion("provider_id between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotBetween(String value1, String value2) { + addCriterion("provider_id not between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNull() { + addCriterion("location_id is null"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNotNull() { + addCriterion("location_id is not null"); + return (Criteria) this; + } + + public Criteria andLocationIdEqualTo(String value) { + addCriterion("location_id =", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotEqualTo(String value) { + addCriterion("location_id <>", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThan(String value) { + addCriterion("location_id >", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThanOrEqualTo(String value) { + addCriterion("location_id >=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThan(String value) { + addCriterion("location_id <", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThanOrEqualTo(String value) { + addCriterion("location_id <=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLike(String value) { + addCriterion("location_id like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotLike(String value) { + addCriterion("location_id not like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdIn(List values) { + addCriterion("location_id in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotIn(List values) { + addCriterion("location_id not in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdBetween(String value1, String value2) { + addCriterion("location_id between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotBetween(String value1, String value2) { + addCriterion("location_id not between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andTeamIsNull() { + addCriterion("team is null"); + return (Criteria) this; + } + + public Criteria andTeamIsNotNull() { + addCriterion("team is not null"); + return (Criteria) this; + } + + public Criteria andTeamEqualTo(String value) { + addCriterion("team =", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotEqualTo(String value) { + addCriterion("team <>", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThan(String value) { + addCriterion("team >", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThanOrEqualTo(String value) { + addCriterion("team >=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThan(String value) { + addCriterion("team <", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThanOrEqualTo(String value) { + addCriterion("team <=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLike(String value) { + addCriterion("team like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotLike(String value) { + addCriterion("team not like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamIn(List values) { + addCriterion("team in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotIn(List values) { + addCriterion("team not in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamBetween(String value1, String value2) { + addCriterion("team between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotBetween(String value1, String value2) { + addCriterion("team not between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNull() { + addCriterion("team_id is null"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNotNull() { + addCriterion("team_id is not null"); + return (Criteria) this; + } + + public Criteria andTeamIdEqualTo(String value) { + addCriterion("team_id =", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotEqualTo(String value) { + addCriterion("team_id <>", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThan(String value) { + addCriterion("team_id >", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThanOrEqualTo(String value) { + addCriterion("team_id >=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThan(String value) { + addCriterion("team_id <", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThanOrEqualTo(String value) { + addCriterion("team_id <=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLike(String value) { + addCriterion("team_id like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotLike(String value) { + addCriterion("team_id not like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdIn(List values) { + addCriterion("team_id in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotIn(List values) { + addCriterion("team_id not in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdBetween(String value1, String value2) { + addCriterion("team_id between", value1, value2, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotBetween(String value1, String value2) { + addCriterion("team_id not between", value1, value2, "teamId"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } + + /** * This class was generated by MyBatis Generator. * This class corresponds to the database table core.action_metadata * @@ -738,96 +789,4 @@ protected Criteria() { super(); } } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java index 143ef67d3a..b806e85e64 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java @@ -1,69 +1,51 @@ package org.opensrp.domain.postgres; public class Alert { - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.alert.id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private Long id; - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.alert.json - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private Object json; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private Long id; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert.json + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private Object json; - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.alert.id - * - * @return the value of core.alert.id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Long getId() { - return id; - } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert.id + * @return the value of core.alert.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Long getId() { + return id; + } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.alert.id - * - * @param id the value for core.alert.id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setId(Long id) { - this.id = id; - } + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert.id + * @param id the value for core.alert.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.alert.json - * - * @return the value of core.alert.json - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Object getJson() { - return json; - } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert.json + * @return the value of core.alert.json + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Object getJson() { + return json; + } - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.alert.json - * - * @param json the value for core.alert.json - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setJson(Object json) { - this.json = json; - } + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert.json + * @param json the value for core.alert.json + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setJson(Object json) { + this.json = json; + } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java index 0c4bbec41b..44c577a39b 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java @@ -5,317 +5,368 @@ public class AlertExample { /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected String orderByClause; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected boolean distinct; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected List oredCriteria; - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public AlertExample() { - oredCriteria = new ArrayList(); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public String getOrderByClause() { - return orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public boolean isDistinct() { - return distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public List getOredCriteria() { - return oredCriteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andJsonIsNull() { - addCriterion("json is null"); - return (Criteria) this; - } - - public Criteria andJsonIsNotNull() { - addCriterion("json is not null"); - return (Criteria) this; - } - - public Criteria andJsonEqualTo(Object value) { - addCriterion("json =", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotEqualTo(Object value) { - addCriterion("json <>", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonGreaterThan(Object value) { - addCriterion("json >", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonGreaterThanOrEqualTo(Object value) { - addCriterion("json >=", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonLessThan(Object value) { - addCriterion("json <", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonLessThanOrEqualTo(Object value) { - addCriterion("json <=", value, "json"); - return (Criteria) this; - } - - public Criteria andJsonIn(List values) { - addCriterion("json in", values, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotIn(List values) { - addCriterion("json not in", values, "json"); - return (Criteria) this; - } - - public Criteria andJsonBetween(Object value1, Object value2) { - addCriterion("json between", value1, value2, "json"); - return (Criteria) this; - } - - public Criteria andJsonNotBetween(Object value1, Object value2) { - addCriterion("json not between", value1, value2, "json"); - return (Criteria) this; - } - } - - /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected String orderByClause; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected boolean distinct; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public AlertExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andJsonIsNull() { + addCriterion("json is null"); + return (Criteria) this; + } + + public Criteria andJsonIsNotNull() { + addCriterion("json is not null"); + return (Criteria) this; + } + + public Criteria andJsonEqualTo(Object value) { + addCriterion("json =", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotEqualTo(Object value) { + addCriterion("json <>", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThan(Object value) { + addCriterion("json >", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonGreaterThanOrEqualTo(Object value) { + addCriterion("json >=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThan(Object value) { + addCriterion("json <", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonLessThanOrEqualTo(Object value) { + addCriterion("json <=", value, "json"); + return (Criteria) this; + } + + public Criteria andJsonIn(List values) { + addCriterion("json in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotIn(List values) { + addCriterion("json not in", values, "json"); + return (Criteria) this; + } + + public Criteria andJsonBetween(Object value1, Object value2) { + addCriterion("json between", value1, value2, "json"); + return (Criteria) this; + } + + public Criteria andJsonNotBetween(Object value1, Object value2) { + addCriterion("json not between", value1, value2, "json"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } + + /** * This class was generated by MyBatis Generator. * This class corresponds to the database table core.alert * @@ -327,96 +378,4 @@ protected Criteria() { super(); } } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java index dadb9cd42a..931674c7f6 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java @@ -3,333 +3,235 @@ import java.util.Date; public class AlertMetadata { - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.alert_metadata.id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private Long id; - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.alert_metadata.alert_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private Long alertId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.alert_metadata.base_entity_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private String baseEntityId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.alert_metadata.server_version - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private Date serverVersion; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.alert_metadata.provider_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private String providerId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.alert_metadata.location_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private String locationId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.alert_metadata.team - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private String team; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.alert_metadata.team_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private String teamId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.alert_metadata.is_active - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private Boolean isActive; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column core.alert_metadata.trigger_name - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - private String triggerName; - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.alert_metadata.id - * - * @return the value of core.alert_metadata.id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Long getId() { - return id; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.alert_metadata.id - * - * @param id the value for core.alert_metadata.id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setId(Long id) { - this.id = id; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.alert_metadata.alert_id - * - * @return the value of core.alert_metadata.alert_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Long getAlertId() { - return alertId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.alert_metadata.alert_id - * - * @param alertId the value for core.alert_metadata.alert_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setAlertId(Long alertId) { - this.alertId = alertId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.alert_metadata.base_entity_id - * - * @return the value of core.alert_metadata.base_entity_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public String getBaseEntityId() { - return baseEntityId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.alert_metadata.base_entity_id - * - * @param baseEntityId the value for core.alert_metadata.base_entity_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setBaseEntityId(String baseEntityId) { - this.baseEntityId = baseEntityId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.alert_metadata.server_version - * - * @return the value of core.alert_metadata.server_version - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Date getServerVersion() { - return serverVersion; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.alert_metadata.server_version - * - * @param serverVersion the value for core.alert_metadata.server_version - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setServerVersion(Date serverVersion) { - this.serverVersion = serverVersion; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.alert_metadata.provider_id - * - * @return the value of core.alert_metadata.provider_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public String getProviderId() { - return providerId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.alert_metadata.provider_id - * - * @param providerId the value for core.alert_metadata.provider_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setProviderId(String providerId) { - this.providerId = providerId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.alert_metadata.location_id - * - * @return the value of core.alert_metadata.location_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public String getLocationId() { - return locationId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.alert_metadata.location_id - * - * @param locationId the value for core.alert_metadata.location_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setLocationId(String locationId) { - this.locationId = locationId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.alert_metadata.team - * - * @return the value of core.alert_metadata.team - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public String getTeam() { - return team; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.alert_metadata.team - * - * @param team the value for core.alert_metadata.team - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setTeam(String team) { - this.team = team; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.alert_metadata.team_id - * - * @return the value of core.alert_metadata.team_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public String getTeamId() { - return teamId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.alert_metadata.team_id - * - * @param teamId the value for core.alert_metadata.team_id - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setTeamId(String teamId) { - this.teamId = teamId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.alert_metadata.is_active - * - * @return the value of core.alert_metadata.is_active - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Boolean getIsActive() { - return isActive; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.alert_metadata.is_active - * - * @param isActive the value for core.alert_metadata.is_active - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setIsActive(Boolean isActive) { - this.isActive = isActive; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column core.alert_metadata.trigger_name - * - * @return the value of core.alert_metadata.trigger_name - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public String getTriggerName() { - return triggerName; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column core.alert_metadata.trigger_name - * - * @param triggerName the value for core.alert_metadata.trigger_name - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setTriggerName(String triggerName) { - this.triggerName = triggerName; - } + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private Long id; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.alert_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private Long alertId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.base_entity_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String baseEntityId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.server_version + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private Long serverVersion; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.provider_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String providerId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.location_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String locationId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.team + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String team; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.team_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String teamId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.is_active + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private Boolean isActive; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.trigger_name + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String triggerName; + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.id + * @return the value of core.alert_metadata.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.id + * @param id the value for core.alert_metadata.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.alert_id + * @return the value of core.alert_metadata.alert_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Long getAlertId() { + return alertId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.alert_id + * @param alertId the value for core.alert_metadata.alert_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setAlertId(Long alertId) { + this.alertId = alertId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.base_entity_id + * @return the value of core.alert_metadata.base_entity_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getBaseEntityId() { + return baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.base_entity_id + * @param baseEntityId the value for core.alert_metadata.base_entity_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setBaseEntityId(String baseEntityId) { + this.baseEntityId = baseEntityId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.server_version + * @return the value of core.alert_metadata.server_version + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Long getServerVersion() { + return serverVersion; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.server_version + * @param serverVersion the value for core.alert_metadata.server_version + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setServerVersion(Long serverVersion) { + this.serverVersion = serverVersion; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.provider_id + * @return the value of core.alert_metadata.provider_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getProviderId() { + return providerId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.provider_id + * @param providerId the value for core.alert_metadata.provider_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.location_id + * @return the value of core.alert_metadata.location_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getLocationId() { + return locationId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.location_id + * @param locationId the value for core.alert_metadata.location_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.team + * @return the value of core.alert_metadata.team + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getTeam() { + return team; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.team + * @param team the value for core.alert_metadata.team + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setTeam(String team) { + this.team = team; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.team_id + * @return the value of core.alert_metadata.team_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getTeamId() { + return teamId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.team_id + * @param teamId the value for core.alert_metadata.team_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setTeamId(String teamId) { + this.teamId = teamId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.is_active + * @return the value of core.alert_metadata.is_active + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Boolean getIsActive() { + return isActive; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.is_active + * @param isActive the value for core.alert_metadata.is_active + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setIsActive(Boolean isActive) { + this.isActive = isActive; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.trigger_name + * @return the value of core.alert_metadata.trigger_name + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getTriggerName() { + return triggerName; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.trigger_name + * @param triggerName the value for core.alert_metadata.trigger_name + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setTriggerName(String triggerName) { + this.triggerName = triggerName; + } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java index c48b94b43a..52372506c0 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java @@ -6,857 +6,908 @@ public class AlertMetadataExample { /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected String orderByClause; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected boolean distinct; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected List oredCriteria; - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public AlertMetadataExample() { - oredCriteria = new ArrayList(); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public String getOrderByClause() { - return orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public boolean isDistinct() { - return distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public List getOredCriteria() { - return oredCriteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andAlertIdIsNull() { - addCriterion("alert_id is null"); - return (Criteria) this; - } - - public Criteria andAlertIdIsNotNull() { - addCriterion("alert_id is not null"); - return (Criteria) this; - } - - public Criteria andAlertIdEqualTo(Long value) { - addCriterion("alert_id =", value, "alertId"); - return (Criteria) this; - } - - public Criteria andAlertIdNotEqualTo(Long value) { - addCriterion("alert_id <>", value, "alertId"); - return (Criteria) this; - } - - public Criteria andAlertIdGreaterThan(Long value) { - addCriterion("alert_id >", value, "alertId"); - return (Criteria) this; - } - - public Criteria andAlertIdGreaterThanOrEqualTo(Long value) { - addCriterion("alert_id >=", value, "alertId"); - return (Criteria) this; - } - - public Criteria andAlertIdLessThan(Long value) { - addCriterion("alert_id <", value, "alertId"); - return (Criteria) this; - } - - public Criteria andAlertIdLessThanOrEqualTo(Long value) { - addCriterion("alert_id <=", value, "alertId"); - return (Criteria) this; - } - - public Criteria andAlertIdIn(List values) { - addCriterion("alert_id in", values, "alertId"); - return (Criteria) this; - } - - public Criteria andAlertIdNotIn(List values) { - addCriterion("alert_id not in", values, "alertId"); - return (Criteria) this; - } - - public Criteria andAlertIdBetween(Long value1, Long value2) { - addCriterion("alert_id between", value1, value2, "alertId"); - return (Criteria) this; - } - - public Criteria andAlertIdNotBetween(Long value1, Long value2) { - addCriterion("alert_id not between", value1, value2, "alertId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdIsNull() { - addCriterion("base_entity_id is null"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdIsNotNull() { - addCriterion("base_entity_id is not null"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdEqualTo(String value) { - addCriterion("base_entity_id =", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotEqualTo(String value) { - addCriterion("base_entity_id <>", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdGreaterThan(String value) { - addCriterion("base_entity_id >", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { - addCriterion("base_entity_id >=", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdLessThan(String value) { - addCriterion("base_entity_id <", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { - addCriterion("base_entity_id <=", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdLike(String value) { - addCriterion("base_entity_id like", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotLike(String value) { - addCriterion("base_entity_id not like", value, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdIn(List values) { - addCriterion("base_entity_id in", values, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotIn(List values) { - addCriterion("base_entity_id not in", values, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdBetween(String value1, String value2) { - addCriterion("base_entity_id between", value1, value2, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andBaseEntityIdNotBetween(String value1, String value2) { - addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); - return (Criteria) this; - } - - public Criteria andServerVersionIsNull() { - addCriterion("server_version is null"); - return (Criteria) this; - } - - public Criteria andServerVersionIsNotNull() { - addCriterion("server_version is not null"); - return (Criteria) this; - } - - public Criteria andServerVersionEqualTo(Date value) { - addCriterion("server_version =", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionNotEqualTo(Date value) { - addCriterion("server_version <>", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionGreaterThan(Date value) { - addCriterion("server_version >", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionGreaterThanOrEqualTo(Date value) { - addCriterion("server_version >=", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionLessThan(Date value) { - addCriterion("server_version <", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionLessThanOrEqualTo(Date value) { - addCriterion("server_version <=", value, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionIn(List values) { - addCriterion("server_version in", values, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionNotIn(List values) { - addCriterion("server_version not in", values, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionBetween(Date value1, Date value2) { - addCriterion("server_version between", value1, value2, "serverVersion"); - return (Criteria) this; - } - - public Criteria andServerVersionNotBetween(Date value1, Date value2) { - addCriterion("server_version not between", value1, value2, "serverVersion"); - return (Criteria) this; - } - - public Criteria andProviderIdIsNull() { - addCriterion("provider_id is null"); - return (Criteria) this; - } - - public Criteria andProviderIdIsNotNull() { - addCriterion("provider_id is not null"); - return (Criteria) this; - } - - public Criteria andProviderIdEqualTo(String value) { - addCriterion("provider_id =", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotEqualTo(String value) { - addCriterion("provider_id <>", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdGreaterThan(String value) { - addCriterion("provider_id >", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdGreaterThanOrEqualTo(String value) { - addCriterion("provider_id >=", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdLessThan(String value) { - addCriterion("provider_id <", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdLessThanOrEqualTo(String value) { - addCriterion("provider_id <=", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdLike(String value) { - addCriterion("provider_id like", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotLike(String value) { - addCriterion("provider_id not like", value, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdIn(List values) { - addCriterion("provider_id in", values, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotIn(List values) { - addCriterion("provider_id not in", values, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdBetween(String value1, String value2) { - addCriterion("provider_id between", value1, value2, "providerId"); - return (Criteria) this; - } - - public Criteria andProviderIdNotBetween(String value1, String value2) { - addCriterion("provider_id not between", value1, value2, "providerId"); - return (Criteria) this; - } - - public Criteria andLocationIdIsNull() { - addCriterion("location_id is null"); - return (Criteria) this; - } - - public Criteria andLocationIdIsNotNull() { - addCriterion("location_id is not null"); - return (Criteria) this; - } - - public Criteria andLocationIdEqualTo(String value) { - addCriterion("location_id =", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotEqualTo(String value) { - addCriterion("location_id <>", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdGreaterThan(String value) { - addCriterion("location_id >", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdGreaterThanOrEqualTo(String value) { - addCriterion("location_id >=", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdLessThan(String value) { - addCriterion("location_id <", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdLessThanOrEqualTo(String value) { - addCriterion("location_id <=", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdLike(String value) { - addCriterion("location_id like", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotLike(String value) { - addCriterion("location_id not like", value, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdIn(List values) { - addCriterion("location_id in", values, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotIn(List values) { - addCriterion("location_id not in", values, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdBetween(String value1, String value2) { - addCriterion("location_id between", value1, value2, "locationId"); - return (Criteria) this; - } - - public Criteria andLocationIdNotBetween(String value1, String value2) { - addCriterion("location_id not between", value1, value2, "locationId"); - return (Criteria) this; - } - - public Criteria andTeamIsNull() { - addCriterion("team is null"); - return (Criteria) this; - } - - public Criteria andTeamIsNotNull() { - addCriterion("team is not null"); - return (Criteria) this; - } - - public Criteria andTeamEqualTo(String value) { - addCriterion("team =", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotEqualTo(String value) { - addCriterion("team <>", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamGreaterThan(String value) { - addCriterion("team >", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamGreaterThanOrEqualTo(String value) { - addCriterion("team >=", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamLessThan(String value) { - addCriterion("team <", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamLessThanOrEqualTo(String value) { - addCriterion("team <=", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamLike(String value) { - addCriterion("team like", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotLike(String value) { - addCriterion("team not like", value, "team"); - return (Criteria) this; - } - - public Criteria andTeamIn(List values) { - addCriterion("team in", values, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotIn(List values) { - addCriterion("team not in", values, "team"); - return (Criteria) this; - } - - public Criteria andTeamBetween(String value1, String value2) { - addCriterion("team between", value1, value2, "team"); - return (Criteria) this; - } - - public Criteria andTeamNotBetween(String value1, String value2) { - addCriterion("team not between", value1, value2, "team"); - return (Criteria) this; - } - - public Criteria andTeamIdIsNull() { - addCriterion("team_id is null"); - return (Criteria) this; - } - - public Criteria andTeamIdIsNotNull() { - addCriterion("team_id is not null"); - return (Criteria) this; - } - - public Criteria andTeamIdEqualTo(String value) { - addCriterion("team_id =", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotEqualTo(String value) { - addCriterion("team_id <>", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdGreaterThan(String value) { - addCriterion("team_id >", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdGreaterThanOrEqualTo(String value) { - addCriterion("team_id >=", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdLessThan(String value) { - addCriterion("team_id <", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdLessThanOrEqualTo(String value) { - addCriterion("team_id <=", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdLike(String value) { - addCriterion("team_id like", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotLike(String value) { - addCriterion("team_id not like", value, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdIn(List values) { - addCriterion("team_id in", values, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotIn(List values) { - addCriterion("team_id not in", values, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdBetween(String value1, String value2) { - addCriterion("team_id between", value1, value2, "teamId"); - return (Criteria) this; - } - - public Criteria andTeamIdNotBetween(String value1, String value2) { - addCriterion("team_id not between", value1, value2, "teamId"); - return (Criteria) this; - } - - public Criteria andIsActiveIsNull() { - addCriterion("is_active is null"); - return (Criteria) this; - } - - public Criteria andIsActiveIsNotNull() { - addCriterion("is_active is not null"); - return (Criteria) this; - } - - public Criteria andIsActiveEqualTo(Boolean value) { - addCriterion("is_active =", value, "isActive"); - return (Criteria) this; - } - - public Criteria andIsActiveNotEqualTo(Boolean value) { - addCriterion("is_active <>", value, "isActive"); - return (Criteria) this; - } - - public Criteria andIsActiveGreaterThan(Boolean value) { - addCriterion("is_active >", value, "isActive"); - return (Criteria) this; - } - - public Criteria andIsActiveGreaterThanOrEqualTo(Boolean value) { - addCriterion("is_active >=", value, "isActive"); - return (Criteria) this; - } - - public Criteria andIsActiveLessThan(Boolean value) { - addCriterion("is_active <", value, "isActive"); - return (Criteria) this; - } - - public Criteria andIsActiveLessThanOrEqualTo(Boolean value) { - addCriterion("is_active <=", value, "isActive"); - return (Criteria) this; - } - - public Criteria andIsActiveIn(List values) { - addCriterion("is_active in", values, "isActive"); - return (Criteria) this; - } - - public Criteria andIsActiveNotIn(List values) { - addCriterion("is_active not in", values, "isActive"); - return (Criteria) this; - } - - public Criteria andIsActiveBetween(Boolean value1, Boolean value2) { - addCriterion("is_active between", value1, value2, "isActive"); - return (Criteria) this; - } - - public Criteria andIsActiveNotBetween(Boolean value1, Boolean value2) { - addCriterion("is_active not between", value1, value2, "isActive"); - return (Criteria) this; - } - - public Criteria andTriggerNameIsNull() { - addCriterion("trigger_name is null"); - return (Criteria) this; - } - - public Criteria andTriggerNameIsNotNull() { - addCriterion("trigger_name is not null"); - return (Criteria) this; - } - - public Criteria andTriggerNameEqualTo(String value) { - addCriterion("trigger_name =", value, "triggerName"); - return (Criteria) this; - } - - public Criteria andTriggerNameNotEqualTo(String value) { - addCriterion("trigger_name <>", value, "triggerName"); - return (Criteria) this; - } - - public Criteria andTriggerNameGreaterThan(String value) { - addCriterion("trigger_name >", value, "triggerName"); - return (Criteria) this; - } - - public Criteria andTriggerNameGreaterThanOrEqualTo(String value) { - addCriterion("trigger_name >=", value, "triggerName"); - return (Criteria) this; - } - - public Criteria andTriggerNameLessThan(String value) { - addCriterion("trigger_name <", value, "triggerName"); - return (Criteria) this; - } - - public Criteria andTriggerNameLessThanOrEqualTo(String value) { - addCriterion("trigger_name <=", value, "triggerName"); - return (Criteria) this; - } - - public Criteria andTriggerNameLike(String value) { - addCriterion("trigger_name like", value, "triggerName"); - return (Criteria) this; - } - - public Criteria andTriggerNameNotLike(String value) { - addCriterion("trigger_name not like", value, "triggerName"); - return (Criteria) this; - } - - public Criteria andTriggerNameIn(List values) { - addCriterion("trigger_name in", values, "triggerName"); - return (Criteria) this; - } - - public Criteria andTriggerNameNotIn(List values) { - addCriterion("trigger_name not in", values, "triggerName"); - return (Criteria) this; - } - - public Criteria andTriggerNameBetween(String value1, String value2) { - addCriterion("trigger_name between", value1, value2, "triggerName"); - return (Criteria) this; - } - - public Criteria andTriggerNameNotBetween(String value1, String value2) { - addCriterion("trigger_name not between", value1, value2, "triggerName"); - return (Criteria) this; - } - } - - /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected String orderByClause; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected boolean distinct; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public AlertMetadataExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andAlertIdIsNull() { + addCriterion("alert_id is null"); + return (Criteria) this; + } + + public Criteria andAlertIdIsNotNull() { + addCriterion("alert_id is not null"); + return (Criteria) this; + } + + public Criteria andAlertIdEqualTo(Long value) { + addCriterion("alert_id =", value, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdNotEqualTo(Long value) { + addCriterion("alert_id <>", value, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdGreaterThan(Long value) { + addCriterion("alert_id >", value, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdGreaterThanOrEqualTo(Long value) { + addCriterion("alert_id >=", value, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdLessThan(Long value) { + addCriterion("alert_id <", value, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdLessThanOrEqualTo(Long value) { + addCriterion("alert_id <=", value, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdIn(List values) { + addCriterion("alert_id in", values, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdNotIn(List values) { + addCriterion("alert_id not in", values, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdBetween(Long value1, Long value2) { + addCriterion("alert_id between", value1, value2, "alertId"); + return (Criteria) this; + } + + public Criteria andAlertIdNotBetween(Long value1, Long value2) { + addCriterion("alert_id not between", value1, value2, "alertId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNull() { + addCriterion("base_entity_id is null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIsNotNull() { + addCriterion("base_entity_id is not null"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdEqualTo(String value) { + addCriterion("base_entity_id =", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotEqualTo(String value) { + addCriterion("base_entity_id <>", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThan(String value) { + addCriterion("base_entity_id >", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { + addCriterion("base_entity_id >=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThan(String value) { + addCriterion("base_entity_id <", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { + addCriterion("base_entity_id <=", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdLike(String value) { + addCriterion("base_entity_id like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotLike(String value) { + addCriterion("base_entity_id not like", value, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdIn(List values) { + addCriterion("base_entity_id in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotIn(List values) { + addCriterion("base_entity_id not in", values, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdBetween(String value1, String value2) { + addCriterion("base_entity_id between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andBaseEntityIdNotBetween(String value1, String value2) { + addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNull() { + addCriterion("server_version is null"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNotNull() { + addCriterion("server_version is not null"); + return (Criteria) this; + } + + public Criteria andServerVersionEqualTo(Long value) { + addCriterion("server_version =", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotEqualTo(Long value) { + addCriterion("server_version <>", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThan(Long value) { + addCriterion("server_version >", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThanOrEqualTo(Long value) { + addCriterion("server_version >=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThan(Long value) { + addCriterion("server_version <", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThanOrEqualTo(Long value) { + addCriterion("server_version <=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionIn(List values) { + addCriterion("server_version in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotIn(List values) { + addCriterion("server_version not in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionBetween(Long value1, Long value2) { + addCriterion("server_version between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotBetween(Long value1, Long value2) { + addCriterion("server_version not between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNull() { + addCriterion("provider_id is null"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNotNull() { + addCriterion("provider_id is not null"); + return (Criteria) this; + } + + public Criteria andProviderIdEqualTo(String value) { + addCriterion("provider_id =", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotEqualTo(String value) { + addCriterion("provider_id <>", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThan(String value) { + addCriterion("provider_id >", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThanOrEqualTo(String value) { + addCriterion("provider_id >=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThan(String value) { + addCriterion("provider_id <", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThanOrEqualTo(String value) { + addCriterion("provider_id <=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLike(String value) { + addCriterion("provider_id like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotLike(String value) { + addCriterion("provider_id not like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdIn(List values) { + addCriterion("provider_id in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotIn(List values) { + addCriterion("provider_id not in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdBetween(String value1, String value2) { + addCriterion("provider_id between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotBetween(String value1, String value2) { + addCriterion("provider_id not between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNull() { + addCriterion("location_id is null"); + return (Criteria) this; + } + + public Criteria andLocationIdIsNotNull() { + addCriterion("location_id is not null"); + return (Criteria) this; + } + + public Criteria andLocationIdEqualTo(String value) { + addCriterion("location_id =", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotEqualTo(String value) { + addCriterion("location_id <>", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThan(String value) { + addCriterion("location_id >", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdGreaterThanOrEqualTo(String value) { + addCriterion("location_id >=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThan(String value) { + addCriterion("location_id <", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLessThanOrEqualTo(String value) { + addCriterion("location_id <=", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdLike(String value) { + addCriterion("location_id like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotLike(String value) { + addCriterion("location_id not like", value, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdIn(List values) { + addCriterion("location_id in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotIn(List values) { + addCriterion("location_id not in", values, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdBetween(String value1, String value2) { + addCriterion("location_id between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andLocationIdNotBetween(String value1, String value2) { + addCriterion("location_id not between", value1, value2, "locationId"); + return (Criteria) this; + } + + public Criteria andTeamIsNull() { + addCriterion("team is null"); + return (Criteria) this; + } + + public Criteria andTeamIsNotNull() { + addCriterion("team is not null"); + return (Criteria) this; + } + + public Criteria andTeamEqualTo(String value) { + addCriterion("team =", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotEqualTo(String value) { + addCriterion("team <>", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThan(String value) { + addCriterion("team >", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamGreaterThanOrEqualTo(String value) { + addCriterion("team >=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThan(String value) { + addCriterion("team <", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLessThanOrEqualTo(String value) { + addCriterion("team <=", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamLike(String value) { + addCriterion("team like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotLike(String value) { + addCriterion("team not like", value, "team"); + return (Criteria) this; + } + + public Criteria andTeamIn(List values) { + addCriterion("team in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotIn(List values) { + addCriterion("team not in", values, "team"); + return (Criteria) this; + } + + public Criteria andTeamBetween(String value1, String value2) { + addCriterion("team between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamNotBetween(String value1, String value2) { + addCriterion("team not between", value1, value2, "team"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNull() { + addCriterion("team_id is null"); + return (Criteria) this; + } + + public Criteria andTeamIdIsNotNull() { + addCriterion("team_id is not null"); + return (Criteria) this; + } + + public Criteria andTeamIdEqualTo(String value) { + addCriterion("team_id =", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotEqualTo(String value) { + addCriterion("team_id <>", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThan(String value) { + addCriterion("team_id >", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdGreaterThanOrEqualTo(String value) { + addCriterion("team_id >=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThan(String value) { + addCriterion("team_id <", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLessThanOrEqualTo(String value) { + addCriterion("team_id <=", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdLike(String value) { + addCriterion("team_id like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotLike(String value) { + addCriterion("team_id not like", value, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdIn(List values) { + addCriterion("team_id in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotIn(List values) { + addCriterion("team_id not in", values, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdBetween(String value1, String value2) { + addCriterion("team_id between", value1, value2, "teamId"); + return (Criteria) this; + } + + public Criteria andTeamIdNotBetween(String value1, String value2) { + addCriterion("team_id not between", value1, value2, "teamId"); + return (Criteria) this; + } + + public Criteria andIsActiveIsNull() { + addCriterion("is_active is null"); + return (Criteria) this; + } + + public Criteria andIsActiveIsNotNull() { + addCriterion("is_active is not null"); + return (Criteria) this; + } + + public Criteria andIsActiveEqualTo(Boolean value) { + addCriterion("is_active =", value, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveNotEqualTo(Boolean value) { + addCriterion("is_active <>", value, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveGreaterThan(Boolean value) { + addCriterion("is_active >", value, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveGreaterThanOrEqualTo(Boolean value) { + addCriterion("is_active >=", value, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveLessThan(Boolean value) { + addCriterion("is_active <", value, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveLessThanOrEqualTo(Boolean value) { + addCriterion("is_active <=", value, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveIn(List values) { + addCriterion("is_active in", values, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveNotIn(List values) { + addCriterion("is_active not in", values, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveBetween(Boolean value1, Boolean value2) { + addCriterion("is_active between", value1, value2, "isActive"); + return (Criteria) this; + } + + public Criteria andIsActiveNotBetween(Boolean value1, Boolean value2) { + addCriterion("is_active not between", value1, value2, "isActive"); + return (Criteria) this; + } + + public Criteria andTriggerNameIsNull() { + addCriterion("trigger_name is null"); + return (Criteria) this; + } + + public Criteria andTriggerNameIsNotNull() { + addCriterion("trigger_name is not null"); + return (Criteria) this; + } + + public Criteria andTriggerNameEqualTo(String value) { + addCriterion("trigger_name =", value, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameNotEqualTo(String value) { + addCriterion("trigger_name <>", value, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameGreaterThan(String value) { + addCriterion("trigger_name >", value, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameGreaterThanOrEqualTo(String value) { + addCriterion("trigger_name >=", value, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameLessThan(String value) { + addCriterion("trigger_name <", value, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameLessThanOrEqualTo(String value) { + addCriterion("trigger_name <=", value, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameLike(String value) { + addCriterion("trigger_name like", value, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameNotLike(String value) { + addCriterion("trigger_name not like", value, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameIn(List values) { + addCriterion("trigger_name in", values, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameNotIn(List values) { + addCriterion("trigger_name not in", values, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameBetween(String value1, String value2) { + addCriterion("trigger_name between", value1, value2, "triggerName"); + return (Criteria) this; + } + + public Criteria andTriggerNameNotBetween(String value1, String value2) { + addCriterion("trigger_name not between", value1, value2, "triggerName"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } + + /** * This class was generated by MyBatis Generator. * This class corresponds to the database table core.alert_metadata * @@ -868,96 +919,4 @@ protected Criteria() { super(); } } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateToken.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateToken.java new file mode 100644 index 0000000000..4cc6437ec3 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateToken.java @@ -0,0 +1,120 @@ +package org.opensrp.domain.postgres; + +public class AppStateToken { + + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.app_state_token.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private Long id; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.app_state_token.name + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String name; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.app_state_token.description + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String description; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.app_state_token.value + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String value; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.app_state_token.last_edited_date + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private Long lastEditedDate; + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.app_state_token.id + * @return the value of core.app_state_token.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.app_state_token.id + * @param id the value for core.app_state_token.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.app_state_token.name + * @return the value of core.app_state_token.name + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getName() { + return name; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.app_state_token.name + * @param name the value for core.app_state_token.name + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setName(String name) { + this.name = name; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.app_state_token.description + * @return the value of core.app_state_token.description + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getDescription() { + return description; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.app_state_token.description + * @param description the value for core.app_state_token.description + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setDescription(String description) { + this.description = description; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.app_state_token.value + * @return the value of core.app_state_token.value + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getValue() { + return value; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.app_state_token.value + * @param value the value for core.app_state_token.value + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setValue(String value) { + this.value = value; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.app_state_token.last_edited_date + * @return the value of core.app_state_token.last_edited_date + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Long getLastEditedDate() { + return lastEditedDate; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.app_state_token.last_edited_date + * @param lastEditedDate the value for core.app_state_token.last_edited_date + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setLastEditedDate(Long lastEditedDate) { + this.lastEditedDate = lastEditedDate; + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateTokenExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateTokenExample.java new file mode 100644 index 0000000000..c9bd6b5c4f --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateTokenExample.java @@ -0,0 +1,591 @@ +package org.opensrp.domain.postgres; + +import java.util.ArrayList; +import java.util.List; + +public class AppStateTokenExample { + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected String orderByClause; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected boolean distinct; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public AppStateTokenExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andNameIsNull() { + addCriterion("name is null"); + return (Criteria) this; + } + + public Criteria andNameIsNotNull() { + addCriterion("name is not null"); + return (Criteria) this; + } + + public Criteria andNameEqualTo(String value) { + addCriterion("name =", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotEqualTo(String value) { + addCriterion("name <>", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThan(String value) { + addCriterion("name >", value, "name"); + return (Criteria) this; + } + + public Criteria andNameGreaterThanOrEqualTo(String value) { + addCriterion("name >=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThan(String value) { + addCriterion("name <", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLessThanOrEqualTo(String value) { + addCriterion("name <=", value, "name"); + return (Criteria) this; + } + + public Criteria andNameLike(String value) { + addCriterion("name like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameNotLike(String value) { + addCriterion("name not like", value, "name"); + return (Criteria) this; + } + + public Criteria andNameIn(List values) { + addCriterion("name in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameNotIn(List values) { + addCriterion("name not in", values, "name"); + return (Criteria) this; + } + + public Criteria andNameBetween(String value1, String value2) { + addCriterion("name between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andNameNotBetween(String value1, String value2) { + addCriterion("name not between", value1, value2, "name"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNull() { + addCriterion("description is null"); + return (Criteria) this; + } + + public Criteria andDescriptionIsNotNull() { + addCriterion("description is not null"); + return (Criteria) this; + } + + public Criteria andDescriptionEqualTo(String value) { + addCriterion("description =", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotEqualTo(String value) { + addCriterion("description <>", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThan(String value) { + addCriterion("description >", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { + addCriterion("description >=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThan(String value) { + addCriterion("description <", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLessThanOrEqualTo(String value) { + addCriterion("description <=", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionLike(String value) { + addCriterion("description like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotLike(String value) { + addCriterion("description not like", value, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionIn(List values) { + addCriterion("description in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotIn(List values) { + addCriterion("description not in", values, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionBetween(String value1, String value2) { + addCriterion("description between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andDescriptionNotBetween(String value1, String value2) { + addCriterion("description not between", value1, value2, "description"); + return (Criteria) this; + } + + public Criteria andValueIsNull() { + addCriterion("value is null"); + return (Criteria) this; + } + + public Criteria andValueIsNotNull() { + addCriterion("value is not null"); + return (Criteria) this; + } + + public Criteria andValueEqualTo(String value) { + addCriterion("value =", value, "value"); + return (Criteria) this; + } + + public Criteria andValueNotEqualTo(String value) { + addCriterion("value <>", value, "value"); + return (Criteria) this; + } + + public Criteria andValueGreaterThan(String value) { + addCriterion("value >", value, "value"); + return (Criteria) this; + } + + public Criteria andValueGreaterThanOrEqualTo(String value) { + addCriterion("value >=", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLessThan(String value) { + addCriterion("value <", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLessThanOrEqualTo(String value) { + addCriterion("value <=", value, "value"); + return (Criteria) this; + } + + public Criteria andValueLike(String value) { + addCriterion("value like", value, "value"); + return (Criteria) this; + } + + public Criteria andValueNotLike(String value) { + addCriterion("value not like", value, "value"); + return (Criteria) this; + } + + public Criteria andValueIn(List values) { + addCriterion("value in", values, "value"); + return (Criteria) this; + } + + public Criteria andValueNotIn(List values) { + addCriterion("value not in", values, "value"); + return (Criteria) this; + } + + public Criteria andValueBetween(String value1, String value2) { + addCriterion("value between", value1, value2, "value"); + return (Criteria) this; + } + + public Criteria andValueNotBetween(String value1, String value2) { + addCriterion("value not between", value1, value2, "value"); + return (Criteria) this; + } + + public Criteria andLastEditedDateIsNull() { + addCriterion("last_edited_date is null"); + return (Criteria) this; + } + + public Criteria andLastEditedDateIsNotNull() { + addCriterion("last_edited_date is not null"); + return (Criteria) this; + } + + public Criteria andLastEditedDateEqualTo(Long value) { + addCriterion("last_edited_date =", value, "lastEditedDate"); + return (Criteria) this; + } + + public Criteria andLastEditedDateNotEqualTo(Long value) { + addCriterion("last_edited_date <>", value, "lastEditedDate"); + return (Criteria) this; + } + + public Criteria andLastEditedDateGreaterThan(Long value) { + addCriterion("last_edited_date >", value, "lastEditedDate"); + return (Criteria) this; + } + + public Criteria andLastEditedDateGreaterThanOrEqualTo(Long value) { + addCriterion("last_edited_date >=", value, "lastEditedDate"); + return (Criteria) this; + } + + public Criteria andLastEditedDateLessThan(Long value) { + addCriterion("last_edited_date <", value, "lastEditedDate"); + return (Criteria) this; + } + + public Criteria andLastEditedDateLessThanOrEqualTo(Long value) { + addCriterion("last_edited_date <=", value, "lastEditedDate"); + return (Criteria) this; + } + + public Criteria andLastEditedDateIn(List values) { + addCriterion("last_edited_date in", values, "lastEditedDate"); + return (Criteria) this; + } + + public Criteria andLastEditedDateNotIn(List values) { + addCriterion("last_edited_date not in", values, "lastEditedDate"); + return (Criteria) this; + } + + public Criteria andLastEditedDateBetween(Long value1, Long value2) { + addCriterion("last_edited_date between", value1, value2, "lastEditedDate"); + return (Criteria) this; + } + + public Criteria andLastEditedDateNotBetween(Long value1, Long value2) { + addCriterion("last_edited_date not between", value1, value2, "lastEditedDate"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.app_state_token + * + * @mbg.generated do_not_delete_during_merge Fri Mar 09 18:03:53 EAT 2018 + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java index e29d3399bd..85ec9636e1 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java @@ -4,19 +4,19 @@ public class Client { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client.json - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client.id * @return the value of core.client.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client.id * @param id the value for core.client.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client.json * @return the value of core.client.json - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client.json * @param json the value for core.client.json - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java index d83d7054a6..f977816636 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java @@ -6,23 +6,23 @@ public class ClientExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public ClientExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public ClientExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -285,7 +285,7 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java index e0d58dfc18..615b18556d 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java @@ -6,54 +6,54 @@ public class ClientMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.client_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Long clientId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.base_entity_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.relational_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String relationalId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.openmrs_uuid - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String openmrsUuid; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.unique_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String uniqueId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.first_name - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String firstName; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.last_name - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String lastName; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.birth_date - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Date birthDate; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.id * @return the value of core.client_metadata.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Long getId() { return id; @@ -62,7 +62,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.id * @param id the value for core.client_metadata.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -71,7 +71,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.client_id * @return the value of core.client_metadata.client_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Long getClientId() { return clientId; @@ -80,7 +80,7 @@ public Long getClientId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.client_id * @param clientId the value for core.client_metadata.client_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setClientId(Long clientId) { this.clientId = clientId; @@ -89,7 +89,7 @@ public void setClientId(Long clientId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.base_entity_id * @return the value of core.client_metadata.base_entity_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -98,7 +98,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.base_entity_id * @param baseEntityId the value for core.client_metadata.base_entity_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -107,7 +107,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.relational_id * @return the value of core.client_metadata.relational_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getRelationalId() { return relationalId; @@ -116,7 +116,7 @@ public String getRelationalId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.relational_id * @param relationalId the value for core.client_metadata.relational_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setRelationalId(String relationalId) { this.relationalId = relationalId; @@ -125,7 +125,7 @@ public void setRelationalId(String relationalId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.openmrs_uuid * @return the value of core.client_metadata.openmrs_uuid - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getOpenmrsUuid() { return openmrsUuid; @@ -134,7 +134,7 @@ public String getOpenmrsUuid() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.openmrs_uuid * @param openmrsUuid the value for core.client_metadata.openmrs_uuid - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setOpenmrsUuid(String openmrsUuid) { this.openmrsUuid = openmrsUuid; @@ -143,7 +143,7 @@ public void setOpenmrsUuid(String openmrsUuid) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.unique_id * @return the value of core.client_metadata.unique_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getUniqueId() { return uniqueId; @@ -152,7 +152,7 @@ public String getUniqueId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.unique_id * @param uniqueId the value for core.client_metadata.unique_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; @@ -161,7 +161,7 @@ public void setUniqueId(String uniqueId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.first_name * @return the value of core.client_metadata.first_name - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getFirstName() { return firstName; @@ -170,7 +170,7 @@ public String getFirstName() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.first_name * @param firstName the value for core.client_metadata.first_name - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setFirstName(String firstName) { this.firstName = firstName; @@ -179,7 +179,7 @@ public void setFirstName(String firstName) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.last_name * @return the value of core.client_metadata.last_name - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getLastName() { return lastName; @@ -188,7 +188,7 @@ public String getLastName() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.last_name * @param lastName the value for core.client_metadata.last_name - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setLastName(String lastName) { this.lastName = lastName; @@ -197,7 +197,7 @@ public void setLastName(String lastName) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.birth_date * @return the value of core.client_metadata.birth_date - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Date getBirthDate() { return birthDate; @@ -206,7 +206,7 @@ public Date getBirthDate() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.birth_date * @param birthDate the value for core.client_metadata.birth_date - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setBirthDate(Date birthDate) { this.birthDate = birthDate; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java index a939dda243..43ec9a3179 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java @@ -8,23 +8,23 @@ public class ClientMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public ClientMetadataExample() { oredCriteria = new ArrayList(); @@ -32,7 +32,7 @@ public ClientMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -40,7 +40,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -48,7 +48,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -56,7 +56,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -64,7 +64,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -72,7 +72,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -80,7 +80,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -90,7 +90,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -102,7 +102,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -111,7 +111,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -121,7 +121,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -793,7 +793,7 @@ public Criteria andBirthDateNotBetween(Date value1, Date value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java new file mode 100644 index 0000000000..1aa20123bd --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java @@ -0,0 +1,335 @@ +package org.opensrp.domain.postgres; + +import java.util.Date; + +public class ErrorTrace { + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column error.error_trace.id + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private Long id; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column error.error_trace.date_occurred + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private Date dateOccurred; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column error.error_trace.error_type + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String errorType; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column error.error_trace.occurred_at + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String occurredAt; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column error.error_trace.stack_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String stackTrace; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column error.error_trace.status + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String status; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column error.error_trace.record_id + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String recordId; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column error.error_trace.date_closed + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private Date dateClosed; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column error.error_trace.document_type + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String documentType; + + /** + * + * This field was generated by MyBatis Generator. + * This field corresponds to the database column error.error_trace.retry_url + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String retryUrl; + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column error.error_trace.id + * + * @return the value of error.error_trace.id + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column error.error_trace.id + * + * @param id the value for error.error_trace.id + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column error.error_trace.date_occurred + * + * @return the value of error.error_trace.date_occurred + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Date getDateOccurred() { + return dateOccurred; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column error.error_trace.date_occurred + * + * @param dateOccurred the value for error.error_trace.date_occurred + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setDateOccurred(Date dateOccurred) { + this.dateOccurred = dateOccurred; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column error.error_trace.error_type + * + * @return the value of error.error_trace.error_type + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getErrorType() { + return errorType; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column error.error_trace.error_type + * + * @param errorType the value for error.error_trace.error_type + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setErrorType(String errorType) { + this.errorType = errorType; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column error.error_trace.occurred_at + * + * @return the value of error.error_trace.occurred_at + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getOccurredAt() { + return occurredAt; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column error.error_trace.occurred_at + * + * @param occurredAt the value for error.error_trace.occurred_at + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setOccurredAt(String occurredAt) { + this.occurredAt = occurredAt; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column error.error_trace.stack_trace + * + * @return the value of error.error_trace.stack_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getStackTrace() { + return stackTrace; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column error.error_trace.stack_trace + * + * @param stackTrace the value for error.error_trace.stack_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setStackTrace(String stackTrace) { + this.stackTrace = stackTrace; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column error.error_trace.status + * + * @return the value of error.error_trace.status + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getStatus() { + return status; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column error.error_trace.status + * + * @param status the value for error.error_trace.status + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setStatus(String status) { + this.status = status; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column error.error_trace.record_id + * + * @return the value of error.error_trace.record_id + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getRecordId() { + return recordId; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column error.error_trace.record_id + * + * @param recordId the value for error.error_trace.record_id + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setRecordId(String recordId) { + this.recordId = recordId; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column error.error_trace.date_closed + * + * @return the value of error.error_trace.date_closed + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Date getDateClosed() { + return dateClosed; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column error.error_trace.date_closed + * + * @param dateClosed the value for error.error_trace.date_closed + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setDateClosed(Date dateClosed) { + this.dateClosed = dateClosed; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column error.error_trace.document_type + * + * @return the value of error.error_trace.document_type + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getDocumentType() { + return documentType; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column error.error_trace.document_type + * + * @param documentType the value for error.error_trace.document_type + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setDocumentType(String documentType) { + this.documentType = documentType; + } + + /** + * This method was generated by MyBatis Generator. + * This method returns the value of the database column error.error_trace.retry_url + * + * @return the value of error.error_trace.retry_url + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getRetryUrl() { + return retryUrl; + } + + /** + * This method was generated by MyBatis Generator. + * This method sets the value of the database column error.error_trace.retry_url + * + * @param retryUrl the value for error.error_trace.retry_url + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setRetryUrl(String retryUrl) { + this.retryUrl = retryUrl; + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java new file mode 100644 index 0000000000..d3f1f88af4 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java @@ -0,0 +1,1000 @@ +package org.opensrp.domain.postgres; + +import java.util.ArrayList; +import java.util.Date; +import java.util.Iterator; +import java.util.List; + +public class ErrorTraceExample { + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected String orderByClause; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected boolean distinct; + + /** + * This field was generated by MyBatis Generator. + * This field corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public ErrorTraceExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + protected void addCriterionForJDBCDate(String condition, Date value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value.getTime()), property); + } + + protected void addCriterionForJDBCDate(String condition, List values, String property) { + if (values == null || values.size() == 0) { + throw new RuntimeException("Value list for " + property + " cannot be null or empty"); + } + List dateList = new ArrayList(); + Iterator iter = values.iterator(); + while (iter.hasNext()) { + dateList.add(new java.sql.Date(iter.next().getTime())); + } + addCriterion(condition, dateList, property); + } + + protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andDateOccurredIsNull() { + addCriterion("date_occurred is null"); + return (Criteria) this; + } + + public Criteria andDateOccurredIsNotNull() { + addCriterion("date_occurred is not null"); + return (Criteria) this; + } + + public Criteria andDateOccurredEqualTo(Date value) { + addCriterionForJDBCDate("date_occurred =", value, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredNotEqualTo(Date value) { + addCriterionForJDBCDate("date_occurred <>", value, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredGreaterThan(Date value) { + addCriterionForJDBCDate("date_occurred >", value, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_occurred >=", value, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredLessThan(Date value) { + addCriterionForJDBCDate("date_occurred <", value, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_occurred <=", value, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredIn(List values) { + addCriterionForJDBCDate("date_occurred in", values, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredNotIn(List values) { + addCriterionForJDBCDate("date_occurred not in", values, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_occurred between", value1, value2, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_occurred not between", value1, value2, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andErrorTypeIsNull() { + addCriterion("error_type is null"); + return (Criteria) this; + } + + public Criteria andErrorTypeIsNotNull() { + addCriterion("error_type is not null"); + return (Criteria) this; + } + + public Criteria andErrorTypeEqualTo(String value) { + addCriterion("error_type =", value, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeNotEqualTo(String value) { + addCriterion("error_type <>", value, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeGreaterThan(String value) { + addCriterion("error_type >", value, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeGreaterThanOrEqualTo(String value) { + addCriterion("error_type >=", value, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeLessThan(String value) { + addCriterion("error_type <", value, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeLessThanOrEqualTo(String value) { + addCriterion("error_type <=", value, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeLike(String value) { + addCriterion("error_type like", value, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeNotLike(String value) { + addCriterion("error_type not like", value, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeIn(List values) { + addCriterion("error_type in", values, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeNotIn(List values) { + addCriterion("error_type not in", values, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeBetween(String value1, String value2) { + addCriterion("error_type between", value1, value2, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeNotBetween(String value1, String value2) { + addCriterion("error_type not between", value1, value2, "errorType"); + return (Criteria) this; + } + + public Criteria andOccurredAtIsNull() { + addCriterion("occurred_at is null"); + return (Criteria) this; + } + + public Criteria andOccurredAtIsNotNull() { + addCriterion("occurred_at is not null"); + return (Criteria) this; + } + + public Criteria andOccurredAtEqualTo(String value) { + addCriterion("occurred_at =", value, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtNotEqualTo(String value) { + addCriterion("occurred_at <>", value, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtGreaterThan(String value) { + addCriterion("occurred_at >", value, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtGreaterThanOrEqualTo(String value) { + addCriterion("occurred_at >=", value, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtLessThan(String value) { + addCriterion("occurred_at <", value, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtLessThanOrEqualTo(String value) { + addCriterion("occurred_at <=", value, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtLike(String value) { + addCriterion("occurred_at like", value, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtNotLike(String value) { + addCriterion("occurred_at not like", value, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtIn(List values) { + addCriterion("occurred_at in", values, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtNotIn(List values) { + addCriterion("occurred_at not in", values, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtBetween(String value1, String value2) { + addCriterion("occurred_at between", value1, value2, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtNotBetween(String value1, String value2) { + addCriterion("occurred_at not between", value1, value2, "occurredAt"); + return (Criteria) this; + } + + public Criteria andStackTraceIsNull() { + addCriterion("stack_trace is null"); + return (Criteria) this; + } + + public Criteria andStackTraceIsNotNull() { + addCriterion("stack_trace is not null"); + return (Criteria) this; + } + + public Criteria andStackTraceEqualTo(String value) { + addCriterion("stack_trace =", value, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceNotEqualTo(String value) { + addCriterion("stack_trace <>", value, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceGreaterThan(String value) { + addCriterion("stack_trace >", value, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceGreaterThanOrEqualTo(String value) { + addCriterion("stack_trace >=", value, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceLessThan(String value) { + addCriterion("stack_trace <", value, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceLessThanOrEqualTo(String value) { + addCriterion("stack_trace <=", value, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceLike(String value) { + addCriterion("stack_trace like", value, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceNotLike(String value) { + addCriterion("stack_trace not like", value, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceIn(List values) { + addCriterion("stack_trace in", values, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceNotIn(List values) { + addCriterion("stack_trace not in", values, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceBetween(String value1, String value2) { + addCriterion("stack_trace between", value1, value2, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceNotBetween(String value1, String value2) { + addCriterion("stack_trace not between", value1, value2, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("status is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("status is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("status =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("status <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("status >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("status >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("status <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("status <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("status like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("status not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("status in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("status not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("status between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("status not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andRecordIdIsNull() { + addCriterion("record_id is null"); + return (Criteria) this; + } + + public Criteria andRecordIdIsNotNull() { + addCriterion("record_id is not null"); + return (Criteria) this; + } + + public Criteria andRecordIdEqualTo(String value) { + addCriterion("record_id =", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotEqualTo(String value) { + addCriterion("record_id <>", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdGreaterThan(String value) { + addCriterion("record_id >", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdGreaterThanOrEqualTo(String value) { + addCriterion("record_id >=", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLessThan(String value) { + addCriterion("record_id <", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLessThanOrEqualTo(String value) { + addCriterion("record_id <=", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLike(String value) { + addCriterion("record_id like", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotLike(String value) { + addCriterion("record_id not like", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdIn(List values) { + addCriterion("record_id in", values, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotIn(List values) { + addCriterion("record_id not in", values, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdBetween(String value1, String value2) { + addCriterion("record_id between", value1, value2, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotBetween(String value1, String value2) { + addCriterion("record_id not between", value1, value2, "recordId"); + return (Criteria) this; + } + + public Criteria andDateClosedIsNull() { + addCriterion("date_closed is null"); + return (Criteria) this; + } + + public Criteria andDateClosedIsNotNull() { + addCriterion("date_closed is not null"); + return (Criteria) this; + } + + public Criteria andDateClosedEqualTo(Date value) { + addCriterionForJDBCDate("date_closed =", value, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedNotEqualTo(Date value) { + addCriterionForJDBCDate("date_closed <>", value, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedGreaterThan(Date value) { + addCriterionForJDBCDate("date_closed >", value, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_closed >=", value, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedLessThan(Date value) { + addCriterionForJDBCDate("date_closed <", value, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_closed <=", value, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedIn(List values) { + addCriterionForJDBCDate("date_closed in", values, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedNotIn(List values) { + addCriterionForJDBCDate("date_closed not in", values, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_closed between", value1, value2, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_closed not between", value1, value2, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDocumentTypeIsNull() { + addCriterion("document_type is null"); + return (Criteria) this; + } + + public Criteria andDocumentTypeIsNotNull() { + addCriterion("document_type is not null"); + return (Criteria) this; + } + + public Criteria andDocumentTypeEqualTo(String value) { + addCriterion("document_type =", value, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeNotEqualTo(String value) { + addCriterion("document_type <>", value, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeGreaterThan(String value) { + addCriterion("document_type >", value, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeGreaterThanOrEqualTo(String value) { + addCriterion("document_type >=", value, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeLessThan(String value) { + addCriterion("document_type <", value, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeLessThanOrEqualTo(String value) { + addCriterion("document_type <=", value, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeLike(String value) { + addCriterion("document_type like", value, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeNotLike(String value) { + addCriterion("document_type not like", value, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeIn(List values) { + addCriterion("document_type in", values, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeNotIn(List values) { + addCriterion("document_type not in", values, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeBetween(String value1, String value2) { + addCriterion("document_type between", value1, value2, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeNotBetween(String value1, String value2) { + addCriterion("document_type not between", value1, value2, "documentType"); + return (Criteria) this; + } + + public Criteria andRetryUrlIsNull() { + addCriterion("retry_url is null"); + return (Criteria) this; + } + + public Criteria andRetryUrlIsNotNull() { + addCriterion("retry_url is not null"); + return (Criteria) this; + } + + public Criteria andRetryUrlEqualTo(String value) { + addCriterion("retry_url =", value, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlNotEqualTo(String value) { + addCriterion("retry_url <>", value, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlGreaterThan(String value) { + addCriterion("retry_url >", value, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlGreaterThanOrEqualTo(String value) { + addCriterion("retry_url >=", value, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlLessThan(String value) { + addCriterion("retry_url <", value, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlLessThanOrEqualTo(String value) { + addCriterion("retry_url <=", value, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlLike(String value) { + addCriterion("retry_url like", value, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlNotLike(String value) { + addCriterion("retry_url not like", value, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlIn(List values) { + addCriterion("retry_url in", values, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlNotIn(List values) { + addCriterion("retry_url not in", values, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlBetween(String value1, String value2) { + addCriterion("retry_url between", value1, value2, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlNotBetween(String value1, String value2) { + addCriterion("retry_url not between", value1, value2, "retryUrl"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table error.error_trace + * + * @mbg.generated do_not_delete_during_merge Fri Mar 09 18:05:46 EAT 2018 + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public static class Criterion { + private String condition; + + private Object value; + + private Object secondValue; + + private boolean noValue; + + private boolean singleValue; + + private boolean betweenValue; + + private boolean listValue; + + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java index 3307257caa..eadfb74a01 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java @@ -4,19 +4,19 @@ public class Event { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event.json - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event.id * @return the value of core.event.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event.id * @param id the value for core.event.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event.json * @return the value of core.event.json - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event.json * @param json the value for core.event.json - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java index 31a401710c..9d4db6809c 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java @@ -6,23 +6,23 @@ public class EventExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public EventExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public EventExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -285,7 +285,7 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java index 01178d2fc7..d720f68de5 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java @@ -6,69 +6,69 @@ public class EventMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Long eventId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.base_entity_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.form_submission_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String formSubmissionId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.server_version - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ - private Date serverVersion; + private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.openmrs_uuid - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String openmrsUuid; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_type - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String eventType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_date - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Date eventDate; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.provider_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.location_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.team - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.team_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String teamId; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.id * @return the value of core.event_metadata.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Long getId() { return id; @@ -77,7 +77,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.id * @param id the value for core.event_metadata.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -86,7 +86,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_id * @return the value of core.event_metadata.event_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Long getEventId() { return eventId; @@ -95,7 +95,7 @@ public Long getEventId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_id * @param eventId the value for core.event_metadata.event_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setEventId(Long eventId) { this.eventId = eventId; @@ -104,7 +104,7 @@ public void setEventId(Long eventId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.base_entity_id * @return the value of core.event_metadata.base_entity_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -113,7 +113,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.base_entity_id * @param baseEntityId the value for core.event_metadata.base_entity_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -122,7 +122,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.form_submission_id * @return the value of core.event_metadata.form_submission_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getFormSubmissionId() { return formSubmissionId; @@ -131,7 +131,7 @@ public String getFormSubmissionId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.form_submission_id * @param formSubmissionId the value for core.event_metadata.form_submission_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setFormSubmissionId(String formSubmissionId) { this.formSubmissionId = formSubmissionId; @@ -140,25 +140,25 @@ public void setFormSubmissionId(String formSubmissionId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.server_version * @return the value of core.event_metadata.server_version - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ - public Date getServerVersion() { + public Long getServerVersion() { return serverVersion; } /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.server_version * @param serverVersion the value for core.event_metadata.server_version - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ - public void setServerVersion(Date serverVersion) { + public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; } /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.openmrs_uuid * @return the value of core.event_metadata.openmrs_uuid - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getOpenmrsUuid() { return openmrsUuid; @@ -167,7 +167,7 @@ public String getOpenmrsUuid() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.openmrs_uuid * @param openmrsUuid the value for core.event_metadata.openmrs_uuid - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setOpenmrsUuid(String openmrsUuid) { this.openmrsUuid = openmrsUuid; @@ -176,7 +176,7 @@ public void setOpenmrsUuid(String openmrsUuid) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_type * @return the value of core.event_metadata.event_type - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getEventType() { return eventType; @@ -185,7 +185,7 @@ public String getEventType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_type * @param eventType the value for core.event_metadata.event_type - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setEventType(String eventType) { this.eventType = eventType; @@ -194,7 +194,7 @@ public void setEventType(String eventType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_date * @return the value of core.event_metadata.event_date - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Date getEventDate() { return eventDate; @@ -203,7 +203,7 @@ public Date getEventDate() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_date * @param eventDate the value for core.event_metadata.event_date - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setEventDate(Date eventDate) { this.eventDate = eventDate; @@ -212,7 +212,7 @@ public void setEventDate(Date eventDate) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.provider_id * @return the value of core.event_metadata.provider_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getProviderId() { return providerId; @@ -221,7 +221,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.provider_id * @param providerId the value for core.event_metadata.provider_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -230,7 +230,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.location_id * @return the value of core.event_metadata.location_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getLocationId() { return locationId; @@ -239,7 +239,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.location_id * @param locationId the value for core.event_metadata.location_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -248,7 +248,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.team * @return the value of core.event_metadata.team - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getTeam() { return team; @@ -257,7 +257,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.team * @param team the value for core.event_metadata.team - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -266,7 +266,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.team_id * @return the value of core.event_metadata.team_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getTeamId() { return teamId; @@ -275,7 +275,7 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.team_id * @param teamId the value for core.event_metadata.team_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java index 7e3ce5d147..b32261ebf4 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java @@ -8,23 +8,23 @@ public class EventMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public EventMetadataExample() { oredCriteria = new ArrayList(); @@ -32,7 +32,7 @@ public EventMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -40,7 +40,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -48,7 +48,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -56,7 +56,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -64,7 +64,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -72,7 +72,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -80,7 +80,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -90,7 +90,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -102,7 +102,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -111,7 +111,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -121,7 +121,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -460,52 +460,52 @@ public Criteria andServerVersionIsNotNull() { return (Criteria) this; } - public Criteria andServerVersionEqualTo(Date value) { + public Criteria andServerVersionEqualTo(Long value) { addCriterion("server_version =", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionNotEqualTo(Date value) { + public Criteria andServerVersionNotEqualTo(Long value) { addCriterion("server_version <>", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionGreaterThan(Date value) { + public Criteria andServerVersionGreaterThan(Long value) { addCriterion("server_version >", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionGreaterThanOrEqualTo(Date value) { + public Criteria andServerVersionGreaterThanOrEqualTo(Long value) { addCriterion("server_version >=", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionLessThan(Date value) { + public Criteria andServerVersionLessThan(Long value) { addCriterion("server_version <", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionLessThanOrEqualTo(Date value) { + public Criteria andServerVersionLessThanOrEqualTo(Long value) { addCriterion("server_version <=", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionIn(List values) { + public Criteria andServerVersionIn(List values) { addCriterion("server_version in", values, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionNotIn(List values) { + public Criteria andServerVersionNotIn(List values) { addCriterion("server_version not in", values, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionBetween(Date value1, Date value2) { + public Criteria andServerVersionBetween(Long value1, Long value2) { addCriterion("server_version between", value1, value2, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionNotBetween(Date value1, Date value2) { + public Criteria andServerVersionNotBetween(Long value1, Long value2) { addCriterion("server_version not between", value1, value2, "serverVersion"); return (Criteria) this; } @@ -993,7 +993,7 @@ public Criteria andTeamIdNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMedia.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMedia.java new file mode 100644 index 0000000000..8208128c92 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMedia.java @@ -0,0 +1,143 @@ +package org.opensrp.domain.postgres; + +public class MultiMedia { + + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private Long id; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.case_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String caseId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.provider_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String providerId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.content_type + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String contentType; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.file_path + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String filePath; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.file_category + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + private String fileCategory; + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.id + * @return the value of core.multi_media.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.id + * @param id the value for core.multi_media.id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.case_id + * @return the value of core.multi_media.case_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getCaseId() { + return caseId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.case_id + * @param caseId the value for core.multi_media.case_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setCaseId(String caseId) { + this.caseId = caseId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.provider_id + * @return the value of core.multi_media.provider_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getProviderId() { + return providerId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.provider_id + * @param providerId the value for core.multi_media.provider_id + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.content_type + * @return the value of core.multi_media.content_type + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getContentType() { + return contentType; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.content_type + * @param contentType the value for core.multi_media.content_type + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setContentType(String contentType) { + this.contentType = contentType; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.file_path + * @return the value of core.multi_media.file_path + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getFilePath() { + return filePath; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.file_path + * @param filePath the value for core.multi_media.file_path + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setFilePath(String filePath) { + this.filePath = filePath; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.file_category + * @return the value of core.multi_media.file_category + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getFileCategory() { + return fileCategory; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.file_category + * @param fileCategory the value for core.multi_media.file_category + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setFileCategory(String fileCategory) { + this.fileCategory = fileCategory; + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMediaExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMediaExample.java new file mode 100644 index 0000000000..d86c481290 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMediaExample.java @@ -0,0 +1,671 @@ +package org.opensrp.domain.postgres; + +import java.util.ArrayList; +import java.util.List; + +public class MultiMediaExample { + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected String orderByClause; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected boolean distinct; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public MultiMediaExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andCaseIdIsNull() { + addCriterion("case_id is null"); + return (Criteria) this; + } + + public Criteria andCaseIdIsNotNull() { + addCriterion("case_id is not null"); + return (Criteria) this; + } + + public Criteria andCaseIdEqualTo(String value) { + addCriterion("case_id =", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotEqualTo(String value) { + addCriterion("case_id <>", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdGreaterThan(String value) { + addCriterion("case_id >", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdGreaterThanOrEqualTo(String value) { + addCriterion("case_id >=", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLessThan(String value) { + addCriterion("case_id <", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLessThanOrEqualTo(String value) { + addCriterion("case_id <=", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdLike(String value) { + addCriterion("case_id like", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotLike(String value) { + addCriterion("case_id not like", value, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdIn(List values) { + addCriterion("case_id in", values, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotIn(List values) { + addCriterion("case_id not in", values, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdBetween(String value1, String value2) { + addCriterion("case_id between", value1, value2, "caseId"); + return (Criteria) this; + } + + public Criteria andCaseIdNotBetween(String value1, String value2) { + addCriterion("case_id not between", value1, value2, "caseId"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNull() { + addCriterion("provider_id is null"); + return (Criteria) this; + } + + public Criteria andProviderIdIsNotNull() { + addCriterion("provider_id is not null"); + return (Criteria) this; + } + + public Criteria andProviderIdEqualTo(String value) { + addCriterion("provider_id =", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotEqualTo(String value) { + addCriterion("provider_id <>", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThan(String value) { + addCriterion("provider_id >", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdGreaterThanOrEqualTo(String value) { + addCriterion("provider_id >=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThan(String value) { + addCriterion("provider_id <", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLessThanOrEqualTo(String value) { + addCriterion("provider_id <=", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdLike(String value) { + addCriterion("provider_id like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotLike(String value) { + addCriterion("provider_id not like", value, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdIn(List values) { + addCriterion("provider_id in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotIn(List values) { + addCriterion("provider_id not in", values, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdBetween(String value1, String value2) { + addCriterion("provider_id between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andProviderIdNotBetween(String value1, String value2) { + addCriterion("provider_id not between", value1, value2, "providerId"); + return (Criteria) this; + } + + public Criteria andContentTypeIsNull() { + addCriterion("content_type is null"); + return (Criteria) this; + } + + public Criteria andContentTypeIsNotNull() { + addCriterion("content_type is not null"); + return (Criteria) this; + } + + public Criteria andContentTypeEqualTo(String value) { + addCriterion("content_type =", value, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeNotEqualTo(String value) { + addCriterion("content_type <>", value, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeGreaterThan(String value) { + addCriterion("content_type >", value, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeGreaterThanOrEqualTo(String value) { + addCriterion("content_type >=", value, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeLessThan(String value) { + addCriterion("content_type <", value, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeLessThanOrEqualTo(String value) { + addCriterion("content_type <=", value, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeLike(String value) { + addCriterion("content_type like", value, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeNotLike(String value) { + addCriterion("content_type not like", value, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeIn(List values) { + addCriterion("content_type in", values, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeNotIn(List values) { + addCriterion("content_type not in", values, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeBetween(String value1, String value2) { + addCriterion("content_type between", value1, value2, "contentType"); + return (Criteria) this; + } + + public Criteria andContentTypeNotBetween(String value1, String value2) { + addCriterion("content_type not between", value1, value2, "contentType"); + return (Criteria) this; + } + + public Criteria andFilePathIsNull() { + addCriterion("file_path is null"); + return (Criteria) this; + } + + public Criteria andFilePathIsNotNull() { + addCriterion("file_path is not null"); + return (Criteria) this; + } + + public Criteria andFilePathEqualTo(String value) { + addCriterion("file_path =", value, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathNotEqualTo(String value) { + addCriterion("file_path <>", value, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathGreaterThan(String value) { + addCriterion("file_path >", value, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathGreaterThanOrEqualTo(String value) { + addCriterion("file_path >=", value, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathLessThan(String value) { + addCriterion("file_path <", value, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathLessThanOrEqualTo(String value) { + addCriterion("file_path <=", value, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathLike(String value) { + addCriterion("file_path like", value, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathNotLike(String value) { + addCriterion("file_path not like", value, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathIn(List values) { + addCriterion("file_path in", values, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathNotIn(List values) { + addCriterion("file_path not in", values, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathBetween(String value1, String value2) { + addCriterion("file_path between", value1, value2, "filePath"); + return (Criteria) this; + } + + public Criteria andFilePathNotBetween(String value1, String value2) { + addCriterion("file_path not between", value1, value2, "filePath"); + return (Criteria) this; + } + + public Criteria andFileCategoryIsNull() { + addCriterion("file_category is null"); + return (Criteria) this; + } + + public Criteria andFileCategoryIsNotNull() { + addCriterion("file_category is not null"); + return (Criteria) this; + } + + public Criteria andFileCategoryEqualTo(String value) { + addCriterion("file_category =", value, "fileCategory"); + return (Criteria) this; + } + + public Criteria andFileCategoryNotEqualTo(String value) { + addCriterion("file_category <>", value, "fileCategory"); + return (Criteria) this; + } + + public Criteria andFileCategoryGreaterThan(String value) { + addCriterion("file_category >", value, "fileCategory"); + return (Criteria) this; + } + + public Criteria andFileCategoryGreaterThanOrEqualTo(String value) { + addCriterion("file_category >=", value, "fileCategory"); + return (Criteria) this; + } + + public Criteria andFileCategoryLessThan(String value) { + addCriterion("file_category <", value, "fileCategory"); + return (Criteria) this; + } + + public Criteria andFileCategoryLessThanOrEqualTo(String value) { + addCriterion("file_category <=", value, "fileCategory"); + return (Criteria) this; + } + + public Criteria andFileCategoryLike(String value) { + addCriterion("file_category like", value, "fileCategory"); + return (Criteria) this; + } + + public Criteria andFileCategoryNotLike(String value) { + addCriterion("file_category not like", value, "fileCategory"); + return (Criteria) this; + } + + public Criteria andFileCategoryIn(List values) { + addCriterion("file_category in", values, "fileCategory"); + return (Criteria) this; + } + + public Criteria andFileCategoryNotIn(List values) { + addCriterion("file_category not in", values, "fileCategory"); + return (Criteria) this; + } + + public Criteria andFileCategoryBetween(String value1, String value2) { + addCriterion("file_category between", value1, value2, "fileCategory"); + return (Criteria) this; + } + + public Criteria andFileCategoryNotBetween(String value1, String value2) { + addCriterion("file_category not between", value1, value2, "fileCategory"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } + + /** + * This class was generated by MyBatis Generator. + * This class corresponds to the database table core.multi_media + * + * @mbg.generated do_not_delete_during_merge Fri Mar 09 18:03:53 EAT 2018 + */ + public static class Criteria extends GeneratedCriteria { + + protected Criteria() { + super(); + } + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java index 7b03ab177c..9c3a1007f7 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java @@ -4,19 +4,19 @@ public class Report { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report.json - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report.id * @return the value of core.report.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report.id * @param id the value for core.report.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report.json * @return the value of core.report.json - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report.json * @param json the value for core.report.json - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java index e64f19be06..566783848d 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java @@ -6,23 +6,23 @@ public class ReportExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public ReportExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public ReportExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -285,7 +285,7 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java index 3f6ae59598..6b09d97e1d 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java @@ -6,54 +6,54 @@ public class ReportMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.report_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Long reportId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.base_entity_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.server_version - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ - private Date serverVersion; + private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.report_type - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String reportType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.provider_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.location_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.team - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.team_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String teamId; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.id * @return the value of core.report_metadata.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Long getId() { return id; @@ -62,7 +62,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.id * @param id the value for core.report_metadata.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -71,7 +71,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.report_id * @return the value of core.report_metadata.report_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Long getReportId() { return reportId; @@ -80,7 +80,7 @@ public Long getReportId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.report_id * @param reportId the value for core.report_metadata.report_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setReportId(Long reportId) { this.reportId = reportId; @@ -89,7 +89,7 @@ public void setReportId(Long reportId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.base_entity_id * @return the value of core.report_metadata.base_entity_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -98,7 +98,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.base_entity_id * @param baseEntityId the value for core.report_metadata.base_entity_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -107,25 +107,25 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.server_version * @return the value of core.report_metadata.server_version - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ - public Date getServerVersion() { + public Long getServerVersion() { return serverVersion; } /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.server_version * @param serverVersion the value for core.report_metadata.server_version - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ - public void setServerVersion(Date serverVersion) { + public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; } /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.report_type * @return the value of core.report_metadata.report_type - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getReportType() { return reportType; @@ -134,7 +134,7 @@ public String getReportType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.report_type * @param reportType the value for core.report_metadata.report_type - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setReportType(String reportType) { this.reportType = reportType; @@ -143,7 +143,7 @@ public void setReportType(String reportType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.provider_id * @return the value of core.report_metadata.provider_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getProviderId() { return providerId; @@ -152,7 +152,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.provider_id * @param providerId the value for core.report_metadata.provider_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -161,7 +161,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.location_id * @return the value of core.report_metadata.location_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getLocationId() { return locationId; @@ -170,7 +170,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.location_id * @param locationId the value for core.report_metadata.location_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -179,7 +179,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.team * @return the value of core.report_metadata.team - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getTeam() { return team; @@ -188,7 +188,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.team * @param team the value for core.report_metadata.team - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -197,7 +197,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.team_id * @return the value of core.report_metadata.team_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getTeamId() { return teamId; @@ -206,7 +206,7 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.team_id * @param teamId the value for core.report_metadata.team_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java index fee2fe07d6..5e4f3d69aa 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java @@ -7,23 +7,23 @@ public class ReportMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public ReportMetadataExample() { oredCriteria = new ArrayList(); @@ -31,7 +31,7 @@ public ReportMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -39,7 +39,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -47,7 +47,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -55,7 +55,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -63,7 +63,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -71,7 +71,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -79,7 +79,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -89,7 +89,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -101,7 +101,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -110,7 +110,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -120,7 +120,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -363,52 +363,52 @@ public Criteria andServerVersionIsNotNull() { return (Criteria) this; } - public Criteria andServerVersionEqualTo(Date value) { + public Criteria andServerVersionEqualTo(Long value) { addCriterion("server_version =", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionNotEqualTo(Date value) { + public Criteria andServerVersionNotEqualTo(Long value) { addCriterion("server_version <>", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionGreaterThan(Date value) { + public Criteria andServerVersionGreaterThan(Long value) { addCriterion("server_version >", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionGreaterThanOrEqualTo(Date value) { + public Criteria andServerVersionGreaterThanOrEqualTo(Long value) { addCriterion("server_version >=", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionLessThan(Date value) { + public Criteria andServerVersionLessThan(Long value) { addCriterion("server_version <", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionLessThanOrEqualTo(Date value) { + public Criteria andServerVersionLessThanOrEqualTo(Long value) { addCriterion("server_version <=", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionIn(List values) { + public Criteria andServerVersionIn(List values) { addCriterion("server_version in", values, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionNotIn(List values) { + public Criteria andServerVersionNotIn(List values) { addCriterion("server_version not in", values, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionBetween(Date value1, Date value2) { + public Criteria andServerVersionBetween(Long value1, Long value2) { addCriterion("server_version between", value1, value2, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionNotBetween(Date value1, Date value2) { + public Criteria andServerVersionNotBetween(Long value1, Long value2) { addCriterion("server_version not between", value1, value2, "serverVersion"); return (Criteria) this; } @@ -766,7 +766,7 @@ public Criteria andTeamIdNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java index b440496e75..7d5e736a94 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java @@ -4,19 +4,19 @@ public class Stock { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock.json - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock.id * @return the value of core.stock.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock.id * @param id the value for core.stock.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock.json * @return the value of core.stock.json - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock.json * @param json the value for core.stock.json - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java index aaeab23a4b..9663cc6265 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java @@ -6,23 +6,23 @@ public class StockExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public StockExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public StockExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -285,7 +285,7 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java index 78fa3f17ea..4f98e78031 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java @@ -6,44 +6,44 @@ public class StockMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.stock_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private Long stockId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.server_version - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ - private Date serverVersion; + private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.provider_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.location_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.team - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.team_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ private String teamId; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.id * @return the value of core.stock_metadata.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Long getId() { return id; @@ -52,7 +52,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.id * @param id the value for core.stock_metadata.id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -61,7 +61,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.stock_id * @return the value of core.stock_metadata.stock_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Long getStockId() { return stockId; @@ -70,7 +70,7 @@ public Long getStockId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.stock_id * @param stockId the value for core.stock_metadata.stock_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setStockId(Long stockId) { this.stockId = stockId; @@ -79,25 +79,25 @@ public void setStockId(Long stockId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.server_version * @return the value of core.stock_metadata.server_version - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ - public Date getServerVersion() { + public Long getServerVersion() { return serverVersion; } /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.server_version * @param serverVersion the value for core.stock_metadata.server_version - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ - public void setServerVersion(Date serverVersion) { + public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; } /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.provider_id * @return the value of core.stock_metadata.provider_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getProviderId() { return providerId; @@ -106,7 +106,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.provider_id * @param providerId the value for core.stock_metadata.provider_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -115,7 +115,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.location_id * @return the value of core.stock_metadata.location_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getLocationId() { return locationId; @@ -124,7 +124,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.location_id * @param locationId the value for core.stock_metadata.location_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -133,7 +133,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.team * @return the value of core.stock_metadata.team - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getTeam() { return team; @@ -142,7 +142,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.team * @param team the value for core.stock_metadata.team - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -151,7 +151,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.team_id * @return the value of core.stock_metadata.team_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getTeamId() { return teamId; @@ -160,7 +160,7 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.team_id * @param teamId the value for core.stock_metadata.team_id - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java index 340640a4f9..0178c45078 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java @@ -7,23 +7,23 @@ public class StockMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public StockMetadataExample() { oredCriteria = new ArrayList(); @@ -31,7 +31,7 @@ public StockMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -39,7 +39,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -47,7 +47,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -55,7 +55,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -63,7 +63,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -71,7 +71,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -79,7 +79,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -89,7 +89,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -101,7 +101,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -110,7 +110,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -120,7 +120,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -293,52 +293,52 @@ public Criteria andServerVersionIsNotNull() { return (Criteria) this; } - public Criteria andServerVersionEqualTo(Date value) { + public Criteria andServerVersionEqualTo(Long value) { addCriterion("server_version =", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionNotEqualTo(Date value) { + public Criteria andServerVersionNotEqualTo(Long value) { addCriterion("server_version <>", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionGreaterThan(Date value) { + public Criteria andServerVersionGreaterThan(Long value) { addCriterion("server_version >", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionGreaterThanOrEqualTo(Date value) { + public Criteria andServerVersionGreaterThanOrEqualTo(Long value) { addCriterion("server_version >=", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionLessThan(Date value) { + public Criteria andServerVersionLessThan(Long value) { addCriterion("server_version <", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionLessThanOrEqualTo(Date value) { + public Criteria andServerVersionLessThanOrEqualTo(Long value) { addCriterion("server_version <=", value, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionIn(List values) { + public Criteria andServerVersionIn(List values) { addCriterion("server_version in", values, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionNotIn(List values) { + public Criteria andServerVersionNotIn(List values) { addCriterion("server_version not in", values, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionBetween(Date value1, Date value2) { + public Criteria andServerVersionBetween(Long value1, Long value2) { addCriterion("server_version between", value1, value2, "serverVersion"); return (Criteria) this; } - public Criteria andServerVersionNotBetween(Date value1, Date value2) { + public Criteria andServerVersionNotBetween(Long value1, Long value2) { addCriterion("server_version not between", value1, value2, "serverVersion"); return (Criteria) this; } @@ -626,7 +626,7 @@ public Criteria andTeamIdNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java index 68c5e46218..4f5906b9d3 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java @@ -6,91 +6,70 @@ import org.opensrp.domain.postgres.ActionExample; public interface ActionMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - long countByExample(ActionExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int deleteByExample(ActionExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + long countByExample(ActionExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int deleteByExample(ActionExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int insert(Action record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int insertSelective(Action record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int insert(Action record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - List selectByExample(ActionExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int insertSelective(Action record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - Action selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + List selectByExample(ActionExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Action record, @Param("example") ActionExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + Action selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int updateByExample(@Param("record") Action record, @Param("example") ActionExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Action record, @Param("example") ActionExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int updateByPrimaryKeySelective(Action record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByExample(@Param("record") Action record, @Param("example") ActionExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int updateByPrimaryKey(Action record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByPrimaryKeySelective(Action record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByPrimaryKey(Action record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java index dad88923d7..c582f74935 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java @@ -6,91 +6,71 @@ import org.opensrp.domain.postgres.ActionMetadataExample; public interface ActionMetadataMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - long countByExample(ActionMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int deleteByExample(ActionMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + long countByExample(ActionMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int deleteByExample(ActionMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int insert(ActionMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int insertSelective(ActionMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int insert(ActionMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - List selectByExample(ActionMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int insertSelective(ActionMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - ActionMetadata selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + List selectByExample(ActionMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int updateByExampleSelective(@Param("record") ActionMetadata record, @Param("example") ActionMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + ActionMetadata selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int updateByExample(@Param("record") ActionMetadata record, @Param("example") ActionMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByExampleSelective(@Param("record") ActionMetadata record, + @Param("example") ActionMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int updateByPrimaryKeySelective(ActionMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByExample(@Param("record") ActionMetadata record, @Param("example") ActionMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int updateByPrimaryKey(ActionMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByPrimaryKeySelective(ActionMetadata record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByPrimaryKey(ActionMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java index d55379fcec..69d0114e36 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java @@ -6,91 +6,70 @@ import org.opensrp.domain.postgres.AlertExample; public interface AlertMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - long countByExample(AlertExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int deleteByExample(AlertExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + long countByExample(AlertExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int deleteByExample(AlertExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int insert(Alert record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int insertSelective(Alert record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int insert(Alert record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - List selectByExample(AlertExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int insertSelective(Alert record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - Alert selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + List selectByExample(AlertExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Alert record, @Param("example") AlertExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + Alert selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int updateByExample(@Param("record") Alert record, @Param("example") AlertExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Alert record, @Param("example") AlertExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int updateByPrimaryKeySelective(Alert record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByExample(@Param("record") Alert record, @Param("example") AlertExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int updateByPrimaryKey(Alert record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByPrimaryKeySelective(Alert record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByPrimaryKey(Alert record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java index 266753e084..dbbcbb6a11 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java @@ -6,91 +6,70 @@ import org.opensrp.domain.postgres.AlertMetadataExample; public interface AlertMetadataMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - long countByExample(AlertMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int deleteByExample(AlertMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + long countByExample(AlertMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int deleteByExample(AlertMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int insert(AlertMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int insertSelective(AlertMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int insert(AlertMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - List selectByExample(AlertMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int insertSelective(AlertMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - AlertMetadata selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + List selectByExample(AlertMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int updateByExampleSelective(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + AlertMetadata selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int updateByExample(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByExampleSelective(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int updateByPrimaryKeySelective(AlertMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByExample(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 - */ - int updateByPrimaryKey(AlertMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByPrimaryKeySelective(AlertMetadata record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByPrimaryKey(AlertMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AppStateTokenMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AppStateTokenMapper.java new file mode 100644 index 0000000000..6473c36959 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AppStateTokenMapper.java @@ -0,0 +1,75 @@ +package org.opensrp.repository.postgres.mapper; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.AppStateToken; +import org.opensrp.domain.postgres.AppStateTokenExample; + +public interface AppStateTokenMapper { + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + long countByExample(AppStateTokenExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int deleteByExample(AppStateTokenExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int insert(AppStateToken record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int insertSelective(AppStateToken record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + List selectByExample(AppStateTokenExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + AppStateToken selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByExampleSelective(@Param("record") AppStateToken record, @Param("example") AppStateTokenExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByExample(@Param("record") AppStateToken record, @Param("example") AppStateTokenExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByPrimaryKeySelective(AppStateToken record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByPrimaryKey(AppStateToken record); +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java index 8dea8ccc8f..5ae050bb6e 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java @@ -9,67 +9,67 @@ public interface ClientMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ long countByExample(ClientExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int deleteByExample(ClientExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int insert(Client record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int insertSelective(Client record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ List selectByExample(ClientExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ Client selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByExampleSelective(@Param("record") Client record, @Param("example") ClientExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByExample(@Param("record") Client record, @Param("example") ClientExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByPrimaryKeySelective(Client record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByPrimaryKey(Client record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java index f44baa61d9..a725b21cb1 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java @@ -9,68 +9,68 @@ public interface ClientMetadataMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ long countByExample(ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int deleteByExample(ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int insert(ClientMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int insertSelective(ClientMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ List selectByExample(ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ ClientMetadata selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByExampleSelective(@Param("record") ClientMetadata record, @Param("example") ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByExample(@Param("record") ClientMetadata record, @Param("example") ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByPrimaryKeySelective(ClientMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByPrimaryKey(ClientMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java new file mode 100644 index 0000000000..976abdc2fe --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java @@ -0,0 +1,96 @@ +package org.opensrp.repository.postgres.mapper; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.ErrorTrace; +import org.opensrp.domain.postgres.ErrorTraceExample; + +public interface ErrorTraceMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + long countByExample(ErrorTraceExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int deleteByExample(ErrorTraceExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int insert(ErrorTrace record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int insertSelective(ErrorTrace record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + List selectByExample(ErrorTraceExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + ErrorTrace selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByExampleSelective(@Param("record") ErrorTrace record, @Param("example") ErrorTraceExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByExample(@Param("record") ErrorTrace record, @Param("example") ErrorTraceExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByPrimaryKeySelective(ErrorTrace record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table error.error_trace + * + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByPrimaryKey(ErrorTrace record); +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java index b342a14aeb..b6cd5a2f3a 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java @@ -9,67 +9,67 @@ public interface EventMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ long countByExample(EventExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int deleteByExample(EventExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int insert(Event record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int insertSelective(Event record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ List selectByExample(EventExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ Event selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByExampleSelective(@Param("record") Event record, @Param("example") EventExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByExample(@Param("record") Event record, @Param("example") EventExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByPrimaryKeySelective(Event record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByPrimaryKey(Event record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java index db7c7ea425..c549b07b85 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java @@ -9,67 +9,67 @@ public interface EventMetadataMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ long countByExample(EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int deleteByExample(EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int insert(EventMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int insertSelective(EventMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ List selectByExample(EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ EventMetadata selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByExampleSelective(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByExample(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByPrimaryKeySelective(EventMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByPrimaryKey(EventMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java new file mode 100644 index 0000000000..2b49b8a45d --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java @@ -0,0 +1,75 @@ +package org.opensrp.repository.postgres.mapper; + +import java.util.List; +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.MultiMedia; +import org.opensrp.domain.postgres.MultiMediaExample; + +public interface MultiMediaMapper { + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + long countByExample(MultiMediaExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int deleteByExample(MultiMediaExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int deleteByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int insert(MultiMedia record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int insertSelective(MultiMedia record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + List selectByExample(MultiMediaExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + MultiMedia selectByPrimaryKey(Long id); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByExampleSelective(@Param("record") MultiMedia record, @Param("example") MultiMediaExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByExample(@Param("record") MultiMedia record, @Param("example") MultiMediaExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByPrimaryKeySelective(MultiMedia record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + */ + int updateByPrimaryKey(MultiMedia record); +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java index ede2292ccf..e41fc212af 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java @@ -9,67 +9,67 @@ public interface ReportMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ long countByExample(ReportExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int deleteByExample(ReportExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int insert(Report record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int insertSelective(Report record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ List selectByExample(ReportExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ Report selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByExampleSelective(@Param("record") Report record, @Param("example") ReportExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByExample(@Param("record") Report record, @Param("example") ReportExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByPrimaryKeySelective(Report record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByPrimaryKey(Report record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java index 7bf54aa393..26fd796a66 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java @@ -9,68 +9,68 @@ public interface ReportMetadataMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ long countByExample(ReportMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int deleteByExample(ReportMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int insert(ReportMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int insertSelective(ReportMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ List selectByExample(ReportMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ ReportMetadata selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByExampleSelective(@Param("record") ReportMetadata record, @Param("example") ReportMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByExample(@Param("record") ReportMetadata record, @Param("example") ReportMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByPrimaryKeySelective(ReportMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByPrimaryKey(ReportMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java index ccfdb7ea30..9b45614cb5 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java @@ -9,67 +9,67 @@ public interface StockMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ long countByExample(StockExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int deleteByExample(StockExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int insert(Stock record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int insertSelective(Stock record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ List selectByExample(StockExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ Stock selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByExampleSelective(@Param("record") Stock record, @Param("example") StockExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByExample(@Param("record") Stock record, @Param("example") StockExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByPrimaryKeySelective(Stock record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByPrimaryKey(Stock record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java index c34f8a7fd4..79c9cee699 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java @@ -9,67 +9,67 @@ public interface StockMetadataMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ long countByExample(StockMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int deleteByExample(StockMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int insert(StockMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int insertSelective(StockMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ List selectByExample(StockMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ StockMetadata selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByExampleSelective(@Param("record") StockMetadata record, @Param("example") StockMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByExample(@Param("record") StockMetadata record, @Param("example") StockMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByPrimaryKeySelective(StockMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 15:24:01 EAT 2018 + * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 */ int updateByPrimaryKey(StockMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMapper.xml index aaf2bc7bdd..1a95365a21 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.action where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.action @@ -140,7 +140,7 @@ insert into core.action (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.action @@ -173,7 +173,7 @@ select count(*) from core.action @@ -184,7 +184,7 @@ update core.action @@ -203,7 +203,7 @@ update core.action set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.action @@ -230,7 +230,7 @@ update core.action set json = #{json,jdbcType=OTHER} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml index e62dea6d3e..69f790f7f0 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml @@ -5,12 +5,12 @@ - + @@ -20,7 +20,7 @@ @@ -54,7 +54,7 @@ @@ -88,7 +88,7 @@ id, action_id, base_entity_id, server_version, provider_id, location_id, team, team_id @@ -96,7 +96,7 @@ select @@ -115,7 +115,7 @@ select @@ -126,7 +126,7 @@ delete from core.action_metadata where id = #{id,jdbcType=BIGINT} @@ -135,7 +135,7 @@ delete from core.action_metadata @@ -146,20 +146,20 @@ insert into core.action_metadata (id, action_id, base_entity_id, server_version, provider_id, location_id, team, team_id) values (#{id,jdbcType=BIGINT}, #{actionId,jdbcType=BIGINT}, #{baseEntityId,jdbcType=VARCHAR}, - #{serverVersion,jdbcType=TIMESTAMP}, #{providerId,jdbcType=VARCHAR}, #{locationId,jdbcType=VARCHAR}, + #{serverVersion,jdbcType=BIGINT}, #{providerId,jdbcType=VARCHAR}, #{locationId,jdbcType=VARCHAR}, #{team,jdbcType=VARCHAR}, #{teamId,jdbcType=VARCHAR}) insert into core.action_metadata @@ -199,7 +199,7 @@ #{baseEntityId,jdbcType=VARCHAR}, - #{serverVersion,jdbcType=TIMESTAMP}, + #{serverVersion,jdbcType=BIGINT}, #{providerId,jdbcType=VARCHAR}, @@ -219,7 +219,7 @@ select count(*) from core.action_metadata @@ -230,7 +230,7 @@ update core.action_metadata @@ -244,7 +244,7 @@ base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, - server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + server_version = #{record.serverVersion,jdbcType=BIGINT}, provider_id = #{record.providerId,jdbcType=VARCHAR}, @@ -267,13 +267,13 @@ update core.action_metadata set id = #{record.id,jdbcType=BIGINT}, action_id = #{record.actionId,jdbcType=BIGINT}, base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, - server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + server_version = #{record.serverVersion,jdbcType=BIGINT}, provider_id = #{record.providerId,jdbcType=VARCHAR}, location_id = #{record.locationId,jdbcType=VARCHAR}, team = #{record.team,jdbcType=VARCHAR}, @@ -286,7 +286,7 @@ update core.action_metadata @@ -297,7 +297,7 @@ base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, - server_version = #{serverVersion,jdbcType=TIMESTAMP}, + server_version = #{serverVersion,jdbcType=BIGINT}, provider_id = #{providerId,jdbcType=VARCHAR}, @@ -318,12 +318,12 @@ update core.action_metadata set action_id = #{actionId,jdbcType=BIGINT}, base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, - server_version = #{serverVersion,jdbcType=TIMESTAMP}, + server_version = #{serverVersion,jdbcType=BIGINT}, provider_id = #{providerId,jdbcType=VARCHAR}, location_id = #{locationId,jdbcType=VARCHAR}, team = #{team,jdbcType=VARCHAR}, diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml index 3e9fd36a16..7472f505fe 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.alert where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.alert @@ -140,7 +140,7 @@ insert into core.alert (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.alert @@ -173,7 +173,7 @@ select count(*) from core.alert @@ -184,7 +184,7 @@ update core.alert @@ -203,7 +203,7 @@ update core.alert set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.alert @@ -230,7 +230,7 @@ update core.alert set json = #{json,jdbcType=OTHER} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml index 65c1fb76e6..45841c129b 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml @@ -5,12 +5,12 @@ - + @@ -22,7 +22,7 @@ @@ -56,7 +56,7 @@ @@ -90,7 +90,7 @@ id, alert_id, base_entity_id, server_version, provider_id, location_id, team, team_id, is_active, trigger_name @@ -99,7 +99,7 @@ select @@ -118,7 +118,7 @@ select @@ -129,7 +129,7 @@ delete from core.alert_metadata where id = #{id,jdbcType=BIGINT} @@ -138,7 +138,7 @@ delete from core.alert_metadata @@ -149,14 +149,14 @@ insert into core.alert_metadata (id, alert_id, base_entity_id, server_version, provider_id, location_id, team, team_id, is_active, trigger_name) values (#{id,jdbcType=BIGINT}, #{alertId,jdbcType=BIGINT}, #{baseEntityId,jdbcType=VARCHAR}, - #{serverVersion,jdbcType=TIMESTAMP}, #{providerId,jdbcType=VARCHAR}, #{locationId,jdbcType=VARCHAR}, + #{serverVersion,jdbcType=BIGINT}, #{providerId,jdbcType=VARCHAR}, #{locationId,jdbcType=VARCHAR}, #{team,jdbcType=VARCHAR}, #{teamId,jdbcType=VARCHAR}, #{isActive,jdbcType=BIT}, #{triggerName,jdbcType=VARCHAR}) @@ -164,7 +164,7 @@ insert into core.alert_metadata @@ -210,7 +210,7 @@ #{baseEntityId,jdbcType=VARCHAR}, - #{serverVersion,jdbcType=TIMESTAMP}, + #{serverVersion,jdbcType=BIGINT}, #{providerId,jdbcType=VARCHAR}, @@ -236,7 +236,7 @@ select count(*) from core.alert_metadata @@ -247,7 +247,7 @@ update core.alert_metadata @@ -261,7 +261,7 @@ base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, - server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + server_version = #{record.serverVersion,jdbcType=BIGINT}, provider_id = #{record.providerId,jdbcType=VARCHAR}, @@ -290,13 +290,13 @@ update core.alert_metadata set id = #{record.id,jdbcType=BIGINT}, alert_id = #{record.alertId,jdbcType=BIGINT}, base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, - server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + server_version = #{record.serverVersion,jdbcType=BIGINT}, provider_id = #{record.providerId,jdbcType=VARCHAR}, location_id = #{record.locationId,jdbcType=VARCHAR}, team = #{record.team,jdbcType=VARCHAR}, @@ -311,7 +311,7 @@ update core.alert_metadata @@ -322,7 +322,7 @@ base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, - server_version = #{serverVersion,jdbcType=TIMESTAMP}, + server_version = #{serverVersion,jdbcType=BIGINT}, provider_id = #{providerId,jdbcType=VARCHAR}, @@ -349,12 +349,12 @@ update core.alert_metadata set alert_id = #{alertId,jdbcType=BIGINT}, base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, - server_version = #{serverVersion,jdbcType=TIMESTAMP}, + server_version = #{serverVersion,jdbcType=BIGINT}, provider_id = #{providerId,jdbcType=VARCHAR}, location_id = #{locationId,jdbcType=VARCHAR}, team = #{team,jdbcType=VARCHAR}, diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AppStateTokenMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AppStateTokenMapper.xml new file mode 100644 index 0000000000..d4ffa9fbe2 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AppStateTokenMapper.xml @@ -0,0 +1,286 @@ + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, name, description, value, last_edited_date + + + + + + delete from core.app_state_token + where id = #{id,jdbcType=BIGINT} + + + + delete from core.app_state_token + + + + + + + insert into core.app_state_token (id, name, description, + value, last_edited_date) + values (#{id,jdbcType=BIGINT}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR}, + #{value,jdbcType=VARCHAR}, #{lastEditedDate,jdbcType=BIGINT}) + + + + insert into core.app_state_token + + + id, + + + name, + + + description, + + + value, + + + last_edited_date, + + + + + #{id,jdbcType=BIGINT}, + + + #{name,jdbcType=VARCHAR}, + + + #{description,jdbcType=VARCHAR}, + + + #{value,jdbcType=VARCHAR}, + + + #{lastEditedDate,jdbcType=BIGINT}, + + + + + + + update core.app_state_token + + + id = #{record.id,jdbcType=BIGINT}, + + + name = #{record.name,jdbcType=VARCHAR}, + + + description = #{record.description,jdbcType=VARCHAR}, + + + value = #{record.value,jdbcType=VARCHAR}, + + + last_edited_date = #{record.lastEditedDate,jdbcType=BIGINT}, + + + + + + + + + update core.app_state_token + set id = #{record.id,jdbcType=BIGINT}, + name = #{record.name,jdbcType=VARCHAR}, + description = #{record.description,jdbcType=VARCHAR}, + value = #{record.value,jdbcType=VARCHAR}, + last_edited_date = #{record.lastEditedDate,jdbcType=BIGINT} + + + + + + + update core.app_state_token + + + name = #{name,jdbcType=VARCHAR}, + + + description = #{description,jdbcType=VARCHAR}, + + + value = #{value,jdbcType=VARCHAR}, + + + last_edited_date = #{lastEditedDate,jdbcType=BIGINT}, + + + where id = #{id,jdbcType=BIGINT} + + + + update core.app_state_token + set name = #{name,jdbcType=VARCHAR}, + description = #{description,jdbcType=VARCHAR}, + value = #{value,jdbcType=VARCHAR}, + last_edited_date = #{lastEditedDate,jdbcType=BIGINT} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml index f41be4c47a..157028509a 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.client where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.client @@ -140,7 +140,7 @@ insert into core.client (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.client @@ -173,7 +173,7 @@ select count(*) from core.client @@ -184,7 +184,7 @@ update core.client @@ -203,7 +203,7 @@ update core.client set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.client @@ -230,7 +230,7 @@ update core.client set json = #{json,jdbcType=OTHER} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml index f8326be879..859b4c9cd9 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -21,7 +21,7 @@ @@ -55,7 +55,7 @@ @@ -89,7 +89,7 @@ id, client_id, base_entity_id, relational_id, openmrs_uuid, unique_id, first_name, last_name, birth_date @@ -98,7 +98,7 @@ select @@ -117,7 +117,7 @@ select @@ -128,7 +128,7 @@ delete from core.client_metadata where id = #{id,jdbcType=BIGINT} @@ -137,7 +137,7 @@ delete from core.client_metadata @@ -148,7 +148,7 @@ insert into core.client_metadata (id, client_id, base_entity_id, relational_id, openmrs_uuid, unique_id, @@ -163,7 +163,7 @@ insert into core.client_metadata @@ -229,7 +229,7 @@ select count(*) from core.client_metadata @@ -240,7 +240,7 @@ update core.client_metadata @@ -280,7 +280,7 @@ update core.client_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -300,7 +300,7 @@ update core.client_metadata @@ -335,7 +335,7 @@ update core.client_metadata set client_id = #{clientId,jdbcType=BIGINT}, diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ErrorTraceMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ErrorTraceMapper.xml new file mode 100644 index 0000000000..a5c05810ca --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ErrorTraceMapper.xml @@ -0,0 +1,366 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, + document_type, retry_url + + + + + + delete from error.error_trace + where id = #{id,jdbcType=BIGINT} + + + + delete from error.error_trace + + + + + + + insert into error.error_trace (id, date_occurred, error_type, + occurred_at, stack_trace, status, + record_id, date_closed, document_type, + retry_url) + values (#{id,jdbcType=BIGINT}, #{dateOccurred,jdbcType=DATE}, #{errorType,jdbcType=VARCHAR}, + #{occurredAt,jdbcType=VARCHAR}, #{stackTrace,jdbcType=VARCHAR}, #{status,jdbcType=VARCHAR}, + #{recordId,jdbcType=VARCHAR}, #{dateClosed,jdbcType=DATE}, #{documentType,jdbcType=VARCHAR}, + #{retryUrl,jdbcType=VARCHAR}) + + + + insert into error.error_trace + + + id, + + + date_occurred, + + + error_type, + + + occurred_at, + + + stack_trace, + + + status, + + + record_id, + + + date_closed, + + + document_type, + + + retry_url, + + + + + #{id,jdbcType=BIGINT}, + + + #{dateOccurred,jdbcType=DATE}, + + + #{errorType,jdbcType=VARCHAR}, + + + #{occurredAt,jdbcType=VARCHAR}, + + + #{stackTrace,jdbcType=VARCHAR}, + + + #{status,jdbcType=VARCHAR}, + + + #{recordId,jdbcType=VARCHAR}, + + + #{dateClosed,jdbcType=DATE}, + + + #{documentType,jdbcType=VARCHAR}, + + + #{retryUrl,jdbcType=VARCHAR}, + + + + + + + update error.error_trace + + + id = #{record.id,jdbcType=BIGINT}, + + + date_occurred = #{record.dateOccurred,jdbcType=DATE}, + + + error_type = #{record.errorType,jdbcType=VARCHAR}, + + + occurred_at = #{record.occurredAt,jdbcType=VARCHAR}, + + + stack_trace = #{record.stackTrace,jdbcType=VARCHAR}, + + + status = #{record.status,jdbcType=VARCHAR}, + + + record_id = #{record.recordId,jdbcType=VARCHAR}, + + + date_closed = #{record.dateClosed,jdbcType=DATE}, + + + document_type = #{record.documentType,jdbcType=VARCHAR}, + + + retry_url = #{record.retryUrl,jdbcType=VARCHAR}, + + + + + + + + + update error.error_trace + set id = #{record.id,jdbcType=BIGINT}, + date_occurred = #{record.dateOccurred,jdbcType=DATE}, + error_type = #{record.errorType,jdbcType=VARCHAR}, + occurred_at = #{record.occurredAt,jdbcType=VARCHAR}, + stack_trace = #{record.stackTrace,jdbcType=VARCHAR}, + status = #{record.status,jdbcType=VARCHAR}, + record_id = #{record.recordId,jdbcType=VARCHAR}, + date_closed = #{record.dateClosed,jdbcType=DATE}, + document_type = #{record.documentType,jdbcType=VARCHAR}, + retry_url = #{record.retryUrl,jdbcType=VARCHAR} + + + + + + + update error.error_trace + + + date_occurred = #{dateOccurred,jdbcType=DATE}, + + + error_type = #{errorType,jdbcType=VARCHAR}, + + + occurred_at = #{occurredAt,jdbcType=VARCHAR}, + + + stack_trace = #{stackTrace,jdbcType=VARCHAR}, + + + status = #{status,jdbcType=VARCHAR}, + + + record_id = #{recordId,jdbcType=VARCHAR}, + + + date_closed = #{dateClosed,jdbcType=DATE}, + + + document_type = #{documentType,jdbcType=VARCHAR}, + + + retry_url = #{retryUrl,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + + update error.error_trace + set date_occurred = #{dateOccurred,jdbcType=DATE}, + error_type = #{errorType,jdbcType=VARCHAR}, + occurred_at = #{occurredAt,jdbcType=VARCHAR}, + stack_trace = #{stackTrace,jdbcType=VARCHAR}, + status = #{status,jdbcType=VARCHAR}, + record_id = #{recordId,jdbcType=VARCHAR}, + date_closed = #{dateClosed,jdbcType=DATE}, + document_type = #{documentType,jdbcType=VARCHAR}, + retry_url = #{retryUrl,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml index 23ac8aa681..b217e6f08e 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.event where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.event @@ -140,7 +140,7 @@ insert into core.event (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.event @@ -173,7 +173,7 @@ select count(*) from core.event @@ -184,7 +184,7 @@ update core.event @@ -203,7 +203,7 @@ update core.event set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.event @@ -230,7 +230,7 @@ update core.event set json = #{json,jdbcType=OTHER} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml index 6ff9ec423e..d213a2f40a 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml @@ -5,13 +5,13 @@ - + @@ -24,7 +24,7 @@ @@ -58,7 +58,7 @@ @@ -92,7 +92,7 @@ id, event_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, event_type, event_date, provider_id, location_id, team, team_id @@ -101,7 +101,7 @@ select @@ -120,7 +120,7 @@ select @@ -131,7 +131,7 @@ delete from core.event_metadata where id = #{id,jdbcType=BIGINT} @@ -140,7 +140,7 @@ delete from core.event_metadata @@ -151,7 +151,7 @@ insert into core.event_metadata (id, event_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, @@ -159,7 +159,7 @@ location_id, team, team_id ) values (#{id,jdbcType=BIGINT}, #{eventId,jdbcType=BIGINT}, #{baseEntityId,jdbcType=VARCHAR}, - #{formSubmissionId,jdbcType=VARCHAR}, #{serverVersion,jdbcType=TIMESTAMP}, #{openmrsUuid,jdbcType=VARCHAR}, + #{formSubmissionId,jdbcType=VARCHAR}, #{serverVersion,jdbcType=BIGINT}, #{openmrsUuid,jdbcType=VARCHAR}, #{eventType,jdbcType=VARCHAR}, #{eventDate,jdbcType=DATE}, #{providerId,jdbcType=VARCHAR}, #{locationId,jdbcType=VARCHAR}, #{team,jdbcType=VARCHAR}, #{teamId,jdbcType=VARCHAR} ) @@ -168,7 +168,7 @@ insert into core.event_metadata @@ -223,7 +223,7 @@ #{formSubmissionId,jdbcType=VARCHAR}, - #{serverVersion,jdbcType=TIMESTAMP}, + #{serverVersion,jdbcType=BIGINT}, #{openmrsUuid,jdbcType=VARCHAR}, @@ -252,7 +252,7 @@ select count(*) from core.event_metadata @@ -263,7 +263,7 @@ update core.event_metadata @@ -280,7 +280,7 @@ form_submission_id = #{record.formSubmissionId,jdbcType=VARCHAR}, - server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + server_version = #{record.serverVersion,jdbcType=BIGINT}, openmrs_uuid = #{record.openmrsUuid,jdbcType=VARCHAR}, @@ -312,14 +312,14 @@ update core.event_metadata set id = #{record.id,jdbcType=BIGINT}, event_id = #{record.eventId,jdbcType=BIGINT}, base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, form_submission_id = #{record.formSubmissionId,jdbcType=VARCHAR}, - server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + server_version = #{record.serverVersion,jdbcType=BIGINT}, openmrs_uuid = #{record.openmrsUuid,jdbcType=VARCHAR}, event_type = #{record.eventType,jdbcType=VARCHAR}, event_date = #{record.eventDate,jdbcType=DATE}, @@ -335,7 +335,7 @@ update core.event_metadata @@ -349,7 +349,7 @@ form_submission_id = #{formSubmissionId,jdbcType=VARCHAR}, - server_version = #{serverVersion,jdbcType=TIMESTAMP}, + server_version = #{serverVersion,jdbcType=BIGINT}, openmrs_uuid = #{openmrsUuid,jdbcType=VARCHAR}, @@ -379,13 +379,13 @@ update core.event_metadata set event_id = #{eventId,jdbcType=BIGINT}, base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, form_submission_id = #{formSubmissionId,jdbcType=VARCHAR}, - server_version = #{serverVersion,jdbcType=TIMESTAMP}, + server_version = #{serverVersion,jdbcType=BIGINT}, openmrs_uuid = #{openmrsUuid,jdbcType=VARCHAR}, event_type = #{eventType,jdbcType=VARCHAR}, event_date = #{eventDate,jdbcType=DATE}, diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/MultiMediaMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/MultiMediaMapper.xml new file mode 100644 index 0000000000..afe35cf920 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/MultiMediaMapper.xml @@ -0,0 +1,303 @@ + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + id, case_id, provider_id, content_type, file_path, file_category + + + + + + delete from core.multi_media + where id = #{id,jdbcType=BIGINT} + + + + delete from core.multi_media + + + + + + + insert into core.multi_media (id, case_id, provider_id, + content_type, file_path, file_category + ) + values (#{id,jdbcType=BIGINT}, #{caseId,jdbcType=VARCHAR}, #{providerId,jdbcType=VARCHAR}, + #{contentType,jdbcType=VARCHAR}, #{filePath,jdbcType=VARCHAR}, #{fileCategory,jdbcType=VARCHAR} + ) + + + + insert into core.multi_media + + + id, + + + case_id, + + + provider_id, + + + content_type, + + + file_path, + + + file_category, + + + + + #{id,jdbcType=BIGINT}, + + + #{caseId,jdbcType=VARCHAR}, + + + #{providerId,jdbcType=VARCHAR}, + + + #{contentType,jdbcType=VARCHAR}, + + + #{filePath,jdbcType=VARCHAR}, + + + #{fileCategory,jdbcType=VARCHAR}, + + + + + + + update core.multi_media + + + id = #{record.id,jdbcType=BIGINT}, + + + case_id = #{record.caseId,jdbcType=VARCHAR}, + + + provider_id = #{record.providerId,jdbcType=VARCHAR}, + + + content_type = #{record.contentType,jdbcType=VARCHAR}, + + + file_path = #{record.filePath,jdbcType=VARCHAR}, + + + file_category = #{record.fileCategory,jdbcType=VARCHAR}, + + + + + + + + + update core.multi_media + set id = #{record.id,jdbcType=BIGINT}, + case_id = #{record.caseId,jdbcType=VARCHAR}, + provider_id = #{record.providerId,jdbcType=VARCHAR}, + content_type = #{record.contentType,jdbcType=VARCHAR}, + file_path = #{record.filePath,jdbcType=VARCHAR}, + file_category = #{record.fileCategory,jdbcType=VARCHAR} + + + + + + + update core.multi_media + + + case_id = #{caseId,jdbcType=VARCHAR}, + + + provider_id = #{providerId,jdbcType=VARCHAR}, + + + content_type = #{contentType,jdbcType=VARCHAR}, + + + file_path = #{filePath,jdbcType=VARCHAR}, + + + file_category = #{fileCategory,jdbcType=VARCHAR}, + + + where id = #{id,jdbcType=BIGINT} + + + + update core.multi_media + set case_id = #{caseId,jdbcType=VARCHAR}, + provider_id = #{providerId,jdbcType=VARCHAR}, + content_type = #{contentType,jdbcType=VARCHAR}, + file_path = #{filePath,jdbcType=VARCHAR}, + file_category = #{fileCategory,jdbcType=VARCHAR} + where id = #{id,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml index 12d525f20e..f74689075c 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.report where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.report @@ -140,7 +140,7 @@ insert into core.report (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.report @@ -173,7 +173,7 @@ select count(*) from core.report @@ -184,7 +184,7 @@ update core.report @@ -203,7 +203,7 @@ update core.report set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.report @@ -230,7 +230,7 @@ update core.report set json = #{json,jdbcType=OTHER} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml index 191e4ee423..e86eda406c 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml @@ -5,12 +5,12 @@ - + @@ -21,7 +21,7 @@ @@ -55,7 +55,7 @@ @@ -89,7 +89,7 @@ id, report_id, base_entity_id, server_version, report_type, provider_id, location_id, team, team_id @@ -98,7 +98,7 @@ select @@ -117,7 +117,7 @@ select @@ -128,7 +128,7 @@ delete from core.report_metadata where id = #{id,jdbcType=BIGINT} @@ -137,7 +137,7 @@ delete from core.report_metadata @@ -148,14 +148,14 @@ insert into core.report_metadata (id, report_id, base_entity_id, server_version, report_type, provider_id, location_id, team, team_id ) values (#{id,jdbcType=BIGINT}, #{reportId,jdbcType=BIGINT}, #{baseEntityId,jdbcType=VARCHAR}, - #{serverVersion,jdbcType=TIMESTAMP}, #{reportType,jdbcType=VARCHAR}, #{providerId,jdbcType=VARCHAR}, + #{serverVersion,jdbcType=BIGINT}, #{reportType,jdbcType=VARCHAR}, #{providerId,jdbcType=VARCHAR}, #{locationId,jdbcType=VARCHAR}, #{team,jdbcType=VARCHAR}, #{teamId,jdbcType=VARCHAR} ) @@ -163,7 +163,7 @@ insert into core.report_metadata @@ -206,7 +206,7 @@ #{baseEntityId,jdbcType=VARCHAR}, - #{serverVersion,jdbcType=TIMESTAMP}, + #{serverVersion,jdbcType=BIGINT}, #{reportType,jdbcType=VARCHAR}, @@ -229,7 +229,7 @@ select count(*) from core.report_metadata @@ -240,7 +240,7 @@ update core.report_metadata @@ -254,7 +254,7 @@ base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, - server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + server_version = #{record.serverVersion,jdbcType=BIGINT}, report_type = #{record.reportType,jdbcType=VARCHAR}, @@ -280,13 +280,13 @@ update core.report_metadata set id = #{record.id,jdbcType=BIGINT}, report_id = #{record.reportId,jdbcType=BIGINT}, base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, - server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + server_version = #{record.serverVersion,jdbcType=BIGINT}, report_type = #{record.reportType,jdbcType=VARCHAR}, provider_id = #{record.providerId,jdbcType=VARCHAR}, location_id = #{record.locationId,jdbcType=VARCHAR}, @@ -300,7 +300,7 @@ update core.report_metadata @@ -311,7 +311,7 @@ base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, - server_version = #{serverVersion,jdbcType=TIMESTAMP}, + server_version = #{serverVersion,jdbcType=BIGINT}, report_type = #{reportType,jdbcType=VARCHAR}, @@ -335,12 +335,12 @@ update core.report_metadata set report_id = #{reportId,jdbcType=BIGINT}, base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, - server_version = #{serverVersion,jdbcType=TIMESTAMP}, + server_version = #{serverVersion,jdbcType=BIGINT}, report_type = #{reportType,jdbcType=VARCHAR}, provider_id = #{providerId,jdbcType=VARCHAR}, location_id = #{locationId,jdbcType=VARCHAR}, diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMapper.xml index f0795284a4..8571d22c44 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.stock where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.stock @@ -140,7 +140,7 @@ insert into core.stock (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.stock @@ -173,7 +173,7 @@ select count(*) from core.stock @@ -184,7 +184,7 @@ update core.stock @@ -203,7 +203,7 @@ update core.stock set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.stock @@ -230,7 +230,7 @@ update core.stock set json = #{json,jdbcType=OTHER} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml index de0d738f07..58554a145b 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml @@ -5,11 +5,11 @@ - + @@ -19,7 +19,7 @@ @@ -53,7 +53,7 @@ @@ -87,7 +87,7 @@ id, stock_id, server_version, provider_id, location_id, team, team_id @@ -95,7 +95,7 @@ select @@ -114,7 +114,7 @@ select @@ -125,7 +125,7 @@ delete from core.stock_metadata where id = #{id,jdbcType=BIGINT} @@ -134,7 +134,7 @@ delete from core.stock_metadata @@ -145,12 +145,12 @@ insert into core.stock_metadata (id, stock_id, server_version, provider_id, location_id, team, team_id) - values (#{id,jdbcType=BIGINT}, #{stockId,jdbcType=BIGINT}, #{serverVersion,jdbcType=TIMESTAMP}, + values (#{id,jdbcType=BIGINT}, #{stockId,jdbcType=BIGINT}, #{serverVersion,jdbcType=BIGINT}, #{providerId,jdbcType=VARCHAR}, #{locationId,jdbcType=VARCHAR}, #{team,jdbcType=VARCHAR}, #{teamId,jdbcType=VARCHAR}) @@ -158,7 +158,7 @@ insert into core.stock_metadata @@ -192,7 +192,7 @@ #{stockId,jdbcType=BIGINT}, - #{serverVersion,jdbcType=TIMESTAMP}, + #{serverVersion,jdbcType=BIGINT}, #{providerId,jdbcType=VARCHAR}, @@ -212,7 +212,7 @@ select count(*) from core.stock_metadata @@ -223,7 +223,7 @@ update core.stock_metadata @@ -234,7 +234,7 @@ stock_id = #{record.stockId,jdbcType=BIGINT}, - server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + server_version = #{record.serverVersion,jdbcType=BIGINT}, provider_id = #{record.providerId,jdbcType=VARCHAR}, @@ -257,12 +257,12 @@ update core.stock_metadata set id = #{record.id,jdbcType=BIGINT}, stock_id = #{record.stockId,jdbcType=BIGINT}, - server_version = #{record.serverVersion,jdbcType=TIMESTAMP}, + server_version = #{record.serverVersion,jdbcType=BIGINT}, provider_id = #{record.providerId,jdbcType=VARCHAR}, location_id = #{record.locationId,jdbcType=VARCHAR}, team = #{record.team,jdbcType=VARCHAR}, @@ -275,7 +275,7 @@ update core.stock_metadata @@ -283,7 +283,7 @@ stock_id = #{stockId,jdbcType=BIGINT}, - server_version = #{serverVersion,jdbcType=TIMESTAMP}, + server_version = #{serverVersion,jdbcType=BIGINT}, provider_id = #{providerId,jdbcType=VARCHAR}, @@ -304,11 +304,11 @@ update core.stock_metadata set stock_id = #{stockId,jdbcType=BIGINT}, - server_version = #{serverVersion,jdbcType=TIMESTAMP}, + server_version = #{serverVersion,jdbcType=BIGINT}, provider_id = #{providerId,jdbcType=VARCHAR}, location_id = #{locationId,jdbcType=VARCHAR}, team = #{team,jdbcType=VARCHAR}, From 7aa8a6f00fbe24d9a1d434fd34d2ca560cf99c8a Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 9 Mar 2018 18:45:05 +0300 Subject: [PATCH 017/133] Create persistence configs for couch and postges to allow one choose database Signed-off-by: Samuel Githengi --- .../resources/applicationContext-opensrp.xml | 19 ++------ .../main/resources/persistence_couchdb.xml | 27 ++++++++++++ .../main/resources/persistence_postgres.xml | 43 +++++++++++++++++++ 3 files changed, 74 insertions(+), 15 deletions(-) create mode 100644 opensrp-core/src/main/resources/persistence_couchdb.xml create mode 100644 opensrp-core/src/main/resources/persistence_postgres.xml diff --git a/opensrp-core/src/main/resources/applicationContext-opensrp.xml b/opensrp-core/src/main/resources/applicationContext-opensrp.xml index 6bfda68dff..34a936adbc 100644 --- a/opensrp-core/src/main/resources/applicationContext-opensrp.xml +++ b/opensrp-core/src/main/resources/applicationContext-opensrp.xml @@ -23,21 +23,10 @@ - - - - - - - - - - - + - - - - + + + diff --git a/opensrp-core/src/main/resources/persistence_couchdb.xml b/opensrp-core/src/main/resources/persistence_couchdb.xml new file mode 100644 index 0000000000..ff76fe24c4 --- /dev/null +++ b/opensrp-core/src/main/resources/persistence_couchdb.xml @@ -0,0 +1,27 @@ + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-core/src/main/resources/persistence_postgres.xml b/opensrp-core/src/main/resources/persistence_postgres.xml new file mode 100644 index 0000000000..f20bc1e7e9 --- /dev/null +++ b/opensrp-core/src/main/resources/persistence_postgres.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file From 708e4b9e8d5b70fac24d0826fee77f0f83ca9804 Mon Sep 17 00:00:00 2001 From: Ephraim Muhia Date: Mon, 12 Mar 2018 09:52:05 +0300 Subject: [PATCH 018/133] Code cleanup Signed-off-by: Ephraim Muhia --- .../main/java/org/opensrp/domain/postgres/ActionMetadata.java | 2 -- .../java/org/opensrp/domain/postgres/ActionMetadataExample.java | 1 - .../main/java/org/opensrp/domain/postgres/AlertMetadata.java | 2 -- .../java/org/opensrp/domain/postgres/AlertMetadataExample.java | 1 - .../main/java/org/opensrp/domain/postgres/ReportMetadata.java | 2 -- .../java/org/opensrp/domain/postgres/ReportMetadataExample.java | 1 - .../main/java/org/opensrp/domain/postgres/StockMetadata.java | 2 -- .../java/org/opensrp/domain/postgres/StockMetadataExample.java | 1 - 8 files changed, 12 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java index 176bbd9500..6335c54eef 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java @@ -1,7 +1,5 @@ package org.opensrp.domain.postgres; -import java.util.Date; - public class ActionMetadata { /** diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java index 8e13080573..daa49855d1 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java @@ -1,7 +1,6 @@ package org.opensrp.domain.postgres; import java.util.ArrayList; -import java.util.Date; import java.util.List; public class ActionMetadataExample { diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java index 931674c7f6..6a9b05a156 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java @@ -1,7 +1,5 @@ package org.opensrp.domain.postgres; -import java.util.Date; - public class AlertMetadata { /** diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java index 52372506c0..816dc0cea2 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java @@ -1,7 +1,6 @@ package org.opensrp.domain.postgres; import java.util.ArrayList; -import java.util.Date; import java.util.List; public class AlertMetadataExample { diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java index 6b09d97e1d..2f4442db02 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java @@ -1,7 +1,5 @@ package org.opensrp.domain.postgres; -import java.util.Date; - public class ReportMetadata { /** diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java index 5e4f3d69aa..d8c11499f5 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java @@ -1,7 +1,6 @@ package org.opensrp.domain.postgres; import java.util.ArrayList; -import java.util.Date; import java.util.List; public class ReportMetadataExample { diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java index 4f98e78031..a7b0c7b7f5 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java @@ -1,7 +1,5 @@ package org.opensrp.domain.postgres; -import java.util.Date; - public class StockMetadata { /** diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java index 0178c45078..8c0cb11f78 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java @@ -1,7 +1,6 @@ package org.opensrp.domain.postgres; import java.util.ArrayList; -import java.util.Date; import java.util.List; public class StockMetadataExample { From d916e83801b1fa7e408bd0f8ed1896556f52fc0c Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 19 Apr 2018 18:23:31 +0300 Subject: [PATCH 019/133] Restore removed entity objects From 448cedf211686fc073f54a359ac8d8b31bad0c0f Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 12 Mar 2018 11:15:40 +0300 Subject: [PATCH 020/133] Add Interfaces for Alerts and Actions Signed-off-by: Samuel Githengi --- .../repository/ActionsRepository.java | 30 +++++++++++ .../repository/AlertsRepository.java | 38 ++++++++++++++ .../repository/{ => couch}/AllActions.java | 5 +- .../repository/{ => couch}/AllAlerts.java | 11 ++-- .../scheduler/service/ActionService.java | 52 +++++++++---------- .../resources/applicationContext-opensrp.xml | 12 ++--- .../main/resources/persistence_couchdb.xml | 2 + .../main/resources/persistence_postgres.xml | 4 +- .../it/AllActionsIntegrationTest.java | 2 +- .../it/AllAlertsIntegrationTest.java | 4 +- .../repository/it/FormLifeCycleTest.java | 4 +- .../lucene/it/LuceneActionRepositoryTest.java | 23 ++++---- .../scheduler/service/ActionServiceTest.java | 4 +- .../scheduling/BNFSchedulesService.java | 2 +- .../scheduling/BNFSchedulesServiceTest.java | 2 +- .../scheduling/HHSchedulesServiceTest.java | 2 +- .../web/controller/ActionController.java | 10 ++-- .../controller/fake/FakeActionController.java | 2 +- .../controller/it/ActionControllerTest.java | 4 +- .../web/it/listener/ClientListenerTest.java | 2 +- .../web/rest/it/ResourceTestUtility.java | 4 +- 21 files changed, 147 insertions(+), 72 deletions(-) create mode 100644 opensrp-core/src/main/java/org/opensrp/scheduler/repository/ActionsRepository.java create mode 100644 opensrp-core/src/main/java/org/opensrp/scheduler/repository/AlertsRepository.java rename opensrp-core/src/main/java/org/opensrp/scheduler/repository/{ => couch}/AllActions.java (96%) rename opensrp-core/src/main/java/org/opensrp/scheduler/repository/{ => couch}/AllAlerts.java (97%) diff --git a/opensrp-core/src/main/java/org/opensrp/scheduler/repository/ActionsRepository.java b/opensrp-core/src/main/java/org/opensrp/scheduler/repository/ActionsRepository.java new file mode 100644 index 0000000000..7cf0d61ba2 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/scheduler/repository/ActionsRepository.java @@ -0,0 +1,30 @@ +package org.opensrp.scheduler.repository; + +import java.util.List; + +import org.joda.time.DateTime; +import org.opensrp.repository.BaseRepository; +import org.opensrp.scheduler.Action; + +public interface ActionsRepository extends BaseRepository{ + + List findByProviderIdAndTimeStamp(String providerId, long timeStamp); + + List findAlertByANMIdEntityIdScheduleName(String providerId, String baseEntityId, String scheduleName); + + List findByCaseIdScheduleAndTimeStamp(String baseEntityId, String schedule, DateTime start, DateTime end); + + List findByCaseIdAndTimeStamp(String baseEntityId, long timeStamp); + + void deleteAllByTarget(String target); + + void markAllAsInActiveFor(String baseEntityId); + + void addOrUpdateAlert(Action alertAction); + + void markAlertAsInactiveFor(String providerId, String baseEntityId, String scheduleName); + + List findByCriteria(String team, String providerId, long timeStamp, String sortBy, String sortOrder, int limit); + + List findAllActionNotExpired(); +} diff --git a/opensrp-core/src/main/java/org/opensrp/scheduler/repository/AlertsRepository.java b/opensrp-core/src/main/java/org/opensrp/scheduler/repository/AlertsRepository.java new file mode 100644 index 0000000000..6630493d20 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/scheduler/repository/AlertsRepository.java @@ -0,0 +1,38 @@ +package org.opensrp.scheduler.repository; + +import java.util.List; + +import org.joda.time.DateTime; +import org.opensrp.dto.AlertStatus; +import org.opensrp.repository.BaseRepository; +import org.opensrp.scheduler.Alert; + +public interface AlertsRepository extends BaseRepository{ + + List findByProviderAndTimestamp(String provider, long timeStamp); + + List findActiveByProviderAndTimestamp(String provider, long timeStamp); + + List findAlertByProviderEntityIdTriggerName(String provider, String entityId, String triggerName); + + List findActiveAlertByProviderEntityIdTriggerName(String provider, String entityId, String triggerName); + + List findActiveAlertByEntityIdTriggerName(String entityId, String triggerName); + + List findActiveAlertByEntityId(String entityId); + + List findByEntityIdTriggerAndTimeStamp(String entityId, String trigger, DateTime start, DateTime end); + + void markAllAsClosedFor(String entityId, String reasonForClose); + + void markAlertAsClosedFor(String providerId, String entityId, String triggerName, String reasonForClose); + + void markAlertAsCompleteFor(String providerId, String entityId, String triggerName, String completionDate); + + void addOrUpdateScheduleNotificationAlert(String beneficiaryType, String entityId, String providerId, String triggerName, + String triggerCode, AlertStatus alertStatus, DateTime startDate, + DateTime expiryDate); + + void markAlertAsCompleteFor(String entityId, String triggerName, String completionDate); + +} diff --git a/opensrp-core/src/main/java/org/opensrp/scheduler/repository/AllActions.java b/opensrp-core/src/main/java/org/opensrp/scheduler/repository/couch/AllActions.java similarity index 96% rename from opensrp-core/src/main/java/org/opensrp/scheduler/repository/AllActions.java rename to opensrp-core/src/main/java/org/opensrp/scheduler/repository/couch/AllActions.java index a118b9c069..a9c7381f41 100644 --- a/opensrp-core/src/main/java/org/opensrp/scheduler/repository/AllActions.java +++ b/opensrp-core/src/main/java/org/opensrp/scheduler/repository/couch/AllActions.java @@ -1,4 +1,4 @@ -package org.opensrp.scheduler.repository; +package org.opensrp.scheduler.repository.couch; import java.text.MessageFormat; import java.util.ArrayList; @@ -14,6 +14,7 @@ import org.opensrp.common.AllConstants; import org.opensrp.repository.lucene.LuceneActionRepository; import org.opensrp.scheduler.Action; +import org.opensrp.scheduler.repository.ActionsRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -21,7 +22,7 @@ import org.springframework.stereotype.Repository; @Repository -public class AllActions extends MotechBaseRepository { +public class AllActions extends MotechBaseRepository implements ActionsRepository { private static Logger logger = LoggerFactory.getLogger(AllActions.class.toString()); diff --git a/opensrp-core/src/main/java/org/opensrp/scheduler/repository/AllAlerts.java b/opensrp-core/src/main/java/org/opensrp/scheduler/repository/couch/AllAlerts.java similarity index 97% rename from opensrp-core/src/main/java/org/opensrp/scheduler/repository/AllAlerts.java rename to opensrp-core/src/main/java/org/opensrp/scheduler/repository/couch/AllAlerts.java index 460036c704..35e5ee96a9 100644 --- a/opensrp-core/src/main/java/org/opensrp/scheduler/repository/AllAlerts.java +++ b/opensrp-core/src/main/java/org/opensrp/scheduler/repository/couch/AllAlerts.java @@ -1,4 +1,7 @@ -package org.opensrp.scheduler.repository; +package org.opensrp.scheduler.repository.couch; + +import java.text.MessageFormat; +import java.util.List; import org.apache.commons.lang3.StringUtils; import org.ektorp.ComplexKey; @@ -12,17 +15,15 @@ import org.opensrp.scheduler.Alert; import org.opensrp.scheduler.Alert.AlertType; import org.opensrp.scheduler.Alert.TriggerType; +import org.opensrp.scheduler.repository.AlertsRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Repository; -import java.text.MessageFormat; -import java.util.List; - @Repository -public class AllAlerts extends MotechBaseRepository { +public class AllAlerts extends MotechBaseRepository implements AlertsRepository { private static Logger logger = LoggerFactory.getLogger(AllAlerts.class.toString()); @Autowired diff --git a/opensrp-core/src/main/java/org/opensrp/scheduler/service/ActionService.java b/opensrp-core/src/main/java/org/opensrp/scheduler/service/ActionService.java index 7d87744f78..ab890eade5 100644 --- a/opensrp-core/src/main/java/org/opensrp/scheduler/service/ActionService.java +++ b/opensrp-core/src/main/java/org/opensrp/scheduler/service/ActionService.java @@ -10,39 +10,37 @@ import org.opensrp.scheduler.Alert; import org.opensrp.scheduler.Alert.AlertType; import org.opensrp.scheduler.Alert.TriggerType; -import org.opensrp.scheduler.repository.AllActions; -import org.opensrp.scheduler.repository.AllAlerts; +import org.opensrp.scheduler.repository.ActionsRepository; +import org.opensrp.scheduler.repository.AlertsRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @Service public class ActionService { - public static final String ALL_PROVIDERS = "all_providers"; - - private AllActions allActions; - - private AllAlerts allAlerts; - - @Autowired - public ActionService(AllActions allActions, AllAlerts allAlerts) { - this.allActions = allActions; - this.allAlerts = allAlerts; - } - - public List getNewAlertsForANM(String anmIdentifier, long timeStamp) { - return allActions.findByProviderIdAndTimeStamp(anmIdentifier, timeStamp); - } - - public List getAlertsForProvider(String providerId, long timeStamp) { - return allAlerts.findByProviderAndTimestamp(providerId, timeStamp); - } - - public List getAlertsActiveForProvider(String providerId, long timeStamp) { - return allAlerts.findActiveByProviderAndTimestamp(providerId, timeStamp); - } - - public List findByCaseIdScheduleAndTimeStamp(String caseId, String schedule, DateTime start, DateTime end) { + public static final String ALL_PROVIDERS = "all_providers"; + private ActionsRepository allActions; + private AlertsRepository allAlerts; + + @Autowired + public ActionService(ActionsRepository allActions, AlertsRepository allAlerts) { + this.allActions = allActions; + this.allAlerts = allAlerts; + } + + public List getNewAlertsForANM(String anmIdentifier, long timeStamp) { + return allActions.findByProviderIdAndTimeStamp(anmIdentifier, timeStamp); + } + + public List getAlertsForProvider(String providerId, long timeStamp) { + return allAlerts.findByProviderAndTimestamp(providerId, timeStamp); + } + + public List getAlertsActiveForProvider(String providerId, long timeStamp) { + return allAlerts.findActiveByProviderAndTimestamp(providerId, timeStamp); + } + + public List findByCaseIdScheduleAndTimeStamp(String caseId, String schedule, DateTime start, DateTime end) { return allActions.findByCaseIdScheduleAndTimeStamp(caseId, schedule, start, end); } diff --git a/opensrp-core/src/main/resources/applicationContext-opensrp.xml b/opensrp-core/src/main/resources/applicationContext-opensrp.xml index 34a936adbc..2343f7f6e9 100644 --- a/opensrp-core/src/main/resources/applicationContext-opensrp.xml +++ b/opensrp-core/src/main/resources/applicationContext-opensrp.xml @@ -22,11 +22,11 @@ - - - - - - + + + + + + diff --git a/opensrp-core/src/main/resources/persistence_couchdb.xml b/opensrp-core/src/main/resources/persistence_couchdb.xml index ff76fe24c4..35a901ef6f 100644 --- a/opensrp-core/src/main/resources/persistence_couchdb.xml +++ b/opensrp-core/src/main/resources/persistence_couchdb.xml @@ -7,6 +7,8 @@ + diff --git a/opensrp-core/src/main/resources/persistence_postgres.xml b/opensrp-core/src/main/resources/persistence_postgres.xml index f20bc1e7e9..8bae2c3554 100644 --- a/opensrp-core/src/main/resources/persistence_postgres.xml +++ b/opensrp-core/src/main/resources/persistence_postgres.xml @@ -9,6 +9,8 @@ + @@ -28,7 +30,7 @@ - + diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllActionsIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllActionsIntegrationTest.java index e8a4f7a919..77727e5e44 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllActionsIntegrationTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/it/AllActionsIntegrationTest.java @@ -15,7 +15,7 @@ import org.junit.runner.RunWith; import org.opensrp.dto.ActionData; import org.opensrp.scheduler.Action; -import org.opensrp.scheduler.repository.AllActions; +import org.opensrp.scheduler.repository.couch.AllActions; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllAlertsIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllAlertsIntegrationTest.java index 2d7e618880..b35e062147 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllAlertsIntegrationTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/it/AllAlertsIntegrationTest.java @@ -20,8 +20,8 @@ import org.opensrp.scheduler.Alert; import org.opensrp.scheduler.Alert.AlertType; import org.opensrp.scheduler.Alert.TriggerType; -import org.opensrp.scheduler.repository.AllActions; -import org.opensrp.scheduler.repository.AllAlerts; +import org.opensrp.scheduler.repository.couch.AllActions; +import org.opensrp.scheduler.repository.couch.AllAlerts; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java index dda0fc4245..413cf66586 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/it/FormLifeCycleTest.java @@ -34,8 +34,8 @@ import org.opensrp.scheduler.Alert; import org.opensrp.scheduler.AlertCreationAction; import org.opensrp.scheduler.HealthSchedulerService; -import org.opensrp.scheduler.repository.AllActions; -import org.opensrp.scheduler.repository.AllAlerts; +import org.opensrp.scheduler.repository.couch.AllActions; +import org.opensrp.scheduler.repository.couch.AllAlerts; import org.opensrp.service.ClientService; import org.opensrp.service.EventService; import org.opensrp.service.formSubmission.FormEntityConverter; diff --git a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneActionRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneActionRepositoryTest.java index 0b6b9ec58c..750ab9ac62 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneActionRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneActionRepositoryTest.java @@ -1,5 +1,15 @@ package org.opensrp.repository.lucene.it; +import static org.opensrp.util.SampleFullDomainObject.BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; +import static org.opensrp.util.SampleFullDomainObject.EPOCH_DATE_TIME; +import static org.opensrp.util.SampleFullDomainObject.PROVIDER_ID; +import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; +import static org.utils.CouchDbAccessUtils.addObjectToRepository; + +import java.util.Arrays; +import java.util.List; + import org.junit.After; import org.junit.Before; import org.junit.Test; @@ -8,16 +18,9 @@ import org.opensrp.dto.AlertStatus; import org.opensrp.repository.lucene.LuceneActionRepository; import org.opensrp.scheduler.Action; -import org.opensrp.scheduler.repository.AllActions; +import org.opensrp.scheduler.repository.couch.AllActions; import org.springframework.beans.factory.annotation.Autowired; -import java.util.List; - -import static java.util.Arrays.asList; -import static org.opensrp.util.SampleFullDomainObject.*; -import static org.utils.AssertionUtil.assertTwoListAreSameIgnoringOrder; -import static org.utils.CouchDbAccessUtils.addObjectToRepository; - public class LuceneActionRepositoryTest extends BaseIntegrationTest { @Autowired @@ -43,7 +46,7 @@ public void shouldFindByAllCriteria() { EPOCH_DATE_TIME); Action expectedAction = new Action(BASE_ENTITY_ID, PROVIDER_ID, actionData); Action expectedAction2 = new Action(DIFFERENT_BASE_ENTITY_ID, DIFFERENT_BASE_ENTITY_ID, actionData); - List expectedActions = asList(expectedAction, expectedAction2); + List expectedActions = Arrays.asList(expectedAction, expectedAction2); addObjectToRepository(expectedActions, allActions); String teamIds = PROVIDER_ID + "," + DIFFERENT_BASE_ENTITY_ID; @@ -61,7 +64,7 @@ public void throwExceptionIfNoSortOrderSpecified() { EPOCH_DATE_TIME); Action expectedAction = new Action(BASE_ENTITY_ID, PROVIDER_ID, actionData); Action expectedAction2 = new Action(DIFFERENT_BASE_ENTITY_ID, DIFFERENT_BASE_ENTITY_ID, actionData); - List expectedActions = asList(expectedAction, expectedAction2); + List expectedActions = Arrays.asList(expectedAction, expectedAction2); addObjectToRepository(expectedActions, allActions); String teamIds = PROVIDER_ID + "," + DIFFERENT_BASE_ENTITY_ID; diff --git a/opensrp-core/src/test/java/org/opensrp/scheduler/service/ActionServiceTest.java b/opensrp-core/src/test/java/org/opensrp/scheduler/service/ActionServiceTest.java index 4e6312e1b1..982f847d57 100644 --- a/opensrp-core/src/test/java/org/opensrp/scheduler/service/ActionServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/scheduler/service/ActionServiceTest.java @@ -24,8 +24,8 @@ import org.opensrp.dto.MonthSummaryDatum; import org.opensrp.scheduler.Action; import org.opensrp.scheduler.Alert; -import org.opensrp.scheduler.repository.AllActions; -import org.opensrp.scheduler.repository.AllAlerts; +import org.opensrp.scheduler.repository.couch.AllActions; +import org.opensrp.scheduler.repository.couch.AllAlerts; import org.powermock.api.mockito.PowerMockito; import org.powermock.core.classloader.annotations.PrepareForTest; import org.powermock.modules.junit4.PowerMockRunner; diff --git a/opensrp-register/src/main/java/org/opensrp/register/service/scheduling/BNFSchedulesService.java b/opensrp-register/src/main/java/org/opensrp/register/service/scheduling/BNFSchedulesService.java index 97396e9404..9dcc783451 100644 --- a/opensrp-register/src/main/java/org/opensrp/register/service/scheduling/BNFSchedulesService.java +++ b/opensrp-register/src/main/java/org/opensrp/register/service/scheduling/BNFSchedulesService.java @@ -7,7 +7,7 @@ import org.joda.time.LocalDate; import org.opensrp.scheduler.HealthSchedulerService; -import org.opensrp.scheduler.repository.AllActions; +import org.opensrp.scheduler.repository.couch.AllActions; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; diff --git a/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/BNFSchedulesServiceTest.java b/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/BNFSchedulesServiceTest.java index b3e5fedece..a20edebd76 100644 --- a/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/BNFSchedulesServiceTest.java +++ b/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/BNFSchedulesServiceTest.java @@ -18,7 +18,7 @@ import org.opensrp.common.util.TestLoggerAppender; import org.opensrp.register.service.handler.TestResourceLoader; import org.opensrp.scheduler.HealthSchedulerService; -import org.opensrp.scheduler.repository.AllActions; +import org.opensrp.scheduler.repository.couch.AllActions; import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.modules.junit4.PowerMockRunner; import static org.mockito.Mockito.times; diff --git a/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/HHSchedulesServiceTest.java b/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/HHSchedulesServiceTest.java index f0d0b1b5b3..a129d1833f 100644 --- a/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/HHSchedulesServiceTest.java +++ b/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/HHSchedulesServiceTest.java @@ -18,7 +18,7 @@ import org.opensrp.common.util.TestLoggerAppender; import org.opensrp.register.service.handler.TestResourceLoader; import org.opensrp.scheduler.HealthSchedulerService; -import org.opensrp.scheduler.repository.AllActions; +import org.opensrp.scheduler.repository.couch.AllActions; import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.modules.junit4.PowerMockRunner; import static org.mockito.Mockito.times; diff --git a/opensrp-web/src/main/java/org/opensrp/web/controller/ActionController.java b/opensrp-web/src/main/java/org/opensrp/web/controller/ActionController.java index fe7e49f2d2..590441133e 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/controller/ActionController.java +++ b/opensrp-web/src/main/java/org/opensrp/web/controller/ActionController.java @@ -16,9 +16,9 @@ import org.opensrp.common.AllConstants.BaseEntity; import org.opensrp.domain.Client; import org.opensrp.dto.Action; -import org.opensrp.repository.couch.AllClients; +import org.opensrp.repository.ClientsRepository; import org.opensrp.scheduler.Alert; -import org.opensrp.scheduler.repository.AllAlerts; +import org.opensrp.scheduler.repository.AlertsRepository; import org.opensrp.scheduler.service.ActionService; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -39,11 +39,11 @@ public class ActionController { private static org.slf4j.Logger logger = LoggerFactory.getLogger(ActionController.class.toString()); private ActionService actionService; - private AllClients allClients; - private AllAlerts allAlerts; + private ClientsRepository allClients; + private AlertsRepository allAlerts; @Autowired - public ActionController(ActionService actionService, AllClients c, AllAlerts allAlerts) { + public ActionController(ActionService actionService, ClientsRepository c, AlertsRepository allAlerts) { this.actionService = actionService; this.allClients = c; this.allAlerts = allAlerts; diff --git a/opensrp-web/src/main/java/org/opensrp/web/controller/fake/FakeActionController.java b/opensrp-web/src/main/java/org/opensrp/web/controller/fake/FakeActionController.java index 06ee384c27..52ea5005c4 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/controller/fake/FakeActionController.java +++ b/opensrp-web/src/main/java/org/opensrp/web/controller/fake/FakeActionController.java @@ -2,8 +2,8 @@ import com.google.gson.Gson; -import org.opensrp.scheduler.repository.AllActions; import org.opensrp.dto.Action; +import org.opensrp.scheduler.repository.couch.AllActions; import org.opensrp.web.controller.ActionConvertor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; diff --git a/opensrp-web/src/test/java/org/opensrp/web/controller/it/ActionControllerTest.java b/opensrp-web/src/test/java/org/opensrp/web/controller/it/ActionControllerTest.java index 7437ac6b34..85fa33bdb6 100644 --- a/opensrp-web/src/test/java/org/opensrp/web/controller/it/ActionControllerTest.java +++ b/opensrp-web/src/test/java/org/opensrp/web/controller/it/ActionControllerTest.java @@ -25,8 +25,8 @@ import org.opensrp.repository.couch.AllClients; import org.opensrp.scheduler.Action; import org.opensrp.scheduler.Alert; -import org.opensrp.scheduler.repository.AllActions; -import org.opensrp.scheduler.repository.AllAlerts; +import org.opensrp.scheduler.repository.couch.AllActions; +import org.opensrp.scheduler.repository.couch.AllAlerts; import org.opensrp.web.controller.ActionConvertor; import org.opensrp.web.rest.it.BaseResourceTest; import org.springframework.beans.factory.annotation.Autowired; diff --git a/opensrp-web/src/test/java/org/opensrp/web/it/listener/ClientListenerTest.java b/opensrp-web/src/test/java/org/opensrp/web/it/listener/ClientListenerTest.java index 6ab0a37246..91727b5310 100644 --- a/opensrp-web/src/test/java/org/opensrp/web/it/listener/ClientListenerTest.java +++ b/opensrp-web/src/test/java/org/opensrp/web/it/listener/ClientListenerTest.java @@ -16,7 +16,7 @@ import org.opensrp.domain.Camp; import org.opensrp.repository.AllCamp; import org.opensrp.repository.couch.AllClients; -import org.opensrp.scheduler.repository.AllActions; +import org.opensrp.scheduler.repository.couch.AllActions; import org.opensrp.web.listener.RapidproMessageListener; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; diff --git a/opensrp-web/src/test/java/org/opensrp/web/rest/it/ResourceTestUtility.java b/opensrp-web/src/test/java/org/opensrp/web/rest/it/ResourceTestUtility.java index b63c3041d8..b6e64a2431 100644 --- a/opensrp-web/src/test/java/org/opensrp/web/rest/it/ResourceTestUtility.java +++ b/opensrp-web/src/test/java/org/opensrp/web/rest/it/ResourceTestUtility.java @@ -8,8 +8,8 @@ import org.opensrp.repository.couch.AllErrorTrace; import org.opensrp.scheduler.Action; import org.opensrp.scheduler.Alert; -import org.opensrp.scheduler.repository.AllActions; -import org.opensrp.scheduler.repository.AllAlerts; +import org.opensrp.scheduler.repository.couch.AllActions; +import org.opensrp.scheduler.repository.couch.AllAlerts; public final class ResourceTestUtility { From 91d77bf293ede89934853ffd2b90162e43219345 Mon Sep 17 00:00:00 2001 From: Ephraim Muhia Date: Mon, 12 Mar 2018 11:48:46 +0300 Subject: [PATCH 021/133] moved error_trace to error_space tablespace Signed-off-by: Ephraim Muhia --- .../scripts/20180309140716_create_error_trace_table.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/migrations/scripts/20180309140716_create_error_trace_table.sql b/assets/migrations/scripts/20180309140716_create_error_trace_table.sql index 504f62131e..db1fd6430c 100644 --- a/assets/migrations/scripts/20180309140716_create_error_trace_table.sql +++ b/assets/migrations/scripts/20180309140716_create_error_trace_table.sql @@ -33,7 +33,7 @@ CREATE TABLE error.error_trace ) WITH ( OIDS = FALSE -) TABLESPACE core_space; +) TABLESPACE error_space; CREATE INDEX error_trace_status_index ON error.error_trace (status); From f6662caeffb51951dc05f06aa3189db328ae5091 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 12 Mar 2018 12:32:42 +0300 Subject: [PATCH 022/133] Prepend postgress beans to avoid potential conflicts Signed-off-by: Samuel Githengi --- .../src/main/resources/persistence_postgres.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/opensrp-core/src/main/resources/persistence_postgres.xml b/opensrp-core/src/main/resources/persistence_postgres.xml index 8bae2c3554..3ee93c06f9 100644 --- a/opensrp-core/src/main/resources/persistence_postgres.xml +++ b/opensrp-core/src/main/resources/persistence_postgres.xml @@ -14,7 +14,7 @@ - @@ -22,21 +22,21 @@ - - + - + - - + + - - + + From b459042eab404eb4e7bc2d05cca6f9a624812553 Mon Sep 17 00:00:00 2001 From: "Ephraim (Keyman) Muhia" Date: Mon, 12 Mar 2018 12:53:01 +0300 Subject: [PATCH 023/133] Merge pull request #411 from OpenSRP/issue408 Covert non client document to relational model From 839f962e64e2600052a0026548bf469f05d9b553 Mon Sep 17 00:00:00 2001 From: "Ephraim (Keyman) Muhia" Date: Mon, 12 Mar 2018 12:53:12 +0300 Subject: [PATCH 024/133] Merge branch 'couchdb-to-postgres' into issue401 From ec053305080493304b503e76c01774c4fa8ff50a Mon Sep 17 00:00:00 2001 From: "Ephraim (Keyman) Muhia" Date: Mon, 12 Mar 2018 14:20:43 +0300 Subject: [PATCH 025/133] Merge pull request #412 from OpenSRP/issue401 Ability to switch between couchdb and postgres From 3728ea10d24541320ca5caadab41bce30b65362a Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Tue, 13 Mar 2018 12:39:08 +0300 Subject: [PATCH 026/133] Setup and run postgres repository beans. Setup tomcat connection pool as datasource --- .../dhis2/DHIS2AggregateConnector.java | 5 +- opensrp-core/pom.xml | 11 ++ .../{couch => }/UniqueIdRepository.java | 2 +- .../postgres/ActionRepositoryImpl.java | 99 +++++++++++ .../postgres/AlertsRepositoryImpl.java | 118 +++++++++++++ .../AppStateTokensRepositoryImpl.java | 92 +++++++++++ .../postgres/ClientsRepositoryImpl.java | 149 +++++++++++++++++ .../postgres/ErrorTraceRepositoryImpl.java | 91 ++++++++++ .../postgres/EventsRepositoryImpl.java | 155 ++++++++++++++++++ .../postgres/MultimediaRepositoryImpl.java | 54 ++++++ .../postgres/ReportsRepositoryImpl.java | 105 ++++++++++++ .../postgres/SearchRepositoryImpl.java | 20 +++ .../postgres/StocksRepositoryImpl.java | 79 +++++++++ .../org/opensrp/service/OpenmrsIDService.java | 2 +- .../formSubmission/EventsListener.java | 17 +- .../main/resources/persistence_postgres.xml | 20 ++- .../opensrp/service/OpenmrsIDServiceTest.java | 2 +- .../handler/VaccinesScheduleHandler.java | 6 +- .../scheduling/BNFSchedulesService.java | 4 +- .../web/controller/DHIS2Controller.java | 12 +- .../controller/fake/FakeActionController.java | 10 +- .../src/main/webapp/META-INF/context.xml | 24 +++ opensrp-web/src/main/webapp/WEB-INF/web.xml | 7 + 23 files changed, 1042 insertions(+), 42 deletions(-) rename opensrp-core/src/main/java/org/opensrp/repository/{couch => }/UniqueIdRepository.java (98%) create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/AppStateTokensRepositoryImpl.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/ErrorTraceRepositoryImpl.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/SearchRepositoryImpl.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java create mode 100644 opensrp-web/src/main/webapp/META-INF/context.xml diff --git a/opensrp-connector/src/main/java/org/opensrp/connector/dhis2/DHIS2AggregateConnector.java b/opensrp-connector/src/main/java/org/opensrp/connector/dhis2/DHIS2AggregateConnector.java index 49b8d459a8..d4974d453b 100644 --- a/opensrp-connector/src/main/java/org/opensrp/connector/dhis2/DHIS2AggregateConnector.java +++ b/opensrp-connector/src/main/java/org/opensrp/connector/dhis2/DHIS2AggregateConnector.java @@ -10,6 +10,7 @@ import org.json.JSONObject; import org.opensrp.domain.Event; import org.opensrp.domain.Obs; +import org.opensrp.repository.EventsRepository; import org.opensrp.repository.couch.AllEvents; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -20,9 +21,9 @@ public class DHIS2AggregateConnector extends DHIS2Service { @Autowired - private AllEvents allEvents; + private EventsRepository allEvents; - public DHIS2AggregateConnector() { + public DHIS2AggregateConnector(){ } diff --git a/opensrp-core/pom.xml b/opensrp-core/pom.xml index b347eff464..289f424e5c 100644 --- a/opensrp-core/pom.xml +++ b/opensrp-core/pom.xml @@ -41,6 +41,10 @@ ../opensrp-core/src/main/resources/queries queries + + ../opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml + org/opensrp/repository/postgres/mapper/xml + @@ -243,6 +247,13 @@ test runtime + + + org.apache.tomcat + tomcat-jdbc + 7.0.85 + + diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/UniqueIdRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/UniqueIdRepository.java similarity index 98% rename from opensrp-core/src/main/java/org/opensrp/repository/couch/UniqueIdRepository.java rename to opensrp-core/src/main/java/org/opensrp/repository/UniqueIdRepository.java index 30f7fd2ca7..4a4e279744 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/UniqueIdRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/UniqueIdRepository.java @@ -1,4 +1,4 @@ -package org.opensrp.repository.couch; +package org.opensrp.repository; import org.opensrp.domain.UniqueId; import org.springframework.beans.factory.annotation.Autowired; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java new file mode 100644 index 0000000000..abaa3357af --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java @@ -0,0 +1,99 @@ +package org.opensrp.repository.postgres; + +import java.util.List; + +import org.joda.time.DateTime; +import org.opensrp.scheduler.Action; +import org.opensrp.scheduler.repository.ActionsRepository; +import org.springframework.stereotype.Repository; + +@Repository +public class ActionRepositoryImpl implements ActionsRepository { + + @Override + public Action get(String id) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void add(Action entity) { + // TODO Auto-generated method stub + + } + + @Override + public void update(Action entity) { + // TODO Auto-generated method stub + + } + + @Override + public List getAll() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void safeRemove(Action entity) { + // TODO Auto-generated method stub + + } + + @Override + public List findByProviderIdAndTimeStamp(String providerId, long timeStamp) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findAlertByANMIdEntityIdScheduleName(String providerId, String baseEntityId, String scheduleName) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByCaseIdScheduleAndTimeStamp(String baseEntityId, String schedule, DateTime start, + DateTime end) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByCaseIdAndTimeStamp(String baseEntityId, long timeStamp) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void deleteAllByTarget(String target) { + // TODO Auto-generated method stub + + } + + @Override + public void markAllAsInActiveFor(String baseEntityId) { + // TODO Auto-generated method stub + + } + + @Override + public void addOrUpdateAlert(Action alertAction) { + // TODO Auto-generated method stub + + } + + @Override + public void markAlertAsInactiveFor(String providerId, String baseEntityId, String scheduleName) { + // TODO Auto-generated method stub + + } + + @Override + public List findByCriteria(String team, String providerId, long timeStamp, String sortBy, String sortOrder, + int limit) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java new file mode 100644 index 0000000000..8dd3505838 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java @@ -0,0 +1,118 @@ +package org.opensrp.repository.postgres; + +import java.util.List; + +import org.joda.time.DateTime; +import org.opensrp.dto.AlertStatus; +import org.opensrp.scheduler.Alert; +import org.opensrp.scheduler.repository.AlertsRepository; +import org.springframework.stereotype.Repository; + +@Repository +public class AlertsRepositoryImpl implements AlertsRepository{ + + @Override + public Alert get(String id) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void add(Alert entity) { + // TODO Auto-generated method stub + + } + + @Override + public void update(Alert entity) { + // TODO Auto-generated method stub + + } + + @Override + public List getAll() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void safeRemove(Alert entity) { + // TODO Auto-generated method stub + + } + + @Override + public List findByProviderAndTimestamp(String provider, long timeStamp) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findActiveByProviderAndTimestamp(String provider, long timeStamp) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findAlertByProviderEntityIdTriggerName(String provider, String entityId, String triggerName) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findActiveAlertByProviderEntityIdTriggerName(String provider, String entityId, String triggerName) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findActiveAlertByEntityIdTriggerName(String entityId, String triggerName) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findActiveAlertByEntityId(String entityId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByEntityIdTriggerAndTimeStamp(String entityId, String trigger, DateTime start, DateTime end) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void markAllAsClosedFor(String entityId, String reasonForClose) { + // TODO Auto-generated method stub + + } + + @Override + public void markAlertAsClosedFor(String providerId, String entityId, String triggerName, String reasonForClose) { + // TODO Auto-generated method stub + + } + + @Override + public void markAlertAsCompleteFor(String providerId, String entityId, String triggerName, String completionDate) { + // TODO Auto-generated method stub + + } + + @Override + public void addOrUpdateScheduleNotificationAlert(String beneficiaryType, String entityId, String providerId, + String triggerName, String triggerCode, AlertStatus alertStatus, + DateTime startDate, DateTime expiryDate) { + // TODO Auto-generated method stub + + } + + @Override + public void markAlertAsCompleteFor(String entityId, String triggerName, String completionDate) { + // TODO Auto-generated method stub + + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/AppStateTokensRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AppStateTokensRepositoryImpl.java new file mode 100644 index 0000000000..f4127cfa26 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AppStateTokensRepositoryImpl.java @@ -0,0 +1,92 @@ +package org.opensrp.repository.postgres; + +import java.util.ArrayList; +import java.util.List; + +import org.opensrp.domain.AppStateToken; +import org.opensrp.domain.postgres.AppStateTokenExample; +import org.opensrp.repository.AppStateTokensRepository; +import org.opensrp.repository.postgres.mapper.AppStateTokenMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Repository; + +@Repository +public class AppStateTokensRepositoryImpl implements AppStateTokensRepository { + + @Autowired + private AppStateTokenMapper mapper; + + @Override + public AppStateToken get(String id) { + org.opensrp.domain.postgres.AppStateToken token = mapper.selectByPrimaryKey(Long.valueOf(id)); + return new AppStateToken(token.getName(), token.getValue(), token.getLastEditedDate(), token.getDescription()); + } + + @Override + public List getAll() { + List tokens = mapper.selectByExample(new AppStateTokenExample()); + List appStateTokens = new ArrayList(); + for (org.opensrp.domain.postgres.AppStateToken token : tokens) { + appStateTokens.add(getDomainEntity(token)); + } + return appStateTokens; + } + + @Override + public void safeRemove(AppStateToken entity) { + + AppStateTokenExample example = new AppStateTokenExample(); + example.createCriteria().andNameEqualTo(entity.getName()); + mapper.deleteByExample(example); + + } + + @Override + public List findByName(String name) { + AppStateTokenExample example = new AppStateTokenExample(); + example.createCriteria().andNameEqualTo(name); + List tokens = mapper.selectByExample(example); + List appStateTokens = new ArrayList(); + for (org.opensrp.domain.postgres.AppStateToken token : tokens) { + appStateTokens.add(getDomainEntity(token)); + } + return appStateTokens; + } + + @Override + public void update(AppStateToken entity) { + + AppStateTokenExample example = new AppStateTokenExample(); + example.createCriteria().andNameEqualTo(entity.getName()); + + List tokens = mapper.selectByExample(example); + if (tokens != null && !tokens.isEmpty()) { + org.opensrp.domain.postgres.AppStateToken token = tokens.get(0); + mapper.updateByPrimaryKey(getPostgresEntity(token, entity)); + } + + } + + @Override + public void add(AppStateToken entity) { + mapper.insertSelective(getPostgresEntity(entity)); + } + + private AppStateToken getDomainEntity(org.opensrp.domain.postgres.AppStateToken token) { + return new AppStateToken(token.getName(), token.getValue(), token.getLastEditedDate(), token.getDescription()); + } + + private org.opensrp.domain.postgres.AppStateToken getPostgresEntity(AppStateToken entity) { + return getPostgresEntity(new org.opensrp.domain.postgres.AppStateToken(), entity); + } + + private org.opensrp.domain.postgres.AppStateToken getPostgresEntity(org.opensrp.domain.postgres.AppStateToken token, + AppStateToken entity) { + token.setDescription(entity.getDescription()); + token.setName(entity.getName()); + token.setLastEditedDate(entity.getLastEditDate()); + token.setValue(entity.getValue().toString()); + return token; + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java new file mode 100644 index 0000000000..d44b9044b3 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java @@ -0,0 +1,149 @@ +package org.opensrp.repository.postgres; + +import java.util.Calendar; +import java.util.List; + +import org.joda.time.DateTime; +import org.opensrp.domain.Client; +import org.opensrp.repository.ClientsRepository; +import org.opensrp.search.AddressSearchBean; +import org.opensrp.search.ClientSearchBean; +import org.springframework.stereotype.Repository; + +@Repository +public class ClientsRepositoryImpl implements ClientsRepository { + + @Override + public Client get(String id) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void add(Client entity) { + // TODO Auto-generated method stub + + } + + @Override + public void update(Client entity) { + // TODO Auto-generated method stub + + } + + @Override + public List getAll() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void safeRemove(Client entity) { + // TODO Auto-generated method stub + + } + + @Override + public Client findByBaseEntityId(String baseEntityId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findAllClients() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findAllByIdentifier(String identifier) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findAllByIdentifier(String identifierType, String identifier) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findAllByAttribute(String attributeType, String attribute) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findAllByMatchingName(String nameMatches) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByRelationshipIdAndDateCreated(String relationalId, String dateFrom, String dateTo) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByRelationshipId(String relationshipType, String entityId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean, + DateTime lastEditFrom, DateTime lastEditTo) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByDynamicQuery(String query) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByCriteria(ClientSearchBean searchBean) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByCriteria(AddressSearchBean addressSearchBean, DateTime lastEditFrom, DateTime lastEditTo) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByRelationShip(String relationIndentier) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByEmptyServerVersion() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByServerVersion(long serverVersion) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByFieldValue(String field, List ids) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List notInOpenMRSByServerVersion(long serverVersion, Calendar calendar) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ErrorTraceRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ErrorTraceRepositoryImpl.java new file mode 100644 index 0000000000..25afa24bde --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ErrorTraceRepositoryImpl.java @@ -0,0 +1,91 @@ +package org.opensrp.repository.postgres; + +import java.util.ArrayList; +import java.util.List; + +import org.ektorp.DocumentNotFoundException; +import org.joda.time.DateTime; +import org.opensrp.domain.ErrorTrace; +import org.opensrp.domain.postgres.ErrorTraceExample; +import org.opensrp.repository.ErrorTraceRepository; +import org.opensrp.repository.postgres.mapper.ErrorTraceMapper; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Repository; + +@Repository +public class ErrorTraceRepositoryImpl implements ErrorTraceRepository { + + @Autowired + private ErrorTraceMapper errorTraceMapper; + + @Override + public ErrorTrace get(String id) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void add(ErrorTrace entity) { + // TODO Auto-generated method stub + + } + + @Override + public void update(ErrorTrace entity) { + // TODO Auto-generated method stub + + } + + @Override + public List getAll() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void safeRemove(ErrorTrace entity) { + // TODO Auto-generated method stub + + } + + @Override + public ErrorTrace findById(String _id) throws DocumentNotFoundException { + // TODO Auto-generated method stub + return null; + } + + @Override + public boolean exists(String id) { + // TODO Auto-generated method stub + return false; + } + + @Override + public List findAllErrors() throws DocumentNotFoundException { + ErrorTraceExample example = new ErrorTraceExample(); + List errors = new ArrayList(); + for (org.opensrp.domain.postgres.ErrorTrace error : errorTraceMapper.selectByExample(example)) { + ErrorTrace err = new ErrorTrace(); + err.setDate(new DateTime(error.getDateOccurred())); + err.setErrorType(error.getErrorType()); + err.setStackTrace(error.getStackTrace()); + err.setStatus(error.getStatus()); + errors.add(err); + } + return errors; + + } + + @Override + public List findAllUnSolvedErrors() throws DocumentNotFoundException { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findAllSolvedErrors() throws DocumentNotFoundException { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java new file mode 100644 index 0000000000..057efbcb11 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java @@ -0,0 +1,155 @@ +package org.opensrp.repository.postgres; + +import java.util.Calendar; +import java.util.List; + +import org.joda.time.DateTime; +import org.opensrp.domain.Event; +import org.opensrp.repository.EventsRepository; +import org.springframework.stereotype.Repository; + +@Repository +public class EventsRepositoryImpl implements EventsRepository { + + @Override + public Event get(String id) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void add(Event entity) { + // TODO Auto-generated method stub + + } + + @Override + public void update(Event entity) { + // TODO Auto-generated method stub + + } + + @Override + public List getAll() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void safeRemove(Event entity) { + // TODO Auto-generated method stub + + } + + @Override + public List findAllByIdentifier(String identifier) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findAllByIdentifier(String identifierType, String identifier) { + // TODO Auto-generated method stub + return null; + } + + @Override + public Event findById(String id) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByFormSubmissionId(String formSubmissionId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByBaseEntityId(String baseEntityId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByBaseEntityAndFormSubmissionId(String baseEntityId, String formSubmissionId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByBaseEntityAndType(String baseEntityId, String eventType) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findEvents(String baseEntityId, DateTime from, DateTime to, String eventType, String entityType, + String providerId, String locationId, DateTime lastEditFrom, DateTime lastEditTo) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findEventsByDynamicQuery(String query) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByServerVersion(long serverVersion) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List notInOpenMRSByServerVersion(long serverVersion, Calendar calendar) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List notInOpenMRSByServerVersionAndType(String type, long serverVersion, Calendar calendar) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByClientAndConceptAndDate(String baseEntityId, String concept, String conceptValue, + String dateFrom, String dateTo) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByBaseEntityIdAndConceptParentCode(String baseEntityId, String concept, String parentCode) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByConceptAndValue(String concept, String conceptValue) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByEmptyServerVersion() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findEvents(String team, String providerId, String locationId, String baseEntityId, Long serverVersion, + String sortBy, String sortOrder, int limit) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findEventByEventTypeBetweenTwoDates(String eventType) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java new file mode 100644 index 0000000000..d6b0ef3349 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java @@ -0,0 +1,54 @@ +package org.opensrp.repository.postgres; + +import java.util.List; + +import org.opensrp.domain.Multimedia; +import org.opensrp.repository.MultimediaRepository; +import org.springframework.stereotype.Repository; + +@Repository +public class MultimediaRepositoryImpl implements MultimediaRepository { + + @Override + public Multimedia get(String id) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void add(Multimedia entity) { + // TODO Auto-generated method stub + + } + + @Override + public void update(Multimedia entity) { + // TODO Auto-generated method stub + + } + + @Override + public List getAll() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void safeRemove(Multimedia entity) { + // TODO Auto-generated method stub + + } + + @Override + public Multimedia findByCaseId(String entityId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List all(String providerId) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java new file mode 100644 index 0000000000..5abd53a15e --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java @@ -0,0 +1,105 @@ +package org.opensrp.repository.postgres; + +import java.util.List; + +import org.joda.time.DateTime; +import org.opensrp.domain.Report; +import org.opensrp.repository.ReportsRepository; +import org.springframework.stereotype.Repository; + +@Repository +public class ReportsRepositoryImpl implements ReportsRepository { + + @Override + public Report get(String id) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void add(Report entity) { + // TODO Auto-generated method stub + + } + + @Override + public void update(Report entity) { + // TODO Auto-generated method stub + + } + + @Override + public List getAll() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void safeRemove(Report entity) { + // TODO Auto-generated method stub + + } + + @Override + public Report findById(String id) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByBaseEntityId(String baseEntityId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findAllByIdentifier(String identifier) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByBaseEntityAndType(String baseEntityId, String reportType) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByEmptyServerVersion() { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByServerVersion(long serverVersion) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findByBaseEntityAndFormSubmissionId(String baseEntityId, String formSubmissionId) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findReports(String team, String providerId, String locationId, String baseEntityId, + Long serverVersion, String sortBy, String sortOrder, int limit) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findReports(String baseEntityId, DateTime from, DateTime to, String reportType, String providerId, + String locationId, DateTime lastEditFrom, DateTime lastEditTo) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findReportsByDynamicQuery(String query) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/SearchRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/SearchRepositoryImpl.java new file mode 100644 index 0000000000..5266757807 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/SearchRepositoryImpl.java @@ -0,0 +1,20 @@ +package org.opensrp.repository.postgres; + +import java.util.List; + +import org.opensrp.domain.Client; +import org.opensrp.repository.SearchRepository; +import org.opensrp.search.ClientSearchBean; +import org.springframework.stereotype.Repository; + +@Repository +public class SearchRepositoryImpl implements SearchRepository { + + @Override + public List findByCriteria(ClientSearchBean clientSearchBean, String firstName, String middleName, + String lastName, Integer limit) { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java new file mode 100644 index 0000000000..f61d5d2910 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java @@ -0,0 +1,79 @@ +package org.opensrp.repository.postgres; + +import java.util.List; + +import org.opensrp.domain.Stock; +import org.opensrp.repository.StocksRepository; +import org.opensrp.search.StockSearchBean; +import org.springframework.stereotype.Repository; + +@Repository +public class StocksRepositoryImpl implements StocksRepository { + + @Override + public Stock get(String id) { + // TODO Auto-generated method stub + return null; + } + + @Override + public void add(Stock entity) { + // TODO Auto-generated method stub + + } + + @Override + public void update(Stock entity) { + // TODO Auto-generated method stub + + } + + @Override + public List getAll() { + // TODO Auto-generated method stub + return null; + } + + @Override + public void safeRemove(Stock entity) { + // TODO Auto-generated method stub + + } + + @Override + public List findAllByProviderid(String providerid) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findAllByIdentifier(String vaccine_type, String vaccine_type_id) { + // TODO Auto-generated method stub + return null; + } + + @Override + public Stock findById(String id) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findStocks(StockSearchBean searchBean, String sortBy, String sortOrder, int limit) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findStocks(StockSearchBean searchBean) { + // TODO Auto-generated method stub + return null; + } + + @Override + public List findAllStocks() { + // TODO Auto-generated method stub + return null; + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/service/OpenmrsIDService.java b/opensrp-core/src/main/java/org/opensrp/service/OpenmrsIDService.java index 4ff79ed468..0bd25bdd83 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/OpenmrsIDService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/OpenmrsIDService.java @@ -16,7 +16,7 @@ import org.json.JSONObject; import org.opensrp.domain.Client; import org.opensrp.domain.UniqueId; -import org.opensrp.repository.couch.UniqueIdRepository; +import org.opensrp.repository.UniqueIdRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; diff --git a/opensrp-core/src/main/java/org/opensrp/service/formSubmission/EventsListener.java b/opensrp-core/src/main/java/org/opensrp/service/formSubmission/EventsListener.java index ef597d4c96..2a141e015b 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/formSubmission/EventsListener.java +++ b/opensrp-core/src/main/java/org/opensrp/service/formSubmission/EventsListener.java @@ -18,8 +18,8 @@ import org.opensrp.domain.ErrorTrace; import org.opensrp.domain.Event; import org.opensrp.form.domain.FormSubmission; -import org.opensrp.repository.couch.AllClients; -import org.opensrp.repository.couch.AllEvents; +import org.opensrp.repository.ClientsRepository; +import org.opensrp.repository.EventsRepository; import org.opensrp.service.ConfigService; import org.opensrp.service.ErrorTraceService; import org.opensrp.service.EventService; @@ -38,10 +38,11 @@ public class EventsListener { private ConfigService configService; - private AllEvents allEvents; + private EventsRepository allEvents; @Autowired - private AllClients allClients; + private ClientsRepository allClients; + @Autowired EventService eventService; @@ -50,7 +51,7 @@ public class EventsListener { private ErrorTraceService errorTraceService; @Autowired - public EventsListener(EventsRouter eventsRouter, ConfigService configService, AllEvents allEvents, + public EventsListener(EventsRouter eventsRouter, ConfigService configService, EventsRepository allEvents, ErrorTraceService errorTraceService) { this.configService = configService; this.errorTraceService = errorTraceService; @@ -60,9 +61,9 @@ public EventsListener(EventsRouter eventsRouter, ConfigService configService, Al "Token to keep track of events processed for client n event parsing and schedule handling", true); } - - public EventsListener(EventsRouter eventsRouter, ConfigService configService, AllEvents allEvents, EventService eventService, - ErrorTraceService errorTraceService, AllClients allClients) { + + public EventsListener(EventsRouter eventsRouter, ConfigService configService, EventsRepository allEvents, + EventService eventService, ErrorTraceService errorTraceService, ClientsRepository allClients) { this.configService = configService; this.errorTraceService = errorTraceService; this.eventsRouter = eventsRouter; diff --git a/opensrp-core/src/main/resources/persistence_postgres.xml b/opensrp-core/src/main/resources/persistence_postgres.xml index 3ee93c06f9..91ec6e5a20 100644 --- a/opensrp-core/src/main/resources/persistence_postgres.xml +++ b/opensrp-core/src/main/resources/persistence_postgres.xml @@ -9,19 +9,23 @@ + + + + - - - - - - + + + @@ -32,7 +36,7 @@ + value="classpath*:org/opensrp/repository/postgres/mapper/xml/*.xml" /> diff --git a/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java index 49570d3336..60ae1904eb 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java @@ -9,7 +9,7 @@ import org.opensrp.domain.Address; import org.opensrp.domain.Client; import org.opensrp.domain.UniqueId; -import org.opensrp.repository.couch.UniqueIdRepository; +import org.opensrp.repository.UniqueIdRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.jdbc.core.JdbcTemplate; diff --git a/opensrp-register/src/main/java/org/opensrp/register/service/handler/VaccinesScheduleHandler.java b/opensrp-register/src/main/java/org/opensrp/register/service/handler/VaccinesScheduleHandler.java index 7dfa2e1df5..14e1128b0a 100644 --- a/opensrp-register/src/main/java/org/opensrp/register/service/handler/VaccinesScheduleHandler.java +++ b/opensrp-register/src/main/java/org/opensrp/register/service/handler/VaccinesScheduleHandler.java @@ -12,7 +12,7 @@ import org.motechproject.scheduletracking.api.domain.Enrollment; import org.opensrp.domain.Event; import org.opensrp.domain.Obs; -import org.opensrp.repository.couch.AllEvents; +import org.opensrp.repository.EventsRepository; import org.opensrp.scheduler.HealthSchedulerService; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -20,9 +20,9 @@ @Component public class VaccinesScheduleHandler extends BaseScheduleHandler { private HealthSchedulerService scheduler; - private AllEvents allEvents; + private EventsRepository allEvents; @Autowired - public VaccinesScheduleHandler(HealthSchedulerService scheduler,AllEvents allEvents) { + public VaccinesScheduleHandler(HealthSchedulerService scheduler,EventsRepository allEvents) { this.scheduler = scheduler; this.allEvents = allEvents; } diff --git a/opensrp-register/src/main/java/org/opensrp/register/service/scheduling/BNFSchedulesService.java b/opensrp-register/src/main/java/org/opensrp/register/service/scheduling/BNFSchedulesService.java index 9dcc783451..37a6005d1b 100644 --- a/opensrp-register/src/main/java/org/opensrp/register/service/scheduling/BNFSchedulesService.java +++ b/opensrp-register/src/main/java/org/opensrp/register/service/scheduling/BNFSchedulesService.java @@ -7,7 +7,7 @@ import org.joda.time.LocalDate; import org.opensrp.scheduler.HealthSchedulerService; -import org.opensrp.scheduler.repository.couch.AllActions; +import org.opensrp.scheduler.repository.ActionsRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -21,7 +21,7 @@ public class BNFSchedulesService { private HealthSchedulerService scheduler; @Autowired - public BNFSchedulesService(HealthSchedulerService scheduler, AllActions allActions) { + public BNFSchedulesService(HealthSchedulerService scheduler, ActionsRepository allActions) { this.scheduler = scheduler; } diff --git a/opensrp-web/src/main/java/org/opensrp/web/controller/DHIS2Controller.java b/opensrp-web/src/main/java/org/opensrp/web/controller/DHIS2Controller.java index e5fcf9b066..c9917a5277 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/controller/DHIS2Controller.java +++ b/opensrp-web/src/main/java/org/opensrp/web/controller/DHIS2Controller.java @@ -1,12 +1,8 @@ package org.opensrp.web.controller; -import java.util.List; - import org.json.JSONException; import org.json.JSONObject; import org.opensrp.connector.dhis2.DHIS2AggregateConnector; -import org.opensrp.domain.Event; -import org.opensrp.repository.couch.AllEvents; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -19,15 +15,9 @@ @Controller public class DHIS2Controller { - - - private AllEvents allEvents; + @Autowired private DHIS2AggregateConnector dHIS2AggregateConnector; - @Autowired - public DHIS2Controller(AllEvents allEvents) { - this.allEvents = allEvents; - } @RequestMapping(method = RequestMethod.GET, value = "/this-month-client-to-dhis2") @ResponseBody diff --git a/opensrp-web/src/main/java/org/opensrp/web/controller/fake/FakeActionController.java b/opensrp-web/src/main/java/org/opensrp/web/controller/fake/FakeActionController.java index 52ea5005c4..4e9bd52929 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/controller/fake/FakeActionController.java +++ b/opensrp-web/src/main/java/org/opensrp/web/controller/fake/FakeActionController.java @@ -1,9 +1,7 @@ package org.opensrp.web.controller.fake; -import com.google.gson.Gson; - import org.opensrp.dto.Action; -import org.opensrp.scheduler.repository.couch.AllActions; +import org.opensrp.scheduler.repository.ActionsRepository; import org.opensrp.web.controller.ActionConvertor; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; @@ -12,12 +10,14 @@ import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.ResponseBody; +import com.google.gson.Gson; + @Controller public class FakeActionController { - private AllActions allActions; + private ActionsRepository allActions; @Autowired - public FakeActionController(AllActions allActions) { + public FakeActionController(ActionsRepository allActions) { this.allActions = allActions; } diff --git a/opensrp-web/src/main/webapp/META-INF/context.xml b/opensrp-web/src/main/webapp/META-INF/context.xml new file mode 100644 index 0000000000..7da7fc5e39 --- /dev/null +++ b/opensrp-web/src/main/webapp/META-INF/context.xml @@ -0,0 +1,24 @@ + + + + \ No newline at end of file diff --git a/opensrp-web/src/main/webapp/WEB-INF/web.xml b/opensrp-web/src/main/webapp/WEB-INF/web.xml index 46d00e3f53..8cd616cdcb 100644 --- a/opensrp-web/src/main/webapp/WEB-INF/web.xml +++ b/opensrp-web/src/main/webapp/WEB-INF/web.xml @@ -6,6 +6,13 @@ OpenSRP Web Application + + Postgress DB Connection + jdbc/openSRPDB + javax.sql.DataSource + Container + + defaultHtmlEscape From 4cc02d4eb313b0d1fdce4343aa818776e479fd7a Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Tue, 13 Mar 2018 13:16:11 +0300 Subject: [PATCH 027/133] Disable Postgres Repositories in Unit Tests. Code cleanup --- .../AppStateTokensRepositoryImpl.java | 7 +--- .../main/resources/persistence_postgres.xml | 12 +++--- .../test-applicationContext-opensrp.xml | 5 ++- .../src/main/webapp/META-INF/context.xml | 38 +++++++++---------- 4 files changed, 30 insertions(+), 32 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/AppStateTokensRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AppStateTokensRepositoryImpl.java index f4127cfa26..ef82d179a3 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/AppStateTokensRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AppStateTokensRepositoryImpl.java @@ -19,7 +19,7 @@ public class AppStateTokensRepositoryImpl implements AppStateTokensRepository { @Override public AppStateToken get(String id) { org.opensrp.domain.postgres.AppStateToken token = mapper.selectByPrimaryKey(Long.valueOf(id)); - return new AppStateToken(token.getName(), token.getValue(), token.getLastEditedDate(), token.getDescription()); + return getDomainEntity(token); } @Override @@ -34,11 +34,9 @@ public List getAll() { @Override public void safeRemove(AppStateToken entity) { - AppStateTokenExample example = new AppStateTokenExample(); example.createCriteria().andNameEqualTo(entity.getName()); mapper.deleteByExample(example); - } @Override @@ -55,16 +53,13 @@ public List findByName(String name) { @Override public void update(AppStateToken entity) { - AppStateTokenExample example = new AppStateTokenExample(); example.createCriteria().andNameEqualTo(entity.getName()); - List tokens = mapper.selectByExample(example); if (tokens != null && !tokens.isEmpty()) { org.opensrp.domain.postgres.AppStateToken token = tokens.get(0); mapper.updateByPrimaryKey(getPostgresEntity(token, entity)); } - } @Override diff --git a/opensrp-core/src/main/resources/persistence_postgres.xml b/opensrp-core/src/main/resources/persistence_postgres.xml index 91ec6e5a20..e4dfaf3cc9 100644 --- a/opensrp-core/src/main/resources/persistence_postgres.xml +++ b/opensrp-core/src/main/resources/persistence_postgres.xml @@ -8,17 +8,17 @@ + expression="org.opensrp.repository.couch.*" /> + expression="org.opensrp.repository.lucene.*" /> + expression="org.opensrp.scheduler.repository.couch.*" /> + expression="org.opensrp.service.formSubmission.FormSubmission..*" /> + expression="org.opensrp.service.formSubmission.ziggy.*" /> + expression="org.opensrp.service.FormSubmissionDataMigrationService" /> diff --git a/opensrp-core/src/test/resources/test-applicationContext-opensrp.xml b/opensrp-core/src/test/resources/test-applicationContext-opensrp.xml index bfcd61eff6..bd1f4c57a3 100644 --- a/opensrp-core/src/test/resources/test-applicationContext-opensrp.xml +++ b/opensrp-core/src/test/resources/test-applicationContext-opensrp.xml @@ -21,7 +21,10 @@ - + + + + + +
+ + diff --git a/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql b/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql index 5623cb8a9a..965af9c411 100644 --- a/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql +++ b/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql @@ -23,6 +23,7 @@ CREATE TABLE core.client_metadata client_id bigint REFERENCES core.client (id), base_entity_id character varying NOT NULL, relational_id character varying, + server_version bigint, openmrs_uuid character varying, unique_id character varying, first_name character varying, @@ -37,6 +38,7 @@ WITH ( CREATE UNIQUE INDEX client_metadata_base_entity_id_unique_index ON core.client_metadata (base_entity_id); CREATE INDEX client_metadata_relational_id_index ON core.client_metadata (relational_id); +CREATE INDEX client_metadata_server_version_index ON core.client_metadata (server_version); CREATE INDEX client_metadata_openmrs_uuid_index ON core.client_metadata (openmrs_uuid); CREATE INDEX client_metadata_unique_id_index ON core.client_metadata (unique_id); CREATE INDEX client_metadata_first_name_index ON core.client_metadata (first_name NULLS LAST); diff --git a/opensrp-common/src/main/java/org/opensrp/common/AllConstants.java b/opensrp-common/src/main/java/org/opensrp/common/AllConstants.java index ee23c1b9ef..9618ae28fb 100644 --- a/opensrp-common/src/main/java/org/opensrp/common/AllConstants.java +++ b/opensrp-common/src/main/java/org/opensrp/common/AllConstants.java @@ -81,6 +81,8 @@ public static class Client extends BaseEntity { public static final String GENDER = "gender"; public static final String ZEIR_ID = "zeir_id"; + + public static final String OPENMRS_UUID_IDENTIFIER_TYPE = "OPENMRS_UUID"; } public static class Event { @@ -103,6 +105,8 @@ public static class Event { public static final String TEAM_ID = "teamId"; + public static final String OPENMRS_UUID_IDENTIFIER_TYPE = "OPENMRS_UUID"; + } public static class Stock { diff --git a/opensrp-core/pom.xml b/opensrp-core/pom.xml index 289f424e5c..1052e0d21a 100644 --- a/opensrp-core/pom.xml +++ b/opensrp-core/pom.xml @@ -41,9 +41,13 @@ ../opensrp-core/src/main/resources/queriesqueries - + ../opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml org/opensrp/repository/postgres/mapper/xml + + + ../opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml + org/opensrp/repository/postgres/mapper/custom/xml diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Action.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Action.java index 6bd0efe2f8..1c6adddd64 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Action.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Action.java @@ -4,19 +4,19 @@ public class Action { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action.id * @return the value of core.action.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action.id * @param id the value for core.action.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action.json * @return the value of core.action.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action.json * @param json the value for core.action.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionExample.java index feabeccad4..9c973225ea 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionExample.java @@ -6,23 +6,23 @@ public class ActionExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public ActionExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public ActionExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -285,7 +285,7 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java index 6335c54eef..ee25154981 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java @@ -4,49 +4,49 @@ public class ActionMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.action_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long actionId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.base_entity_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.server_version - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.location_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.team - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.team_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String teamId; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.id * @return the value of core.action_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getId() { return id; @@ -55,7 +55,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.id * @param id the value for core.action_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -64,7 +64,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.action_id * @return the value of core.action_metadata.action_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getActionId() { return actionId; @@ -73,7 +73,7 @@ public Long getActionId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.action_id * @param actionId the value for core.action_metadata.action_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setActionId(Long actionId) { this.actionId = actionId; @@ -82,7 +82,7 @@ public void setActionId(Long actionId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.base_entity_id * @return the value of core.action_metadata.base_entity_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -91,7 +91,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.base_entity_id * @param baseEntityId the value for core.action_metadata.base_entity_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -100,7 +100,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.server_version * @return the value of core.action_metadata.server_version - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -109,7 +109,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.server_version * @param serverVersion the value for core.action_metadata.server_version - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -118,7 +118,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.provider_id * @return the value of core.action_metadata.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getProviderId() { return providerId; @@ -127,7 +127,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.provider_id * @param providerId the value for core.action_metadata.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -136,7 +136,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.location_id * @return the value of core.action_metadata.location_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getLocationId() { return locationId; @@ -145,7 +145,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.location_id * @param locationId the value for core.action_metadata.location_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -154,7 +154,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.team * @return the value of core.action_metadata.team - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getTeam() { return team; @@ -163,7 +163,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.team * @param team the value for core.action_metadata.team - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -172,7 +172,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.team_id * @return the value of core.action_metadata.team_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getTeamId() { return teamId; @@ -181,7 +181,7 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.team_id * @param teamId the value for core.action_metadata.team_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java index daa49855d1..00972d5a81 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java @@ -6,23 +6,23 @@ public class ActionMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public ActionMetadataExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public ActionMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -695,7 +695,7 @@ public Criteria andTeamIdNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java index b806e85e64..8eb5ea5a61 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java @@ -4,19 +4,19 @@ public class Alert { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert.id * @return the value of core.alert.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert.id * @param id the value for core.alert.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert.json * @return the value of core.alert.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert.json * @param json the value for core.alert.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java index 44c577a39b..a39227cbb1 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java @@ -6,23 +6,23 @@ public class AlertExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public AlertExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public AlertExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -285,7 +285,7 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java index 6a9b05a156..e4eec2e80a 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java @@ -4,59 +4,59 @@ public class AlertMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.alert_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long alertId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.base_entity_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.server_version - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.location_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.team - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.team_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String teamId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.is_active - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Boolean isActive; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.trigger_name - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String triggerName; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.id * @return the value of core.alert_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getId() { return id; @@ -65,7 +65,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.id * @param id the value for core.alert_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -74,7 +74,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.alert_id * @return the value of core.alert_metadata.alert_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getAlertId() { return alertId; @@ -83,7 +83,7 @@ public Long getAlertId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.alert_id * @param alertId the value for core.alert_metadata.alert_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setAlertId(Long alertId) { this.alertId = alertId; @@ -92,7 +92,7 @@ public void setAlertId(Long alertId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.base_entity_id * @return the value of core.alert_metadata.base_entity_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -101,7 +101,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.base_entity_id * @param baseEntityId the value for core.alert_metadata.base_entity_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -110,7 +110,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.server_version * @return the value of core.alert_metadata.server_version - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -119,7 +119,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.server_version * @param serverVersion the value for core.alert_metadata.server_version - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -128,7 +128,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.provider_id * @return the value of core.alert_metadata.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getProviderId() { return providerId; @@ -137,7 +137,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.provider_id * @param providerId the value for core.alert_metadata.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -146,7 +146,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.location_id * @return the value of core.alert_metadata.location_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getLocationId() { return locationId; @@ -155,7 +155,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.location_id * @param locationId the value for core.alert_metadata.location_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -164,7 +164,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.team * @return the value of core.alert_metadata.team - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getTeam() { return team; @@ -173,7 +173,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.team * @param team the value for core.alert_metadata.team - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -182,7 +182,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.team_id * @return the value of core.alert_metadata.team_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getTeamId() { return teamId; @@ -191,7 +191,7 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.team_id * @param teamId the value for core.alert_metadata.team_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; @@ -200,7 +200,7 @@ public void setTeamId(String teamId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.is_active * @return the value of core.alert_metadata.is_active - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Boolean getIsActive() { return isActive; @@ -209,7 +209,7 @@ public Boolean getIsActive() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.is_active * @param isActive the value for core.alert_metadata.is_active - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setIsActive(Boolean isActive) { this.isActive = isActive; @@ -218,7 +218,7 @@ public void setIsActive(Boolean isActive) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.trigger_name * @return the value of core.alert_metadata.trigger_name - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getTriggerName() { return triggerName; @@ -227,7 +227,7 @@ public String getTriggerName() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.trigger_name * @param triggerName the value for core.alert_metadata.trigger_name - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setTriggerName(String triggerName) { this.triggerName = triggerName; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java index 816dc0cea2..f158e87c06 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java @@ -6,23 +6,23 @@ public class AlertMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public AlertMetadataExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public AlertMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -825,7 +825,7 @@ public Criteria andTriggerNameNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateToken.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateToken.java index 4cc6437ec3..3cfa2b69e7 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateToken.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateToken.java @@ -4,34 +4,34 @@ public class AppStateToken { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.app_state_token.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.app_state_token.name - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String name; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.app_state_token.description - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String description; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.app_state_token.value - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String value; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.app_state_token.last_edited_date - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long lastEditedDate; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.app_state_token.id * @return the value of core.app_state_token.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getId() { return id; @@ -40,7 +40,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.app_state_token.id * @param id the value for core.app_state_token.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -49,7 +49,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.app_state_token.name * @return the value of core.app_state_token.name - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getName() { return name; @@ -58,7 +58,7 @@ public String getName() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.app_state_token.name * @param name the value for core.app_state_token.name - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setName(String name) { this.name = name; @@ -67,7 +67,7 @@ public void setName(String name) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.app_state_token.description * @return the value of core.app_state_token.description - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getDescription() { return description; @@ -76,7 +76,7 @@ public String getDescription() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.app_state_token.description * @param description the value for core.app_state_token.description - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setDescription(String description) { this.description = description; @@ -85,7 +85,7 @@ public void setDescription(String description) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.app_state_token.value * @return the value of core.app_state_token.value - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getValue() { return value; @@ -94,7 +94,7 @@ public String getValue() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.app_state_token.value * @param value the value for core.app_state_token.value - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setValue(String value) { this.value = value; @@ -103,7 +103,7 @@ public void setValue(String value) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.app_state_token.last_edited_date * @return the value of core.app_state_token.last_edited_date - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getLastEditedDate() { return lastEditedDate; @@ -112,7 +112,7 @@ public Long getLastEditedDate() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.app_state_token.last_edited_date * @param lastEditedDate the value for core.app_state_token.last_edited_date - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setLastEditedDate(Long lastEditedDate) { this.lastEditedDate = lastEditedDate; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateTokenExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateTokenExample.java index c9bd6b5c4f..7d277c2159 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateTokenExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateTokenExample.java @@ -6,23 +6,23 @@ public class AppStateTokenExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public AppStateTokenExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public AppStateTokenExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -495,7 +495,7 @@ public Criteria andLastEditedDateNotBetween(Long value1, Long value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java index 85ec9636e1..f4016eedf9 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java @@ -4,19 +4,19 @@ public class Client { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client.id * @return the value of core.client.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client.id * @param id the value for core.client.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client.json * @return the value of core.client.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client.json * @param json the value for core.client.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java index f977816636..09297fc366 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java @@ -6,23 +6,23 @@ public class ClientExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public ClientExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public ClientExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -285,7 +285,7 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java index 615b18556d..4728ab70ea 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java @@ -6,54 +6,59 @@ public class ClientMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.client_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ private Long clientId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.base_entity_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.relational_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ private String relationalId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.server_version + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + */ + private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.openmrs_uuid - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ private String openmrsUuid; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.unique_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ private String uniqueId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.first_name - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ private String firstName; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.last_name - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ private String lastName; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.birth_date - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ private Date birthDate; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.id * @return the value of core.client_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public Long getId() { return id; @@ -62,7 +67,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.id * @param id the value for core.client_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -71,7 +76,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.client_id * @return the value of core.client_metadata.client_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public Long getClientId() { return clientId; @@ -80,7 +85,7 @@ public Long getClientId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.client_id * @param clientId the value for core.client_metadata.client_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public void setClientId(Long clientId) { this.clientId = clientId; @@ -89,7 +94,7 @@ public void setClientId(Long clientId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.base_entity_id * @return the value of core.client_metadata.base_entity_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -98,7 +103,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.base_entity_id * @param baseEntityId the value for core.client_metadata.base_entity_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -107,7 +112,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.relational_id * @return the value of core.client_metadata.relational_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public String getRelationalId() { return relationalId; @@ -116,16 +121,34 @@ public String getRelationalId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.relational_id * @param relationalId the value for core.client_metadata.relational_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public void setRelationalId(String relationalId) { this.relationalId = relationalId; } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.server_version + * @return the value of core.client_metadata.server_version + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + */ + public Long getServerVersion() { + return serverVersion; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.server_version + * @param serverVersion the value for core.client_metadata.server_version + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + */ + public void setServerVersion(Long serverVersion) { + this.serverVersion = serverVersion; + } + /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.openmrs_uuid * @return the value of core.client_metadata.openmrs_uuid - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public String getOpenmrsUuid() { return openmrsUuid; @@ -134,7 +157,7 @@ public String getOpenmrsUuid() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.openmrs_uuid * @param openmrsUuid the value for core.client_metadata.openmrs_uuid - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public void setOpenmrsUuid(String openmrsUuid) { this.openmrsUuid = openmrsUuid; @@ -143,7 +166,7 @@ public void setOpenmrsUuid(String openmrsUuid) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.unique_id * @return the value of core.client_metadata.unique_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public String getUniqueId() { return uniqueId; @@ -152,7 +175,7 @@ public String getUniqueId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.unique_id * @param uniqueId the value for core.client_metadata.unique_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; @@ -161,7 +184,7 @@ public void setUniqueId(String uniqueId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.first_name * @return the value of core.client_metadata.first_name - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public String getFirstName() { return firstName; @@ -170,7 +193,7 @@ public String getFirstName() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.first_name * @param firstName the value for core.client_metadata.first_name - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public void setFirstName(String firstName) { this.firstName = firstName; @@ -179,7 +202,7 @@ public void setFirstName(String firstName) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.last_name * @return the value of core.client_metadata.last_name - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public String getLastName() { return lastName; @@ -188,7 +211,7 @@ public String getLastName() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.last_name * @param lastName the value for core.client_metadata.last_name - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public void setLastName(String lastName) { this.lastName = lastName; @@ -197,7 +220,7 @@ public void setLastName(String lastName) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.birth_date * @return the value of core.client_metadata.birth_date - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public Date getBirthDate() { return birthDate; @@ -206,7 +229,7 @@ public Date getBirthDate() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.birth_date * @param birthDate the value for core.client_metadata.birth_date - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public void setBirthDate(Date birthDate) { this.birthDate = birthDate; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java index 43ec9a3179..6331348faa 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java @@ -8,23 +8,23 @@ public class ClientMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public ClientMetadataExample() { oredCriteria = new ArrayList(); @@ -32,7 +32,7 @@ public ClientMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -40,7 +40,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -48,7 +48,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -56,7 +56,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -64,7 +64,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -72,7 +72,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -80,7 +80,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -90,7 +90,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -102,7 +102,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -111,7 +111,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -121,56 +121,57 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ protected abstract static class GeneratedCriteria { + protected List criteria; - + protected GeneratedCriteria() { super(); criteria = new ArrayList(); } - + public boolean isValid() { return criteria.size() > 0; } - + public List getAllCriteria() { return criteria; } - + public List getCriteria() { return criteria; } - + protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } - + protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } - + protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } - + protected void addCriterionForJDBCDate(String condition, Date value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } addCriterion(condition, new java.sql.Date(value.getTime()), property); } - + protected void addCriterionForJDBCDate(String condition, List values, String property) { if (values == null || values.size() == 0) { throw new RuntimeException("Value list for " + property + " cannot be null or empty"); @@ -182,609 +183,669 @@ protected void addCriterionForJDBCDate(String condition, List values, Stri } addCriterion(condition, dateList, property); } - + protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); } - + public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } - + public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } - + public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } - + public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } - + public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } - + public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } - + public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andClientIdIsNull() { addCriterion("client_id is null"); return (Criteria) this; } - + public Criteria andClientIdIsNotNull() { addCriterion("client_id is not null"); return (Criteria) this; } - + public Criteria andClientIdEqualTo(Long value) { addCriterion("client_id =", value, "clientId"); return (Criteria) this; } - + public Criteria andClientIdNotEqualTo(Long value) { addCriterion("client_id <>", value, "clientId"); return (Criteria) this; } - + public Criteria andClientIdGreaterThan(Long value) { addCriterion("client_id >", value, "clientId"); return (Criteria) this; } - + public Criteria andClientIdGreaterThanOrEqualTo(Long value) { addCriterion("client_id >=", value, "clientId"); return (Criteria) this; } - + public Criteria andClientIdLessThan(Long value) { addCriterion("client_id <", value, "clientId"); return (Criteria) this; } - + public Criteria andClientIdLessThanOrEqualTo(Long value) { addCriterion("client_id <=", value, "clientId"); return (Criteria) this; } - + public Criteria andClientIdIn(List values) { addCriterion("client_id in", values, "clientId"); return (Criteria) this; } - + public Criteria andClientIdNotIn(List values) { addCriterion("client_id not in", values, "clientId"); return (Criteria) this; } - + public Criteria andClientIdBetween(Long value1, Long value2) { addCriterion("client_id between", value1, value2, "clientId"); return (Criteria) this; } - + public Criteria andClientIdNotBetween(Long value1, Long value2) { addCriterion("client_id not between", value1, value2, "clientId"); return (Criteria) this; } - + public Criteria andBaseEntityIdIsNull() { addCriterion("base_entity_id is null"); return (Criteria) this; } - + public Criteria andBaseEntityIdIsNotNull() { addCriterion("base_entity_id is not null"); return (Criteria) this; } - + public Criteria andBaseEntityIdEqualTo(String value) { addCriterion("base_entity_id =", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotEqualTo(String value) { addCriterion("base_entity_id <>", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdGreaterThan(String value) { addCriterion("base_entity_id >", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { addCriterion("base_entity_id >=", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdLessThan(String value) { addCriterion("base_entity_id <", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { addCriterion("base_entity_id <=", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdLike(String value) { addCriterion("base_entity_id like", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotLike(String value) { addCriterion("base_entity_id not like", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdIn(List values) { addCriterion("base_entity_id in", values, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotIn(List values) { addCriterion("base_entity_id not in", values, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdBetween(String value1, String value2) { addCriterion("base_entity_id between", value1, value2, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotBetween(String value1, String value2) { addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); return (Criteria) this; } - + public Criteria andRelationalIdIsNull() { addCriterion("relational_id is null"); return (Criteria) this; } - + public Criteria andRelationalIdIsNotNull() { addCriterion("relational_id is not null"); return (Criteria) this; } - + public Criteria andRelationalIdEqualTo(String value) { addCriterion("relational_id =", value, "relationalId"); return (Criteria) this; } - + public Criteria andRelationalIdNotEqualTo(String value) { addCriterion("relational_id <>", value, "relationalId"); return (Criteria) this; } - + public Criteria andRelationalIdGreaterThan(String value) { addCriterion("relational_id >", value, "relationalId"); return (Criteria) this; } - + public Criteria andRelationalIdGreaterThanOrEqualTo(String value) { addCriterion("relational_id >=", value, "relationalId"); return (Criteria) this; } - + public Criteria andRelationalIdLessThan(String value) { addCriterion("relational_id <", value, "relationalId"); return (Criteria) this; } - + public Criteria andRelationalIdLessThanOrEqualTo(String value) { addCriterion("relational_id <=", value, "relationalId"); return (Criteria) this; } - + public Criteria andRelationalIdLike(String value) { addCriterion("relational_id like", value, "relationalId"); return (Criteria) this; } - + public Criteria andRelationalIdNotLike(String value) { addCriterion("relational_id not like", value, "relationalId"); return (Criteria) this; } - + public Criteria andRelationalIdIn(List values) { addCriterion("relational_id in", values, "relationalId"); return (Criteria) this; } - + public Criteria andRelationalIdNotIn(List values) { addCriterion("relational_id not in", values, "relationalId"); return (Criteria) this; } - + public Criteria andRelationalIdBetween(String value1, String value2) { addCriterion("relational_id between", value1, value2, "relationalId"); return (Criteria) this; } - + public Criteria andRelationalIdNotBetween(String value1, String value2) { addCriterion("relational_id not between", value1, value2, "relationalId"); return (Criteria) this; } - + + public Criteria andServerVersionIsNull() { + addCriterion("server_version is null"); + return (Criteria) this; + } + + public Criteria andServerVersionIsNotNull() { + addCriterion("server_version is not null"); + return (Criteria) this; + } + + public Criteria andServerVersionEqualTo(Long value) { + addCriterion("server_version =", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotEqualTo(Long value) { + addCriterion("server_version <>", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThan(Long value) { + addCriterion("server_version >", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionGreaterThanOrEqualTo(Long value) { + addCriterion("server_version >=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThan(Long value) { + addCriterion("server_version <", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionLessThanOrEqualTo(Long value) { + addCriterion("server_version <=", value, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionIn(List values) { + addCriterion("server_version in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotIn(List values) { + addCriterion("server_version not in", values, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionBetween(Long value1, Long value2) { + addCriterion("server_version between", value1, value2, "serverVersion"); + return (Criteria) this; + } + + public Criteria andServerVersionNotBetween(Long value1, Long value2) { + addCriterion("server_version not between", value1, value2, "serverVersion"); + return (Criteria) this; + } + public Criteria andOpenmrsUuidIsNull() { addCriterion("openmrs_uuid is null"); return (Criteria) this; } - + public Criteria andOpenmrsUuidIsNotNull() { addCriterion("openmrs_uuid is not null"); return (Criteria) this; } - + public Criteria andOpenmrsUuidEqualTo(String value) { addCriterion("openmrs_uuid =", value, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidNotEqualTo(String value) { addCriterion("openmrs_uuid <>", value, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidGreaterThan(String value) { addCriterion("openmrs_uuid >", value, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidGreaterThanOrEqualTo(String value) { addCriterion("openmrs_uuid >=", value, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidLessThan(String value) { addCriterion("openmrs_uuid <", value, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidLessThanOrEqualTo(String value) { addCriterion("openmrs_uuid <=", value, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidLike(String value) { addCriterion("openmrs_uuid like", value, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidNotLike(String value) { addCriterion("openmrs_uuid not like", value, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidIn(List values) { addCriterion("openmrs_uuid in", values, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidNotIn(List values) { addCriterion("openmrs_uuid not in", values, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidBetween(String value1, String value2) { addCriterion("openmrs_uuid between", value1, value2, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidNotBetween(String value1, String value2) { addCriterion("openmrs_uuid not between", value1, value2, "openmrsUuid"); return (Criteria) this; } - + public Criteria andUniqueIdIsNull() { addCriterion("unique_id is null"); return (Criteria) this; } - + public Criteria andUniqueIdIsNotNull() { addCriterion("unique_id is not null"); return (Criteria) this; } - + public Criteria andUniqueIdEqualTo(String value) { addCriterion("unique_id =", value, "uniqueId"); return (Criteria) this; } - + public Criteria andUniqueIdNotEqualTo(String value) { addCriterion("unique_id <>", value, "uniqueId"); return (Criteria) this; } - + public Criteria andUniqueIdGreaterThan(String value) { addCriterion("unique_id >", value, "uniqueId"); return (Criteria) this; } - + public Criteria andUniqueIdGreaterThanOrEqualTo(String value) { addCriterion("unique_id >=", value, "uniqueId"); return (Criteria) this; } - + public Criteria andUniqueIdLessThan(String value) { addCriterion("unique_id <", value, "uniqueId"); return (Criteria) this; } - + public Criteria andUniqueIdLessThanOrEqualTo(String value) { addCriterion("unique_id <=", value, "uniqueId"); return (Criteria) this; } - + public Criteria andUniqueIdLike(String value) { addCriterion("unique_id like", value, "uniqueId"); return (Criteria) this; } - + public Criteria andUniqueIdNotLike(String value) { addCriterion("unique_id not like", value, "uniqueId"); return (Criteria) this; } - + public Criteria andUniqueIdIn(List values) { addCriterion("unique_id in", values, "uniqueId"); return (Criteria) this; } - + public Criteria andUniqueIdNotIn(List values) { addCriterion("unique_id not in", values, "uniqueId"); return (Criteria) this; } - + public Criteria andUniqueIdBetween(String value1, String value2) { addCriterion("unique_id between", value1, value2, "uniqueId"); return (Criteria) this; } - + public Criteria andUniqueIdNotBetween(String value1, String value2) { addCriterion("unique_id not between", value1, value2, "uniqueId"); return (Criteria) this; } - + public Criteria andFirstNameIsNull() { addCriterion("first_name is null"); return (Criteria) this; } - + public Criteria andFirstNameIsNotNull() { addCriterion("first_name is not null"); return (Criteria) this; } - + public Criteria andFirstNameEqualTo(String value) { addCriterion("first_name =", value, "firstName"); return (Criteria) this; } - + public Criteria andFirstNameNotEqualTo(String value) { addCriterion("first_name <>", value, "firstName"); return (Criteria) this; } - + public Criteria andFirstNameGreaterThan(String value) { addCriterion("first_name >", value, "firstName"); return (Criteria) this; } - + public Criteria andFirstNameGreaterThanOrEqualTo(String value) { addCriterion("first_name >=", value, "firstName"); return (Criteria) this; } - + public Criteria andFirstNameLessThan(String value) { addCriterion("first_name <", value, "firstName"); return (Criteria) this; } - + public Criteria andFirstNameLessThanOrEqualTo(String value) { addCriterion("first_name <=", value, "firstName"); return (Criteria) this; } - + public Criteria andFirstNameLike(String value) { addCriterion("first_name like", value, "firstName"); return (Criteria) this; } - + public Criteria andFirstNameNotLike(String value) { addCriterion("first_name not like", value, "firstName"); return (Criteria) this; } - + public Criteria andFirstNameIn(List values) { addCriterion("first_name in", values, "firstName"); return (Criteria) this; } - + public Criteria andFirstNameNotIn(List values) { addCriterion("first_name not in", values, "firstName"); return (Criteria) this; } - + public Criteria andFirstNameBetween(String value1, String value2) { addCriterion("first_name between", value1, value2, "firstName"); return (Criteria) this; } - + public Criteria andFirstNameNotBetween(String value1, String value2) { addCriterion("first_name not between", value1, value2, "firstName"); return (Criteria) this; } - + public Criteria andLastNameIsNull() { addCriterion("last_name is null"); return (Criteria) this; } - + public Criteria andLastNameIsNotNull() { addCriterion("last_name is not null"); return (Criteria) this; } - + public Criteria andLastNameEqualTo(String value) { addCriterion("last_name =", value, "lastName"); return (Criteria) this; } - + public Criteria andLastNameNotEqualTo(String value) { addCriterion("last_name <>", value, "lastName"); return (Criteria) this; } - + public Criteria andLastNameGreaterThan(String value) { addCriterion("last_name >", value, "lastName"); return (Criteria) this; } - + public Criteria andLastNameGreaterThanOrEqualTo(String value) { addCriterion("last_name >=", value, "lastName"); return (Criteria) this; } - + public Criteria andLastNameLessThan(String value) { addCriterion("last_name <", value, "lastName"); return (Criteria) this; } - + public Criteria andLastNameLessThanOrEqualTo(String value) { addCriterion("last_name <=", value, "lastName"); return (Criteria) this; } - + public Criteria andLastNameLike(String value) { addCriterion("last_name like", value, "lastName"); return (Criteria) this; } - + public Criteria andLastNameNotLike(String value) { addCriterion("last_name not like", value, "lastName"); return (Criteria) this; } - + public Criteria andLastNameIn(List values) { addCriterion("last_name in", values, "lastName"); return (Criteria) this; } - + public Criteria andLastNameNotIn(List values) { addCriterion("last_name not in", values, "lastName"); return (Criteria) this; } - + public Criteria andLastNameBetween(String value1, String value2) { addCriterion("last_name between", value1, value2, "lastName"); return (Criteria) this; } - + public Criteria andLastNameNotBetween(String value1, String value2) { addCriterion("last_name not between", value1, value2, "lastName"); return (Criteria) this; } - + public Criteria andBirthDateIsNull() { addCriterion("birth_date is null"); return (Criteria) this; } - + public Criteria andBirthDateIsNotNull() { addCriterion("birth_date is not null"); return (Criteria) this; } - + public Criteria andBirthDateEqualTo(Date value) { addCriterionForJDBCDate("birth_date =", value, "birthDate"); return (Criteria) this; } - + public Criteria andBirthDateNotEqualTo(Date value) { addCriterionForJDBCDate("birth_date <>", value, "birthDate"); return (Criteria) this; } - + public Criteria andBirthDateGreaterThan(Date value) { addCriterionForJDBCDate("birth_date >", value, "birthDate"); return (Criteria) this; } - + public Criteria andBirthDateGreaterThanOrEqualTo(Date value) { addCriterionForJDBCDate("birth_date >=", value, "birthDate"); return (Criteria) this; } - + public Criteria andBirthDateLessThan(Date value) { addCriterionForJDBCDate("birth_date <", value, "birthDate"); return (Criteria) this; } - + public Criteria andBirthDateLessThanOrEqualTo(Date value) { addCriterionForJDBCDate("birth_date <=", value, "birthDate"); return (Criteria) this; } - + public Criteria andBirthDateIn(List values) { addCriterionForJDBCDate("birth_date in", values, "birthDate"); return (Criteria) this; } - + public Criteria andBirthDateNotIn(List values) { addCriterionForJDBCDate("birth_date not in", values, "birthDate"); return (Criteria) this; } - + public Criteria andBirthDateBetween(Date value1, Date value2) { addCriterionForJDBCDate("birth_date between", value1, value2, "birthDate"); return (Criteria) this; } - + public Criteria andBirthDateNotBetween(Date value1, Date value2) { addCriterionForJDBCDate("birth_date not between", value1, value2, "birthDate"); return (Criteria) this; @@ -793,57 +854,65 @@ public Criteria andBirthDateNotBetween(Date value1, Date value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; - + public String getCondition() { return condition; } - + public Object getValue() { return value; } - + public Object getSecondValue() { return secondValue; } - + public boolean isNoValue() { return noValue; } - + public boolean isSingleValue() { return singleValue; } - + public boolean isBetweenValue() { return betweenValue; } - + public boolean isListValue() { return listValue; } - + public String getTypeHandler() { return typeHandler; } - + protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } - + protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; @@ -855,11 +924,11 @@ protected Criterion(String condition, Object value, String typeHandler) { this.singleValue = true; } } - + protected Criterion(String condition, Object value) { this(condition, value, null); } - + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; @@ -868,7 +937,7 @@ protected Criterion(String condition, Object value, Object secondValue, String t this.typeHandler = typeHandler; this.betweenValue = true; } - + protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java index 1aa20123bd..e72aed5a2d 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java @@ -3,333 +3,235 @@ import java.util.Date; public class ErrorTrace { - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column error.error_trace.id - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - private Long id; - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column error.error_trace.date_occurred - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - private Date dateOccurred; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column error.error_trace.error_type - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - private String errorType; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column error.error_trace.occurred_at - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - private String occurredAt; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column error.error_trace.stack_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - private String stackTrace; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column error.error_trace.status - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - private String status; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column error.error_trace.record_id - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - private String recordId; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column error.error_trace.date_closed - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - private Date dateClosed; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column error.error_trace.document_type - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - private String documentType; - - /** - * - * This field was generated by MyBatis Generator. - * This field corresponds to the database column error.error_trace.retry_url - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - private String retryUrl; - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column error.error_trace.id - * - * @return the value of error.error_trace.id - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public Long getId() { - return id; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column error.error_trace.id - * - * @param id the value for error.error_trace.id - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public void setId(Long id) { - this.id = id; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column error.error_trace.date_occurred - * - * @return the value of error.error_trace.date_occurred - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public Date getDateOccurred() { - return dateOccurred; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column error.error_trace.date_occurred - * - * @param dateOccurred the value for error.error_trace.date_occurred - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public void setDateOccurred(Date dateOccurred) { - this.dateOccurred = dateOccurred; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column error.error_trace.error_type - * - * @return the value of error.error_trace.error_type - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public String getErrorType() { - return errorType; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column error.error_trace.error_type - * - * @param errorType the value for error.error_trace.error_type - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public void setErrorType(String errorType) { - this.errorType = errorType; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column error.error_trace.occurred_at - * - * @return the value of error.error_trace.occurred_at - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public String getOccurredAt() { - return occurredAt; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column error.error_trace.occurred_at - * - * @param occurredAt the value for error.error_trace.occurred_at - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public void setOccurredAt(String occurredAt) { - this.occurredAt = occurredAt; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column error.error_trace.stack_trace - * - * @return the value of error.error_trace.stack_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public String getStackTrace() { - return stackTrace; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column error.error_trace.stack_trace - * - * @param stackTrace the value for error.error_trace.stack_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public void setStackTrace(String stackTrace) { - this.stackTrace = stackTrace; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column error.error_trace.status - * - * @return the value of error.error_trace.status - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public String getStatus() { - return status; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column error.error_trace.status - * - * @param status the value for error.error_trace.status - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public void setStatus(String status) { - this.status = status; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column error.error_trace.record_id - * - * @return the value of error.error_trace.record_id - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public String getRecordId() { - return recordId; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column error.error_trace.record_id - * - * @param recordId the value for error.error_trace.record_id - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public void setRecordId(String recordId) { - this.recordId = recordId; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column error.error_trace.date_closed - * - * @return the value of error.error_trace.date_closed - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public Date getDateClosed() { - return dateClosed; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column error.error_trace.date_closed - * - * @param dateClosed the value for error.error_trace.date_closed - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public void setDateClosed(Date dateClosed) { - this.dateClosed = dateClosed; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column error.error_trace.document_type - * - * @return the value of error.error_trace.document_type - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public String getDocumentType() { - return documentType; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column error.error_trace.document_type - * - * @param documentType the value for error.error_trace.document_type - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public void setDocumentType(String documentType) { - this.documentType = documentType; - } - - /** - * This method was generated by MyBatis Generator. - * This method returns the value of the database column error.error_trace.retry_url - * - * @return the value of error.error_trace.retry_url - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public String getRetryUrl() { - return retryUrl; - } - - /** - * This method was generated by MyBatis Generator. - * This method sets the value of the database column error.error_trace.retry_url - * - * @param retryUrl the value for error.error_trace.retry_url - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public void setRetryUrl(String retryUrl) { - this.retryUrl = retryUrl; - } + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.id + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + private Long id; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.date_occurred + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + private Date dateOccurred; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.error_type + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + private String errorType; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.occurred_at + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + private String occurredAt; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.stack_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + private String stackTrace; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.status + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + private String status; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.record_id + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + private String recordId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.date_closed + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + private Date dateClosed; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.document_type + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + private String documentType; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.retry_url + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + private String retryUrl; + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.id + * @return the value of error.error_trace.id + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public Long getId() { + return id; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.id + * @param id the value for error.error_trace.id + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public void setId(Long id) { + this.id = id; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.date_occurred + * @return the value of error.error_trace.date_occurred + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public Date getDateOccurred() { + return dateOccurred; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.date_occurred + * @param dateOccurred the value for error.error_trace.date_occurred + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public void setDateOccurred(Date dateOccurred) { + this.dateOccurred = dateOccurred; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.error_type + * @return the value of error.error_trace.error_type + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public String getErrorType() { + return errorType; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.error_type + * @param errorType the value for error.error_trace.error_type + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public void setErrorType(String errorType) { + this.errorType = errorType; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.occurred_at + * @return the value of error.error_trace.occurred_at + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public String getOccurredAt() { + return occurredAt; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.occurred_at + * @param occurredAt the value for error.error_trace.occurred_at + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public void setOccurredAt(String occurredAt) { + this.occurredAt = occurredAt; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.stack_trace + * @return the value of error.error_trace.stack_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public String getStackTrace() { + return stackTrace; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.stack_trace + * @param stackTrace the value for error.error_trace.stack_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public void setStackTrace(String stackTrace) { + this.stackTrace = stackTrace; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.status + * @return the value of error.error_trace.status + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public String getStatus() { + return status; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.status + * @param status the value for error.error_trace.status + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public void setStatus(String status) { + this.status = status; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.record_id + * @return the value of error.error_trace.record_id + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public String getRecordId() { + return recordId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.record_id + * @param recordId the value for error.error_trace.record_id + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public void setRecordId(String recordId) { + this.recordId = recordId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.date_closed + * @return the value of error.error_trace.date_closed + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public Date getDateClosed() { + return dateClosed; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.date_closed + * @param dateClosed the value for error.error_trace.date_closed + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public void setDateClosed(Date dateClosed) { + this.dateClosed = dateClosed; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.document_type + * @return the value of error.error_trace.document_type + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public String getDocumentType() { + return documentType; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.document_type + * @param documentType the value for error.error_trace.document_type + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public void setDocumentType(String documentType) { + this.documentType = documentType; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.retry_url + * @return the value of error.error_trace.retry_url + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public String getRetryUrl() { + return retryUrl; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.retry_url + * @param retryUrl the value for error.error_trace.retry_url + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public void setRetryUrl(String retryUrl) { + this.retryUrl = retryUrl; + } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java index d3f1f88af4..dc3d25d431 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java @@ -7,893 +7,944 @@ public class ErrorTraceExample { /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table error.error_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - protected String orderByClause; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table error.error_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - protected boolean distinct; - - /** - * This field was generated by MyBatis Generator. - * This field corresponds to the database table error.error_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - protected List oredCriteria; - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public ErrorTraceExample() { - oredCriteria = new ArrayList(); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public void setOrderByClause(String orderByClause) { - this.orderByClause = orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public String getOrderByClause() { - return orderByClause; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public void setDistinct(boolean distinct) { - this.distinct = distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public boolean isDistinct() { - return distinct; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public List getOredCriteria() { - return oredCriteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public void or(Criteria criteria) { - oredCriteria.add(criteria); - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public Criteria or() { - Criteria criteria = createCriteriaInternal(); - oredCriteria.add(criteria); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public Criteria createCriteria() { - Criteria criteria = createCriteriaInternal(); - if (oredCriteria.size() == 0) { - oredCriteria.add(criteria); - } - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - protected Criteria createCriteriaInternal() { - Criteria criteria = new Criteria(); - return criteria; - } - - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public void clear() { - oredCriteria.clear(); - orderByClause = null; - distinct = false; - } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table error.error_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - protected abstract static class GeneratedCriteria { - protected List criteria; - - protected GeneratedCriteria() { - super(); - criteria = new ArrayList(); - } - - public boolean isValid() { - return criteria.size() > 0; - } - - public List getAllCriteria() { - return criteria; - } - - public List getCriteria() { - return criteria; - } - - protected void addCriterion(String condition) { - if (condition == null) { - throw new RuntimeException("Value for condition cannot be null"); - } - criteria.add(new Criterion(condition)); - } - - protected void addCriterion(String condition, Object value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value)); - } - - protected void addCriterion(String condition, Object value1, Object value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - criteria.add(new Criterion(condition, value1, value2)); - } - - protected void addCriterionForJDBCDate(String condition, Date value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - addCriterion(condition, new java.sql.Date(value.getTime()), property); - } - - protected void addCriterionForJDBCDate(String condition, List values, String property) { - if (values == null || values.size() == 0) { - throw new RuntimeException("Value list for " + property + " cannot be null or empty"); - } - List dateList = new ArrayList(); - Iterator iter = values.iterator(); - while (iter.hasNext()) { - dateList.add(new java.sql.Date(iter.next().getTime())); - } - addCriterion(condition, dateList, property); - } - - protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); - } - - public Criteria andIdIsNull() { - addCriterion("id is null"); - return (Criteria) this; - } - - public Criteria andIdIsNotNull() { - addCriterion("id is not null"); - return (Criteria) this; - } - - public Criteria andIdEqualTo(Long value) { - addCriterion("id =", value, "id"); - return (Criteria) this; - } - - public Criteria andIdNotEqualTo(Long value) { - addCriterion("id <>", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThan(Long value) { - addCriterion("id >", value, "id"); - return (Criteria) this; - } - - public Criteria andIdGreaterThanOrEqualTo(Long value) { - addCriterion("id >=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThan(Long value) { - addCriterion("id <", value, "id"); - return (Criteria) this; - } - - public Criteria andIdLessThanOrEqualTo(Long value) { - addCriterion("id <=", value, "id"); - return (Criteria) this; - } - - public Criteria andIdIn(List values) { - addCriterion("id in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdNotIn(List values) { - addCriterion("id not in", values, "id"); - return (Criteria) this; - } - - public Criteria andIdBetween(Long value1, Long value2) { - addCriterion("id between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andIdNotBetween(Long value1, Long value2) { - addCriterion("id not between", value1, value2, "id"); - return (Criteria) this; - } - - public Criteria andDateOccurredIsNull() { - addCriterion("date_occurred is null"); - return (Criteria) this; - } - - public Criteria andDateOccurredIsNotNull() { - addCriterion("date_occurred is not null"); - return (Criteria) this; - } - - public Criteria andDateOccurredEqualTo(Date value) { - addCriterionForJDBCDate("date_occurred =", value, "dateOccurred"); - return (Criteria) this; - } - - public Criteria andDateOccurredNotEqualTo(Date value) { - addCriterionForJDBCDate("date_occurred <>", value, "dateOccurred"); - return (Criteria) this; - } - - public Criteria andDateOccurredGreaterThan(Date value) { - addCriterionForJDBCDate("date_occurred >", value, "dateOccurred"); - return (Criteria) this; - } - - public Criteria andDateOccurredGreaterThanOrEqualTo(Date value) { - addCriterionForJDBCDate("date_occurred >=", value, "dateOccurred"); - return (Criteria) this; - } - - public Criteria andDateOccurredLessThan(Date value) { - addCriterionForJDBCDate("date_occurred <", value, "dateOccurred"); - return (Criteria) this; - } - - public Criteria andDateOccurredLessThanOrEqualTo(Date value) { - addCriterionForJDBCDate("date_occurred <=", value, "dateOccurred"); - return (Criteria) this; - } - - public Criteria andDateOccurredIn(List values) { - addCriterionForJDBCDate("date_occurred in", values, "dateOccurred"); - return (Criteria) this; - } - - public Criteria andDateOccurredNotIn(List values) { - addCriterionForJDBCDate("date_occurred not in", values, "dateOccurred"); - return (Criteria) this; - } - - public Criteria andDateOccurredBetween(Date value1, Date value2) { - addCriterionForJDBCDate("date_occurred between", value1, value2, "dateOccurred"); - return (Criteria) this; - } - - public Criteria andDateOccurredNotBetween(Date value1, Date value2) { - addCriterionForJDBCDate("date_occurred not between", value1, value2, "dateOccurred"); - return (Criteria) this; - } - - public Criteria andErrorTypeIsNull() { - addCriterion("error_type is null"); - return (Criteria) this; - } - - public Criteria andErrorTypeIsNotNull() { - addCriterion("error_type is not null"); - return (Criteria) this; - } - - public Criteria andErrorTypeEqualTo(String value) { - addCriterion("error_type =", value, "errorType"); - return (Criteria) this; - } - - public Criteria andErrorTypeNotEqualTo(String value) { - addCriterion("error_type <>", value, "errorType"); - return (Criteria) this; - } - - public Criteria andErrorTypeGreaterThan(String value) { - addCriterion("error_type >", value, "errorType"); - return (Criteria) this; - } - - public Criteria andErrorTypeGreaterThanOrEqualTo(String value) { - addCriterion("error_type >=", value, "errorType"); - return (Criteria) this; - } - - public Criteria andErrorTypeLessThan(String value) { - addCriterion("error_type <", value, "errorType"); - return (Criteria) this; - } - - public Criteria andErrorTypeLessThanOrEqualTo(String value) { - addCriterion("error_type <=", value, "errorType"); - return (Criteria) this; - } - - public Criteria andErrorTypeLike(String value) { - addCriterion("error_type like", value, "errorType"); - return (Criteria) this; - } - - public Criteria andErrorTypeNotLike(String value) { - addCriterion("error_type not like", value, "errorType"); - return (Criteria) this; - } - - public Criteria andErrorTypeIn(List values) { - addCriterion("error_type in", values, "errorType"); - return (Criteria) this; - } - - public Criteria andErrorTypeNotIn(List values) { - addCriterion("error_type not in", values, "errorType"); - return (Criteria) this; - } - - public Criteria andErrorTypeBetween(String value1, String value2) { - addCriterion("error_type between", value1, value2, "errorType"); - return (Criteria) this; - } - - public Criteria andErrorTypeNotBetween(String value1, String value2) { - addCriterion("error_type not between", value1, value2, "errorType"); - return (Criteria) this; - } - - public Criteria andOccurredAtIsNull() { - addCriterion("occurred_at is null"); - return (Criteria) this; - } - - public Criteria andOccurredAtIsNotNull() { - addCriterion("occurred_at is not null"); - return (Criteria) this; - } - - public Criteria andOccurredAtEqualTo(String value) { - addCriterion("occurred_at =", value, "occurredAt"); - return (Criteria) this; - } - - public Criteria andOccurredAtNotEqualTo(String value) { - addCriterion("occurred_at <>", value, "occurredAt"); - return (Criteria) this; - } - - public Criteria andOccurredAtGreaterThan(String value) { - addCriterion("occurred_at >", value, "occurredAt"); - return (Criteria) this; - } - - public Criteria andOccurredAtGreaterThanOrEqualTo(String value) { - addCriterion("occurred_at >=", value, "occurredAt"); - return (Criteria) this; - } - - public Criteria andOccurredAtLessThan(String value) { - addCriterion("occurred_at <", value, "occurredAt"); - return (Criteria) this; - } - - public Criteria andOccurredAtLessThanOrEqualTo(String value) { - addCriterion("occurred_at <=", value, "occurredAt"); - return (Criteria) this; - } - - public Criteria andOccurredAtLike(String value) { - addCriterion("occurred_at like", value, "occurredAt"); - return (Criteria) this; - } - - public Criteria andOccurredAtNotLike(String value) { - addCriterion("occurred_at not like", value, "occurredAt"); - return (Criteria) this; - } - - public Criteria andOccurredAtIn(List values) { - addCriterion("occurred_at in", values, "occurredAt"); - return (Criteria) this; - } - - public Criteria andOccurredAtNotIn(List values) { - addCriterion("occurred_at not in", values, "occurredAt"); - return (Criteria) this; - } - - public Criteria andOccurredAtBetween(String value1, String value2) { - addCriterion("occurred_at between", value1, value2, "occurredAt"); - return (Criteria) this; - } - - public Criteria andOccurredAtNotBetween(String value1, String value2) { - addCriterion("occurred_at not between", value1, value2, "occurredAt"); - return (Criteria) this; - } - - public Criteria andStackTraceIsNull() { - addCriterion("stack_trace is null"); - return (Criteria) this; - } - - public Criteria andStackTraceIsNotNull() { - addCriterion("stack_trace is not null"); - return (Criteria) this; - } - - public Criteria andStackTraceEqualTo(String value) { - addCriterion("stack_trace =", value, "stackTrace"); - return (Criteria) this; - } - - public Criteria andStackTraceNotEqualTo(String value) { - addCriterion("stack_trace <>", value, "stackTrace"); - return (Criteria) this; - } - - public Criteria andStackTraceGreaterThan(String value) { - addCriterion("stack_trace >", value, "stackTrace"); - return (Criteria) this; - } - - public Criteria andStackTraceGreaterThanOrEqualTo(String value) { - addCriterion("stack_trace >=", value, "stackTrace"); - return (Criteria) this; - } - - public Criteria andStackTraceLessThan(String value) { - addCriterion("stack_trace <", value, "stackTrace"); - return (Criteria) this; - } - - public Criteria andStackTraceLessThanOrEqualTo(String value) { - addCriterion("stack_trace <=", value, "stackTrace"); - return (Criteria) this; - } - - public Criteria andStackTraceLike(String value) { - addCriterion("stack_trace like", value, "stackTrace"); - return (Criteria) this; - } - - public Criteria andStackTraceNotLike(String value) { - addCriterion("stack_trace not like", value, "stackTrace"); - return (Criteria) this; - } - - public Criteria andStackTraceIn(List values) { - addCriterion("stack_trace in", values, "stackTrace"); - return (Criteria) this; - } - - public Criteria andStackTraceNotIn(List values) { - addCriterion("stack_trace not in", values, "stackTrace"); - return (Criteria) this; - } - - public Criteria andStackTraceBetween(String value1, String value2) { - addCriterion("stack_trace between", value1, value2, "stackTrace"); - return (Criteria) this; - } - - public Criteria andStackTraceNotBetween(String value1, String value2) { - addCriterion("stack_trace not between", value1, value2, "stackTrace"); - return (Criteria) this; - } - - public Criteria andStatusIsNull() { - addCriterion("status is null"); - return (Criteria) this; - } - - public Criteria andStatusIsNotNull() { - addCriterion("status is not null"); - return (Criteria) this; - } - - public Criteria andStatusEqualTo(String value) { - addCriterion("status =", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotEqualTo(String value) { - addCriterion("status <>", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThan(String value) { - addCriterion("status >", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusGreaterThanOrEqualTo(String value) { - addCriterion("status >=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThan(String value) { - addCriterion("status <", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLessThanOrEqualTo(String value) { - addCriterion("status <=", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusLike(String value) { - addCriterion("status like", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotLike(String value) { - addCriterion("status not like", value, "status"); - return (Criteria) this; - } - - public Criteria andStatusIn(List values) { - addCriterion("status in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotIn(List values) { - addCriterion("status not in", values, "status"); - return (Criteria) this; - } - - public Criteria andStatusBetween(String value1, String value2) { - addCriterion("status between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andStatusNotBetween(String value1, String value2) { - addCriterion("status not between", value1, value2, "status"); - return (Criteria) this; - } - - public Criteria andRecordIdIsNull() { - addCriterion("record_id is null"); - return (Criteria) this; - } - - public Criteria andRecordIdIsNotNull() { - addCriterion("record_id is not null"); - return (Criteria) this; - } - - public Criteria andRecordIdEqualTo(String value) { - addCriterion("record_id =", value, "recordId"); - return (Criteria) this; - } - - public Criteria andRecordIdNotEqualTo(String value) { - addCriterion("record_id <>", value, "recordId"); - return (Criteria) this; - } - - public Criteria andRecordIdGreaterThan(String value) { - addCriterion("record_id >", value, "recordId"); - return (Criteria) this; - } - - public Criteria andRecordIdGreaterThanOrEqualTo(String value) { - addCriterion("record_id >=", value, "recordId"); - return (Criteria) this; - } - - public Criteria andRecordIdLessThan(String value) { - addCriterion("record_id <", value, "recordId"); - return (Criteria) this; - } - - public Criteria andRecordIdLessThanOrEqualTo(String value) { - addCriterion("record_id <=", value, "recordId"); - return (Criteria) this; - } - - public Criteria andRecordIdLike(String value) { - addCriterion("record_id like", value, "recordId"); - return (Criteria) this; - } - - public Criteria andRecordIdNotLike(String value) { - addCriterion("record_id not like", value, "recordId"); - return (Criteria) this; - } - - public Criteria andRecordIdIn(List values) { - addCriterion("record_id in", values, "recordId"); - return (Criteria) this; - } - - public Criteria andRecordIdNotIn(List values) { - addCriterion("record_id not in", values, "recordId"); - return (Criteria) this; - } - - public Criteria andRecordIdBetween(String value1, String value2) { - addCriterion("record_id between", value1, value2, "recordId"); - return (Criteria) this; - } - - public Criteria andRecordIdNotBetween(String value1, String value2) { - addCriterion("record_id not between", value1, value2, "recordId"); - return (Criteria) this; - } - - public Criteria andDateClosedIsNull() { - addCriterion("date_closed is null"); - return (Criteria) this; - } - - public Criteria andDateClosedIsNotNull() { - addCriterion("date_closed is not null"); - return (Criteria) this; - } - - public Criteria andDateClosedEqualTo(Date value) { - addCriterionForJDBCDate("date_closed =", value, "dateClosed"); - return (Criteria) this; - } - - public Criteria andDateClosedNotEqualTo(Date value) { - addCriterionForJDBCDate("date_closed <>", value, "dateClosed"); - return (Criteria) this; - } - - public Criteria andDateClosedGreaterThan(Date value) { - addCriterionForJDBCDate("date_closed >", value, "dateClosed"); - return (Criteria) this; - } - - public Criteria andDateClosedGreaterThanOrEqualTo(Date value) { - addCriterionForJDBCDate("date_closed >=", value, "dateClosed"); - return (Criteria) this; - } - - public Criteria andDateClosedLessThan(Date value) { - addCriterionForJDBCDate("date_closed <", value, "dateClosed"); - return (Criteria) this; - } - - public Criteria andDateClosedLessThanOrEqualTo(Date value) { - addCriterionForJDBCDate("date_closed <=", value, "dateClosed"); - return (Criteria) this; - } - - public Criteria andDateClosedIn(List values) { - addCriterionForJDBCDate("date_closed in", values, "dateClosed"); - return (Criteria) this; - } - - public Criteria andDateClosedNotIn(List values) { - addCriterionForJDBCDate("date_closed not in", values, "dateClosed"); - return (Criteria) this; - } - - public Criteria andDateClosedBetween(Date value1, Date value2) { - addCriterionForJDBCDate("date_closed between", value1, value2, "dateClosed"); - return (Criteria) this; - } - - public Criteria andDateClosedNotBetween(Date value1, Date value2) { - addCriterionForJDBCDate("date_closed not between", value1, value2, "dateClosed"); - return (Criteria) this; - } - - public Criteria andDocumentTypeIsNull() { - addCriterion("document_type is null"); - return (Criteria) this; - } - - public Criteria andDocumentTypeIsNotNull() { - addCriterion("document_type is not null"); - return (Criteria) this; - } - - public Criteria andDocumentTypeEqualTo(String value) { - addCriterion("document_type =", value, "documentType"); - return (Criteria) this; - } - - public Criteria andDocumentTypeNotEqualTo(String value) { - addCriterion("document_type <>", value, "documentType"); - return (Criteria) this; - } - - public Criteria andDocumentTypeGreaterThan(String value) { - addCriterion("document_type >", value, "documentType"); - return (Criteria) this; - } - - public Criteria andDocumentTypeGreaterThanOrEqualTo(String value) { - addCriterion("document_type >=", value, "documentType"); - return (Criteria) this; - } - - public Criteria andDocumentTypeLessThan(String value) { - addCriterion("document_type <", value, "documentType"); - return (Criteria) this; - } - - public Criteria andDocumentTypeLessThanOrEqualTo(String value) { - addCriterion("document_type <=", value, "documentType"); - return (Criteria) this; - } - - public Criteria andDocumentTypeLike(String value) { - addCriterion("document_type like", value, "documentType"); - return (Criteria) this; - } - - public Criteria andDocumentTypeNotLike(String value) { - addCriterion("document_type not like", value, "documentType"); - return (Criteria) this; - } - - public Criteria andDocumentTypeIn(List values) { - addCriterion("document_type in", values, "documentType"); - return (Criteria) this; - } - - public Criteria andDocumentTypeNotIn(List values) { - addCriterion("document_type not in", values, "documentType"); - return (Criteria) this; - } - - public Criteria andDocumentTypeBetween(String value1, String value2) { - addCriterion("document_type between", value1, value2, "documentType"); - return (Criteria) this; - } - - public Criteria andDocumentTypeNotBetween(String value1, String value2) { - addCriterion("document_type not between", value1, value2, "documentType"); - return (Criteria) this; - } - - public Criteria andRetryUrlIsNull() { - addCriterion("retry_url is null"); - return (Criteria) this; - } - - public Criteria andRetryUrlIsNotNull() { - addCriterion("retry_url is not null"); - return (Criteria) this; - } - - public Criteria andRetryUrlEqualTo(String value) { - addCriterion("retry_url =", value, "retryUrl"); - return (Criteria) this; - } - - public Criteria andRetryUrlNotEqualTo(String value) { - addCriterion("retry_url <>", value, "retryUrl"); - return (Criteria) this; - } - - public Criteria andRetryUrlGreaterThan(String value) { - addCriterion("retry_url >", value, "retryUrl"); - return (Criteria) this; - } - - public Criteria andRetryUrlGreaterThanOrEqualTo(String value) { - addCriterion("retry_url >=", value, "retryUrl"); - return (Criteria) this; - } - - public Criteria andRetryUrlLessThan(String value) { - addCriterion("retry_url <", value, "retryUrl"); - return (Criteria) this; - } - - public Criteria andRetryUrlLessThanOrEqualTo(String value) { - addCriterion("retry_url <=", value, "retryUrl"); - return (Criteria) this; - } - - public Criteria andRetryUrlLike(String value) { - addCriterion("retry_url like", value, "retryUrl"); - return (Criteria) this; - } - - public Criteria andRetryUrlNotLike(String value) { - addCriterion("retry_url not like", value, "retryUrl"); - return (Criteria) this; - } - - public Criteria andRetryUrlIn(List values) { - addCriterion("retry_url in", values, "retryUrl"); - return (Criteria) this; - } - - public Criteria andRetryUrlNotIn(List values) { - addCriterion("retry_url not in", values, "retryUrl"); - return (Criteria) this; - } - - public Criteria andRetryUrlBetween(String value1, String value2) { - addCriterion("retry_url between", value1, value2, "retryUrl"); - return (Criteria) this; - } - - public Criteria andRetryUrlNotBetween(String value1, String value2) { - addCriterion("retry_url not between", value1, value2, "retryUrl"); - return (Criteria) this; - } - } - - /** + * This field was generated by MyBatis Generator. This field corresponds to the database table error.error_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + protected String orderByClause; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table error.error_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + protected boolean distinct; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database table error.error_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + protected List oredCriteria; + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public ErrorTraceExample() { + oredCriteria = new ArrayList(); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public void setOrderByClause(String orderByClause) { + this.orderByClause = orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public String getOrderByClause() { + return orderByClause; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public void setDistinct(boolean distinct) { + this.distinct = distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public boolean isDistinct() { + return distinct; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public List getOredCriteria() { + return oredCriteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public void or(Criteria criteria) { + oredCriteria.add(criteria); + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public Criteria or() { + Criteria criteria = createCriteriaInternal(); + oredCriteria.add(criteria); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public Criteria createCriteria() { + Criteria criteria = createCriteriaInternal(); + if (oredCriteria.size() == 0) { + oredCriteria.add(criteria); + } + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + protected Criteria createCriteriaInternal() { + Criteria criteria = new Criteria(); + return criteria; + } + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public void clear() { + oredCriteria.clear(); + orderByClause = null; + distinct = false; + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table error.error_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + protected abstract static class GeneratedCriteria { + protected List criteria; + + protected GeneratedCriteria() { + super(); + criteria = new ArrayList(); + } + + public boolean isValid() { + return criteria.size() > 0; + } + + public List getAllCriteria() { + return criteria; + } + + public List getCriteria() { + return criteria; + } + + protected void addCriterion(String condition) { + if (condition == null) { + throw new RuntimeException("Value for condition cannot be null"); + } + criteria.add(new Criterion(condition)); + } + + protected void addCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value)); + } + + protected void addCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + criteria.add(new Criterion(condition, value1, value2)); + } + + protected void addCriterionForJDBCDate(String condition, Date value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value.getTime()), property); + } + + protected void addCriterionForJDBCDate(String condition, List values, String property) { + if (values == null || values.size() == 0) { + throw new RuntimeException("Value list for " + property + " cannot be null or empty"); + } + List dateList = new ArrayList(); + Iterator iter = values.iterator(); + while (iter.hasNext()) { + dateList.add(new java.sql.Date(iter.next().getTime())); + } + addCriterion(condition, dateList, property); + } + + protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); + } + + public Criteria andIdIsNull() { + addCriterion("id is null"); + return (Criteria) this; + } + + public Criteria andIdIsNotNull() { + addCriterion("id is not null"); + return (Criteria) this; + } + + public Criteria andIdEqualTo(Long value) { + addCriterion("id =", value, "id"); + return (Criteria) this; + } + + public Criteria andIdNotEqualTo(Long value) { + addCriterion("id <>", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThan(Long value) { + addCriterion("id >", value, "id"); + return (Criteria) this; + } + + public Criteria andIdGreaterThanOrEqualTo(Long value) { + addCriterion("id >=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThan(Long value) { + addCriterion("id <", value, "id"); + return (Criteria) this; + } + + public Criteria andIdLessThanOrEqualTo(Long value) { + addCriterion("id <=", value, "id"); + return (Criteria) this; + } + + public Criteria andIdIn(List values) { + addCriterion("id in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdNotIn(List values) { + addCriterion("id not in", values, "id"); + return (Criteria) this; + } + + public Criteria andIdBetween(Long value1, Long value2) { + addCriterion("id between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andIdNotBetween(Long value1, Long value2) { + addCriterion("id not between", value1, value2, "id"); + return (Criteria) this; + } + + public Criteria andDateOccurredIsNull() { + addCriterion("date_occurred is null"); + return (Criteria) this; + } + + public Criteria andDateOccurredIsNotNull() { + addCriterion("date_occurred is not null"); + return (Criteria) this; + } + + public Criteria andDateOccurredEqualTo(Date value) { + addCriterionForJDBCDate("date_occurred =", value, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredNotEqualTo(Date value) { + addCriterionForJDBCDate("date_occurred <>", value, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredGreaterThan(Date value) { + addCriterionForJDBCDate("date_occurred >", value, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_occurred >=", value, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredLessThan(Date value) { + addCriterionForJDBCDate("date_occurred <", value, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_occurred <=", value, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredIn(List values) { + addCriterionForJDBCDate("date_occurred in", values, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredNotIn(List values) { + addCriterionForJDBCDate("date_occurred not in", values, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_occurred between", value1, value2, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andDateOccurredNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_occurred not between", value1, value2, "dateOccurred"); + return (Criteria) this; + } + + public Criteria andErrorTypeIsNull() { + addCriterion("error_type is null"); + return (Criteria) this; + } + + public Criteria andErrorTypeIsNotNull() { + addCriterion("error_type is not null"); + return (Criteria) this; + } + + public Criteria andErrorTypeEqualTo(String value) { + addCriterion("error_type =", value, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeNotEqualTo(String value) { + addCriterion("error_type <>", value, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeGreaterThan(String value) { + addCriterion("error_type >", value, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeGreaterThanOrEqualTo(String value) { + addCriterion("error_type >=", value, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeLessThan(String value) { + addCriterion("error_type <", value, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeLessThanOrEqualTo(String value) { + addCriterion("error_type <=", value, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeLike(String value) { + addCriterion("error_type like", value, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeNotLike(String value) { + addCriterion("error_type not like", value, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeIn(List values) { + addCriterion("error_type in", values, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeNotIn(List values) { + addCriterion("error_type not in", values, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeBetween(String value1, String value2) { + addCriterion("error_type between", value1, value2, "errorType"); + return (Criteria) this; + } + + public Criteria andErrorTypeNotBetween(String value1, String value2) { + addCriterion("error_type not between", value1, value2, "errorType"); + return (Criteria) this; + } + + public Criteria andOccurredAtIsNull() { + addCriterion("occurred_at is null"); + return (Criteria) this; + } + + public Criteria andOccurredAtIsNotNull() { + addCriterion("occurred_at is not null"); + return (Criteria) this; + } + + public Criteria andOccurredAtEqualTo(String value) { + addCriterion("occurred_at =", value, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtNotEqualTo(String value) { + addCriterion("occurred_at <>", value, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtGreaterThan(String value) { + addCriterion("occurred_at >", value, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtGreaterThanOrEqualTo(String value) { + addCriterion("occurred_at >=", value, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtLessThan(String value) { + addCriterion("occurred_at <", value, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtLessThanOrEqualTo(String value) { + addCriterion("occurred_at <=", value, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtLike(String value) { + addCriterion("occurred_at like", value, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtNotLike(String value) { + addCriterion("occurred_at not like", value, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtIn(List values) { + addCriterion("occurred_at in", values, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtNotIn(List values) { + addCriterion("occurred_at not in", values, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtBetween(String value1, String value2) { + addCriterion("occurred_at between", value1, value2, "occurredAt"); + return (Criteria) this; + } + + public Criteria andOccurredAtNotBetween(String value1, String value2) { + addCriterion("occurred_at not between", value1, value2, "occurredAt"); + return (Criteria) this; + } + + public Criteria andStackTraceIsNull() { + addCriterion("stack_trace is null"); + return (Criteria) this; + } + + public Criteria andStackTraceIsNotNull() { + addCriterion("stack_trace is not null"); + return (Criteria) this; + } + + public Criteria andStackTraceEqualTo(String value) { + addCriterion("stack_trace =", value, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceNotEqualTo(String value) { + addCriterion("stack_trace <>", value, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceGreaterThan(String value) { + addCriterion("stack_trace >", value, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceGreaterThanOrEqualTo(String value) { + addCriterion("stack_trace >=", value, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceLessThan(String value) { + addCriterion("stack_trace <", value, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceLessThanOrEqualTo(String value) { + addCriterion("stack_trace <=", value, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceLike(String value) { + addCriterion("stack_trace like", value, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceNotLike(String value) { + addCriterion("stack_trace not like", value, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceIn(List values) { + addCriterion("stack_trace in", values, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceNotIn(List values) { + addCriterion("stack_trace not in", values, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceBetween(String value1, String value2) { + addCriterion("stack_trace between", value1, value2, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStackTraceNotBetween(String value1, String value2) { + addCriterion("stack_trace not between", value1, value2, "stackTrace"); + return (Criteria) this; + } + + public Criteria andStatusIsNull() { + addCriterion("status is null"); + return (Criteria) this; + } + + public Criteria andStatusIsNotNull() { + addCriterion("status is not null"); + return (Criteria) this; + } + + public Criteria andStatusEqualTo(String value) { + addCriterion("status =", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotEqualTo(String value) { + addCriterion("status <>", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThan(String value) { + addCriterion("status >", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusGreaterThanOrEqualTo(String value) { + addCriterion("status >=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThan(String value) { + addCriterion("status <", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLessThanOrEqualTo(String value) { + addCriterion("status <=", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusLike(String value) { + addCriterion("status like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotLike(String value) { + addCriterion("status not like", value, "status"); + return (Criteria) this; + } + + public Criteria andStatusIn(List values) { + addCriterion("status in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotIn(List values) { + addCriterion("status not in", values, "status"); + return (Criteria) this; + } + + public Criteria andStatusBetween(String value1, String value2) { + addCriterion("status between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andStatusNotBetween(String value1, String value2) { + addCriterion("status not between", value1, value2, "status"); + return (Criteria) this; + } + + public Criteria andRecordIdIsNull() { + addCriterion("record_id is null"); + return (Criteria) this; + } + + public Criteria andRecordIdIsNotNull() { + addCriterion("record_id is not null"); + return (Criteria) this; + } + + public Criteria andRecordIdEqualTo(String value) { + addCriterion("record_id =", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotEqualTo(String value) { + addCriterion("record_id <>", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdGreaterThan(String value) { + addCriterion("record_id >", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdGreaterThanOrEqualTo(String value) { + addCriterion("record_id >=", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLessThan(String value) { + addCriterion("record_id <", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLessThanOrEqualTo(String value) { + addCriterion("record_id <=", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdLike(String value) { + addCriterion("record_id like", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotLike(String value) { + addCriterion("record_id not like", value, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdIn(List values) { + addCriterion("record_id in", values, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotIn(List values) { + addCriterion("record_id not in", values, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdBetween(String value1, String value2) { + addCriterion("record_id between", value1, value2, "recordId"); + return (Criteria) this; + } + + public Criteria andRecordIdNotBetween(String value1, String value2) { + addCriterion("record_id not between", value1, value2, "recordId"); + return (Criteria) this; + } + + public Criteria andDateClosedIsNull() { + addCriterion("date_closed is null"); + return (Criteria) this; + } + + public Criteria andDateClosedIsNotNull() { + addCriterion("date_closed is not null"); + return (Criteria) this; + } + + public Criteria andDateClosedEqualTo(Date value) { + addCriterionForJDBCDate("date_closed =", value, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedNotEqualTo(Date value) { + addCriterionForJDBCDate("date_closed <>", value, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedGreaterThan(Date value) { + addCriterionForJDBCDate("date_closed >", value, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_closed >=", value, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedLessThan(Date value) { + addCriterionForJDBCDate("date_closed <", value, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_closed <=", value, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedIn(List values) { + addCriterionForJDBCDate("date_closed in", values, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedNotIn(List values) { + addCriterionForJDBCDate("date_closed not in", values, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_closed between", value1, value2, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDateClosedNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_closed not between", value1, value2, "dateClosed"); + return (Criteria) this; + } + + public Criteria andDocumentTypeIsNull() { + addCriterion("document_type is null"); + return (Criteria) this; + } + + public Criteria andDocumentTypeIsNotNull() { + addCriterion("document_type is not null"); + return (Criteria) this; + } + + public Criteria andDocumentTypeEqualTo(String value) { + addCriterion("document_type =", value, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeNotEqualTo(String value) { + addCriterion("document_type <>", value, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeGreaterThan(String value) { + addCriterion("document_type >", value, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeGreaterThanOrEqualTo(String value) { + addCriterion("document_type >=", value, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeLessThan(String value) { + addCriterion("document_type <", value, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeLessThanOrEqualTo(String value) { + addCriterion("document_type <=", value, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeLike(String value) { + addCriterion("document_type like", value, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeNotLike(String value) { + addCriterion("document_type not like", value, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeIn(List values) { + addCriterion("document_type in", values, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeNotIn(List values) { + addCriterion("document_type not in", values, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeBetween(String value1, String value2) { + addCriterion("document_type between", value1, value2, "documentType"); + return (Criteria) this; + } + + public Criteria andDocumentTypeNotBetween(String value1, String value2) { + addCriterion("document_type not between", value1, value2, "documentType"); + return (Criteria) this; + } + + public Criteria andRetryUrlIsNull() { + addCriterion("retry_url is null"); + return (Criteria) this; + } + + public Criteria andRetryUrlIsNotNull() { + addCriterion("retry_url is not null"); + return (Criteria) this; + } + + public Criteria andRetryUrlEqualTo(String value) { + addCriterion("retry_url =", value, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlNotEqualTo(String value) { + addCriterion("retry_url <>", value, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlGreaterThan(String value) { + addCriterion("retry_url >", value, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlGreaterThanOrEqualTo(String value) { + addCriterion("retry_url >=", value, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlLessThan(String value) { + addCriterion("retry_url <", value, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlLessThanOrEqualTo(String value) { + addCriterion("retry_url <=", value, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlLike(String value) { + addCriterion("retry_url like", value, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlNotLike(String value) { + addCriterion("retry_url not like", value, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlIn(List values) { + addCriterion("retry_url in", values, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlNotIn(List values) { + addCriterion("retry_url not in", values, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlBetween(String value1, String value2) { + addCriterion("retry_url between", value1, value2, "retryUrl"); + return (Criteria) this; + } + + public Criteria andRetryUrlNotBetween(String value1, String value2) { + addCriterion("retry_url not between", value1, value2, "retryUrl"); + return (Criteria) this; + } + } + + /** + * This class was generated by MyBatis Generator. This class corresponds to the database table error.error_trace + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; + + public String getCondition() { + return condition; + } + + public Object getValue() { + return value; + } + + public Object getSecondValue() { + return secondValue; + } + + public boolean isNoValue() { + return noValue; + } + + public boolean isSingleValue() { + return singleValue; + } + + public boolean isBetweenValue() { + return betweenValue; + } + + public boolean isListValue() { + return listValue; + } + + public String getTypeHandler() { + return typeHandler; + } + + protected Criterion(String condition) { + super(); + this.condition = condition; + this.typeHandler = null; + this.noValue = true; + } + + protected Criterion(String condition, Object value, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.typeHandler = typeHandler; + if (value instanceof List) { + this.listValue = true; + } else { + this.singleValue = true; + } + } + + protected Criterion(String condition, Object value) { + this(condition, value, null); + } + + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { + super(); + this.condition = condition; + this.value = value; + this.secondValue = secondValue; + this.typeHandler = typeHandler; + this.betweenValue = true; + } + + protected Criterion(String condition, Object value, Object secondValue) { + this(condition, value, secondValue, null); + } + } + + /** * This class was generated by MyBatis Generator. * This class corresponds to the database table error.error_trace * @@ -905,96 +956,4 @@ protected Criteria() { super(); } } - - /** - * This class was generated by MyBatis Generator. - * This class corresponds to the database table error.error_trace - * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - public static class Criterion { - private String condition; - - private Object value; - - private Object secondValue; - - private boolean noValue; - - private boolean singleValue; - - private boolean betweenValue; - - private boolean listValue; - - private String typeHandler; - - public String getCondition() { - return condition; - } - - public Object getValue() { - return value; - } - - public Object getSecondValue() { - return secondValue; - } - - public boolean isNoValue() { - return noValue; - } - - public boolean isSingleValue() { - return singleValue; - } - - public boolean isBetweenValue() { - return betweenValue; - } - - public boolean isListValue() { - return listValue; - } - - public String getTypeHandler() { - return typeHandler; - } - - protected Criterion(String condition) { - super(); - this.condition = condition; - this.typeHandler = null; - this.noValue = true; - } - - protected Criterion(String condition, Object value, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.typeHandler = typeHandler; - if (value instanceof List) { - this.listValue = true; - } else { - this.singleValue = true; - } - } - - protected Criterion(String condition, Object value) { - this(condition, value, null); - } - - protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { - super(); - this.condition = condition; - this.value = value; - this.secondValue = secondValue; - this.typeHandler = typeHandler; - this.betweenValue = true; - } - - protected Criterion(String condition, Object value, Object secondValue) { - this(condition, value, secondValue, null); - } - } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java index eadfb74a01..4fbcd45a22 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java @@ -4,19 +4,19 @@ public class Event { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event.id * @return the value of core.event.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event.id * @param id the value for core.event.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event.json * @return the value of core.event.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event.json * @param json the value for core.event.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java index 9d4db6809c..52f7a664e7 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java @@ -6,23 +6,23 @@ public class EventExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public EventExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public EventExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -285,7 +285,7 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java index d720f68de5..d7d5d3cb0d 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java @@ -6,69 +6,69 @@ public class EventMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long eventId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.base_entity_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.form_submission_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String formSubmissionId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.server_version - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.openmrs_uuid - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String openmrsUuid; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_type - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String eventType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_date - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Date eventDate; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.location_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.team - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.team_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String teamId; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.id * @return the value of core.event_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getId() { return id; @@ -77,7 +77,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.id * @param id the value for core.event_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -86,7 +86,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_id * @return the value of core.event_metadata.event_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getEventId() { return eventId; @@ -95,7 +95,7 @@ public Long getEventId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_id * @param eventId the value for core.event_metadata.event_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setEventId(Long eventId) { this.eventId = eventId; @@ -104,7 +104,7 @@ public void setEventId(Long eventId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.base_entity_id * @return the value of core.event_metadata.base_entity_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -113,7 +113,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.base_entity_id * @param baseEntityId the value for core.event_metadata.base_entity_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -122,7 +122,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.form_submission_id * @return the value of core.event_metadata.form_submission_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getFormSubmissionId() { return formSubmissionId; @@ -131,7 +131,7 @@ public String getFormSubmissionId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.form_submission_id * @param formSubmissionId the value for core.event_metadata.form_submission_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setFormSubmissionId(String formSubmissionId) { this.formSubmissionId = formSubmissionId; @@ -140,7 +140,7 @@ public void setFormSubmissionId(String formSubmissionId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.server_version * @return the value of core.event_metadata.server_version - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -149,7 +149,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.server_version * @param serverVersion the value for core.event_metadata.server_version - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -158,7 +158,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.openmrs_uuid * @return the value of core.event_metadata.openmrs_uuid - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getOpenmrsUuid() { return openmrsUuid; @@ -167,7 +167,7 @@ public String getOpenmrsUuid() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.openmrs_uuid * @param openmrsUuid the value for core.event_metadata.openmrs_uuid - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setOpenmrsUuid(String openmrsUuid) { this.openmrsUuid = openmrsUuid; @@ -176,7 +176,7 @@ public void setOpenmrsUuid(String openmrsUuid) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_type * @return the value of core.event_metadata.event_type - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getEventType() { return eventType; @@ -185,7 +185,7 @@ public String getEventType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_type * @param eventType the value for core.event_metadata.event_type - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setEventType(String eventType) { this.eventType = eventType; @@ -194,7 +194,7 @@ public void setEventType(String eventType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_date * @return the value of core.event_metadata.event_date - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Date getEventDate() { return eventDate; @@ -203,7 +203,7 @@ public Date getEventDate() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_date * @param eventDate the value for core.event_metadata.event_date - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setEventDate(Date eventDate) { this.eventDate = eventDate; @@ -212,7 +212,7 @@ public void setEventDate(Date eventDate) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.provider_id * @return the value of core.event_metadata.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getProviderId() { return providerId; @@ -221,7 +221,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.provider_id * @param providerId the value for core.event_metadata.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -230,7 +230,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.location_id * @return the value of core.event_metadata.location_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getLocationId() { return locationId; @@ -239,7 +239,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.location_id * @param locationId the value for core.event_metadata.location_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -248,7 +248,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.team * @return the value of core.event_metadata.team - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getTeam() { return team; @@ -257,7 +257,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.team * @param team the value for core.event_metadata.team - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -266,7 +266,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.team_id * @return the value of core.event_metadata.team_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getTeamId() { return teamId; @@ -275,7 +275,7 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.team_id * @param teamId the value for core.event_metadata.team_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java index b32261ebf4..fda27aa665 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java @@ -8,23 +8,23 @@ public class EventMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public EventMetadataExample() { oredCriteria = new ArrayList(); @@ -32,7 +32,7 @@ public EventMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -40,7 +40,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -48,7 +48,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -56,7 +56,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -64,7 +64,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -72,7 +72,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -80,7 +80,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -90,7 +90,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -102,7 +102,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -111,7 +111,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -121,7 +121,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -993,7 +993,7 @@ public Criteria andTeamIdNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMedia.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMedia.java index 8208128c92..43208372ed 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMedia.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMedia.java @@ -4,39 +4,39 @@ public class MultiMedia { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.case_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String caseId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.content_type - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String contentType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.file_path - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String filePath; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.file_category - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String fileCategory; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.id * @return the value of core.multi_media.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getId() { return id; @@ -45,7 +45,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.id * @param id the value for core.multi_media.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -54,7 +54,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.case_id * @return the value of core.multi_media.case_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getCaseId() { return caseId; @@ -63,7 +63,7 @@ public String getCaseId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.case_id * @param caseId the value for core.multi_media.case_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setCaseId(String caseId) { this.caseId = caseId; @@ -72,7 +72,7 @@ public void setCaseId(String caseId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.provider_id * @return the value of core.multi_media.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getProviderId() { return providerId; @@ -81,7 +81,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.provider_id * @param providerId the value for core.multi_media.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -90,7 +90,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.content_type * @return the value of core.multi_media.content_type - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getContentType() { return contentType; @@ -99,7 +99,7 @@ public String getContentType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.content_type * @param contentType the value for core.multi_media.content_type - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setContentType(String contentType) { this.contentType = contentType; @@ -108,7 +108,7 @@ public void setContentType(String contentType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.file_path * @return the value of core.multi_media.file_path - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getFilePath() { return filePath; @@ -117,7 +117,7 @@ public String getFilePath() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.file_path * @param filePath the value for core.multi_media.file_path - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setFilePath(String filePath) { this.filePath = filePath; @@ -126,7 +126,7 @@ public void setFilePath(String filePath) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.file_category * @return the value of core.multi_media.file_category - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getFileCategory() { return fileCategory; @@ -135,7 +135,7 @@ public String getFileCategory() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.file_category * @param fileCategory the value for core.multi_media.file_category - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setFileCategory(String fileCategory) { this.fileCategory = fileCategory; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMediaExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMediaExample.java index d86c481290..3e6dfead6e 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMediaExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMediaExample.java @@ -6,23 +6,23 @@ public class MultiMediaExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public MultiMediaExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public MultiMediaExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -575,7 +575,7 @@ public Criteria andFileCategoryNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java index 9c3a1007f7..cb34fe9705 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java @@ -4,19 +4,19 @@ public class Report { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report.id * @return the value of core.report.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report.id * @param id the value for core.report.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report.json * @return the value of core.report.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report.json * @param json the value for core.report.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java index 566783848d..bf49edccce 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java @@ -6,23 +6,23 @@ public class ReportExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public ReportExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public ReportExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -285,7 +285,7 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java index 2f4442db02..ce37fd63f2 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java @@ -4,54 +4,54 @@ public class ReportMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.report_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long reportId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.base_entity_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.server_version - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.report_type - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String reportType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.location_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.team - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.team_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String teamId; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.id * @return the value of core.report_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getId() { return id; @@ -60,7 +60,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.id * @param id the value for core.report_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -69,7 +69,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.report_id * @return the value of core.report_metadata.report_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getReportId() { return reportId; @@ -78,7 +78,7 @@ public Long getReportId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.report_id * @param reportId the value for core.report_metadata.report_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setReportId(Long reportId) { this.reportId = reportId; @@ -87,7 +87,7 @@ public void setReportId(Long reportId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.base_entity_id * @return the value of core.report_metadata.base_entity_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -96,7 +96,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.base_entity_id * @param baseEntityId the value for core.report_metadata.base_entity_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -105,7 +105,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.server_version * @return the value of core.report_metadata.server_version - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -114,7 +114,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.server_version * @param serverVersion the value for core.report_metadata.server_version - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -123,7 +123,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.report_type * @return the value of core.report_metadata.report_type - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getReportType() { return reportType; @@ -132,7 +132,7 @@ public String getReportType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.report_type * @param reportType the value for core.report_metadata.report_type - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setReportType(String reportType) { this.reportType = reportType; @@ -141,7 +141,7 @@ public void setReportType(String reportType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.provider_id * @return the value of core.report_metadata.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getProviderId() { return providerId; @@ -150,7 +150,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.provider_id * @param providerId the value for core.report_metadata.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -159,7 +159,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.location_id * @return the value of core.report_metadata.location_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getLocationId() { return locationId; @@ -168,7 +168,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.location_id * @param locationId the value for core.report_metadata.location_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -177,7 +177,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.team * @return the value of core.report_metadata.team - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getTeam() { return team; @@ -186,7 +186,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.team * @param team the value for core.report_metadata.team - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -195,7 +195,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.team_id * @return the value of core.report_metadata.team_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getTeamId() { return teamId; @@ -204,7 +204,7 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.team_id * @param teamId the value for core.report_metadata.team_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java index d8c11499f5..5674cd72ce 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java @@ -6,23 +6,23 @@ public class ReportMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public ReportMetadataExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public ReportMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -765,7 +765,7 @@ public Criteria andTeamIdNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java index 7d5e736a94..d5c6d3a9b7 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java @@ -4,19 +4,19 @@ public class Stock { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock.id * @return the value of core.stock.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock.id * @param id the value for core.stock.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock.json * @return the value of core.stock.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock.json * @param json the value for core.stock.json - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java index 9663cc6265..973a74be93 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java @@ -6,23 +6,23 @@ public class StockExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public StockExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public StockExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -285,7 +285,7 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java index a7b0c7b7f5..732f01fc71 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java @@ -4,44 +4,44 @@ public class StockMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.stock_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long stockId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.server_version - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.location_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.team - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.team_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ private String teamId; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.id * @return the value of core.stock_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getId() { return id; @@ -50,7 +50,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.id * @param id the value for core.stock_metadata.id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -59,7 +59,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.stock_id * @return the value of core.stock_metadata.stock_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getStockId() { return stockId; @@ -68,7 +68,7 @@ public Long getStockId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.stock_id * @param stockId the value for core.stock_metadata.stock_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setStockId(Long stockId) { this.stockId = stockId; @@ -77,7 +77,7 @@ public void setStockId(Long stockId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.server_version * @return the value of core.stock_metadata.server_version - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -86,7 +86,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.server_version * @param serverVersion the value for core.stock_metadata.server_version - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -95,7 +95,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.provider_id * @return the value of core.stock_metadata.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getProviderId() { return providerId; @@ -104,7 +104,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.provider_id * @param providerId the value for core.stock_metadata.provider_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -113,7 +113,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.location_id * @return the value of core.stock_metadata.location_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getLocationId() { return locationId; @@ -122,7 +122,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.location_id * @param locationId the value for core.stock_metadata.location_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -131,7 +131,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.team * @return the value of core.stock_metadata.team - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getTeam() { return team; @@ -140,7 +140,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.team * @param team the value for core.stock_metadata.team - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -149,7 +149,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.team_id * @return the value of core.stock_metadata.team_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getTeamId() { return teamId; @@ -158,7 +158,7 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.team_id * @param teamId the value for core.stock_metadata.team_id - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java index 8c0cb11f78..de73fd3103 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java @@ -6,23 +6,23 @@ public class StockMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public StockMetadataExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public StockMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ protected abstract static class GeneratedCriteria { protected List criteria; @@ -625,7 +625,7 @@ public Criteria andTeamIdNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ public static class Criterion { private String condition; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java index d44b9044b3..049b779f40 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java @@ -1,149 +1,338 @@ package org.opensrp.repository.postgres; +import java.util.ArrayList; import java.util.Calendar; import java.util.List; +import java.util.Map; +import org.apache.commons.lang3.StringUtils; import org.joda.time.DateTime; +import org.opensrp.common.AllConstants; import org.opensrp.domain.Client; +import org.opensrp.domain.postgres.ClientMetadata; +import org.opensrp.domain.postgres.ClientMetadataExample; import org.opensrp.repository.ClientsRepository; +import org.opensrp.repository.postgres.mapper.custom.MyClientMapper; +import org.opensrp.repository.postgres.mapper.custom.MyClientMetadataMapper; import org.opensrp.search.AddressSearchBean; import org.opensrp.search.ClientSearchBean; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; @Repository -public class ClientsRepositoryImpl implements ClientsRepository { - +public class ClientsRepositoryImpl extends RepositoryHelper implements ClientsRepository { + + private static Logger logger = LoggerFactory.getLogger(ClientsRepository.class.toString()); + + @Autowired + private MyClientMetadataMapper myClientMetadataMapper; + + @Autowired + private MyClientMapper myClientMapper; + @Override public Client get(String id) { - // TODO Auto-generated method stub - return null; + if (StringUtils.isBlank(id)) { + return null; + } + + org.opensrp.domain.postgres.Client pgClient = myClientMapper.selectByPrimaryKey(Long.valueOf(id)); + if (pgClient == null) { + return null; + } + return convert(pgClient); } - + @Override public void add(Client entity) { - // TODO Auto-generated method stub + if (entity == null || entity.getBaseEntityId() == null) { + return; + } + org.opensrp.domain.postgres.Client pgClient = myClientMetadataMapper.selectOne(entity.getBaseEntityId()); + if (pgClient != null) { + update(entity); + } + + pgClient = convert(entity); + if (pgClient == null) { + return; + } + + int rowsAffected = myClientMapper.insertSelectiveAndSetId(pgClient); + if (rowsAffected <= 0 || pgClient.getId() == null) { + return; + } + + ClientMetadata clientMetadata = createMetadata(entity, pgClient.getId()); + if (clientMetadata != null) { + myClientMetadataMapper.insertSelective(clientMetadata); + } } - + @Override public void update(Client entity) { - // TODO Auto-generated method stub + if (entity == null || entity.getBaseEntityId() == null) { + return; + } + + org.opensrp.domain.postgres.Client pgClient = myClientMetadataMapper.selectOne(entity.getBaseEntityId()); + if (pgClient == null) { + return; + } + + org.opensrp.domain.postgres.Client convertedPgClient = convert(entity); + if (convertedPgClient == null) { + return; + } + pgClient.setJson(convertedPgClient.getJson()); + myClientMapper.updateByPrimaryKey(pgClient); } - + @Override public List getAll() { - // TODO Auto-generated method stub - return null; + List clients = myClientMetadataMapper.selectMany(new ClientMetadataExample()); + return convert(clients); } - + @Override public void safeRemove(Client entity) { - // TODO Auto-generated method stub + if (entity == null || entity.getBaseEntityId() == null) { + return; + } + org.opensrp.domain.postgres.Client pgClient = myClientMetadataMapper.selectOne(entity.getBaseEntityId()); + if (pgClient == null) { + return; + } + + ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); + clientMetadataExample.createCriteria().andClientIdEqualTo(pgClient.getId()); + myClientMetadataMapper.deleteByExample(clientMetadataExample); + myClientMapper.deleteByPrimaryKey(pgClient.getId()); } - + @Override public Client findByBaseEntityId(String baseEntityId) { - // TODO Auto-generated method stub - return null; + if (StringUtils.isBlank(baseEntityId)) { + return null; + } + ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); + clientMetadataExample.createCriteria().andBaseEntityIdEqualTo(baseEntityId); + List clients = myClientMetadataMapper.selectMany(clientMetadataExample); + if (clients == null || clients.isEmpty()) { + return null; + } + + return convert(clients.get(0)); } - + @Override public List findAllClients() { - // TODO Auto-generated method stub - return null; + return getAll(); } - + @Override public List findAllByIdentifier(String identifier) { // TODO Auto-generated method stub return null; } - + @Override public List findAllByIdentifier(String identifierType, String identifier) { // TODO Auto-generated method stub return null; } - + @Override public List findAllByAttribute(String attributeType, String attribute) { // TODO Auto-generated method stub return null; } - + @Override public List findAllByMatchingName(String nameMatches) { // TODO Auto-generated method stub return null; } - + @Override public List findByRelationshipIdAndDateCreated(String relationalId, String dateFrom, String dateTo) { // TODO Auto-generated method stub return null; } - - @Override + public List findByRelationshipId(String relationshipType, String entityId) { // TODO Auto-generated method stub return null; } - + @Override public List findByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean, DateTime lastEditFrom, DateTime lastEditTo) { // TODO Auto-generated method stub return null; } - + @Override public List findByDynamicQuery(String query) { // TODO Auto-generated method stub return null; } - + @Override public List findByCriteria(ClientSearchBean searchBean) { // TODO Auto-generated method stub return null; } - + @Override public List findByCriteria(AddressSearchBean addressSearchBean, DateTime lastEditFrom, DateTime lastEditTo) { // TODO Auto-generated method stub return null; } - + @Override public List findByRelationShip(String relationIndentier) { // TODO Auto-generated method stub return null; } - + @Override public List findByEmptyServerVersion() { - // TODO Auto-generated method stub - return null; + ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); + clientMetadataExample.createCriteria().andServerVersionIsNull(); + + List clients = myClientMetadataMapper.selectMany(clientMetadataExample); + return convert(clients); } - + @Override public List findByServerVersion(long serverVersion) { - // TODO Auto-generated method stub - return null; + ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); + clientMetadataExample.createCriteria().andServerVersionEqualTo(serverVersion); + + List clients = myClientMetadataMapper.selectMany(clientMetadataExample); + return convert(clients); } - + @Override public List findByFieldValue(String field, List ids) { // TODO Auto-generated method stub return null; } - + @Override public List notInOpenMRSByServerVersion(long serverVersion, Calendar calendar) { // TODO Auto-generated method stub return null; } + private List convert(List clients) { + if (clients == null || clients.isEmpty()) { + return new ArrayList<>(); + } + + List convertedClients = new ArrayList<>(); + for (org.opensrp.domain.postgres.Client client : clients) { + Client convertedClient = convert(client); + if (convertedClient != null) { + convertedClients.add(convertedClient); + } + } + + return convertedClients; + } + + private Client convert(org.opensrp.domain.postgres.Client client) { + if (client == null || client.getJson() == null) { + return null; + } + + try { + + Object json = client.getJson(); + if (StringUtils.isBlank(json.toString())) { + return null; + } + + return RepositoryHelper.gson.fromJson(json.toString(), Client.class); + } + catch (Exception e) { + logger.error(e.getMessage(), e); + return null; + } + } + + private org.opensrp.domain.postgres.Client convert(Client client) { + if (client == null) { + return null; + } + + try { + String jsonString = RepositoryHelper.gson.toJson(client); + + org.opensrp.domain.postgres.Client pgClient = new org.opensrp.domain.postgres.Client(); + pgClient.setJson(jsonString); + + return pgClient; + } + catch (Exception e) { + logger.error(e.getMessage(), e); + return null; + } + } + + private ClientMetadata createMetadata(Client client, Long savedId) { + try { + ClientMetadata clientMetadata = new ClientMetadata(); + clientMetadata.setBaseEntityId(client.getBaseEntityId()); + if (client.getBirthdate() != null) { + clientMetadata.setBirthDate(client.getBirthdate().toDate()); + } + clientMetadata.setClientId(savedId); + clientMetadata.setFirstName(client.getFirstName()); + clientMetadata.setLastName(client.getLastName()); + + String relationalId = null; + Map> relationShips = client.getRelationships(); + if (relationShips != null && !relationShips.isEmpty()) { + for (Map.Entry> maEntry : relationShips.entrySet()) { + List values = maEntry.getValue(); + if (values != null && !values.isEmpty()) { + relationalId = values.get(0); + break; + } + } + } + clientMetadata.setRelationalId(relationalId); + + String uniqueId = null; + String openmrsUUID = null; + Map identifiers = client.getIdentifiers(); + if (identifiers != null && !identifiers.isEmpty()) { + for (Map.Entry entry : identifiers.entrySet()) { + String value = entry.getValue(); + if (StringUtils.isNotBlank(value)) { + if (AllConstants.Client.OPENMRS_UUID_IDENTIFIER_TYPE.equalsIgnoreCase(entry.getKey())) { + openmrsUUID = value; + } else { + uniqueId = value; + } + } + } + } + + clientMetadata.setUniqueId(uniqueId); + clientMetadata.setOpenmrsUuid(openmrsUUID); + return clientMetadata; + } + catch (Exception e) { + logger.error(e.getMessage(), e); + return null; + } + } } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/RepositoryHelper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/RepositoryHelper.java new file mode 100644 index 0000000000..e6e02745d8 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/RepositoryHelper.java @@ -0,0 +1,13 @@ +package org.opensrp.repository.postgres; + +import org.joda.time.DateTime; +import org.opensrp.util.DateTimeTypeConverter; + +import com.google.gson.Gson; +import com.google.gson.GsonBuilder; + +public class RepositoryHelper { + public static final Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") + .registerTypeAdapter(DateTime.class, new DateTimeTypeConverter()).create(); + +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ClientTypeHandler.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ClientTypeHandler.java new file mode 100644 index 0000000000..2a830ab348 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ClientTypeHandler.java @@ -0,0 +1,51 @@ +package org.opensrp.repository.postgres.handler; + +import java.sql.CallableStatement; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.type.JdbcType; +import org.apache.ibatis.type.TypeHandler; +import org.opensrp.domain.Client; +import org.opensrp.repository.postgres.RepositoryHelper; + +public class ClientTypeHandler implements TypeHandler { + + @Override + public void setParameter(PreparedStatement ps, int i, Client parameter, JdbcType jdbcType) throws SQLException { + if (parameter != null) { + String jsonString = RepositoryHelper.gson.toJson(parameter); + ps.setObject(i, jsonString); + } + } + + @Override + public Client getResult(ResultSet rs, String columnName) throws SQLException { + String jsonString = rs.getString(columnName); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return RepositoryHelper.gson.fromJson(jsonString, Client.class); + } + + @Override + public Client getResult(ResultSet rs, int columnIndex) throws SQLException { + String jsonString = rs.getString(columnIndex); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return RepositoryHelper.gson.fromJson(jsonString, Client.class); + } + + @Override + public Client getResult(CallableStatement cs, int columnIndex) throws SQLException { + String jsonString = cs.getString(columnIndex); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return RepositoryHelper.gson.fromJson(jsonString, Client.class); + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java index 4f5906b9d3..6d02fe73d3 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java @@ -6,70 +6,91 @@ import org.opensrp.domain.postgres.ActionExample; public interface ActionMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + long countByExample(ActionExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - long countByExample(ActionExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByExample(ActionExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByExample(ActionExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insert(Action record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insert(Action record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insertSelective(Action record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insertSelective(Action record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + List selectByExample(ActionExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - List selectByExample(ActionExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + Action selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - Action selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Action record, @Param("example") ActionExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Action record, @Param("example") ActionExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExample(@Param("record") Action record, @Param("example") ActionExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExample(@Param("record") Action record, @Param("example") ActionExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKeySelective(Action record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKeySelective(Action record); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKey(Action record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKey(Action record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java index c582f74935..ab3004858c 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java @@ -6,71 +6,91 @@ import org.opensrp.domain.postgres.ActionMetadataExample; public interface ActionMetadataMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + long countByExample(ActionMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - long countByExample(ActionMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByExample(ActionMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByExample(ActionMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insert(ActionMetadata record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insert(ActionMetadata record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insertSelective(ActionMetadata record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insertSelective(ActionMetadata record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + List selectByExample(ActionMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - List selectByExample(ActionMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + ActionMetadata selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - ActionMetadata selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExampleSelective(@Param("record") ActionMetadata record, @Param("example") ActionMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExampleSelective(@Param("record") ActionMetadata record, - @Param("example") ActionMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExample(@Param("record") ActionMetadata record, @Param("example") ActionMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExample(@Param("record") ActionMetadata record, @Param("example") ActionMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKeySelective(ActionMetadata record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKeySelective(ActionMetadata record); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKey(ActionMetadata record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.action_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKey(ActionMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java index 69d0114e36..85a5e333d2 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java @@ -6,70 +6,91 @@ import org.opensrp.domain.postgres.AlertExample; public interface AlertMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + long countByExample(AlertExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - long countByExample(AlertExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByExample(AlertExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByExample(AlertExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insert(Alert record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insert(Alert record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insertSelective(Alert record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insertSelective(Alert record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + List selectByExample(AlertExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - List selectByExample(AlertExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + Alert selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - Alert selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Alert record, @Param("example") AlertExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Alert record, @Param("example") AlertExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExample(@Param("record") Alert record, @Param("example") AlertExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExample(@Param("record") Alert record, @Param("example") AlertExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKeySelective(Alert record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKeySelective(Alert record); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKey(Alert record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKey(Alert record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java index dbbcbb6a11..c80bd2d4d9 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java @@ -6,70 +6,91 @@ import org.opensrp.domain.postgres.AlertMetadataExample; public interface AlertMetadataMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + long countByExample(AlertMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - long countByExample(AlertMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByExample(AlertMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByExample(AlertMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insert(AlertMetadata record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insert(AlertMetadata record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insertSelective(AlertMetadata record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insertSelective(AlertMetadata record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + List selectByExample(AlertMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - List selectByExample(AlertMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + AlertMetadata selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - AlertMetadata selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExampleSelective(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExampleSelective(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExample(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExample(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKeySelective(AlertMetadata record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKeySelective(AlertMetadata record); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKey(AlertMetadata record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.alert_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKey(AlertMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AppStateTokenMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AppStateTokenMapper.java index 6473c36959..d308a66011 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AppStateTokenMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AppStateTokenMapper.java @@ -6,70 +6,91 @@ import org.opensrp.domain.postgres.AppStateTokenExample; public interface AppStateTokenMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.app_state_token + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + long countByExample(AppStateTokenExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - long countByExample(AppStateTokenExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.app_state_token + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByExample(AppStateTokenExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByExample(AppStateTokenExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.app_state_token + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.app_state_token + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insert(AppStateToken record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insert(AppStateToken record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.app_state_token + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insertSelective(AppStateToken record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insertSelective(AppStateToken record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.app_state_token + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + List selectByExample(AppStateTokenExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - List selectByExample(AppStateTokenExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.app_state_token + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + AppStateToken selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - AppStateToken selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.app_state_token + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExampleSelective(@Param("record") AppStateToken record, @Param("example") AppStateTokenExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExampleSelective(@Param("record") AppStateToken record, @Param("example") AppStateTokenExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.app_state_token + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExample(@Param("record") AppStateToken record, @Param("example") AppStateTokenExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExample(@Param("record") AppStateToken record, @Param("example") AppStateTokenExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.app_state_token + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKeySelective(AppStateToken record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKeySelective(AppStateToken record); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKey(AppStateToken record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.app_state_token + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKey(AppStateToken record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java index 5ae050bb6e..3a1c10f634 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java @@ -6,70 +6,91 @@ import org.opensrp.domain.postgres.ClientExample; public interface ClientMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + long countByExample(ClientExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - long countByExample(ClientExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByExample(ClientExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByExample(ClientExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insert(Client record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insert(Client record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insertSelective(Client record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insertSelective(Client record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + List selectByExample(ClientExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - List selectByExample(ClientExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + Client selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - Client selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Client record, @Param("example") ClientExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Client record, @Param("example") ClientExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExample(@Param("record") Client record, @Param("example") ClientExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExample(@Param("record") Client record, @Param("example") ClientExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKeySelective(Client record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKeySelective(Client record); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKey(Client record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.client + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKey(Client record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java index a725b21cb1..b3d4849def 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java @@ -9,68 +9,67 @@ public interface ClientMetadataMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ long countByExample(ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ int deleteByExample(ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ int insert(ClientMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ int insertSelective(ClientMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ List selectByExample(ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ ClientMetadata selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ - int updateByExampleSelective(@Param("record") ClientMetadata record, - @Param("example") ClientMetadataExample example); + int updateByExampleSelective(@Param("record") ClientMetadata record, @Param("example") ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ int updateByExample(@Param("record") ClientMetadata record, @Param("example") ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ int updateByPrimaryKeySelective(ClientMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 */ int updateByPrimaryKey(ClientMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java index 976abdc2fe..5d5cf1e7bf 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java @@ -10,7 +10,7 @@ public interface ErrorTraceMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table error.error_trace * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ long countByExample(ErrorTraceExample example); @@ -18,7 +18,7 @@ public interface ErrorTraceMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table error.error_trace * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ int deleteByExample(ErrorTraceExample example); @@ -26,7 +26,7 @@ public interface ErrorTraceMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table error.error_trace * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ int deleteByPrimaryKey(Long id); @@ -34,7 +34,7 @@ public interface ErrorTraceMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table error.error_trace * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ int insert(ErrorTrace record); @@ -42,7 +42,7 @@ public interface ErrorTraceMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table error.error_trace * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ int insertSelective(ErrorTrace record); @@ -50,7 +50,7 @@ public interface ErrorTraceMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table error.error_trace * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ List selectByExample(ErrorTraceExample example); @@ -58,7 +58,7 @@ public interface ErrorTraceMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table error.error_trace * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ ErrorTrace selectByPrimaryKey(Long id); @@ -66,7 +66,7 @@ public interface ErrorTraceMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table error.error_trace * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ int updateByExampleSelective(@Param("record") ErrorTrace record, @Param("example") ErrorTraceExample example); @@ -74,7 +74,7 @@ public interface ErrorTraceMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table error.error_trace * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ int updateByExample(@Param("record") ErrorTrace record, @Param("example") ErrorTraceExample example); @@ -82,7 +82,7 @@ public interface ErrorTraceMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table error.error_trace * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ int updateByPrimaryKeySelective(ErrorTrace record); @@ -90,7 +90,7 @@ public interface ErrorTraceMapper { * This method was generated by MyBatis Generator. * This method corresponds to the database table error.error_trace * - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 */ int updateByPrimaryKey(ErrorTrace record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java index b6cd5a2f3a..cca5255496 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java @@ -6,70 +6,91 @@ import org.opensrp.domain.postgres.EventExample; public interface EventMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + long countByExample(EventExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - long countByExample(EventExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByExample(EventExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByExample(EventExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insert(Event record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insert(Event record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insertSelective(Event record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insertSelective(Event record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + List selectByExample(EventExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - List selectByExample(EventExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + Event selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - Event selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Event record, @Param("example") EventExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Event record, @Param("example") EventExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExample(@Param("record") Event record, @Param("example") EventExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExample(@Param("record") Event record, @Param("example") EventExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKeySelective(Event record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKeySelective(Event record); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKey(Event record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKey(Event record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java index c549b07b85..71f27ad1a6 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java @@ -6,70 +6,91 @@ import org.opensrp.domain.postgres.EventMetadataExample; public interface EventMetadataMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + long countByExample(EventMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - long countByExample(EventMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByExample(EventMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByExample(EventMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insert(EventMetadata record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insert(EventMetadata record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insertSelective(EventMetadata record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insertSelective(EventMetadata record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + List selectByExample(EventMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - List selectByExample(EventMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + EventMetadata selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - EventMetadata selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExampleSelective(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExampleSelective(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExample(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExample(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKeySelective(EventMetadata record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKeySelective(EventMetadata record); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKey(EventMetadata record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.event_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKey(EventMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java index 2b49b8a45d..c7d5060315 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java @@ -6,70 +6,91 @@ import org.opensrp.domain.postgres.MultiMediaExample; public interface MultiMediaMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.multi_media + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + long countByExample(MultiMediaExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - long countByExample(MultiMediaExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.multi_media + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByExample(MultiMediaExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByExample(MultiMediaExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.multi_media + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.multi_media + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insert(MultiMedia record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insert(MultiMedia record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.multi_media + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insertSelective(MultiMedia record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insertSelective(MultiMedia record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.multi_media + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + List selectByExample(MultiMediaExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - List selectByExample(MultiMediaExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.multi_media + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + MultiMedia selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - MultiMedia selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.multi_media + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExampleSelective(@Param("record") MultiMedia record, @Param("example") MultiMediaExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExampleSelective(@Param("record") MultiMedia record, @Param("example") MultiMediaExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.multi_media + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExample(@Param("record") MultiMedia record, @Param("example") MultiMediaExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExample(@Param("record") MultiMedia record, @Param("example") MultiMediaExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.multi_media + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKeySelective(MultiMedia record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKeySelective(MultiMedia record); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKey(MultiMedia record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.multi_media + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKey(MultiMedia record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java index e41fc212af..ef4a192814 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java @@ -6,70 +6,91 @@ import org.opensrp.domain.postgres.ReportExample; public interface ReportMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + long countByExample(ReportExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - long countByExample(ReportExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByExample(ReportExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByExample(ReportExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insert(Report record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insert(Report record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insertSelective(Report record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insertSelective(Report record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + List selectByExample(ReportExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - List selectByExample(ReportExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + Report selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - Report selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Report record, @Param("example") ReportExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Report record, @Param("example") ReportExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExample(@Param("record") Report record, @Param("example") ReportExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExample(@Param("record") Report record, @Param("example") ReportExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKeySelective(Report record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKeySelective(Report record); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKey(Report record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKey(Report record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java index 26fd796a66..2aae6d1f40 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java @@ -6,71 +6,91 @@ import org.opensrp.domain.postgres.ReportMetadataExample; public interface ReportMetadataMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + long countByExample(ReportMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - long countByExample(ReportMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByExample(ReportMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByExample(ReportMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insert(ReportMetadata record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insert(ReportMetadata record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insertSelective(ReportMetadata record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insertSelective(ReportMetadata record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + List selectByExample(ReportMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - List selectByExample(ReportMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + ReportMetadata selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - ReportMetadata selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExampleSelective(@Param("record") ReportMetadata record, @Param("example") ReportMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExampleSelective(@Param("record") ReportMetadata record, - @Param("example") ReportMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExample(@Param("record") ReportMetadata record, @Param("example") ReportMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExample(@Param("record") ReportMetadata record, @Param("example") ReportMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKeySelective(ReportMetadata record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKeySelective(ReportMetadata record); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKey(ReportMetadata record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.report_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKey(ReportMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java index 9b45614cb5..f732325bfb 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java @@ -6,70 +6,91 @@ import org.opensrp.domain.postgres.StockExample; public interface StockMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + long countByExample(StockExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - long countByExample(StockExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByExample(StockExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByExample(StockExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insert(Stock record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insert(Stock record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insertSelective(Stock record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insertSelective(Stock record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + List selectByExample(StockExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - List selectByExample(StockExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + Stock selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - Stock selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Stock record, @Param("example") StockExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Stock record, @Param("example") StockExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExample(@Param("record") Stock record, @Param("example") StockExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExample(@Param("record") Stock record, @Param("example") StockExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKeySelective(Stock record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKeySelective(Stock record); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKey(Stock record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKey(Stock record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java index 79c9cee699..f186e6a821 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java @@ -6,70 +6,91 @@ import org.opensrp.domain.postgres.StockMetadataExample; public interface StockMetadataMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + long countByExample(StockMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - long countByExample(StockMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByExample(StockMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByExample(StockMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insert(StockMetadata record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insert(StockMetadata record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int insertSelective(StockMetadata record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int insertSelective(StockMetadata record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + List selectByExample(StockMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - List selectByExample(StockMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + StockMetadata selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - StockMetadata selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExampleSelective(@Param("record") StockMetadata record, @Param("example") StockMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExampleSelective(@Param("record") StockMetadata record, @Param("example") StockMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByExample(@Param("record") StockMetadata record, @Param("example") StockMetadataExample example); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByExample(@Param("record") StockMetadata record, @Param("example") StockMetadataExample example); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKeySelective(StockMetadata record); - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKeySelective(StockMetadata record); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Fri Mar 09 18:05:46 EAT 2018 - */ - int updateByPrimaryKey(StockMetadata record); + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table core.stock_metadata + * + * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + */ + int updateByPrimaryKey(StockMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMapper.java new file mode 100644 index 0000000000..fa7b2156e3 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMapper.java @@ -0,0 +1,10 @@ +package org.opensrp.repository.postgres.mapper.custom; + +import org.opensrp.domain.postgres.Client; +import org.opensrp.repository.postgres.mapper.ClientMapper; + +public interface MyClientMapper extends ClientMapper { + + int insertSelectiveAndSetId(Client record); + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMetadataMapper.java new file mode 100644 index 0000000000..64d8c704af --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMetadataMapper.java @@ -0,0 +1,14 @@ +package org.opensrp.repository.postgres.mapper.custom; + +import java.util.List; + +import org.opensrp.domain.postgres.Client; +import org.opensrp.domain.postgres.ClientMetadataExample; +import org.opensrp.repository.postgres.mapper.ClientMetadataMapper; + +public interface MyClientMetadataMapper extends ClientMetadataMapper { + + List selectMany(ClientMetadataExample example); + + Client selectOne(String baseEntityId); +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMapper.xml new file mode 100644 index 0000000000..3ba2d44001 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMapper.xml @@ -0,0 +1,24 @@ + + + + + insert into core.client + + + id, + + + json, + + + + + #{id,jdbcType=BIGINT}, + + + #{json,jdbcType=OTHER}, + + + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMetadataMapper.xml new file mode 100644 index 0000000000..92a6397566 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMetadataMapper.xml @@ -0,0 +1,41 @@ + + + + + + + + + id, json + + + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMapper.xml index 1a95365a21..f3f67ff288 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.action where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.action @@ -140,7 +140,7 @@ insert into core.action (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.action @@ -173,7 +173,7 @@ select count(*) from core.action @@ -184,7 +184,7 @@ update core.action @@ -203,7 +203,7 @@ update core.action set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.action @@ -230,7 +230,7 @@ update core.action set json = #{json,jdbcType=OTHER} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml index 69f790f7f0..94f8eb4578 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -20,7 +20,7 @@ @@ -54,7 +54,7 @@ @@ -88,7 +88,7 @@ id, action_id, base_entity_id, server_version, provider_id, location_id, team, team_id @@ -96,7 +96,7 @@ select @@ -115,7 +115,7 @@ select @@ -126,7 +126,7 @@ delete from core.action_metadata where id = #{id,jdbcType=BIGINT} @@ -135,7 +135,7 @@ delete from core.action_metadata @@ -146,7 +146,7 @@ insert into core.action_metadata (id, action_id, base_entity_id, server_version, provider_id, location_id, @@ -159,7 +159,7 @@ insert into core.action_metadata @@ -219,7 +219,7 @@ select count(*) from core.action_metadata @@ -230,7 +230,7 @@ update core.action_metadata @@ -267,7 +267,7 @@ update core.action_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -286,7 +286,7 @@ update core.action_metadata @@ -318,7 +318,7 @@ update core.action_metadata set action_id = #{actionId,jdbcType=BIGINT}, diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml index 7472f505fe..e86b39125f 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.alert where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.alert @@ -140,7 +140,7 @@ insert into core.alert (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.alert @@ -173,7 +173,7 @@ select count(*) from core.alert @@ -184,7 +184,7 @@ update core.alert @@ -203,7 +203,7 @@ update core.alert set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.alert @@ -230,7 +230,7 @@ update core.alert set json = #{json,jdbcType=OTHER} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml index 45841c129b..6beb4e4d10 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -22,7 +22,7 @@ @@ -56,7 +56,7 @@ @@ -90,7 +90,7 @@ id, alert_id, base_entity_id, server_version, provider_id, location_id, team, team_id, is_active, trigger_name @@ -99,7 +99,7 @@ select @@ -118,7 +118,7 @@ select @@ -129,7 +129,7 @@ delete from core.alert_metadata where id = #{id,jdbcType=BIGINT} @@ -138,7 +138,7 @@ delete from core.alert_metadata @@ -149,7 +149,7 @@ insert into core.alert_metadata (id, alert_id, base_entity_id, server_version, provider_id, location_id, @@ -164,7 +164,7 @@ insert into core.alert_metadata @@ -236,7 +236,7 @@ select count(*) from core.alert_metadata @@ -247,7 +247,7 @@ update core.alert_metadata @@ -290,7 +290,7 @@ update core.alert_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -311,7 +311,7 @@ update core.alert_metadata @@ -349,7 +349,7 @@ update core.alert_metadata set alert_id = #{alertId,jdbcType=BIGINT}, diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AppStateTokenMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AppStateTokenMapper.xml index d4ffa9fbe2..ac74d1b1cb 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AppStateTokenMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AppStateTokenMapper.xml @@ -5,7 +5,7 @@ @@ -17,7 +17,7 @@ @@ -51,7 +51,7 @@ @@ -85,7 +85,7 @@ id, name, description, value, last_edited_date @@ -93,7 +93,7 @@ select @@ -112,7 +112,7 @@ select @@ -123,7 +123,7 @@ delete from core.app_state_token where id = #{id,jdbcType=BIGINT} @@ -132,7 +132,7 @@ delete from core.app_state_token @@ -143,7 +143,7 @@ insert into core.app_state_token (id, name, description, value, last_edited_date) @@ -154,7 +154,7 @@ insert into core.app_state_token @@ -196,7 +196,7 @@ select count(*) from core.app_state_token @@ -207,7 +207,7 @@ update core.app_state_token @@ -235,7 +235,7 @@ update core.app_state_token set id = #{record.id,jdbcType=BIGINT}, @@ -251,7 +251,7 @@ update core.app_state_token @@ -274,7 +274,7 @@ update core.app_state_token set name = #{name,jdbcType=VARCHAR}, diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml index 157028509a..8266ed4590 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.client where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.client @@ -140,7 +140,7 @@ insert into core.client (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.client @@ -173,7 +173,7 @@ select count(*) from core.client @@ -184,7 +184,7 @@ update core.client @@ -203,7 +203,7 @@ update core.client set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.client @@ -230,7 +230,7 @@ update core.client set json = #{json,jdbcType=OTHER} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml index 859b4c9cd9..82b34d3175 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml @@ -5,12 +5,13 @@ + @@ -21,7 +22,7 @@ @@ -55,7 +56,7 @@ @@ -89,16 +90,16 @@ - id, client_id, base_entity_id, relational_id, openmrs_uuid, unique_id, first_name, - last_name, birth_date + id, client_id, base_entity_id, relational_id, server_version, openmrs_uuid, unique_id, + first_name, last_name, birth_date select @@ -15,27 +49,27 @@ distinct - from core.client_metadata - inner join core.client + from core.client_metadata cm + inner join core.client c on - core.client_metadata.client_id = core.client.id + cm.client_id = c.id - + - order by ${orderByClause} + order by cm.${orderByClause} \ No newline at end of file From d20ab1d05bc309bc3dcb9fd3dc998e3b50755340 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Wed, 14 Mar 2018 10:49:25 +0300 Subject: [PATCH 032/133] Run both Postgres and Couch db Repositories during Unit testing --- .../org/opensrp/repository/couch/AllAppStateTokens.java | 5 ++++- .../main/java/org/opensrp/repository/couch/AllClients.java | 4 +++- .../java/org/opensrp/repository/couch/AllErrorTrace.java | 4 +++- .../main/java/org/opensrp/repository/couch/AllEvents.java | 4 +++- .../main/java/org/opensrp/repository/couch/AllReports.java | 4 +++- .../main/java/org/opensrp/repository/couch/AllStocks.java | 4 +++- .../opensrp/repository/couch/MultimediaRepositoryImpl.java | 4 +++- .../org/opensrp/repository/couch/SearchRepositoryImpl.java | 4 +++- .../opensrp/service/FormSubmissionDataMigrationService.java | 2 ++ .../service/formSubmission/FormSubmissionProcessor.java | 4 +++- .../FormSubmissionDataMigrationIntegrationTest.java | 2 ++ .../src/test/resources/test-applicationContext-opensrp.xml | 6 +----- 12 files changed, 33 insertions(+), 14 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java index c95570cc88..912ea9ca60 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java @@ -13,11 +13,14 @@ import org.opensrp.repository.AppStateTokensRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.annotation.Primary; import org.springframework.stereotype.Repository; import com.mysql.jdbc.StringUtils; -@Repository + +@Repository("couchAppStateTokensRepository") +@Primary public class AllAppStateTokens extends MotechBaseRepository implements AppStateTokensRepository { private CouchDbConnector db; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java index 938e47fc00..8098692c80 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java @@ -20,11 +20,13 @@ import org.opensrp.search.ClientSearchBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.annotation.Primary; import org.springframework.stereotype.Repository; import com.mysql.jdbc.StringUtils; -@Repository +@Repository("couchClientsRepository") +@Primary public class AllClients extends MotechBaseRepository implements ClientsRepository { private LuceneClientRepository lcr; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllErrorTrace.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllErrorTrace.java index 2320cdfe33..f56328d611 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllErrorTrace.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllErrorTrace.java @@ -12,12 +12,14 @@ import org.opensrp.repository.ErrorTraceRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.annotation.Primary; import org.springframework.stereotype.Repository; /** * @author muhammad.ahmed@ihsinformatics.com Created on May 25, 2015 */ -@Repository +@Repository("couchErrorTraceRepository") +@Primary public class AllErrorTrace extends MotechBaseRepository implements ErrorTraceRepository { @Autowired diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java index 2d6622aef1..e091c4f912 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java @@ -19,9 +19,11 @@ import org.opensrp.repository.lucene.LuceneEventRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.annotation.Primary; import org.springframework.stereotype.Repository; -@Repository +@Repository("couchEventsRepository") +@Primary public class AllEvents extends MotechBaseRepository implements EventsRepository { private LuceneEventRepository ler; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllReports.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllReports.java index 38d38b2502..e6632fe9d6 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllReports.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllReports.java @@ -14,9 +14,11 @@ import org.opensrp.repository.lucene.LuceneReportRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.annotation.Primary; import org.springframework.stereotype.Repository; -@Repository +@Repository("couchReportsRepository") +@Primary public class AllReports extends MotechBaseRepository implements ReportsRepository{ private LuceneReportRepository lrr; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllStocks.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllStocks.java index 312fbe8ea8..d7a053ddab 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllStocks.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllStocks.java @@ -16,9 +16,11 @@ import org.opensrp.search.StockSearchBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.annotation.Primary; import org.springframework.stereotype.Repository; -@Repository +@Repository("couchStocksRepository") +@Primary public class AllStocks extends MotechBaseRepository implements StocksRepository { private LuceneStockRepository lsr; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/MultimediaRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/MultimediaRepositoryImpl.java index fcbe4e7f7d..3b76b67362 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/MultimediaRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/MultimediaRepositoryImpl.java @@ -11,9 +11,11 @@ import org.opensrp.repository.MultimediaRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.annotation.Primary; import org.springframework.stereotype.Repository; -@Repository +@Repository("couchMultimediaRepository") +@Primary public class MultimediaRepositoryImpl extends MotechBaseRepository implements MultimediaRepository { @Autowired diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/SearchRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/SearchRepositoryImpl.java index 4d950c4c19..a9fc46d21b 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/SearchRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/SearchRepositoryImpl.java @@ -12,9 +12,11 @@ import org.opensrp.search.ClientSearchBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.context.annotation.Primary; import org.springframework.stereotype.Repository; -@Repository +@Repository("couchSearchRepository") +@Primary public class SearchRepositoryImpl extends MotechBaseRepository implements SearchRepository { private LuceneSearchRepository sr; diff --git a/opensrp-core/src/main/java/org/opensrp/service/FormSubmissionDataMigrationService.java b/opensrp-core/src/main/java/org/opensrp/service/FormSubmissionDataMigrationService.java index 33c20e47a7..9858a11e2e 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/FormSubmissionDataMigrationService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/FormSubmissionDataMigrationService.java @@ -15,6 +15,7 @@ import org.opensrp.util.Utils; import org.opensrp.util.Utils.DatabaseConnectionParams; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import com.mysql.jdbc.StringUtils; @@ -38,6 +39,7 @@ public class FormSubmissionDataMigrationService { private ConfigService configService; @Autowired + @Qualifier("couchAppStateTokensRepository") private AllAppStateTokens allAppStateTokens; private volatile int BATCH_SIZE = 100; diff --git a/opensrp-core/src/main/java/org/opensrp/service/formSubmission/FormSubmissionProcessor.java b/opensrp-core/src/main/java/org/opensrp/service/formSubmission/FormSubmissionProcessor.java index cc567fe618..3733d41145 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/formSubmission/FormSubmissionProcessor.java +++ b/opensrp-core/src/main/java/org/opensrp/service/formSubmission/FormSubmissionProcessor.java @@ -26,6 +26,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; import com.google.gson.Gson; @@ -55,7 +56,8 @@ public class FormSubmissionProcessor { @Autowired public FormSubmissionProcessor(ZiggyService ziggyService, FormSubmissionRouter formSubmissionRouter, FormEntityConverter formEntityConverter, HealthSchedulerService scheduleService, ClientService clientService, - AllClients allClients, EventService eventService,AllEvents allEvents) throws IOException { + @Qualifier("couchClientsRepository") AllClients allClients, EventService eventService, + @Qualifier("couchEventsRepository") AllEvents allEvents) throws IOException { this.ziggyService = ziggyService; this.formSubmissionRouter = formSubmissionRouter; this.formEntityConverter = formEntityConverter; diff --git a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionDataMigrationIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionDataMigrationIntegrationTest.java index c86498b9e2..ffc78b9065 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionDataMigrationIntegrationTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/formSubmission/FormSubmissionDataMigrationIntegrationTest.java @@ -18,12 +18,14 @@ import org.opensrp.util.Utils; import org.opensrp.util.Utils.DatabaseConnectionParams; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.beans.factory.annotation.Value; public class FormSubmissionDataMigrationIntegrationTest extends BaseIntegrationTest{ @Autowired FormSubmissionDataMigrationService dataMigrationService; @Autowired + @Qualifier("couchAppStateTokensRepository") AllAppStateTokens allAppStateTokens; @Autowired private FormSubmissionProcessor fsp; diff --git a/opensrp-core/src/test/resources/test-applicationContext-opensrp.xml b/opensrp-core/src/test/resources/test-applicationContext-opensrp.xml index 4990aceb68..205501d94f 100644 --- a/opensrp-core/src/test/resources/test-applicationContext-opensrp.xml +++ b/opensrp-core/src/test/resources/test-applicationContext-opensrp.xml @@ -25,11 +25,7 @@ - - - - + +
+ +
+ + +
+ +
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/opensrp-core/pom.xml b/opensrp-core/pom.xml index 91c34bbba6..fc5a290532 100644 --- a/opensrp-core/pom.xml +++ b/opensrp-core/pom.xml @@ -42,13 +42,13 @@ queries - ../opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml - org/opensrp/repository/postgres/mapper/xml - - - ../opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml - org/opensrp/repository/postgres/mapper/custom/xml - + ../opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml + org/opensrp/repository/postgres/mapper/xml + + + ../opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml + org/opensrp/repository/postgres/mapper/custom/xml + @@ -244,6 +244,11 @@ mybatis-spring1.1.0 + + org.postgresql + postgresql + 42.2.1.jre7 + org.jacoco org.jacoco.agent diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Action.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Action.java index 1c6adddd64..a19dd2d3f4 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Action.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Action.java @@ -4,19 +4,19 @@ public class Action { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action.id * @return the value of core.action.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action.id * @param id the value for core.action.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action.json * @return the value of core.action.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action.json * @param json the value for core.action.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionExample.java index 9c973225ea..2c821738cd 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionExample.java @@ -6,23 +6,23 @@ public class ActionExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.action - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.action - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.action - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public ActionExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public ActionExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,164 +119,165 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.action - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected abstract static class GeneratedCriteria { + protected List criteria; - + protected GeneratedCriteria() { super(); criteria = new ArrayList(); } - + public boolean isValid() { return criteria.size() > 0; } - + public List getAllCriteria() { return criteria; } - + public List getCriteria() { return criteria; } - + protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } - + protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } - + protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } - + public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } - + public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } - + public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } - + public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } - + public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } - + public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } - + public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andJsonIsNull() { addCriterion("json is null"); return (Criteria) this; } - + public Criteria andJsonIsNotNull() { addCriterion("json is not null"); return (Criteria) this; } - + public Criteria andJsonEqualTo(Object value) { addCriterion("json =", value, "json"); return (Criteria) this; } - + public Criteria andJsonNotEqualTo(Object value) { addCriterion("json <>", value, "json"); return (Criteria) this; } - + public Criteria andJsonGreaterThan(Object value) { addCriterion("json >", value, "json"); return (Criteria) this; } - + public Criteria andJsonGreaterThanOrEqualTo(Object value) { addCriterion("json >=", value, "json"); return (Criteria) this; } - + public Criteria andJsonLessThan(Object value) { addCriterion("json <", value, "json"); return (Criteria) this; } - + public Criteria andJsonLessThanOrEqualTo(Object value) { addCriterion("json <=", value, "json"); return (Criteria) this; } - + public Criteria andJsonIn(List values) { addCriterion("json in", values, "json"); return (Criteria) this; } - + public Criteria andJsonNotIn(List values) { addCriterion("json not in", values, "json"); return (Criteria) this; } - + public Criteria andJsonBetween(Object value1, Object value2) { addCriterion("json between", value1, value2, "json"); return (Criteria) this; } - + public Criteria andJsonNotBetween(Object value1, Object value2) { addCriterion("json not between", value1, value2, "json"); return (Criteria) this; @@ -285,57 +286,65 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.action - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; - + public String getCondition() { return condition; } - + public Object getValue() { return value; } - + public Object getSecondValue() { return secondValue; } - + public boolean isNoValue() { return noValue; } - + public boolean isSingleValue() { return singleValue; } - + public boolean isBetweenValue() { return betweenValue; } - + public boolean isListValue() { return listValue; } - + public String getTypeHandler() { return typeHandler; } - + protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } - + protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; @@ -347,11 +356,11 @@ protected Criterion(String condition, Object value, String typeHandler) { this.singleValue = true; } } - + protected Criterion(String condition, Object value) { this(condition, value, null); } - + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; @@ -360,7 +369,7 @@ protected Criterion(String condition, Object value, Object secondValue, String t this.typeHandler = typeHandler; this.betweenValue = true; } - + protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java index ee25154981..32f16f42aa 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadata.java @@ -4,49 +4,49 @@ public class ActionMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.action_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long actionId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.base_entity_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.server_version - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.location_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.team - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.action_metadata.team_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String teamId; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.id * @return the value of core.action_metadata.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getId() { return id; @@ -55,7 +55,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.id * @param id the value for core.action_metadata.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -64,7 +64,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.action_id * @return the value of core.action_metadata.action_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getActionId() { return actionId; @@ -73,7 +73,7 @@ public Long getActionId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.action_id * @param actionId the value for core.action_metadata.action_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setActionId(Long actionId) { this.actionId = actionId; @@ -82,7 +82,7 @@ public void setActionId(Long actionId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.base_entity_id * @return the value of core.action_metadata.base_entity_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -91,7 +91,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.base_entity_id * @param baseEntityId the value for core.action_metadata.base_entity_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -100,7 +100,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.server_version * @return the value of core.action_metadata.server_version - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -109,7 +109,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.server_version * @param serverVersion the value for core.action_metadata.server_version - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -118,7 +118,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.provider_id * @return the value of core.action_metadata.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getProviderId() { return providerId; @@ -127,7 +127,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.provider_id * @param providerId the value for core.action_metadata.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -136,7 +136,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.location_id * @return the value of core.action_metadata.location_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getLocationId() { return locationId; @@ -145,7 +145,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.location_id * @param locationId the value for core.action_metadata.location_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -154,7 +154,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.team * @return the value of core.action_metadata.team - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getTeam() { return team; @@ -163,7 +163,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.team * @param team the value for core.action_metadata.team - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -172,7 +172,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.action_metadata.team_id * @return the value of core.action_metadata.team_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getTeamId() { return teamId; @@ -181,7 +181,7 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.action_metadata.team_id * @param teamId the value for core.action_metadata.team_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java index 00972d5a81..c73bfe97e0 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ActionMetadataExample.java @@ -6,23 +6,23 @@ public class ActionMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.action_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.action_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.action_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public ActionMetadataExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public ActionMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,574 +119,575 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.action_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected abstract static class GeneratedCriteria { + protected List criteria; - + protected GeneratedCriteria() { super(); criteria = new ArrayList(); } - + public boolean isValid() { return criteria.size() > 0; } - + public List getAllCriteria() { return criteria; } - + public List getCriteria() { return criteria; } - + protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } - + protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } - + protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } - + public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } - + public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } - + public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } - + public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } - + public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } - + public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } - + public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andActionIdIsNull() { addCriterion("action_id is null"); return (Criteria) this; } - + public Criteria andActionIdIsNotNull() { addCriterion("action_id is not null"); return (Criteria) this; } - + public Criteria andActionIdEqualTo(Long value) { addCriterion("action_id =", value, "actionId"); return (Criteria) this; } - + public Criteria andActionIdNotEqualTo(Long value) { addCriterion("action_id <>", value, "actionId"); return (Criteria) this; } - + public Criteria andActionIdGreaterThan(Long value) { addCriterion("action_id >", value, "actionId"); return (Criteria) this; } - + public Criteria andActionIdGreaterThanOrEqualTo(Long value) { addCriterion("action_id >=", value, "actionId"); return (Criteria) this; } - + public Criteria andActionIdLessThan(Long value) { addCriterion("action_id <", value, "actionId"); return (Criteria) this; } - + public Criteria andActionIdLessThanOrEqualTo(Long value) { addCriterion("action_id <=", value, "actionId"); return (Criteria) this; } - + public Criteria andActionIdIn(List values) { addCriterion("action_id in", values, "actionId"); return (Criteria) this; } - + public Criteria andActionIdNotIn(List values) { addCriterion("action_id not in", values, "actionId"); return (Criteria) this; } - + public Criteria andActionIdBetween(Long value1, Long value2) { addCriterion("action_id between", value1, value2, "actionId"); return (Criteria) this; } - + public Criteria andActionIdNotBetween(Long value1, Long value2) { addCriterion("action_id not between", value1, value2, "actionId"); return (Criteria) this; } - + public Criteria andBaseEntityIdIsNull() { addCriterion("base_entity_id is null"); return (Criteria) this; } - + public Criteria andBaseEntityIdIsNotNull() { addCriterion("base_entity_id is not null"); return (Criteria) this; } - + public Criteria andBaseEntityIdEqualTo(String value) { addCriterion("base_entity_id =", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotEqualTo(String value) { addCriterion("base_entity_id <>", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdGreaterThan(String value) { addCriterion("base_entity_id >", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { addCriterion("base_entity_id >=", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdLessThan(String value) { addCriterion("base_entity_id <", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { addCriterion("base_entity_id <=", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdLike(String value) { addCriterion("base_entity_id like", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotLike(String value) { addCriterion("base_entity_id not like", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdIn(List values) { addCriterion("base_entity_id in", values, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotIn(List values) { addCriterion("base_entity_id not in", values, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdBetween(String value1, String value2) { addCriterion("base_entity_id between", value1, value2, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotBetween(String value1, String value2) { addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); return (Criteria) this; } - + public Criteria andServerVersionIsNull() { addCriterion("server_version is null"); return (Criteria) this; } - + public Criteria andServerVersionIsNotNull() { addCriterion("server_version is not null"); return (Criteria) this; } - + public Criteria andServerVersionEqualTo(Long value) { addCriterion("server_version =", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionNotEqualTo(Long value) { addCriterion("server_version <>", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionGreaterThan(Long value) { addCriterion("server_version >", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionGreaterThanOrEqualTo(Long value) { addCriterion("server_version >=", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionLessThan(Long value) { addCriterion("server_version <", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionLessThanOrEqualTo(Long value) { addCriterion("server_version <=", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionIn(List values) { addCriterion("server_version in", values, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionNotIn(List values) { addCriterion("server_version not in", values, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionBetween(Long value1, Long value2) { addCriterion("server_version between", value1, value2, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionNotBetween(Long value1, Long value2) { addCriterion("server_version not between", value1, value2, "serverVersion"); return (Criteria) this; } - + public Criteria andProviderIdIsNull() { addCriterion("provider_id is null"); return (Criteria) this; } - + public Criteria andProviderIdIsNotNull() { addCriterion("provider_id is not null"); return (Criteria) this; } - + public Criteria andProviderIdEqualTo(String value) { addCriterion("provider_id =", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotEqualTo(String value) { addCriterion("provider_id <>", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdGreaterThan(String value) { addCriterion("provider_id >", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdGreaterThanOrEqualTo(String value) { addCriterion("provider_id >=", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLessThan(String value) { addCriterion("provider_id <", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLessThanOrEqualTo(String value) { addCriterion("provider_id <=", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLike(String value) { addCriterion("provider_id like", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotLike(String value) { addCriterion("provider_id not like", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdIn(List values) { addCriterion("provider_id in", values, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotIn(List values) { addCriterion("provider_id not in", values, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdBetween(String value1, String value2) { addCriterion("provider_id between", value1, value2, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotBetween(String value1, String value2) { addCriterion("provider_id not between", value1, value2, "providerId"); return (Criteria) this; } - + public Criteria andLocationIdIsNull() { addCriterion("location_id is null"); return (Criteria) this; } - + public Criteria andLocationIdIsNotNull() { addCriterion("location_id is not null"); return (Criteria) this; } - + public Criteria andLocationIdEqualTo(String value) { addCriterion("location_id =", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotEqualTo(String value) { addCriterion("location_id <>", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdGreaterThan(String value) { addCriterion("location_id >", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdGreaterThanOrEqualTo(String value) { addCriterion("location_id >=", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdLessThan(String value) { addCriterion("location_id <", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdLessThanOrEqualTo(String value) { addCriterion("location_id <=", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdLike(String value) { addCriterion("location_id like", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotLike(String value) { addCriterion("location_id not like", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdIn(List values) { addCriterion("location_id in", values, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotIn(List values) { addCriterion("location_id not in", values, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdBetween(String value1, String value2) { addCriterion("location_id between", value1, value2, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotBetween(String value1, String value2) { addCriterion("location_id not between", value1, value2, "locationId"); return (Criteria) this; } - + public Criteria andTeamIsNull() { addCriterion("team is null"); return (Criteria) this; } - + public Criteria andTeamIsNotNull() { addCriterion("team is not null"); return (Criteria) this; } - + public Criteria andTeamEqualTo(String value) { addCriterion("team =", value, "team"); return (Criteria) this; } - + public Criteria andTeamNotEqualTo(String value) { addCriterion("team <>", value, "team"); return (Criteria) this; } - + public Criteria andTeamGreaterThan(String value) { addCriterion("team >", value, "team"); return (Criteria) this; } - + public Criteria andTeamGreaterThanOrEqualTo(String value) { addCriterion("team >=", value, "team"); return (Criteria) this; } - + public Criteria andTeamLessThan(String value) { addCriterion("team <", value, "team"); return (Criteria) this; } - + public Criteria andTeamLessThanOrEqualTo(String value) { addCriterion("team <=", value, "team"); return (Criteria) this; } - + public Criteria andTeamLike(String value) { addCriterion("team like", value, "team"); return (Criteria) this; } - + public Criteria andTeamNotLike(String value) { addCriterion("team not like", value, "team"); return (Criteria) this; } - + public Criteria andTeamIn(List values) { addCriterion("team in", values, "team"); return (Criteria) this; } - + public Criteria andTeamNotIn(List values) { addCriterion("team not in", values, "team"); return (Criteria) this; } - + public Criteria andTeamBetween(String value1, String value2) { addCriterion("team between", value1, value2, "team"); return (Criteria) this; } - + public Criteria andTeamNotBetween(String value1, String value2) { addCriterion("team not between", value1, value2, "team"); return (Criteria) this; } - + public Criteria andTeamIdIsNull() { addCriterion("team_id is null"); return (Criteria) this; } - + public Criteria andTeamIdIsNotNull() { addCriterion("team_id is not null"); return (Criteria) this; } - + public Criteria andTeamIdEqualTo(String value) { addCriterion("team_id =", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotEqualTo(String value) { addCriterion("team_id <>", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdGreaterThan(String value) { addCriterion("team_id >", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdGreaterThanOrEqualTo(String value) { addCriterion("team_id >=", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdLessThan(String value) { addCriterion("team_id <", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdLessThanOrEqualTo(String value) { addCriterion("team_id <=", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdLike(String value) { addCriterion("team_id like", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotLike(String value) { addCriterion("team_id not like", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdIn(List values) { addCriterion("team_id in", values, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotIn(List values) { addCriterion("team_id not in", values, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdBetween(String value1, String value2) { addCriterion("team_id between", value1, value2, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotBetween(String value1, String value2) { addCriterion("team_id not between", value1, value2, "teamId"); return (Criteria) this; @@ -695,57 +696,65 @@ public Criteria andTeamIdNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.action_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; - + public String getCondition() { return condition; } - + public Object getValue() { return value; } - + public Object getSecondValue() { return secondValue; } - + public boolean isNoValue() { return noValue; } - + public boolean isSingleValue() { return singleValue; } - + public boolean isBetweenValue() { return betweenValue; } - + public boolean isListValue() { return listValue; } - + public String getTypeHandler() { return typeHandler; } - + protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } - + protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; @@ -757,11 +766,11 @@ protected Criterion(String condition, Object value, String typeHandler) { this.singleValue = true; } } - + protected Criterion(String condition, Object value) { this(condition, value, null); } - + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; @@ -770,7 +779,7 @@ protected Criterion(String condition, Object value, Object secondValue, String t this.typeHandler = typeHandler; this.betweenValue = true; } - + protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java index 8eb5ea5a61..7298ba9c1b 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java @@ -4,19 +4,19 @@ public class Alert { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert.id * @return the value of core.alert.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert.id * @param id the value for core.alert.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert.json * @return the value of core.alert.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert.json * @param json the value for core.alert.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java index a39227cbb1..887cddb123 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java @@ -6,23 +6,23 @@ public class AlertExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public AlertExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public AlertExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,164 +119,165 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.alert - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected abstract static class GeneratedCriteria { + protected List criteria; - + protected GeneratedCriteria() { super(); criteria = new ArrayList(); } - + public boolean isValid() { return criteria.size() > 0; } - + public List getAllCriteria() { return criteria; } - + public List getCriteria() { return criteria; } - + protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } - + protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } - + protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } - + public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } - + public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } - + public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } - + public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } - + public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } - + public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } - + public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andJsonIsNull() { addCriterion("json is null"); return (Criteria) this; } - + public Criteria andJsonIsNotNull() { addCriterion("json is not null"); return (Criteria) this; } - + public Criteria andJsonEqualTo(Object value) { addCriterion("json =", value, "json"); return (Criteria) this; } - + public Criteria andJsonNotEqualTo(Object value) { addCriterion("json <>", value, "json"); return (Criteria) this; } - + public Criteria andJsonGreaterThan(Object value) { addCriterion("json >", value, "json"); return (Criteria) this; } - + public Criteria andJsonGreaterThanOrEqualTo(Object value) { addCriterion("json >=", value, "json"); return (Criteria) this; } - + public Criteria andJsonLessThan(Object value) { addCriterion("json <", value, "json"); return (Criteria) this; } - + public Criteria andJsonLessThanOrEqualTo(Object value) { addCriterion("json <=", value, "json"); return (Criteria) this; } - + public Criteria andJsonIn(List values) { addCriterion("json in", values, "json"); return (Criteria) this; } - + public Criteria andJsonNotIn(List values) { addCriterion("json not in", values, "json"); return (Criteria) this; } - + public Criteria andJsonBetween(Object value1, Object value2) { addCriterion("json between", value1, value2, "json"); return (Criteria) this; } - + public Criteria andJsonNotBetween(Object value1, Object value2) { addCriterion("json not between", value1, value2, "json"); return (Criteria) this; @@ -285,57 +286,65 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.alert - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; - + public String getCondition() { return condition; } - + public Object getValue() { return value; } - + public Object getSecondValue() { return secondValue; } - + public boolean isNoValue() { return noValue; } - + public boolean isSingleValue() { return singleValue; } - + public boolean isBetweenValue() { return betweenValue; } - + public boolean isListValue() { return listValue; } - + public String getTypeHandler() { return typeHandler; } - + protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } - + protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; @@ -347,11 +356,11 @@ protected Criterion(String condition, Object value, String typeHandler) { this.singleValue = true; } } - + protected Criterion(String condition, Object value) { this(condition, value, null); } - + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; @@ -360,7 +369,7 @@ protected Criterion(String condition, Object value, Object secondValue, String t this.typeHandler = typeHandler; this.betweenValue = true; } - + protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java index e4eec2e80a..63e037e0d3 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java @@ -4,59 +4,59 @@ public class AlertMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.alert_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long alertId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.base_entity_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.server_version - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.location_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.team - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.team_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String teamId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.is_active - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Boolean isActive; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.trigger_name - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String triggerName; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.id * @return the value of core.alert_metadata.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getId() { return id; @@ -65,7 +65,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.id * @param id the value for core.alert_metadata.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -74,7 +74,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.alert_id * @return the value of core.alert_metadata.alert_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getAlertId() { return alertId; @@ -83,7 +83,7 @@ public Long getAlertId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.alert_id * @param alertId the value for core.alert_metadata.alert_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setAlertId(Long alertId) { this.alertId = alertId; @@ -92,7 +92,7 @@ public void setAlertId(Long alertId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.base_entity_id * @return the value of core.alert_metadata.base_entity_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -101,7 +101,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.base_entity_id * @param baseEntityId the value for core.alert_metadata.base_entity_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -110,7 +110,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.server_version * @return the value of core.alert_metadata.server_version - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -119,7 +119,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.server_version * @param serverVersion the value for core.alert_metadata.server_version - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -128,7 +128,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.provider_id * @return the value of core.alert_metadata.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getProviderId() { return providerId; @@ -137,7 +137,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.provider_id * @param providerId the value for core.alert_metadata.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -146,7 +146,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.location_id * @return the value of core.alert_metadata.location_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getLocationId() { return locationId; @@ -155,7 +155,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.location_id * @param locationId the value for core.alert_metadata.location_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -164,7 +164,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.team * @return the value of core.alert_metadata.team - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getTeam() { return team; @@ -173,7 +173,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.team * @param team the value for core.alert_metadata.team - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -182,7 +182,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.team_id * @return the value of core.alert_metadata.team_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getTeamId() { return teamId; @@ -191,7 +191,7 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.team_id * @param teamId the value for core.alert_metadata.team_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; @@ -200,7 +200,7 @@ public void setTeamId(String teamId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.is_active * @return the value of core.alert_metadata.is_active - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Boolean getIsActive() { return isActive; @@ -209,7 +209,7 @@ public Boolean getIsActive() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.is_active * @param isActive the value for core.alert_metadata.is_active - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setIsActive(Boolean isActive) { this.isActive = isActive; @@ -218,7 +218,7 @@ public void setIsActive(Boolean isActive) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.trigger_name * @return the value of core.alert_metadata.trigger_name - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getTriggerName() { return triggerName; @@ -227,7 +227,7 @@ public String getTriggerName() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.trigger_name * @param triggerName the value for core.alert_metadata.trigger_name - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setTriggerName(String triggerName) { this.triggerName = triggerName; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java index f158e87c06..140ae99c89 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java @@ -6,23 +6,23 @@ public class AlertMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public AlertMetadataExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public AlertMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,704 +119,705 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.alert_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected abstract static class GeneratedCriteria { + protected List criteria; - + protected GeneratedCriteria() { super(); criteria = new ArrayList(); } - + public boolean isValid() { return criteria.size() > 0; } - + public List getAllCriteria() { return criteria; } - + public List getCriteria() { return criteria; } - + protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } - + protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } - + protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } - + public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } - + public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } - + public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } - + public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } - + public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } - + public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } - + public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andAlertIdIsNull() { addCriterion("alert_id is null"); return (Criteria) this; } - + public Criteria andAlertIdIsNotNull() { addCriterion("alert_id is not null"); return (Criteria) this; } - + public Criteria andAlertIdEqualTo(Long value) { addCriterion("alert_id =", value, "alertId"); return (Criteria) this; } - + public Criteria andAlertIdNotEqualTo(Long value) { addCriterion("alert_id <>", value, "alertId"); return (Criteria) this; } - + public Criteria andAlertIdGreaterThan(Long value) { addCriterion("alert_id >", value, "alertId"); return (Criteria) this; } - + public Criteria andAlertIdGreaterThanOrEqualTo(Long value) { addCriterion("alert_id >=", value, "alertId"); return (Criteria) this; } - + public Criteria andAlertIdLessThan(Long value) { addCriterion("alert_id <", value, "alertId"); return (Criteria) this; } - + public Criteria andAlertIdLessThanOrEqualTo(Long value) { addCriterion("alert_id <=", value, "alertId"); return (Criteria) this; } - + public Criteria andAlertIdIn(List values) { addCriterion("alert_id in", values, "alertId"); return (Criteria) this; } - + public Criteria andAlertIdNotIn(List values) { addCriterion("alert_id not in", values, "alertId"); return (Criteria) this; } - + public Criteria andAlertIdBetween(Long value1, Long value2) { addCriterion("alert_id between", value1, value2, "alertId"); return (Criteria) this; } - + public Criteria andAlertIdNotBetween(Long value1, Long value2) { addCriterion("alert_id not between", value1, value2, "alertId"); return (Criteria) this; } - + public Criteria andBaseEntityIdIsNull() { addCriterion("base_entity_id is null"); return (Criteria) this; } - + public Criteria andBaseEntityIdIsNotNull() { addCriterion("base_entity_id is not null"); return (Criteria) this; } - + public Criteria andBaseEntityIdEqualTo(String value) { addCriterion("base_entity_id =", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotEqualTo(String value) { addCriterion("base_entity_id <>", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdGreaterThan(String value) { addCriterion("base_entity_id >", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { addCriterion("base_entity_id >=", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdLessThan(String value) { addCriterion("base_entity_id <", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { addCriterion("base_entity_id <=", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdLike(String value) { addCriterion("base_entity_id like", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotLike(String value) { addCriterion("base_entity_id not like", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdIn(List values) { addCriterion("base_entity_id in", values, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotIn(List values) { addCriterion("base_entity_id not in", values, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdBetween(String value1, String value2) { addCriterion("base_entity_id between", value1, value2, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotBetween(String value1, String value2) { addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); return (Criteria) this; } - + public Criteria andServerVersionIsNull() { addCriterion("server_version is null"); return (Criteria) this; } - + public Criteria andServerVersionIsNotNull() { addCriterion("server_version is not null"); return (Criteria) this; } - + public Criteria andServerVersionEqualTo(Long value) { addCriterion("server_version =", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionNotEqualTo(Long value) { addCriterion("server_version <>", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionGreaterThan(Long value) { addCriterion("server_version >", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionGreaterThanOrEqualTo(Long value) { addCriterion("server_version >=", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionLessThan(Long value) { addCriterion("server_version <", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionLessThanOrEqualTo(Long value) { addCriterion("server_version <=", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionIn(List values) { addCriterion("server_version in", values, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionNotIn(List values) { addCriterion("server_version not in", values, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionBetween(Long value1, Long value2) { addCriterion("server_version between", value1, value2, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionNotBetween(Long value1, Long value2) { addCriterion("server_version not between", value1, value2, "serverVersion"); return (Criteria) this; } - + public Criteria andProviderIdIsNull() { addCriterion("provider_id is null"); return (Criteria) this; } - + public Criteria andProviderIdIsNotNull() { addCriterion("provider_id is not null"); return (Criteria) this; } - + public Criteria andProviderIdEqualTo(String value) { addCriterion("provider_id =", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotEqualTo(String value) { addCriterion("provider_id <>", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdGreaterThan(String value) { addCriterion("provider_id >", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdGreaterThanOrEqualTo(String value) { addCriterion("provider_id >=", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLessThan(String value) { addCriterion("provider_id <", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLessThanOrEqualTo(String value) { addCriterion("provider_id <=", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLike(String value) { addCriterion("provider_id like", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotLike(String value) { addCriterion("provider_id not like", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdIn(List values) { addCriterion("provider_id in", values, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotIn(List values) { addCriterion("provider_id not in", values, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdBetween(String value1, String value2) { addCriterion("provider_id between", value1, value2, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotBetween(String value1, String value2) { addCriterion("provider_id not between", value1, value2, "providerId"); return (Criteria) this; } - + public Criteria andLocationIdIsNull() { addCriterion("location_id is null"); return (Criteria) this; } - + public Criteria andLocationIdIsNotNull() { addCriterion("location_id is not null"); return (Criteria) this; } - + public Criteria andLocationIdEqualTo(String value) { addCriterion("location_id =", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotEqualTo(String value) { addCriterion("location_id <>", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdGreaterThan(String value) { addCriterion("location_id >", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdGreaterThanOrEqualTo(String value) { addCriterion("location_id >=", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdLessThan(String value) { addCriterion("location_id <", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdLessThanOrEqualTo(String value) { addCriterion("location_id <=", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdLike(String value) { addCriterion("location_id like", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotLike(String value) { addCriterion("location_id not like", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdIn(List values) { addCriterion("location_id in", values, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotIn(List values) { addCriterion("location_id not in", values, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdBetween(String value1, String value2) { addCriterion("location_id between", value1, value2, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotBetween(String value1, String value2) { addCriterion("location_id not between", value1, value2, "locationId"); return (Criteria) this; } - + public Criteria andTeamIsNull() { addCriterion("team is null"); return (Criteria) this; } - + public Criteria andTeamIsNotNull() { addCriterion("team is not null"); return (Criteria) this; } - + public Criteria andTeamEqualTo(String value) { addCriterion("team =", value, "team"); return (Criteria) this; } - + public Criteria andTeamNotEqualTo(String value) { addCriterion("team <>", value, "team"); return (Criteria) this; } - + public Criteria andTeamGreaterThan(String value) { addCriterion("team >", value, "team"); return (Criteria) this; } - + public Criteria andTeamGreaterThanOrEqualTo(String value) { addCriterion("team >=", value, "team"); return (Criteria) this; } - + public Criteria andTeamLessThan(String value) { addCriterion("team <", value, "team"); return (Criteria) this; } - + public Criteria andTeamLessThanOrEqualTo(String value) { addCriterion("team <=", value, "team"); return (Criteria) this; } - + public Criteria andTeamLike(String value) { addCriterion("team like", value, "team"); return (Criteria) this; } - + public Criteria andTeamNotLike(String value) { addCriterion("team not like", value, "team"); return (Criteria) this; } - + public Criteria andTeamIn(List values) { addCriterion("team in", values, "team"); return (Criteria) this; } - + public Criteria andTeamNotIn(List values) { addCriterion("team not in", values, "team"); return (Criteria) this; } - + public Criteria andTeamBetween(String value1, String value2) { addCriterion("team between", value1, value2, "team"); return (Criteria) this; } - + public Criteria andTeamNotBetween(String value1, String value2) { addCriterion("team not between", value1, value2, "team"); return (Criteria) this; } - + public Criteria andTeamIdIsNull() { addCriterion("team_id is null"); return (Criteria) this; } - + public Criteria andTeamIdIsNotNull() { addCriterion("team_id is not null"); return (Criteria) this; } - + public Criteria andTeamIdEqualTo(String value) { addCriterion("team_id =", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotEqualTo(String value) { addCriterion("team_id <>", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdGreaterThan(String value) { addCriterion("team_id >", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdGreaterThanOrEqualTo(String value) { addCriterion("team_id >=", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdLessThan(String value) { addCriterion("team_id <", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdLessThanOrEqualTo(String value) { addCriterion("team_id <=", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdLike(String value) { addCriterion("team_id like", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotLike(String value) { addCriterion("team_id not like", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdIn(List values) { addCriterion("team_id in", values, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotIn(List values) { addCriterion("team_id not in", values, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdBetween(String value1, String value2) { addCriterion("team_id between", value1, value2, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotBetween(String value1, String value2) { addCriterion("team_id not between", value1, value2, "teamId"); return (Criteria) this; } - + public Criteria andIsActiveIsNull() { addCriterion("is_active is null"); return (Criteria) this; } - + public Criteria andIsActiveIsNotNull() { addCriterion("is_active is not null"); return (Criteria) this; } - + public Criteria andIsActiveEqualTo(Boolean value) { addCriterion("is_active =", value, "isActive"); return (Criteria) this; } - + public Criteria andIsActiveNotEqualTo(Boolean value) { addCriterion("is_active <>", value, "isActive"); return (Criteria) this; } - + public Criteria andIsActiveGreaterThan(Boolean value) { addCriterion("is_active >", value, "isActive"); return (Criteria) this; } - + public Criteria andIsActiveGreaterThanOrEqualTo(Boolean value) { addCriterion("is_active >=", value, "isActive"); return (Criteria) this; } - + public Criteria andIsActiveLessThan(Boolean value) { addCriterion("is_active <", value, "isActive"); return (Criteria) this; } - + public Criteria andIsActiveLessThanOrEqualTo(Boolean value) { addCriterion("is_active <=", value, "isActive"); return (Criteria) this; } - + public Criteria andIsActiveIn(List values) { addCriterion("is_active in", values, "isActive"); return (Criteria) this; } - + public Criteria andIsActiveNotIn(List values) { addCriterion("is_active not in", values, "isActive"); return (Criteria) this; } - + public Criteria andIsActiveBetween(Boolean value1, Boolean value2) { addCriterion("is_active between", value1, value2, "isActive"); return (Criteria) this; } - + public Criteria andIsActiveNotBetween(Boolean value1, Boolean value2) { addCriterion("is_active not between", value1, value2, "isActive"); return (Criteria) this; } - + public Criteria andTriggerNameIsNull() { addCriterion("trigger_name is null"); return (Criteria) this; } - + public Criteria andTriggerNameIsNotNull() { addCriterion("trigger_name is not null"); return (Criteria) this; } - + public Criteria andTriggerNameEqualTo(String value) { addCriterion("trigger_name =", value, "triggerName"); return (Criteria) this; } - + public Criteria andTriggerNameNotEqualTo(String value) { addCriterion("trigger_name <>", value, "triggerName"); return (Criteria) this; } - + public Criteria andTriggerNameGreaterThan(String value) { addCriterion("trigger_name >", value, "triggerName"); return (Criteria) this; } - + public Criteria andTriggerNameGreaterThanOrEqualTo(String value) { addCriterion("trigger_name >=", value, "triggerName"); return (Criteria) this; } - + public Criteria andTriggerNameLessThan(String value) { addCriterion("trigger_name <", value, "triggerName"); return (Criteria) this; } - + public Criteria andTriggerNameLessThanOrEqualTo(String value) { addCriterion("trigger_name <=", value, "triggerName"); return (Criteria) this; } - + public Criteria andTriggerNameLike(String value) { addCriterion("trigger_name like", value, "triggerName"); return (Criteria) this; } - + public Criteria andTriggerNameNotLike(String value) { addCriterion("trigger_name not like", value, "triggerName"); return (Criteria) this; } - + public Criteria andTriggerNameIn(List values) { addCriterion("trigger_name in", values, "triggerName"); return (Criteria) this; } - + public Criteria andTriggerNameNotIn(List values) { addCriterion("trigger_name not in", values, "triggerName"); return (Criteria) this; } - + public Criteria andTriggerNameBetween(String value1, String value2) { addCriterion("trigger_name between", value1, value2, "triggerName"); return (Criteria) this; } - + public Criteria andTriggerNameNotBetween(String value1, String value2) { addCriterion("trigger_name not between", value1, value2, "triggerName"); return (Criteria) this; @@ -825,57 +826,65 @@ public Criteria andTriggerNameNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.alert_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; - + public String getCondition() { return condition; } - + public Object getValue() { return value; } - + public Object getSecondValue() { return secondValue; } - + public boolean isNoValue() { return noValue; } - + public boolean isSingleValue() { return singleValue; } - + public boolean isBetweenValue() { return betweenValue; } - + public boolean isListValue() { return listValue; } - + public String getTypeHandler() { return typeHandler; } - + protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } - + protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; @@ -887,11 +896,11 @@ protected Criterion(String condition, Object value, String typeHandler) { this.singleValue = true; } } - + protected Criterion(String condition, Object value) { this(condition, value, null); } - + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; @@ -900,7 +909,7 @@ protected Criterion(String condition, Object value, Object secondValue, String t this.typeHandler = typeHandler; this.betweenValue = true; } - + protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateToken.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateToken.java index 3cfa2b69e7..ede24da920 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateToken.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateToken.java @@ -4,34 +4,34 @@ public class AppStateToken { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.app_state_token.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.app_state_token.name - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String name; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.app_state_token.description - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String description; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.app_state_token.value - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String value; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.app_state_token.last_edited_date - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long lastEditedDate; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.app_state_token.id * @return the value of core.app_state_token.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getId() { return id; @@ -40,7 +40,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.app_state_token.id * @param id the value for core.app_state_token.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -49,7 +49,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.app_state_token.name * @return the value of core.app_state_token.name - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getName() { return name; @@ -58,7 +58,7 @@ public String getName() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.app_state_token.name * @param name the value for core.app_state_token.name - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setName(String name) { this.name = name; @@ -67,7 +67,7 @@ public void setName(String name) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.app_state_token.description * @return the value of core.app_state_token.description - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getDescription() { return description; @@ -76,7 +76,7 @@ public String getDescription() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.app_state_token.description * @param description the value for core.app_state_token.description - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDescription(String description) { this.description = description; @@ -85,7 +85,7 @@ public void setDescription(String description) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.app_state_token.value * @return the value of core.app_state_token.value - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getValue() { return value; @@ -94,7 +94,7 @@ public String getValue() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.app_state_token.value * @param value the value for core.app_state_token.value - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setValue(String value) { this.value = value; @@ -103,7 +103,7 @@ public void setValue(String value) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.app_state_token.last_edited_date * @return the value of core.app_state_token.last_edited_date - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getLastEditedDate() { return lastEditedDate; @@ -112,7 +112,7 @@ public Long getLastEditedDate() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.app_state_token.last_edited_date * @param lastEditedDate the value for core.app_state_token.last_edited_date - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setLastEditedDate(Long lastEditedDate) { this.lastEditedDate = lastEditedDate; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateTokenExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateTokenExample.java index 7d277c2159..ef0ec66bb6 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateTokenExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AppStateTokenExample.java @@ -6,23 +6,23 @@ public class AppStateTokenExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.app_state_token - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.app_state_token - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.app_state_token - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public AppStateTokenExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public AppStateTokenExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,374 +119,375 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.app_state_token - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected abstract static class GeneratedCriteria { + protected List criteria; - + protected GeneratedCriteria() { super(); criteria = new ArrayList(); } - + public boolean isValid() { return criteria.size() > 0; } - + public List getAllCriteria() { return criteria; } - + public List getCriteria() { return criteria; } - + protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } - + protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } - + protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } - + public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } - + public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } - + public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } - + public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } - + public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } - + public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } - + public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andNameIsNull() { addCriterion("name is null"); return (Criteria) this; } - + public Criteria andNameIsNotNull() { addCriterion("name is not null"); return (Criteria) this; } - + public Criteria andNameEqualTo(String value) { addCriterion("name =", value, "name"); return (Criteria) this; } - + public Criteria andNameNotEqualTo(String value) { addCriterion("name <>", value, "name"); return (Criteria) this; } - + public Criteria andNameGreaterThan(String value) { addCriterion("name >", value, "name"); return (Criteria) this; } - + public Criteria andNameGreaterThanOrEqualTo(String value) { addCriterion("name >=", value, "name"); return (Criteria) this; } - + public Criteria andNameLessThan(String value) { addCriterion("name <", value, "name"); return (Criteria) this; } - + public Criteria andNameLessThanOrEqualTo(String value) { addCriterion("name <=", value, "name"); return (Criteria) this; } - + public Criteria andNameLike(String value) { addCriterion("name like", value, "name"); return (Criteria) this; } - + public Criteria andNameNotLike(String value) { addCriterion("name not like", value, "name"); return (Criteria) this; } - + public Criteria andNameIn(List values) { addCriterion("name in", values, "name"); return (Criteria) this; } - + public Criteria andNameNotIn(List values) { addCriterion("name not in", values, "name"); return (Criteria) this; } - + public Criteria andNameBetween(String value1, String value2) { addCriterion("name between", value1, value2, "name"); return (Criteria) this; } - + public Criteria andNameNotBetween(String value1, String value2) { addCriterion("name not between", value1, value2, "name"); return (Criteria) this; } - + public Criteria andDescriptionIsNull() { addCriterion("description is null"); return (Criteria) this; } - + public Criteria andDescriptionIsNotNull() { addCriterion("description is not null"); return (Criteria) this; } - + public Criteria andDescriptionEqualTo(String value) { addCriterion("description =", value, "description"); return (Criteria) this; } - + public Criteria andDescriptionNotEqualTo(String value) { addCriterion("description <>", value, "description"); return (Criteria) this; } - + public Criteria andDescriptionGreaterThan(String value) { addCriterion("description >", value, "description"); return (Criteria) this; } - + public Criteria andDescriptionGreaterThanOrEqualTo(String value) { addCriterion("description >=", value, "description"); return (Criteria) this; } - + public Criteria andDescriptionLessThan(String value) { addCriterion("description <", value, "description"); return (Criteria) this; } - + public Criteria andDescriptionLessThanOrEqualTo(String value) { addCriterion("description <=", value, "description"); return (Criteria) this; } - + public Criteria andDescriptionLike(String value) { addCriterion("description like", value, "description"); return (Criteria) this; } - + public Criteria andDescriptionNotLike(String value) { addCriterion("description not like", value, "description"); return (Criteria) this; } - + public Criteria andDescriptionIn(List values) { addCriterion("description in", values, "description"); return (Criteria) this; } - + public Criteria andDescriptionNotIn(List values) { addCriterion("description not in", values, "description"); return (Criteria) this; } - + public Criteria andDescriptionBetween(String value1, String value2) { addCriterion("description between", value1, value2, "description"); return (Criteria) this; } - + public Criteria andDescriptionNotBetween(String value1, String value2) { addCriterion("description not between", value1, value2, "description"); return (Criteria) this; } - + public Criteria andValueIsNull() { addCriterion("value is null"); return (Criteria) this; } - + public Criteria andValueIsNotNull() { addCriterion("value is not null"); return (Criteria) this; } - + public Criteria andValueEqualTo(String value) { addCriterion("value =", value, "value"); return (Criteria) this; } - + public Criteria andValueNotEqualTo(String value) { addCriterion("value <>", value, "value"); return (Criteria) this; } - + public Criteria andValueGreaterThan(String value) { addCriterion("value >", value, "value"); return (Criteria) this; } - + public Criteria andValueGreaterThanOrEqualTo(String value) { addCriterion("value >=", value, "value"); return (Criteria) this; } - + public Criteria andValueLessThan(String value) { addCriterion("value <", value, "value"); return (Criteria) this; } - + public Criteria andValueLessThanOrEqualTo(String value) { addCriterion("value <=", value, "value"); return (Criteria) this; } - + public Criteria andValueLike(String value) { addCriterion("value like", value, "value"); return (Criteria) this; } - + public Criteria andValueNotLike(String value) { addCriterion("value not like", value, "value"); return (Criteria) this; } - + public Criteria andValueIn(List values) { addCriterion("value in", values, "value"); return (Criteria) this; } - + public Criteria andValueNotIn(List values) { addCriterion("value not in", values, "value"); return (Criteria) this; } - + public Criteria andValueBetween(String value1, String value2) { addCriterion("value between", value1, value2, "value"); return (Criteria) this; } - + public Criteria andValueNotBetween(String value1, String value2) { addCriterion("value not between", value1, value2, "value"); return (Criteria) this; } - + public Criteria andLastEditedDateIsNull() { addCriterion("last_edited_date is null"); return (Criteria) this; } - + public Criteria andLastEditedDateIsNotNull() { addCriterion("last_edited_date is not null"); return (Criteria) this; } - + public Criteria andLastEditedDateEqualTo(Long value) { addCriterion("last_edited_date =", value, "lastEditedDate"); return (Criteria) this; } - + public Criteria andLastEditedDateNotEqualTo(Long value) { addCriterion("last_edited_date <>", value, "lastEditedDate"); return (Criteria) this; } - + public Criteria andLastEditedDateGreaterThan(Long value) { addCriterion("last_edited_date >", value, "lastEditedDate"); return (Criteria) this; } - + public Criteria andLastEditedDateGreaterThanOrEqualTo(Long value) { addCriterion("last_edited_date >=", value, "lastEditedDate"); return (Criteria) this; } - + public Criteria andLastEditedDateLessThan(Long value) { addCriterion("last_edited_date <", value, "lastEditedDate"); return (Criteria) this; } - + public Criteria andLastEditedDateLessThanOrEqualTo(Long value) { addCriterion("last_edited_date <=", value, "lastEditedDate"); return (Criteria) this; } - + public Criteria andLastEditedDateIn(List values) { addCriterion("last_edited_date in", values, "lastEditedDate"); return (Criteria) this; } - + public Criteria andLastEditedDateNotIn(List values) { addCriterion("last_edited_date not in", values, "lastEditedDate"); return (Criteria) this; } - + public Criteria andLastEditedDateBetween(Long value1, Long value2) { addCriterion("last_edited_date between", value1, value2, "lastEditedDate"); return (Criteria) this; } - + public Criteria andLastEditedDateNotBetween(Long value1, Long value2) { addCriterion("last_edited_date not between", value1, value2, "lastEditedDate"); return (Criteria) this; @@ -495,57 +496,65 @@ public Criteria andLastEditedDateNotBetween(Long value1, Long value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.app_state_token - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; - + public String getCondition() { return condition; } - + public Object getValue() { return value; } - + public Object getSecondValue() { return secondValue; } - + public boolean isNoValue() { return noValue; } - + public boolean isSingleValue() { return singleValue; } - + public boolean isBetweenValue() { return betweenValue; } - + public boolean isListValue() { return listValue; } - + public String getTypeHandler() { return typeHandler; } - + protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } - + protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; @@ -557,11 +566,11 @@ protected Criterion(String condition, Object value, String typeHandler) { this.singleValue = true; } } - + protected Criterion(String condition, Object value) { this(condition, value, null); } - + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; @@ -570,7 +579,7 @@ protected Criterion(String condition, Object value, Object secondValue, String t this.typeHandler = typeHandler; this.betweenValue = true; } - + protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java index f4016eedf9..1a6142085d 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java @@ -4,19 +4,19 @@ public class Client { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client.id * @return the value of core.client.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client.id * @param id the value for core.client.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client.json * @return the value of core.client.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client.json * @param json the value for core.client.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java index 09297fc366..bf4deef0a5 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java @@ -6,23 +6,23 @@ public class ClientExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public ClientExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public ClientExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,223 +119,266 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected abstract static class GeneratedCriteria { + + protected List jsonCriteria; + + protected List allCriteria; + protected List criteria; - + protected GeneratedCriteria() { super(); criteria = new ArrayList(); + jsonCriteria = new ArrayList(); } - + + public List getJsonCriteria() { + return jsonCriteria; + } + + protected void addJsonCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + jsonCriteria.add(new Criterion(condition, value, "org.opensrp.repository.postgres.handler.ClientTypeHandler")); + allCriteria = null; + } + + protected void addJsonCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + jsonCriteria.add( + new Criterion(condition, value1, value2, "org.opensrp.repository.postgres.handler.ClientTypeHandler")); + allCriteria = null; + } + public boolean isValid() { - return criteria.size() > 0; + return criteria.size() > 0 || jsonCriteria.size() > 0; } - + public List getAllCriteria() { - return criteria; + if (allCriteria == null) { + allCriteria = new ArrayList(); + allCriteria.addAll(criteria); + allCriteria.addAll(jsonCriteria); + } + return allCriteria; } - + public List getCriteria() { return criteria; } - + protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); + allCriteria = null; } - + protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); + allCriteria = null; } - + protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); + allCriteria = null; } - + public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } - + public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } - + public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } - + public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } - + public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } - + public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } - + public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andJsonIsNull() { addCriterion("json is null"); return (Criteria) this; } - + public Criteria andJsonIsNotNull() { addCriterion("json is not null"); return (Criteria) this; } - + public Criteria andJsonEqualTo(Object value) { - addCriterion("json =", value, "json"); + addJsonCriterion("json =", value, "json"); return (Criteria) this; } - + public Criteria andJsonNotEqualTo(Object value) { - addCriterion("json <>", value, "json"); + addJsonCriterion("json <>", value, "json"); return (Criteria) this; } - + public Criteria andJsonGreaterThan(Object value) { - addCriterion("json >", value, "json"); + addJsonCriterion("json >", value, "json"); return (Criteria) this; } - + public Criteria andJsonGreaterThanOrEqualTo(Object value) { - addCriterion("json >=", value, "json"); + addJsonCriterion("json >=", value, "json"); return (Criteria) this; } - + public Criteria andJsonLessThan(Object value) { - addCriterion("json <", value, "json"); + addJsonCriterion("json <", value, "json"); return (Criteria) this; } - + public Criteria andJsonLessThanOrEqualTo(Object value) { - addCriterion("json <=", value, "json"); + addJsonCriterion("json <=", value, "json"); return (Criteria) this; } - + public Criteria andJsonIn(List values) { - addCriterion("json in", values, "json"); + addJsonCriterion("json in", values, "json"); return (Criteria) this; } - + public Criteria andJsonNotIn(List values) { - addCriterion("json not in", values, "json"); + addJsonCriterion("json not in", values, "json"); return (Criteria) this; } - + public Criteria andJsonBetween(Object value1, Object value2) { - addCriterion("json between", value1, value2, "json"); + addJsonCriterion("json between", value1, value2, "json"); return (Criteria) this; } - + public Criteria andJsonNotBetween(Object value1, Object value2) { - addCriterion("json not between", value1, value2, "json"); + addJsonCriterion("json not between", value1, value2, "json"); return (Criteria) this; } } /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; - + public String getCondition() { return condition; } - + public Object getValue() { return value; } - + public Object getSecondValue() { return secondValue; } - + public boolean isNoValue() { return noValue; } - + public boolean isSingleValue() { return singleValue; } - + public boolean isBetweenValue() { return betweenValue; } - + public boolean isListValue() { return listValue; } - + public String getTypeHandler() { return typeHandler; } - + protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } - + protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; @@ -347,11 +390,11 @@ protected Criterion(String condition, Object value, String typeHandler) { this.singleValue = true; } } - + protected Criterion(String condition, Object value) { this(condition, value, null); } - + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; @@ -360,7 +403,7 @@ protected Criterion(String condition, Object value, Object secondValue, String t this.typeHandler = typeHandler; this.betweenValue = true; } - + protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java index 4728ab70ea..8592897d35 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java @@ -6,59 +6,59 @@ public class ClientMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.id - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.client_id - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long clientId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.base_entity_id - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.relational_id - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String relationalId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.server_version - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.openmrs_uuid - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String openmrsUuid; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.unique_id - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String uniqueId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.first_name - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String firstName; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.last_name - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String lastName; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.birth_date - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Date birthDate; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.id * @return the value of core.client_metadata.id - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getId() { return id; @@ -67,7 +67,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.id * @param id the value for core.client_metadata.id - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -76,7 +76,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.client_id * @return the value of core.client_metadata.client_id - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getClientId() { return clientId; @@ -85,7 +85,7 @@ public Long getClientId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.client_id * @param clientId the value for core.client_metadata.client_id - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setClientId(Long clientId) { this.clientId = clientId; @@ -94,7 +94,7 @@ public void setClientId(Long clientId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.base_entity_id * @return the value of core.client_metadata.base_entity_id - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -103,7 +103,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.base_entity_id * @param baseEntityId the value for core.client_metadata.base_entity_id - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -112,7 +112,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.relational_id * @return the value of core.client_metadata.relational_id - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getRelationalId() { return relationalId; @@ -121,7 +121,7 @@ public String getRelationalId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.relational_id * @param relationalId the value for core.client_metadata.relational_id - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setRelationalId(String relationalId) { this.relationalId = relationalId; @@ -130,7 +130,7 @@ public void setRelationalId(String relationalId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.server_version * @return the value of core.client_metadata.server_version - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -139,7 +139,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.server_version * @param serverVersion the value for core.client_metadata.server_version - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -148,7 +148,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.openmrs_uuid * @return the value of core.client_metadata.openmrs_uuid - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOpenmrsUuid() { return openmrsUuid; @@ -157,7 +157,7 @@ public String getOpenmrsUuid() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.openmrs_uuid * @param openmrsUuid the value for core.client_metadata.openmrs_uuid - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOpenmrsUuid(String openmrsUuid) { this.openmrsUuid = openmrsUuid; @@ -166,7 +166,7 @@ public void setOpenmrsUuid(String openmrsUuid) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.unique_id * @return the value of core.client_metadata.unique_id - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getUniqueId() { return uniqueId; @@ -175,7 +175,7 @@ public String getUniqueId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.unique_id * @param uniqueId the value for core.client_metadata.unique_id - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; @@ -184,7 +184,7 @@ public void setUniqueId(String uniqueId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.first_name * @return the value of core.client_metadata.first_name - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getFirstName() { return firstName; @@ -193,7 +193,7 @@ public String getFirstName() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.first_name * @param firstName the value for core.client_metadata.first_name - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setFirstName(String firstName) { this.firstName = firstName; @@ -202,7 +202,7 @@ public void setFirstName(String firstName) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.last_name * @return the value of core.client_metadata.last_name - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getLastName() { return lastName; @@ -211,7 +211,7 @@ public String getLastName() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.last_name * @param lastName the value for core.client_metadata.last_name - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setLastName(String lastName) { this.lastName = lastName; @@ -220,7 +220,7 @@ public void setLastName(String lastName) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.birth_date * @return the value of core.client_metadata.birth_date - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Date getBirthDate() { return birthDate; @@ -229,7 +229,7 @@ public Date getBirthDate() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.birth_date * @param birthDate the value for core.client_metadata.birth_date - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setBirthDate(Date birthDate) { this.birthDate = birthDate; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java index 6331348faa..a187c3598a 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java @@ -8,23 +8,23 @@ public class ClientMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public ClientMetadataExample() { oredCriteria = new ArrayList(); @@ -32,7 +32,7 @@ public ClientMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -40,7 +40,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -48,7 +48,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -56,7 +56,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -64,7 +64,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -72,7 +72,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -80,7 +80,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -90,7 +90,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -102,7 +102,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -111,7 +111,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -121,7 +121,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected abstract static class GeneratedCriteria { @@ -854,7 +854,7 @@ public Criteria andBirthDateNotBetween(Date value1, Date value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public static class Criterion { diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java index e72aed5a2d..a197b760be 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java @@ -6,59 +6,59 @@ public class ErrorTrace { /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.date_occurred - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Date dateOccurred; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.error_type - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String errorType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.occurred_at - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String occurredAt; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.stack_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String stackTrace; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.status - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String status; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.record_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String recordId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.date_closed - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Date dateClosed; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.document_type - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String documentType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.retry_url - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String retryUrl; /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.id * @return the value of error.error_trace.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getId() { return id; @@ -67,7 +67,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.id * @param id the value for error.error_trace.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -76,7 +76,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.date_occurred * @return the value of error.error_trace.date_occurred - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Date getDateOccurred() { return dateOccurred; @@ -85,7 +85,7 @@ public Date getDateOccurred() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.date_occurred * @param dateOccurred the value for error.error_trace.date_occurred - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDateOccurred(Date dateOccurred) { this.dateOccurred = dateOccurred; @@ -94,7 +94,7 @@ public void setDateOccurred(Date dateOccurred) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.error_type * @return the value of error.error_trace.error_type - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getErrorType() { return errorType; @@ -103,7 +103,7 @@ public String getErrorType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.error_type * @param errorType the value for error.error_trace.error_type - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setErrorType(String errorType) { this.errorType = errorType; @@ -112,7 +112,7 @@ public void setErrorType(String errorType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.occurred_at * @return the value of error.error_trace.occurred_at - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOccurredAt() { return occurredAt; @@ -121,7 +121,7 @@ public String getOccurredAt() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.occurred_at * @param occurredAt the value for error.error_trace.occurred_at - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOccurredAt(String occurredAt) { this.occurredAt = occurredAt; @@ -130,7 +130,7 @@ public void setOccurredAt(String occurredAt) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.stack_trace * @return the value of error.error_trace.stack_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getStackTrace() { return stackTrace; @@ -139,7 +139,7 @@ public String getStackTrace() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.stack_trace * @param stackTrace the value for error.error_trace.stack_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setStackTrace(String stackTrace) { this.stackTrace = stackTrace; @@ -148,7 +148,7 @@ public void setStackTrace(String stackTrace) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.status * @return the value of error.error_trace.status - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getStatus() { return status; @@ -157,7 +157,7 @@ public String getStatus() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.status * @param status the value for error.error_trace.status - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setStatus(String status) { this.status = status; @@ -166,7 +166,7 @@ public void setStatus(String status) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.record_id * @return the value of error.error_trace.record_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getRecordId() { return recordId; @@ -175,7 +175,7 @@ public String getRecordId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.record_id * @param recordId the value for error.error_trace.record_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setRecordId(String recordId) { this.recordId = recordId; @@ -184,7 +184,7 @@ public void setRecordId(String recordId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.date_closed * @return the value of error.error_trace.date_closed - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Date getDateClosed() { return dateClosed; @@ -193,7 +193,7 @@ public Date getDateClosed() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.date_closed * @param dateClosed the value for error.error_trace.date_closed - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDateClosed(Date dateClosed) { this.dateClosed = dateClosed; @@ -202,7 +202,7 @@ public void setDateClosed(Date dateClosed) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.document_type * @return the value of error.error_trace.document_type - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getDocumentType() { return documentType; @@ -211,7 +211,7 @@ public String getDocumentType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.document_type * @param documentType the value for error.error_trace.document_type - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDocumentType(String documentType) { this.documentType = documentType; @@ -220,7 +220,7 @@ public void setDocumentType(String documentType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.retry_url * @return the value of error.error_trace.retry_url - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getRetryUrl() { return retryUrl; @@ -229,7 +229,7 @@ public String getRetryUrl() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.retry_url * @param retryUrl the value for error.error_trace.retry_url - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setRetryUrl(String retryUrl) { this.retryUrl = retryUrl; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java index dc3d25d431..9947d91bb9 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java @@ -8,23 +8,23 @@ public class ErrorTraceExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table error.error_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table error.error_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table error.error_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public ErrorTraceExample() { oredCriteria = new ArrayList(); @@ -32,7 +32,7 @@ public ErrorTraceExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -40,7 +40,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -48,7 +48,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -56,7 +56,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -64,7 +64,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -72,7 +72,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -80,7 +80,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -90,7 +90,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -102,7 +102,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -111,7 +111,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -121,56 +121,57 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table error.error_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected abstract static class GeneratedCriteria { + protected List criteria; - + protected GeneratedCriteria() { super(); criteria = new ArrayList(); } - + public boolean isValid() { return criteria.size() > 0; } - + public List getAllCriteria() { return criteria; } - + public List getCriteria() { return criteria; } - + protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } - + protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } - + protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } - + protected void addCriterionForJDBCDate(String condition, Date value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } addCriterion(condition, new java.sql.Date(value.getTime()), property); } - + protected void addCriterionForJDBCDate(String condition, List values, String property) { if (values == null || values.size() == 0) { throw new RuntimeException("Value list for " + property + " cannot be null or empty"); @@ -182,679 +183,679 @@ protected void addCriterionForJDBCDate(String condition, List values, Stri } addCriterion(condition, dateList, property); } - + protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); } - + public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } - + public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } - + public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } - + public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } - + public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } - + public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } - + public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andDateOccurredIsNull() { addCriterion("date_occurred is null"); return (Criteria) this; } - + public Criteria andDateOccurredIsNotNull() { addCriterion("date_occurred is not null"); return (Criteria) this; } - + public Criteria andDateOccurredEqualTo(Date value) { addCriterionForJDBCDate("date_occurred =", value, "dateOccurred"); return (Criteria) this; } - + public Criteria andDateOccurredNotEqualTo(Date value) { addCriterionForJDBCDate("date_occurred <>", value, "dateOccurred"); return (Criteria) this; } - + public Criteria andDateOccurredGreaterThan(Date value) { addCriterionForJDBCDate("date_occurred >", value, "dateOccurred"); return (Criteria) this; } - + public Criteria andDateOccurredGreaterThanOrEqualTo(Date value) { addCriterionForJDBCDate("date_occurred >=", value, "dateOccurred"); return (Criteria) this; } - + public Criteria andDateOccurredLessThan(Date value) { addCriterionForJDBCDate("date_occurred <", value, "dateOccurred"); return (Criteria) this; } - + public Criteria andDateOccurredLessThanOrEqualTo(Date value) { addCriterionForJDBCDate("date_occurred <=", value, "dateOccurred"); return (Criteria) this; } - + public Criteria andDateOccurredIn(List values) { addCriterionForJDBCDate("date_occurred in", values, "dateOccurred"); return (Criteria) this; } - + public Criteria andDateOccurredNotIn(List values) { addCriterionForJDBCDate("date_occurred not in", values, "dateOccurred"); return (Criteria) this; } - + public Criteria andDateOccurredBetween(Date value1, Date value2) { addCriterionForJDBCDate("date_occurred between", value1, value2, "dateOccurred"); return (Criteria) this; } - + public Criteria andDateOccurredNotBetween(Date value1, Date value2) { addCriterionForJDBCDate("date_occurred not between", value1, value2, "dateOccurred"); return (Criteria) this; } - + public Criteria andErrorTypeIsNull() { addCriterion("error_type is null"); return (Criteria) this; } - + public Criteria andErrorTypeIsNotNull() { addCriterion("error_type is not null"); return (Criteria) this; } - + public Criteria andErrorTypeEqualTo(String value) { addCriterion("error_type =", value, "errorType"); return (Criteria) this; } - + public Criteria andErrorTypeNotEqualTo(String value) { addCriterion("error_type <>", value, "errorType"); return (Criteria) this; } - + public Criteria andErrorTypeGreaterThan(String value) { addCriterion("error_type >", value, "errorType"); return (Criteria) this; } - + public Criteria andErrorTypeGreaterThanOrEqualTo(String value) { addCriterion("error_type >=", value, "errorType"); return (Criteria) this; } - + public Criteria andErrorTypeLessThan(String value) { addCriterion("error_type <", value, "errorType"); return (Criteria) this; } - + public Criteria andErrorTypeLessThanOrEqualTo(String value) { addCriterion("error_type <=", value, "errorType"); return (Criteria) this; } - + public Criteria andErrorTypeLike(String value) { addCriterion("error_type like", value, "errorType"); return (Criteria) this; } - + public Criteria andErrorTypeNotLike(String value) { addCriterion("error_type not like", value, "errorType"); return (Criteria) this; } - + public Criteria andErrorTypeIn(List values) { addCriterion("error_type in", values, "errorType"); return (Criteria) this; } - + public Criteria andErrorTypeNotIn(List values) { addCriterion("error_type not in", values, "errorType"); return (Criteria) this; } - + public Criteria andErrorTypeBetween(String value1, String value2) { addCriterion("error_type between", value1, value2, "errorType"); return (Criteria) this; } - + public Criteria andErrorTypeNotBetween(String value1, String value2) { addCriterion("error_type not between", value1, value2, "errorType"); return (Criteria) this; } - + public Criteria andOccurredAtIsNull() { addCriterion("occurred_at is null"); return (Criteria) this; } - + public Criteria andOccurredAtIsNotNull() { addCriterion("occurred_at is not null"); return (Criteria) this; } - + public Criteria andOccurredAtEqualTo(String value) { addCriterion("occurred_at =", value, "occurredAt"); return (Criteria) this; } - + public Criteria andOccurredAtNotEqualTo(String value) { addCriterion("occurred_at <>", value, "occurredAt"); return (Criteria) this; } - + public Criteria andOccurredAtGreaterThan(String value) { addCriterion("occurred_at >", value, "occurredAt"); return (Criteria) this; } - + public Criteria andOccurredAtGreaterThanOrEqualTo(String value) { addCriterion("occurred_at >=", value, "occurredAt"); return (Criteria) this; } - + public Criteria andOccurredAtLessThan(String value) { addCriterion("occurred_at <", value, "occurredAt"); return (Criteria) this; } - + public Criteria andOccurredAtLessThanOrEqualTo(String value) { addCriterion("occurred_at <=", value, "occurredAt"); return (Criteria) this; } - + public Criteria andOccurredAtLike(String value) { addCriterion("occurred_at like", value, "occurredAt"); return (Criteria) this; } - + public Criteria andOccurredAtNotLike(String value) { addCriterion("occurred_at not like", value, "occurredAt"); return (Criteria) this; } - + public Criteria andOccurredAtIn(List values) { addCriterion("occurred_at in", values, "occurredAt"); return (Criteria) this; } - + public Criteria andOccurredAtNotIn(List values) { addCriterion("occurred_at not in", values, "occurredAt"); return (Criteria) this; } - + public Criteria andOccurredAtBetween(String value1, String value2) { addCriterion("occurred_at between", value1, value2, "occurredAt"); return (Criteria) this; } - + public Criteria andOccurredAtNotBetween(String value1, String value2) { addCriterion("occurred_at not between", value1, value2, "occurredAt"); return (Criteria) this; } - + public Criteria andStackTraceIsNull() { addCriterion("stack_trace is null"); return (Criteria) this; } - + public Criteria andStackTraceIsNotNull() { addCriterion("stack_trace is not null"); return (Criteria) this; } - + public Criteria andStackTraceEqualTo(String value) { addCriterion("stack_trace =", value, "stackTrace"); return (Criteria) this; } - + public Criteria andStackTraceNotEqualTo(String value) { addCriterion("stack_trace <>", value, "stackTrace"); return (Criteria) this; } - + public Criteria andStackTraceGreaterThan(String value) { addCriterion("stack_trace >", value, "stackTrace"); return (Criteria) this; } - + public Criteria andStackTraceGreaterThanOrEqualTo(String value) { addCriterion("stack_trace >=", value, "stackTrace"); return (Criteria) this; } - + public Criteria andStackTraceLessThan(String value) { addCriterion("stack_trace <", value, "stackTrace"); return (Criteria) this; } - + public Criteria andStackTraceLessThanOrEqualTo(String value) { addCriterion("stack_trace <=", value, "stackTrace"); return (Criteria) this; } - + public Criteria andStackTraceLike(String value) { addCriterion("stack_trace like", value, "stackTrace"); return (Criteria) this; } - + public Criteria andStackTraceNotLike(String value) { addCriterion("stack_trace not like", value, "stackTrace"); return (Criteria) this; } - + public Criteria andStackTraceIn(List values) { addCriterion("stack_trace in", values, "stackTrace"); return (Criteria) this; } - + public Criteria andStackTraceNotIn(List values) { addCriterion("stack_trace not in", values, "stackTrace"); return (Criteria) this; } - + public Criteria andStackTraceBetween(String value1, String value2) { addCriterion("stack_trace between", value1, value2, "stackTrace"); return (Criteria) this; } - + public Criteria andStackTraceNotBetween(String value1, String value2) { addCriterion("stack_trace not between", value1, value2, "stackTrace"); return (Criteria) this; } - + public Criteria andStatusIsNull() { addCriterion("status is null"); return (Criteria) this; } - + public Criteria andStatusIsNotNull() { addCriterion("status is not null"); return (Criteria) this; } - + public Criteria andStatusEqualTo(String value) { addCriterion("status =", value, "status"); return (Criteria) this; } - + public Criteria andStatusNotEqualTo(String value) { addCriterion("status <>", value, "status"); return (Criteria) this; } - + public Criteria andStatusGreaterThan(String value) { addCriterion("status >", value, "status"); return (Criteria) this; } - + public Criteria andStatusGreaterThanOrEqualTo(String value) { addCriterion("status >=", value, "status"); return (Criteria) this; } - + public Criteria andStatusLessThan(String value) { addCriterion("status <", value, "status"); return (Criteria) this; } - + public Criteria andStatusLessThanOrEqualTo(String value) { addCriterion("status <=", value, "status"); return (Criteria) this; } - + public Criteria andStatusLike(String value) { addCriterion("status like", value, "status"); return (Criteria) this; } - + public Criteria andStatusNotLike(String value) { addCriterion("status not like", value, "status"); return (Criteria) this; } - + public Criteria andStatusIn(List values) { addCriterion("status in", values, "status"); return (Criteria) this; } - + public Criteria andStatusNotIn(List values) { addCriterion("status not in", values, "status"); return (Criteria) this; } - + public Criteria andStatusBetween(String value1, String value2) { addCriterion("status between", value1, value2, "status"); return (Criteria) this; } - + public Criteria andStatusNotBetween(String value1, String value2) { addCriterion("status not between", value1, value2, "status"); return (Criteria) this; } - + public Criteria andRecordIdIsNull() { addCriterion("record_id is null"); return (Criteria) this; } - + public Criteria andRecordIdIsNotNull() { addCriterion("record_id is not null"); return (Criteria) this; } - + public Criteria andRecordIdEqualTo(String value) { addCriterion("record_id =", value, "recordId"); return (Criteria) this; } - + public Criteria andRecordIdNotEqualTo(String value) { addCriterion("record_id <>", value, "recordId"); return (Criteria) this; } - + public Criteria andRecordIdGreaterThan(String value) { addCriterion("record_id >", value, "recordId"); return (Criteria) this; } - + public Criteria andRecordIdGreaterThanOrEqualTo(String value) { addCriterion("record_id >=", value, "recordId"); return (Criteria) this; } - + public Criteria andRecordIdLessThan(String value) { addCriterion("record_id <", value, "recordId"); return (Criteria) this; } - + public Criteria andRecordIdLessThanOrEqualTo(String value) { addCriterion("record_id <=", value, "recordId"); return (Criteria) this; } - + public Criteria andRecordIdLike(String value) { addCriterion("record_id like", value, "recordId"); return (Criteria) this; } - + public Criteria andRecordIdNotLike(String value) { addCriterion("record_id not like", value, "recordId"); return (Criteria) this; } - + public Criteria andRecordIdIn(List values) { addCriterion("record_id in", values, "recordId"); return (Criteria) this; } - + public Criteria andRecordIdNotIn(List values) { addCriterion("record_id not in", values, "recordId"); return (Criteria) this; } - + public Criteria andRecordIdBetween(String value1, String value2) { addCriterion("record_id between", value1, value2, "recordId"); return (Criteria) this; } - + public Criteria andRecordIdNotBetween(String value1, String value2) { addCriterion("record_id not between", value1, value2, "recordId"); return (Criteria) this; } - + public Criteria andDateClosedIsNull() { addCriterion("date_closed is null"); return (Criteria) this; } - + public Criteria andDateClosedIsNotNull() { addCriterion("date_closed is not null"); return (Criteria) this; } - + public Criteria andDateClosedEqualTo(Date value) { addCriterionForJDBCDate("date_closed =", value, "dateClosed"); return (Criteria) this; } - + public Criteria andDateClosedNotEqualTo(Date value) { addCriterionForJDBCDate("date_closed <>", value, "dateClosed"); return (Criteria) this; } - + public Criteria andDateClosedGreaterThan(Date value) { addCriterionForJDBCDate("date_closed >", value, "dateClosed"); return (Criteria) this; } - + public Criteria andDateClosedGreaterThanOrEqualTo(Date value) { addCriterionForJDBCDate("date_closed >=", value, "dateClosed"); return (Criteria) this; } - + public Criteria andDateClosedLessThan(Date value) { addCriterionForJDBCDate("date_closed <", value, "dateClosed"); return (Criteria) this; } - + public Criteria andDateClosedLessThanOrEqualTo(Date value) { addCriterionForJDBCDate("date_closed <=", value, "dateClosed"); return (Criteria) this; } - + public Criteria andDateClosedIn(List values) { addCriterionForJDBCDate("date_closed in", values, "dateClosed"); return (Criteria) this; } - + public Criteria andDateClosedNotIn(List values) { addCriterionForJDBCDate("date_closed not in", values, "dateClosed"); return (Criteria) this; } - + public Criteria andDateClosedBetween(Date value1, Date value2) { addCriterionForJDBCDate("date_closed between", value1, value2, "dateClosed"); return (Criteria) this; } - + public Criteria andDateClosedNotBetween(Date value1, Date value2) { addCriterionForJDBCDate("date_closed not between", value1, value2, "dateClosed"); return (Criteria) this; } - + public Criteria andDocumentTypeIsNull() { addCriterion("document_type is null"); return (Criteria) this; } - + public Criteria andDocumentTypeIsNotNull() { addCriterion("document_type is not null"); return (Criteria) this; } - + public Criteria andDocumentTypeEqualTo(String value) { addCriterion("document_type =", value, "documentType"); return (Criteria) this; } - + public Criteria andDocumentTypeNotEqualTo(String value) { addCriterion("document_type <>", value, "documentType"); return (Criteria) this; } - + public Criteria andDocumentTypeGreaterThan(String value) { addCriterion("document_type >", value, "documentType"); return (Criteria) this; } - + public Criteria andDocumentTypeGreaterThanOrEqualTo(String value) { addCriterion("document_type >=", value, "documentType"); return (Criteria) this; } - + public Criteria andDocumentTypeLessThan(String value) { addCriterion("document_type <", value, "documentType"); return (Criteria) this; } - + public Criteria andDocumentTypeLessThanOrEqualTo(String value) { addCriterion("document_type <=", value, "documentType"); return (Criteria) this; } - + public Criteria andDocumentTypeLike(String value) { addCriterion("document_type like", value, "documentType"); return (Criteria) this; } - + public Criteria andDocumentTypeNotLike(String value) { addCriterion("document_type not like", value, "documentType"); return (Criteria) this; } - + public Criteria andDocumentTypeIn(List values) { addCriterion("document_type in", values, "documentType"); return (Criteria) this; } - + public Criteria andDocumentTypeNotIn(List values) { addCriterion("document_type not in", values, "documentType"); return (Criteria) this; } - + public Criteria andDocumentTypeBetween(String value1, String value2) { addCriterion("document_type between", value1, value2, "documentType"); return (Criteria) this; } - + public Criteria andDocumentTypeNotBetween(String value1, String value2) { addCriterion("document_type not between", value1, value2, "documentType"); return (Criteria) this; } - + public Criteria andRetryUrlIsNull() { addCriterion("retry_url is null"); return (Criteria) this; } - + public Criteria andRetryUrlIsNotNull() { addCriterion("retry_url is not null"); return (Criteria) this; } - + public Criteria andRetryUrlEqualTo(String value) { addCriterion("retry_url =", value, "retryUrl"); return (Criteria) this; } - + public Criteria andRetryUrlNotEqualTo(String value) { addCriterion("retry_url <>", value, "retryUrl"); return (Criteria) this; } - + public Criteria andRetryUrlGreaterThan(String value) { addCriterion("retry_url >", value, "retryUrl"); return (Criteria) this; } - + public Criteria andRetryUrlGreaterThanOrEqualTo(String value) { addCriterion("retry_url >=", value, "retryUrl"); return (Criteria) this; } - + public Criteria andRetryUrlLessThan(String value) { addCriterion("retry_url <", value, "retryUrl"); return (Criteria) this; } - + public Criteria andRetryUrlLessThanOrEqualTo(String value) { addCriterion("retry_url <=", value, "retryUrl"); return (Criteria) this; } - + public Criteria andRetryUrlLike(String value) { addCriterion("retry_url like", value, "retryUrl"); return (Criteria) this; } - + public Criteria andRetryUrlNotLike(String value) { addCriterion("retry_url not like", value, "retryUrl"); return (Criteria) this; } - + public Criteria andRetryUrlIn(List values) { addCriterion("retry_url in", values, "retryUrl"); return (Criteria) this; } - + public Criteria andRetryUrlNotIn(List values) { addCriterion("retry_url not in", values, "retryUrl"); return (Criteria) this; } - + public Criteria andRetryUrlBetween(String value1, String value2) { addCriterion("retry_url between", value1, value2, "retryUrl"); return (Criteria) this; } - + public Criteria andRetryUrlNotBetween(String value1, String value2) { addCriterion("retry_url not between", value1, value2, "retryUrl"); return (Criteria) this; @@ -863,57 +864,65 @@ public Criteria andRetryUrlNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table error.error_trace - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; - + public String getCondition() { return condition; } - + public Object getValue() { return value; } - + public Object getSecondValue() { return secondValue; } - + public boolean isNoValue() { return noValue; } - + public boolean isSingleValue() { return singleValue; } - + public boolean isBetweenValue() { return betweenValue; } - + public boolean isListValue() { return listValue; } - + public String getTypeHandler() { return typeHandler; } - + protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } - + protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; @@ -925,11 +934,11 @@ protected Criterion(String condition, Object value, String typeHandler) { this.singleValue = true; } } - + protected Criterion(String condition, Object value) { this(condition, value, null); } - + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; @@ -938,7 +947,7 @@ protected Criterion(String condition, Object value, Object secondValue, String t this.typeHandler = typeHandler; this.betweenValue = true; } - + protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java index 4fbcd45a22..5bf048da39 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java @@ -4,19 +4,19 @@ public class Event { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event.id * @return the value of core.event.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event.id * @param id the value for core.event.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event.json * @return the value of core.event.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event.json * @param json the value for core.event.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java index 52f7a664e7..942694aaa1 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java @@ -6,23 +6,23 @@ public class EventExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public EventExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public EventExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,164 +119,165 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected abstract static class GeneratedCriteria { + protected List criteria; - + protected GeneratedCriteria() { super(); criteria = new ArrayList(); } - + public boolean isValid() { return criteria.size() > 0; } - + public List getAllCriteria() { return criteria; } - + public List getCriteria() { return criteria; } - + protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } - + protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } - + protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } - + public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } - + public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } - + public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } - + public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } - + public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } - + public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } - + public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andJsonIsNull() { addCriterion("json is null"); return (Criteria) this; } - + public Criteria andJsonIsNotNull() { addCriterion("json is not null"); return (Criteria) this; } - + public Criteria andJsonEqualTo(Object value) { addCriterion("json =", value, "json"); return (Criteria) this; } - + public Criteria andJsonNotEqualTo(Object value) { addCriterion("json <>", value, "json"); return (Criteria) this; } - + public Criteria andJsonGreaterThan(Object value) { addCriterion("json >", value, "json"); return (Criteria) this; } - + public Criteria andJsonGreaterThanOrEqualTo(Object value) { addCriterion("json >=", value, "json"); return (Criteria) this; } - + public Criteria andJsonLessThan(Object value) { addCriterion("json <", value, "json"); return (Criteria) this; } - + public Criteria andJsonLessThanOrEqualTo(Object value) { addCriterion("json <=", value, "json"); return (Criteria) this; } - + public Criteria andJsonIn(List values) { addCriterion("json in", values, "json"); return (Criteria) this; } - + public Criteria andJsonNotIn(List values) { addCriterion("json not in", values, "json"); return (Criteria) this; } - + public Criteria andJsonBetween(Object value1, Object value2) { addCriterion("json between", value1, value2, "json"); return (Criteria) this; } - + public Criteria andJsonNotBetween(Object value1, Object value2) { addCriterion("json not between", value1, value2, "json"); return (Criteria) this; @@ -285,57 +286,65 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; - + public String getCondition() { return condition; } - + public Object getValue() { return value; } - + public Object getSecondValue() { return secondValue; } - + public boolean isNoValue() { return noValue; } - + public boolean isSingleValue() { return singleValue; } - + public boolean isBetweenValue() { return betweenValue; } - + public boolean isListValue() { return listValue; } - + public String getTypeHandler() { return typeHandler; } - + protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } - + protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; @@ -347,11 +356,11 @@ protected Criterion(String condition, Object value, String typeHandler) { this.singleValue = true; } } - + protected Criterion(String condition, Object value) { this(condition, value, null); } - + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; @@ -360,7 +369,7 @@ protected Criterion(String condition, Object value, Object secondValue, String t this.typeHandler = typeHandler; this.betweenValue = true; } - + protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java index d7d5d3cb0d..7f65c1a71d 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java @@ -6,69 +6,69 @@ public class EventMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long eventId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.base_entity_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.form_submission_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String formSubmissionId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.server_version - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.openmrs_uuid - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String openmrsUuid; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_type - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String eventType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_date - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Date eventDate; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.location_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.team - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.team_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String teamId; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.id * @return the value of core.event_metadata.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getId() { return id; @@ -77,7 +77,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.id * @param id the value for core.event_metadata.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -86,7 +86,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_id * @return the value of core.event_metadata.event_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getEventId() { return eventId; @@ -95,7 +95,7 @@ public Long getEventId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_id * @param eventId the value for core.event_metadata.event_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setEventId(Long eventId) { this.eventId = eventId; @@ -104,7 +104,7 @@ public void setEventId(Long eventId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.base_entity_id * @return the value of core.event_metadata.base_entity_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -113,7 +113,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.base_entity_id * @param baseEntityId the value for core.event_metadata.base_entity_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -122,7 +122,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.form_submission_id * @return the value of core.event_metadata.form_submission_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getFormSubmissionId() { return formSubmissionId; @@ -131,7 +131,7 @@ public String getFormSubmissionId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.form_submission_id * @param formSubmissionId the value for core.event_metadata.form_submission_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setFormSubmissionId(String formSubmissionId) { this.formSubmissionId = formSubmissionId; @@ -140,7 +140,7 @@ public void setFormSubmissionId(String formSubmissionId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.server_version * @return the value of core.event_metadata.server_version - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -149,7 +149,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.server_version * @param serverVersion the value for core.event_metadata.server_version - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -158,7 +158,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.openmrs_uuid * @return the value of core.event_metadata.openmrs_uuid - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOpenmrsUuid() { return openmrsUuid; @@ -167,7 +167,7 @@ public String getOpenmrsUuid() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.openmrs_uuid * @param openmrsUuid the value for core.event_metadata.openmrs_uuid - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOpenmrsUuid(String openmrsUuid) { this.openmrsUuid = openmrsUuid; @@ -176,7 +176,7 @@ public void setOpenmrsUuid(String openmrsUuid) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_type * @return the value of core.event_metadata.event_type - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getEventType() { return eventType; @@ -185,7 +185,7 @@ public String getEventType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_type * @param eventType the value for core.event_metadata.event_type - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setEventType(String eventType) { this.eventType = eventType; @@ -194,7 +194,7 @@ public void setEventType(String eventType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_date * @return the value of core.event_metadata.event_date - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Date getEventDate() { return eventDate; @@ -203,7 +203,7 @@ public Date getEventDate() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_date * @param eventDate the value for core.event_metadata.event_date - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setEventDate(Date eventDate) { this.eventDate = eventDate; @@ -212,7 +212,7 @@ public void setEventDate(Date eventDate) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.provider_id * @return the value of core.event_metadata.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getProviderId() { return providerId; @@ -221,7 +221,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.provider_id * @param providerId the value for core.event_metadata.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -230,7 +230,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.location_id * @return the value of core.event_metadata.location_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getLocationId() { return locationId; @@ -239,7 +239,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.location_id * @param locationId the value for core.event_metadata.location_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -248,7 +248,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.team * @return the value of core.event_metadata.team - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getTeam() { return team; @@ -257,7 +257,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.team * @param team the value for core.event_metadata.team - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -266,7 +266,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.team_id * @return the value of core.event_metadata.team_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getTeamId() { return teamId; @@ -275,7 +275,7 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.team_id * @param teamId the value for core.event_metadata.team_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java index fda27aa665..1602a75953 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java @@ -8,23 +8,23 @@ public class EventMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public EventMetadataExample() { oredCriteria = new ArrayList(); @@ -32,7 +32,7 @@ public EventMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -40,7 +40,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -48,7 +48,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -56,7 +56,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -64,7 +64,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -72,7 +72,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -80,7 +80,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -90,7 +90,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -102,7 +102,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -111,7 +111,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -121,56 +121,57 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected abstract static class GeneratedCriteria { + protected List criteria; - + protected GeneratedCriteria() { super(); criteria = new ArrayList(); } - + public boolean isValid() { return criteria.size() > 0; } - + public List getAllCriteria() { return criteria; } - + public List getCriteria() { return criteria; } - + protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } - + protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } - + protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } - + protected void addCriterionForJDBCDate(String condition, Date value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } addCriterion(condition, new java.sql.Date(value.getTime()), property); } - + protected void addCriterionForJDBCDate(String condition, List values, String property) { if (values == null || values.size() == 0) { throw new RuntimeException("Value list for " + property + " cannot be null or empty"); @@ -182,809 +183,809 @@ protected void addCriterionForJDBCDate(String condition, List values, Stri } addCriterion(condition, dateList, property); } - + protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); } - + public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } - + public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } - + public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } - + public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } - + public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } - + public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } - + public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andEventIdIsNull() { addCriterion("event_id is null"); return (Criteria) this; } - + public Criteria andEventIdIsNotNull() { addCriterion("event_id is not null"); return (Criteria) this; } - + public Criteria andEventIdEqualTo(Long value) { addCriterion("event_id =", value, "eventId"); return (Criteria) this; } - + public Criteria andEventIdNotEqualTo(Long value) { addCriterion("event_id <>", value, "eventId"); return (Criteria) this; } - + public Criteria andEventIdGreaterThan(Long value) { addCriterion("event_id >", value, "eventId"); return (Criteria) this; } - + public Criteria andEventIdGreaterThanOrEqualTo(Long value) { addCriterion("event_id >=", value, "eventId"); return (Criteria) this; } - + public Criteria andEventIdLessThan(Long value) { addCriterion("event_id <", value, "eventId"); return (Criteria) this; } - + public Criteria andEventIdLessThanOrEqualTo(Long value) { addCriterion("event_id <=", value, "eventId"); return (Criteria) this; } - + public Criteria andEventIdIn(List values) { addCriterion("event_id in", values, "eventId"); return (Criteria) this; } - + public Criteria andEventIdNotIn(List values) { addCriterion("event_id not in", values, "eventId"); return (Criteria) this; } - + public Criteria andEventIdBetween(Long value1, Long value2) { addCriterion("event_id between", value1, value2, "eventId"); return (Criteria) this; } - + public Criteria andEventIdNotBetween(Long value1, Long value2) { addCriterion("event_id not between", value1, value2, "eventId"); return (Criteria) this; } - + public Criteria andBaseEntityIdIsNull() { addCriterion("base_entity_id is null"); return (Criteria) this; } - + public Criteria andBaseEntityIdIsNotNull() { addCriterion("base_entity_id is not null"); return (Criteria) this; } - + public Criteria andBaseEntityIdEqualTo(String value) { addCriterion("base_entity_id =", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotEqualTo(String value) { addCriterion("base_entity_id <>", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdGreaterThan(String value) { addCriterion("base_entity_id >", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { addCriterion("base_entity_id >=", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdLessThan(String value) { addCriterion("base_entity_id <", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { addCriterion("base_entity_id <=", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdLike(String value) { addCriterion("base_entity_id like", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotLike(String value) { addCriterion("base_entity_id not like", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdIn(List values) { addCriterion("base_entity_id in", values, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotIn(List values) { addCriterion("base_entity_id not in", values, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdBetween(String value1, String value2) { addCriterion("base_entity_id between", value1, value2, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotBetween(String value1, String value2) { addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); return (Criteria) this; } - + public Criteria andFormSubmissionIdIsNull() { addCriterion("form_submission_id is null"); return (Criteria) this; } - + public Criteria andFormSubmissionIdIsNotNull() { addCriterion("form_submission_id is not null"); return (Criteria) this; } - + public Criteria andFormSubmissionIdEqualTo(String value) { addCriterion("form_submission_id =", value, "formSubmissionId"); return (Criteria) this; } - + public Criteria andFormSubmissionIdNotEqualTo(String value) { addCriterion("form_submission_id <>", value, "formSubmissionId"); return (Criteria) this; } - + public Criteria andFormSubmissionIdGreaterThan(String value) { addCriterion("form_submission_id >", value, "formSubmissionId"); return (Criteria) this; } - + public Criteria andFormSubmissionIdGreaterThanOrEqualTo(String value) { addCriterion("form_submission_id >=", value, "formSubmissionId"); return (Criteria) this; } - + public Criteria andFormSubmissionIdLessThan(String value) { addCriterion("form_submission_id <", value, "formSubmissionId"); return (Criteria) this; } - + public Criteria andFormSubmissionIdLessThanOrEqualTo(String value) { addCriterion("form_submission_id <=", value, "formSubmissionId"); return (Criteria) this; } - + public Criteria andFormSubmissionIdLike(String value) { addCriterion("form_submission_id like", value, "formSubmissionId"); return (Criteria) this; } - + public Criteria andFormSubmissionIdNotLike(String value) { addCriterion("form_submission_id not like", value, "formSubmissionId"); return (Criteria) this; } - + public Criteria andFormSubmissionIdIn(List values) { addCriterion("form_submission_id in", values, "formSubmissionId"); return (Criteria) this; } - + public Criteria andFormSubmissionIdNotIn(List values) { addCriterion("form_submission_id not in", values, "formSubmissionId"); return (Criteria) this; } - + public Criteria andFormSubmissionIdBetween(String value1, String value2) { addCriterion("form_submission_id between", value1, value2, "formSubmissionId"); return (Criteria) this; } - + public Criteria andFormSubmissionIdNotBetween(String value1, String value2) { addCriterion("form_submission_id not between", value1, value2, "formSubmissionId"); return (Criteria) this; } - + public Criteria andServerVersionIsNull() { addCriterion("server_version is null"); return (Criteria) this; } - + public Criteria andServerVersionIsNotNull() { addCriterion("server_version is not null"); return (Criteria) this; } - + public Criteria andServerVersionEqualTo(Long value) { addCriterion("server_version =", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionNotEqualTo(Long value) { addCriterion("server_version <>", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionGreaterThan(Long value) { addCriterion("server_version >", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionGreaterThanOrEqualTo(Long value) { addCriterion("server_version >=", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionLessThan(Long value) { addCriterion("server_version <", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionLessThanOrEqualTo(Long value) { addCriterion("server_version <=", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionIn(List values) { addCriterion("server_version in", values, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionNotIn(List values) { addCriterion("server_version not in", values, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionBetween(Long value1, Long value2) { addCriterion("server_version between", value1, value2, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionNotBetween(Long value1, Long value2) { addCriterion("server_version not between", value1, value2, "serverVersion"); return (Criteria) this; } - + public Criteria andOpenmrsUuidIsNull() { addCriterion("openmrs_uuid is null"); return (Criteria) this; } - + public Criteria andOpenmrsUuidIsNotNull() { addCriterion("openmrs_uuid is not null"); return (Criteria) this; } - + public Criteria andOpenmrsUuidEqualTo(String value) { addCriterion("openmrs_uuid =", value, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidNotEqualTo(String value) { addCriterion("openmrs_uuid <>", value, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidGreaterThan(String value) { addCriterion("openmrs_uuid >", value, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidGreaterThanOrEqualTo(String value) { addCriterion("openmrs_uuid >=", value, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidLessThan(String value) { addCriterion("openmrs_uuid <", value, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidLessThanOrEqualTo(String value) { addCriterion("openmrs_uuid <=", value, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidLike(String value) { addCriterion("openmrs_uuid like", value, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidNotLike(String value) { addCriterion("openmrs_uuid not like", value, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidIn(List values) { addCriterion("openmrs_uuid in", values, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidNotIn(List values) { addCriterion("openmrs_uuid not in", values, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidBetween(String value1, String value2) { addCriterion("openmrs_uuid between", value1, value2, "openmrsUuid"); return (Criteria) this; } - + public Criteria andOpenmrsUuidNotBetween(String value1, String value2) { addCriterion("openmrs_uuid not between", value1, value2, "openmrsUuid"); return (Criteria) this; } - + public Criteria andEventTypeIsNull() { addCriterion("event_type is null"); return (Criteria) this; } - + public Criteria andEventTypeIsNotNull() { addCriterion("event_type is not null"); return (Criteria) this; } - + public Criteria andEventTypeEqualTo(String value) { addCriterion("event_type =", value, "eventType"); return (Criteria) this; } - + public Criteria andEventTypeNotEqualTo(String value) { addCriterion("event_type <>", value, "eventType"); return (Criteria) this; } - + public Criteria andEventTypeGreaterThan(String value) { addCriterion("event_type >", value, "eventType"); return (Criteria) this; } - + public Criteria andEventTypeGreaterThanOrEqualTo(String value) { addCriterion("event_type >=", value, "eventType"); return (Criteria) this; } - + public Criteria andEventTypeLessThan(String value) { addCriterion("event_type <", value, "eventType"); return (Criteria) this; } - + public Criteria andEventTypeLessThanOrEqualTo(String value) { addCriterion("event_type <=", value, "eventType"); return (Criteria) this; } - + public Criteria andEventTypeLike(String value) { addCriterion("event_type like", value, "eventType"); return (Criteria) this; } - + public Criteria andEventTypeNotLike(String value) { addCriterion("event_type not like", value, "eventType"); return (Criteria) this; } - + public Criteria andEventTypeIn(List values) { addCriterion("event_type in", values, "eventType"); return (Criteria) this; } - + public Criteria andEventTypeNotIn(List values) { addCriterion("event_type not in", values, "eventType"); return (Criteria) this; } - + public Criteria andEventTypeBetween(String value1, String value2) { addCriterion("event_type between", value1, value2, "eventType"); return (Criteria) this; } - + public Criteria andEventTypeNotBetween(String value1, String value2) { addCriterion("event_type not between", value1, value2, "eventType"); return (Criteria) this; } - + public Criteria andEventDateIsNull() { addCriterion("event_date is null"); return (Criteria) this; } - + public Criteria andEventDateIsNotNull() { addCriterion("event_date is not null"); return (Criteria) this; } - + public Criteria andEventDateEqualTo(Date value) { addCriterionForJDBCDate("event_date =", value, "eventDate"); return (Criteria) this; } - + public Criteria andEventDateNotEqualTo(Date value) { addCriterionForJDBCDate("event_date <>", value, "eventDate"); return (Criteria) this; } - + public Criteria andEventDateGreaterThan(Date value) { addCriterionForJDBCDate("event_date >", value, "eventDate"); return (Criteria) this; } - + public Criteria andEventDateGreaterThanOrEqualTo(Date value) { addCriterionForJDBCDate("event_date >=", value, "eventDate"); return (Criteria) this; } - + public Criteria andEventDateLessThan(Date value) { addCriterionForJDBCDate("event_date <", value, "eventDate"); return (Criteria) this; } - + public Criteria andEventDateLessThanOrEqualTo(Date value) { addCriterionForJDBCDate("event_date <=", value, "eventDate"); return (Criteria) this; } - + public Criteria andEventDateIn(List values) { addCriterionForJDBCDate("event_date in", values, "eventDate"); return (Criteria) this; } - + public Criteria andEventDateNotIn(List values) { addCriterionForJDBCDate("event_date not in", values, "eventDate"); return (Criteria) this; } - + public Criteria andEventDateBetween(Date value1, Date value2) { addCriterionForJDBCDate("event_date between", value1, value2, "eventDate"); return (Criteria) this; } - + public Criteria andEventDateNotBetween(Date value1, Date value2) { addCriterionForJDBCDate("event_date not between", value1, value2, "eventDate"); return (Criteria) this; } - + public Criteria andProviderIdIsNull() { addCriterion("provider_id is null"); return (Criteria) this; } - + public Criteria andProviderIdIsNotNull() { addCriterion("provider_id is not null"); return (Criteria) this; } - + public Criteria andProviderIdEqualTo(String value) { addCriterion("provider_id =", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotEqualTo(String value) { addCriterion("provider_id <>", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdGreaterThan(String value) { addCriterion("provider_id >", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdGreaterThanOrEqualTo(String value) { addCriterion("provider_id >=", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLessThan(String value) { addCriterion("provider_id <", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLessThanOrEqualTo(String value) { addCriterion("provider_id <=", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLike(String value) { addCriterion("provider_id like", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotLike(String value) { addCriterion("provider_id not like", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdIn(List values) { addCriterion("provider_id in", values, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotIn(List values) { addCriterion("provider_id not in", values, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdBetween(String value1, String value2) { addCriterion("provider_id between", value1, value2, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotBetween(String value1, String value2) { addCriterion("provider_id not between", value1, value2, "providerId"); return (Criteria) this; } - + public Criteria andLocationIdIsNull() { addCriterion("location_id is null"); return (Criteria) this; } - + public Criteria andLocationIdIsNotNull() { addCriterion("location_id is not null"); return (Criteria) this; } - + public Criteria andLocationIdEqualTo(String value) { addCriterion("location_id =", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotEqualTo(String value) { addCriterion("location_id <>", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdGreaterThan(String value) { addCriterion("location_id >", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdGreaterThanOrEqualTo(String value) { addCriterion("location_id >=", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdLessThan(String value) { addCriterion("location_id <", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdLessThanOrEqualTo(String value) { addCriterion("location_id <=", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdLike(String value) { addCriterion("location_id like", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotLike(String value) { addCriterion("location_id not like", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdIn(List values) { addCriterion("location_id in", values, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotIn(List values) { addCriterion("location_id not in", values, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdBetween(String value1, String value2) { addCriterion("location_id between", value1, value2, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotBetween(String value1, String value2) { addCriterion("location_id not between", value1, value2, "locationId"); return (Criteria) this; } - + public Criteria andTeamIsNull() { addCriterion("team is null"); return (Criteria) this; } - + public Criteria andTeamIsNotNull() { addCriterion("team is not null"); return (Criteria) this; } - + public Criteria andTeamEqualTo(String value) { addCriterion("team =", value, "team"); return (Criteria) this; } - + public Criteria andTeamNotEqualTo(String value) { addCriterion("team <>", value, "team"); return (Criteria) this; } - + public Criteria andTeamGreaterThan(String value) { addCriterion("team >", value, "team"); return (Criteria) this; } - + public Criteria andTeamGreaterThanOrEqualTo(String value) { addCriterion("team >=", value, "team"); return (Criteria) this; } - + public Criteria andTeamLessThan(String value) { addCriterion("team <", value, "team"); return (Criteria) this; } - + public Criteria andTeamLessThanOrEqualTo(String value) { addCriterion("team <=", value, "team"); return (Criteria) this; } - + public Criteria andTeamLike(String value) { addCriterion("team like", value, "team"); return (Criteria) this; } - + public Criteria andTeamNotLike(String value) { addCriterion("team not like", value, "team"); return (Criteria) this; } - + public Criteria andTeamIn(List values) { addCriterion("team in", values, "team"); return (Criteria) this; } - + public Criteria andTeamNotIn(List values) { addCriterion("team not in", values, "team"); return (Criteria) this; } - + public Criteria andTeamBetween(String value1, String value2) { addCriterion("team between", value1, value2, "team"); return (Criteria) this; } - + public Criteria andTeamNotBetween(String value1, String value2) { addCriterion("team not between", value1, value2, "team"); return (Criteria) this; } - + public Criteria andTeamIdIsNull() { addCriterion("team_id is null"); return (Criteria) this; } - + public Criteria andTeamIdIsNotNull() { addCriterion("team_id is not null"); return (Criteria) this; } - + public Criteria andTeamIdEqualTo(String value) { addCriterion("team_id =", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotEqualTo(String value) { addCriterion("team_id <>", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdGreaterThan(String value) { addCriterion("team_id >", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdGreaterThanOrEqualTo(String value) { addCriterion("team_id >=", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdLessThan(String value) { addCriterion("team_id <", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdLessThanOrEqualTo(String value) { addCriterion("team_id <=", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdLike(String value) { addCriterion("team_id like", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotLike(String value) { addCriterion("team_id not like", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdIn(List values) { addCriterion("team_id in", values, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotIn(List values) { addCriterion("team_id not in", values, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdBetween(String value1, String value2) { addCriterion("team_id between", value1, value2, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotBetween(String value1, String value2) { addCriterion("team_id not between", value1, value2, "teamId"); return (Criteria) this; @@ -993,57 +994,65 @@ public Criteria andTeamIdNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; - + public String getCondition() { return condition; } - + public Object getValue() { return value; } - + public Object getSecondValue() { return secondValue; } - + public boolean isNoValue() { return noValue; } - + public boolean isSingleValue() { return singleValue; } - + public boolean isBetweenValue() { return betweenValue; } - + public boolean isListValue() { return listValue; } - + public String getTypeHandler() { return typeHandler; } - + protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } - + protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; @@ -1055,11 +1064,11 @@ protected Criterion(String condition, Object value, String typeHandler) { this.singleValue = true; } } - + protected Criterion(String condition, Object value) { this(condition, value, null); } - + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; @@ -1068,7 +1077,7 @@ protected Criterion(String condition, Object value, Object secondValue, String t this.typeHandler = typeHandler; this.betweenValue = true; } - + protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMedia.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMedia.java index 43208372ed..2a605be75e 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMedia.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMedia.java @@ -4,39 +4,39 @@ public class MultiMedia { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.case_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String caseId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.content_type - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String contentType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.file_path - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String filePath; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.file_category - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String fileCategory; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.id * @return the value of core.multi_media.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getId() { return id; @@ -45,7 +45,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.id * @param id the value for core.multi_media.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -54,7 +54,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.case_id * @return the value of core.multi_media.case_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getCaseId() { return caseId; @@ -63,7 +63,7 @@ public String getCaseId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.case_id * @param caseId the value for core.multi_media.case_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setCaseId(String caseId) { this.caseId = caseId; @@ -72,7 +72,7 @@ public void setCaseId(String caseId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.provider_id * @return the value of core.multi_media.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getProviderId() { return providerId; @@ -81,7 +81,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.provider_id * @param providerId the value for core.multi_media.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -90,7 +90,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.content_type * @return the value of core.multi_media.content_type - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getContentType() { return contentType; @@ -99,7 +99,7 @@ public String getContentType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.content_type * @param contentType the value for core.multi_media.content_type - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setContentType(String contentType) { this.contentType = contentType; @@ -108,7 +108,7 @@ public void setContentType(String contentType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.file_path * @return the value of core.multi_media.file_path - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getFilePath() { return filePath; @@ -117,7 +117,7 @@ public String getFilePath() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.file_path * @param filePath the value for core.multi_media.file_path - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setFilePath(String filePath) { this.filePath = filePath; @@ -126,7 +126,7 @@ public void setFilePath(String filePath) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.file_category * @return the value of core.multi_media.file_category - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getFileCategory() { return fileCategory; @@ -135,7 +135,7 @@ public String getFileCategory() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.file_category * @param fileCategory the value for core.multi_media.file_category - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setFileCategory(String fileCategory) { this.fileCategory = fileCategory; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMediaExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMediaExample.java index 3e6dfead6e..ffb69cfc69 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMediaExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMediaExample.java @@ -6,23 +6,23 @@ public class MultiMediaExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.multi_media - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.multi_media - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.multi_media - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public MultiMediaExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public MultiMediaExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,454 +119,455 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.multi_media - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected abstract static class GeneratedCriteria { + protected List criteria; - + protected GeneratedCriteria() { super(); criteria = new ArrayList(); } - + public boolean isValid() { return criteria.size() > 0; } - + public List getAllCriteria() { return criteria; } - + public List getCriteria() { return criteria; } - + protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } - + protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } - + protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } - + public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } - + public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } - + public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } - + public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } - + public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } - + public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } - + public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andCaseIdIsNull() { addCriterion("case_id is null"); return (Criteria) this; } - + public Criteria andCaseIdIsNotNull() { addCriterion("case_id is not null"); return (Criteria) this; } - + public Criteria andCaseIdEqualTo(String value) { addCriterion("case_id =", value, "caseId"); return (Criteria) this; } - + public Criteria andCaseIdNotEqualTo(String value) { addCriterion("case_id <>", value, "caseId"); return (Criteria) this; } - + public Criteria andCaseIdGreaterThan(String value) { addCriterion("case_id >", value, "caseId"); return (Criteria) this; } - + public Criteria andCaseIdGreaterThanOrEqualTo(String value) { addCriterion("case_id >=", value, "caseId"); return (Criteria) this; } - + public Criteria andCaseIdLessThan(String value) { addCriterion("case_id <", value, "caseId"); return (Criteria) this; } - + public Criteria andCaseIdLessThanOrEqualTo(String value) { addCriterion("case_id <=", value, "caseId"); return (Criteria) this; } - + public Criteria andCaseIdLike(String value) { addCriterion("case_id like", value, "caseId"); return (Criteria) this; } - + public Criteria andCaseIdNotLike(String value) { addCriterion("case_id not like", value, "caseId"); return (Criteria) this; } - + public Criteria andCaseIdIn(List values) { addCriterion("case_id in", values, "caseId"); return (Criteria) this; } - + public Criteria andCaseIdNotIn(List values) { addCriterion("case_id not in", values, "caseId"); return (Criteria) this; } - + public Criteria andCaseIdBetween(String value1, String value2) { addCriterion("case_id between", value1, value2, "caseId"); return (Criteria) this; } - + public Criteria andCaseIdNotBetween(String value1, String value2) { addCriterion("case_id not between", value1, value2, "caseId"); return (Criteria) this; } - + public Criteria andProviderIdIsNull() { addCriterion("provider_id is null"); return (Criteria) this; } - + public Criteria andProviderIdIsNotNull() { addCriterion("provider_id is not null"); return (Criteria) this; } - + public Criteria andProviderIdEqualTo(String value) { addCriterion("provider_id =", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotEqualTo(String value) { addCriterion("provider_id <>", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdGreaterThan(String value) { addCriterion("provider_id >", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdGreaterThanOrEqualTo(String value) { addCriterion("provider_id >=", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLessThan(String value) { addCriterion("provider_id <", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLessThanOrEqualTo(String value) { addCriterion("provider_id <=", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLike(String value) { addCriterion("provider_id like", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotLike(String value) { addCriterion("provider_id not like", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdIn(List values) { addCriterion("provider_id in", values, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotIn(List values) { addCriterion("provider_id not in", values, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdBetween(String value1, String value2) { addCriterion("provider_id between", value1, value2, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotBetween(String value1, String value2) { addCriterion("provider_id not between", value1, value2, "providerId"); return (Criteria) this; } - + public Criteria andContentTypeIsNull() { addCriterion("content_type is null"); return (Criteria) this; } - + public Criteria andContentTypeIsNotNull() { addCriterion("content_type is not null"); return (Criteria) this; } - + public Criteria andContentTypeEqualTo(String value) { addCriterion("content_type =", value, "contentType"); return (Criteria) this; } - + public Criteria andContentTypeNotEqualTo(String value) { addCriterion("content_type <>", value, "contentType"); return (Criteria) this; } - + public Criteria andContentTypeGreaterThan(String value) { addCriterion("content_type >", value, "contentType"); return (Criteria) this; } - + public Criteria andContentTypeGreaterThanOrEqualTo(String value) { addCriterion("content_type >=", value, "contentType"); return (Criteria) this; } - + public Criteria andContentTypeLessThan(String value) { addCriterion("content_type <", value, "contentType"); return (Criteria) this; } - + public Criteria andContentTypeLessThanOrEqualTo(String value) { addCriterion("content_type <=", value, "contentType"); return (Criteria) this; } - + public Criteria andContentTypeLike(String value) { addCriterion("content_type like", value, "contentType"); return (Criteria) this; } - + public Criteria andContentTypeNotLike(String value) { addCriterion("content_type not like", value, "contentType"); return (Criteria) this; } - + public Criteria andContentTypeIn(List values) { addCriterion("content_type in", values, "contentType"); return (Criteria) this; } - + public Criteria andContentTypeNotIn(List values) { addCriterion("content_type not in", values, "contentType"); return (Criteria) this; } - + public Criteria andContentTypeBetween(String value1, String value2) { addCriterion("content_type between", value1, value2, "contentType"); return (Criteria) this; } - + public Criteria andContentTypeNotBetween(String value1, String value2) { addCriterion("content_type not between", value1, value2, "contentType"); return (Criteria) this; } - + public Criteria andFilePathIsNull() { addCriterion("file_path is null"); return (Criteria) this; } - + public Criteria andFilePathIsNotNull() { addCriterion("file_path is not null"); return (Criteria) this; } - + public Criteria andFilePathEqualTo(String value) { addCriterion("file_path =", value, "filePath"); return (Criteria) this; } - + public Criteria andFilePathNotEqualTo(String value) { addCriterion("file_path <>", value, "filePath"); return (Criteria) this; } - + public Criteria andFilePathGreaterThan(String value) { addCriterion("file_path >", value, "filePath"); return (Criteria) this; } - + public Criteria andFilePathGreaterThanOrEqualTo(String value) { addCriterion("file_path >=", value, "filePath"); return (Criteria) this; } - + public Criteria andFilePathLessThan(String value) { addCriterion("file_path <", value, "filePath"); return (Criteria) this; } - + public Criteria andFilePathLessThanOrEqualTo(String value) { addCriterion("file_path <=", value, "filePath"); return (Criteria) this; } - + public Criteria andFilePathLike(String value) { addCriterion("file_path like", value, "filePath"); return (Criteria) this; } - + public Criteria andFilePathNotLike(String value) { addCriterion("file_path not like", value, "filePath"); return (Criteria) this; } - + public Criteria andFilePathIn(List values) { addCriterion("file_path in", values, "filePath"); return (Criteria) this; } - + public Criteria andFilePathNotIn(List values) { addCriterion("file_path not in", values, "filePath"); return (Criteria) this; } - + public Criteria andFilePathBetween(String value1, String value2) { addCriterion("file_path between", value1, value2, "filePath"); return (Criteria) this; } - + public Criteria andFilePathNotBetween(String value1, String value2) { addCriterion("file_path not between", value1, value2, "filePath"); return (Criteria) this; } - + public Criteria andFileCategoryIsNull() { addCriterion("file_category is null"); return (Criteria) this; } - + public Criteria andFileCategoryIsNotNull() { addCriterion("file_category is not null"); return (Criteria) this; } - + public Criteria andFileCategoryEqualTo(String value) { addCriterion("file_category =", value, "fileCategory"); return (Criteria) this; } - + public Criteria andFileCategoryNotEqualTo(String value) { addCriterion("file_category <>", value, "fileCategory"); return (Criteria) this; } - + public Criteria andFileCategoryGreaterThan(String value) { addCriterion("file_category >", value, "fileCategory"); return (Criteria) this; } - + public Criteria andFileCategoryGreaterThanOrEqualTo(String value) { addCriterion("file_category >=", value, "fileCategory"); return (Criteria) this; } - + public Criteria andFileCategoryLessThan(String value) { addCriterion("file_category <", value, "fileCategory"); return (Criteria) this; } - + public Criteria andFileCategoryLessThanOrEqualTo(String value) { addCriterion("file_category <=", value, "fileCategory"); return (Criteria) this; } - + public Criteria andFileCategoryLike(String value) { addCriterion("file_category like", value, "fileCategory"); return (Criteria) this; } - + public Criteria andFileCategoryNotLike(String value) { addCriterion("file_category not like", value, "fileCategory"); return (Criteria) this; } - + public Criteria andFileCategoryIn(List values) { addCriterion("file_category in", values, "fileCategory"); return (Criteria) this; } - + public Criteria andFileCategoryNotIn(List values) { addCriterion("file_category not in", values, "fileCategory"); return (Criteria) this; } - + public Criteria andFileCategoryBetween(String value1, String value2) { addCriterion("file_category between", value1, value2, "fileCategory"); return (Criteria) this; } - + public Criteria andFileCategoryNotBetween(String value1, String value2) { addCriterion("file_category not between", value1, value2, "fileCategory"); return (Criteria) this; @@ -575,57 +576,65 @@ public Criteria andFileCategoryNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.multi_media - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; - + public String getCondition() { return condition; } - + public Object getValue() { return value; } - + public Object getSecondValue() { return secondValue; } - + public boolean isNoValue() { return noValue; } - + public boolean isSingleValue() { return singleValue; } - + public boolean isBetweenValue() { return betweenValue; } - + public boolean isListValue() { return listValue; } - + public String getTypeHandler() { return typeHandler; } - + protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } - + protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; @@ -637,11 +646,11 @@ protected Criterion(String condition, Object value, String typeHandler) { this.singleValue = true; } } - + protected Criterion(String condition, Object value) { this(condition, value, null); } - + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; @@ -650,7 +659,7 @@ protected Criterion(String condition, Object value, Object secondValue, String t this.typeHandler = typeHandler; this.betweenValue = true; } - + protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java index cb34fe9705..7c9ad43b0a 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java @@ -4,19 +4,19 @@ public class Report { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report.id * @return the value of core.report.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report.id * @param id the value for core.report.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report.json * @return the value of core.report.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report.json * @param json the value for core.report.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java index bf49edccce..569058ea88 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java @@ -6,23 +6,23 @@ public class ReportExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public ReportExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public ReportExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,164 +119,165 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.report - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected abstract static class GeneratedCriteria { + protected List criteria; - + protected GeneratedCriteria() { super(); criteria = new ArrayList(); } - + public boolean isValid() { return criteria.size() > 0; } - + public List getAllCriteria() { return criteria; } - + public List getCriteria() { return criteria; } - + protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } - + protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } - + protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } - + public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } - + public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } - + public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } - + public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } - + public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } - + public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } - + public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andJsonIsNull() { addCriterion("json is null"); return (Criteria) this; } - + public Criteria andJsonIsNotNull() { addCriterion("json is not null"); return (Criteria) this; } - + public Criteria andJsonEqualTo(Object value) { addCriterion("json =", value, "json"); return (Criteria) this; } - + public Criteria andJsonNotEqualTo(Object value) { addCriterion("json <>", value, "json"); return (Criteria) this; } - + public Criteria andJsonGreaterThan(Object value) { addCriterion("json >", value, "json"); return (Criteria) this; } - + public Criteria andJsonGreaterThanOrEqualTo(Object value) { addCriterion("json >=", value, "json"); return (Criteria) this; } - + public Criteria andJsonLessThan(Object value) { addCriterion("json <", value, "json"); return (Criteria) this; } - + public Criteria andJsonLessThanOrEqualTo(Object value) { addCriterion("json <=", value, "json"); return (Criteria) this; } - + public Criteria andJsonIn(List values) { addCriterion("json in", values, "json"); return (Criteria) this; } - + public Criteria andJsonNotIn(List values) { addCriterion("json not in", values, "json"); return (Criteria) this; } - + public Criteria andJsonBetween(Object value1, Object value2) { addCriterion("json between", value1, value2, "json"); return (Criteria) this; } - + public Criteria andJsonNotBetween(Object value1, Object value2) { addCriterion("json not between", value1, value2, "json"); return (Criteria) this; @@ -285,57 +286,65 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.report - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; - + public String getCondition() { return condition; } - + public Object getValue() { return value; } - + public Object getSecondValue() { return secondValue; } - + public boolean isNoValue() { return noValue; } - + public boolean isSingleValue() { return singleValue; } - + public boolean isBetweenValue() { return betweenValue; } - + public boolean isListValue() { return listValue; } - + public String getTypeHandler() { return typeHandler; } - + protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } - + protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; @@ -347,11 +356,11 @@ protected Criterion(String condition, Object value, String typeHandler) { this.singleValue = true; } } - + protected Criterion(String condition, Object value) { this(condition, value, null); } - + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; @@ -360,7 +369,7 @@ protected Criterion(String condition, Object value, Object secondValue, String t this.typeHandler = typeHandler; this.betweenValue = true; } - + protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java index ce37fd63f2..450d2e7d92 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java @@ -4,54 +4,54 @@ public class ReportMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.report_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long reportId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.base_entity_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.server_version - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.report_type - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String reportType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.location_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.team - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.team_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String teamId; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.id * @return the value of core.report_metadata.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getId() { return id; @@ -60,7 +60,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.id * @param id the value for core.report_metadata.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -69,7 +69,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.report_id * @return the value of core.report_metadata.report_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getReportId() { return reportId; @@ -78,7 +78,7 @@ public Long getReportId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.report_id * @param reportId the value for core.report_metadata.report_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setReportId(Long reportId) { this.reportId = reportId; @@ -87,7 +87,7 @@ public void setReportId(Long reportId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.base_entity_id * @return the value of core.report_metadata.base_entity_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -96,7 +96,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.base_entity_id * @param baseEntityId the value for core.report_metadata.base_entity_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -105,7 +105,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.server_version * @return the value of core.report_metadata.server_version - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -114,7 +114,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.server_version * @param serverVersion the value for core.report_metadata.server_version - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -123,7 +123,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.report_type * @return the value of core.report_metadata.report_type - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getReportType() { return reportType; @@ -132,7 +132,7 @@ public String getReportType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.report_type * @param reportType the value for core.report_metadata.report_type - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setReportType(String reportType) { this.reportType = reportType; @@ -141,7 +141,7 @@ public void setReportType(String reportType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.provider_id * @return the value of core.report_metadata.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getProviderId() { return providerId; @@ -150,7 +150,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.provider_id * @param providerId the value for core.report_metadata.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -159,7 +159,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.location_id * @return the value of core.report_metadata.location_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getLocationId() { return locationId; @@ -168,7 +168,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.location_id * @param locationId the value for core.report_metadata.location_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -177,7 +177,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.team * @return the value of core.report_metadata.team - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getTeam() { return team; @@ -186,7 +186,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.team * @param team the value for core.report_metadata.team - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -195,7 +195,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.team_id * @return the value of core.report_metadata.team_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getTeamId() { return teamId; @@ -204,7 +204,7 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.team_id * @param teamId the value for core.report_metadata.team_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java index 5674cd72ce..27a6ce0593 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java @@ -6,23 +6,23 @@ public class ReportMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public ReportMetadataExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public ReportMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,644 +119,645 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.report_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected abstract static class GeneratedCriteria { + protected List criteria; - + protected GeneratedCriteria() { super(); criteria = new ArrayList(); } - + public boolean isValid() { return criteria.size() > 0; } - + public List getAllCriteria() { return criteria; } - + public List getCriteria() { return criteria; } - + protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } - + protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } - + protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } - + public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } - + public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } - + public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } - + public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } - + public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } - + public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } - + public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andReportIdIsNull() { addCriterion("report_id is null"); return (Criteria) this; } - + public Criteria andReportIdIsNotNull() { addCriterion("report_id is not null"); return (Criteria) this; } - + public Criteria andReportIdEqualTo(Long value) { addCriterion("report_id =", value, "reportId"); return (Criteria) this; } - + public Criteria andReportIdNotEqualTo(Long value) { addCriterion("report_id <>", value, "reportId"); return (Criteria) this; } - + public Criteria andReportIdGreaterThan(Long value) { addCriterion("report_id >", value, "reportId"); return (Criteria) this; } - + public Criteria andReportIdGreaterThanOrEqualTo(Long value) { addCriterion("report_id >=", value, "reportId"); return (Criteria) this; } - + public Criteria andReportIdLessThan(Long value) { addCriterion("report_id <", value, "reportId"); return (Criteria) this; } - + public Criteria andReportIdLessThanOrEqualTo(Long value) { addCriterion("report_id <=", value, "reportId"); return (Criteria) this; } - + public Criteria andReportIdIn(List values) { addCriterion("report_id in", values, "reportId"); return (Criteria) this; } - + public Criteria andReportIdNotIn(List values) { addCriterion("report_id not in", values, "reportId"); return (Criteria) this; } - + public Criteria andReportIdBetween(Long value1, Long value2) { addCriterion("report_id between", value1, value2, "reportId"); return (Criteria) this; } - + public Criteria andReportIdNotBetween(Long value1, Long value2) { addCriterion("report_id not between", value1, value2, "reportId"); return (Criteria) this; } - + public Criteria andBaseEntityIdIsNull() { addCriterion("base_entity_id is null"); return (Criteria) this; } - + public Criteria andBaseEntityIdIsNotNull() { addCriterion("base_entity_id is not null"); return (Criteria) this; } - + public Criteria andBaseEntityIdEqualTo(String value) { addCriterion("base_entity_id =", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotEqualTo(String value) { addCriterion("base_entity_id <>", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdGreaterThan(String value) { addCriterion("base_entity_id >", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdGreaterThanOrEqualTo(String value) { addCriterion("base_entity_id >=", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdLessThan(String value) { addCriterion("base_entity_id <", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdLessThanOrEqualTo(String value) { addCriterion("base_entity_id <=", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdLike(String value) { addCriterion("base_entity_id like", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotLike(String value) { addCriterion("base_entity_id not like", value, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdIn(List values) { addCriterion("base_entity_id in", values, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotIn(List values) { addCriterion("base_entity_id not in", values, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdBetween(String value1, String value2) { addCriterion("base_entity_id between", value1, value2, "baseEntityId"); return (Criteria) this; } - + public Criteria andBaseEntityIdNotBetween(String value1, String value2) { addCriterion("base_entity_id not between", value1, value2, "baseEntityId"); return (Criteria) this; } - + public Criteria andServerVersionIsNull() { addCriterion("server_version is null"); return (Criteria) this; } - + public Criteria andServerVersionIsNotNull() { addCriterion("server_version is not null"); return (Criteria) this; } - + public Criteria andServerVersionEqualTo(Long value) { addCriterion("server_version =", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionNotEqualTo(Long value) { addCriterion("server_version <>", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionGreaterThan(Long value) { addCriterion("server_version >", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionGreaterThanOrEqualTo(Long value) { addCriterion("server_version >=", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionLessThan(Long value) { addCriterion("server_version <", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionLessThanOrEqualTo(Long value) { addCriterion("server_version <=", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionIn(List values) { addCriterion("server_version in", values, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionNotIn(List values) { addCriterion("server_version not in", values, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionBetween(Long value1, Long value2) { addCriterion("server_version between", value1, value2, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionNotBetween(Long value1, Long value2) { addCriterion("server_version not between", value1, value2, "serverVersion"); return (Criteria) this; } - + public Criteria andReportTypeIsNull() { addCriterion("report_type is null"); return (Criteria) this; } - + public Criteria andReportTypeIsNotNull() { addCriterion("report_type is not null"); return (Criteria) this; } - + public Criteria andReportTypeEqualTo(String value) { addCriterion("report_type =", value, "reportType"); return (Criteria) this; } - + public Criteria andReportTypeNotEqualTo(String value) { addCriterion("report_type <>", value, "reportType"); return (Criteria) this; } - + public Criteria andReportTypeGreaterThan(String value) { addCriterion("report_type >", value, "reportType"); return (Criteria) this; } - + public Criteria andReportTypeGreaterThanOrEqualTo(String value) { addCriterion("report_type >=", value, "reportType"); return (Criteria) this; } - + public Criteria andReportTypeLessThan(String value) { addCriterion("report_type <", value, "reportType"); return (Criteria) this; } - + public Criteria andReportTypeLessThanOrEqualTo(String value) { addCriterion("report_type <=", value, "reportType"); return (Criteria) this; } - + public Criteria andReportTypeLike(String value) { addCriterion("report_type like", value, "reportType"); return (Criteria) this; } - + public Criteria andReportTypeNotLike(String value) { addCriterion("report_type not like", value, "reportType"); return (Criteria) this; } - + public Criteria andReportTypeIn(List values) { addCriterion("report_type in", values, "reportType"); return (Criteria) this; } - + public Criteria andReportTypeNotIn(List values) { addCriterion("report_type not in", values, "reportType"); return (Criteria) this; } - + public Criteria andReportTypeBetween(String value1, String value2) { addCriterion("report_type between", value1, value2, "reportType"); return (Criteria) this; } - + public Criteria andReportTypeNotBetween(String value1, String value2) { addCriterion("report_type not between", value1, value2, "reportType"); return (Criteria) this; } - + public Criteria andProviderIdIsNull() { addCriterion("provider_id is null"); return (Criteria) this; } - + public Criteria andProviderIdIsNotNull() { addCriterion("provider_id is not null"); return (Criteria) this; } - + public Criteria andProviderIdEqualTo(String value) { addCriterion("provider_id =", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotEqualTo(String value) { addCriterion("provider_id <>", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdGreaterThan(String value) { addCriterion("provider_id >", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdGreaterThanOrEqualTo(String value) { addCriterion("provider_id >=", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLessThan(String value) { addCriterion("provider_id <", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLessThanOrEqualTo(String value) { addCriterion("provider_id <=", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLike(String value) { addCriterion("provider_id like", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotLike(String value) { addCriterion("provider_id not like", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdIn(List values) { addCriterion("provider_id in", values, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotIn(List values) { addCriterion("provider_id not in", values, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdBetween(String value1, String value2) { addCriterion("provider_id between", value1, value2, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotBetween(String value1, String value2) { addCriterion("provider_id not between", value1, value2, "providerId"); return (Criteria) this; } - + public Criteria andLocationIdIsNull() { addCriterion("location_id is null"); return (Criteria) this; } - + public Criteria andLocationIdIsNotNull() { addCriterion("location_id is not null"); return (Criteria) this; } - + public Criteria andLocationIdEqualTo(String value) { addCriterion("location_id =", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotEqualTo(String value) { addCriterion("location_id <>", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdGreaterThan(String value) { addCriterion("location_id >", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdGreaterThanOrEqualTo(String value) { addCriterion("location_id >=", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdLessThan(String value) { addCriterion("location_id <", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdLessThanOrEqualTo(String value) { addCriterion("location_id <=", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdLike(String value) { addCriterion("location_id like", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotLike(String value) { addCriterion("location_id not like", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdIn(List values) { addCriterion("location_id in", values, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotIn(List values) { addCriterion("location_id not in", values, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdBetween(String value1, String value2) { addCriterion("location_id between", value1, value2, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotBetween(String value1, String value2) { addCriterion("location_id not between", value1, value2, "locationId"); return (Criteria) this; } - + public Criteria andTeamIsNull() { addCriterion("team is null"); return (Criteria) this; } - + public Criteria andTeamIsNotNull() { addCriterion("team is not null"); return (Criteria) this; } - + public Criteria andTeamEqualTo(String value) { addCriterion("team =", value, "team"); return (Criteria) this; } - + public Criteria andTeamNotEqualTo(String value) { addCriterion("team <>", value, "team"); return (Criteria) this; } - + public Criteria andTeamGreaterThan(String value) { addCriterion("team >", value, "team"); return (Criteria) this; } - + public Criteria andTeamGreaterThanOrEqualTo(String value) { addCriterion("team >=", value, "team"); return (Criteria) this; } - + public Criteria andTeamLessThan(String value) { addCriterion("team <", value, "team"); return (Criteria) this; } - + public Criteria andTeamLessThanOrEqualTo(String value) { addCriterion("team <=", value, "team"); return (Criteria) this; } - + public Criteria andTeamLike(String value) { addCriterion("team like", value, "team"); return (Criteria) this; } - + public Criteria andTeamNotLike(String value) { addCriterion("team not like", value, "team"); return (Criteria) this; } - + public Criteria andTeamIn(List values) { addCriterion("team in", values, "team"); return (Criteria) this; } - + public Criteria andTeamNotIn(List values) { addCriterion("team not in", values, "team"); return (Criteria) this; } - + public Criteria andTeamBetween(String value1, String value2) { addCriterion("team between", value1, value2, "team"); return (Criteria) this; } - + public Criteria andTeamNotBetween(String value1, String value2) { addCriterion("team not between", value1, value2, "team"); return (Criteria) this; } - + public Criteria andTeamIdIsNull() { addCriterion("team_id is null"); return (Criteria) this; } - + public Criteria andTeamIdIsNotNull() { addCriterion("team_id is not null"); return (Criteria) this; } - + public Criteria andTeamIdEqualTo(String value) { addCriterion("team_id =", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotEqualTo(String value) { addCriterion("team_id <>", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdGreaterThan(String value) { addCriterion("team_id >", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdGreaterThanOrEqualTo(String value) { addCriterion("team_id >=", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdLessThan(String value) { addCriterion("team_id <", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdLessThanOrEqualTo(String value) { addCriterion("team_id <=", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdLike(String value) { addCriterion("team_id like", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotLike(String value) { addCriterion("team_id not like", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdIn(List values) { addCriterion("team_id in", values, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotIn(List values) { addCriterion("team_id not in", values, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdBetween(String value1, String value2) { addCriterion("team_id between", value1, value2, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotBetween(String value1, String value2) { addCriterion("team_id not between", value1, value2, "teamId"); return (Criteria) this; @@ -765,57 +766,65 @@ public Criteria andTeamIdNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.report_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; - + public String getCondition() { return condition; } - + public Object getValue() { return value; } - + public Object getSecondValue() { return secondValue; } - + public boolean isNoValue() { return noValue; } - + public boolean isSingleValue() { return singleValue; } - + public boolean isBetweenValue() { return betweenValue; } - + public boolean isListValue() { return listValue; } - + public String getTypeHandler() { return typeHandler; } - + protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } - + protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; @@ -827,11 +836,11 @@ protected Criterion(String condition, Object value, String typeHandler) { this.singleValue = true; } } - + protected Criterion(String condition, Object value) { this(condition, value, null); } - + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; @@ -840,7 +849,7 @@ protected Criterion(String condition, Object value, Object secondValue, String t this.typeHandler = typeHandler; this.betweenValue = true; } - + protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java index d5c6d3a9b7..453fdf6698 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Stock.java @@ -4,19 +4,19 @@ public class Stock { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock.id * @return the value of core.stock.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock.id * @param id the value for core.stock.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock.json * @return the value of core.stock.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock.json * @param json the value for core.stock.json - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java index 973a74be93..e84f4cde4a 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockExample.java @@ -6,23 +6,23 @@ public class StockExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public StockExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public StockExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,164 +119,165 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.stock - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected abstract static class GeneratedCriteria { + protected List criteria; - + protected GeneratedCriteria() { super(); criteria = new ArrayList(); } - + public boolean isValid() { return criteria.size() > 0; } - + public List getAllCriteria() { return criteria; } - + public List getCriteria() { return criteria; } - + protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } - + protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } - + protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } - + public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } - + public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } - + public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } - + public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } - + public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } - + public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } - + public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andJsonIsNull() { addCriterion("json is null"); return (Criteria) this; } - + public Criteria andJsonIsNotNull() { addCriterion("json is not null"); return (Criteria) this; } - + public Criteria andJsonEqualTo(Object value) { addCriterion("json =", value, "json"); return (Criteria) this; } - + public Criteria andJsonNotEqualTo(Object value) { addCriterion("json <>", value, "json"); return (Criteria) this; } - + public Criteria andJsonGreaterThan(Object value) { addCriterion("json >", value, "json"); return (Criteria) this; } - + public Criteria andJsonGreaterThanOrEqualTo(Object value) { addCriterion("json >=", value, "json"); return (Criteria) this; } - + public Criteria andJsonLessThan(Object value) { addCriterion("json <", value, "json"); return (Criteria) this; } - + public Criteria andJsonLessThanOrEqualTo(Object value) { addCriterion("json <=", value, "json"); return (Criteria) this; } - + public Criteria andJsonIn(List values) { addCriterion("json in", values, "json"); return (Criteria) this; } - + public Criteria andJsonNotIn(List values) { addCriterion("json not in", values, "json"); return (Criteria) this; } - + public Criteria andJsonBetween(Object value1, Object value2) { addCriterion("json between", value1, value2, "json"); return (Criteria) this; } - + public Criteria andJsonNotBetween(Object value1, Object value2) { addCriterion("json not between", value1, value2, "json"); return (Criteria) this; @@ -285,57 +286,65 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.stock - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; - + public String getCondition() { return condition; } - + public Object getValue() { return value; } - + public Object getSecondValue() { return secondValue; } - + public boolean isNoValue() { return noValue; } - + public boolean isSingleValue() { return singleValue; } - + public boolean isBetweenValue() { return betweenValue; } - + public boolean isListValue() { return listValue; } - + public String getTypeHandler() { return typeHandler; } - + protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } - + protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; @@ -347,11 +356,11 @@ protected Criterion(String condition, Object value, String typeHandler) { this.singleValue = true; } } - + protected Criterion(String condition, Object value) { this(condition, value, null); } - + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; @@ -360,7 +369,7 @@ protected Criterion(String condition, Object value, Object secondValue, String t this.typeHandler = typeHandler; this.betweenValue = true; } - + protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java index 732f01fc71..4633177dcb 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadata.java @@ -4,44 +4,44 @@ public class StockMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.stock_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long stockId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.server_version - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.location_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.team - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.stock_metadata.team_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ private String teamId; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.id * @return the value of core.stock_metadata.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getId() { return id; @@ -50,7 +50,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.id * @param id the value for core.stock_metadata.id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -59,7 +59,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.stock_id * @return the value of core.stock_metadata.stock_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getStockId() { return stockId; @@ -68,7 +68,7 @@ public Long getStockId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.stock_id * @param stockId the value for core.stock_metadata.stock_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setStockId(Long stockId) { this.stockId = stockId; @@ -77,7 +77,7 @@ public void setStockId(Long stockId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.server_version * @return the value of core.stock_metadata.server_version - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -86,7 +86,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.server_version * @param serverVersion the value for core.stock_metadata.server_version - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -95,7 +95,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.provider_id * @return the value of core.stock_metadata.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getProviderId() { return providerId; @@ -104,7 +104,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.provider_id * @param providerId the value for core.stock_metadata.provider_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -113,7 +113,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.location_id * @return the value of core.stock_metadata.location_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getLocationId() { return locationId; @@ -122,7 +122,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.location_id * @param locationId the value for core.stock_metadata.location_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -131,7 +131,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.team * @return the value of core.stock_metadata.team - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getTeam() { return team; @@ -140,7 +140,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.team * @param team the value for core.stock_metadata.team - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -149,7 +149,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.stock_metadata.team_id * @return the value of core.stock_metadata.team_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getTeamId() { return teamId; @@ -158,7 +158,7 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.stock_metadata.team_id * @param teamId the value for core.stock_metadata.team_id - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java index de73fd3103..d7e45348cf 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/StockMetadataExample.java @@ -6,23 +6,23 @@ public class StockMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.stock_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public StockMetadataExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public StockMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,504 +119,505 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.stock_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ protected abstract static class GeneratedCriteria { + protected List criteria; - + protected GeneratedCriteria() { super(); criteria = new ArrayList(); } - + public boolean isValid() { return criteria.size() > 0; } - + public List getAllCriteria() { return criteria; } - + public List getCriteria() { return criteria; } - + protected void addCriterion(String condition) { if (condition == null) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); } - + protected void addCriterion(String condition, Object value, String property) { if (value == null) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); } - + protected void addCriterion(String condition, Object value1, Object value2, String property) { if (value1 == null || value2 == null) { throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); } - + public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; } - + public Criteria andIdIsNotNull() { addCriterion("id is not null"); return (Criteria) this; } - + public Criteria andIdEqualTo(Long value) { addCriterion("id =", value, "id"); return (Criteria) this; } - + public Criteria andIdNotEqualTo(Long value) { addCriterion("id <>", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThan(Long value) { addCriterion("id >", value, "id"); return (Criteria) this; } - + public Criteria andIdGreaterThanOrEqualTo(Long value) { addCriterion("id >=", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThan(Long value) { addCriterion("id <", value, "id"); return (Criteria) this; } - + public Criteria andIdLessThanOrEqualTo(Long value) { addCriterion("id <=", value, "id"); return (Criteria) this; } - + public Criteria andIdIn(List values) { addCriterion("id in", values, "id"); return (Criteria) this; } - + public Criteria andIdNotIn(List values) { addCriterion("id not in", values, "id"); return (Criteria) this; } - + public Criteria andIdBetween(Long value1, Long value2) { addCriterion("id between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andIdNotBetween(Long value1, Long value2) { addCriterion("id not between", value1, value2, "id"); return (Criteria) this; } - + public Criteria andStockIdIsNull() { addCriterion("stock_id is null"); return (Criteria) this; } - + public Criteria andStockIdIsNotNull() { addCriterion("stock_id is not null"); return (Criteria) this; } - + public Criteria andStockIdEqualTo(Long value) { addCriterion("stock_id =", value, "stockId"); return (Criteria) this; } - + public Criteria andStockIdNotEqualTo(Long value) { addCriterion("stock_id <>", value, "stockId"); return (Criteria) this; } - + public Criteria andStockIdGreaterThan(Long value) { addCriterion("stock_id >", value, "stockId"); return (Criteria) this; } - + public Criteria andStockIdGreaterThanOrEqualTo(Long value) { addCriterion("stock_id >=", value, "stockId"); return (Criteria) this; } - + public Criteria andStockIdLessThan(Long value) { addCriterion("stock_id <", value, "stockId"); return (Criteria) this; } - + public Criteria andStockIdLessThanOrEqualTo(Long value) { addCriterion("stock_id <=", value, "stockId"); return (Criteria) this; } - + public Criteria andStockIdIn(List values) { addCriterion("stock_id in", values, "stockId"); return (Criteria) this; } - + public Criteria andStockIdNotIn(List values) { addCriterion("stock_id not in", values, "stockId"); return (Criteria) this; } - + public Criteria andStockIdBetween(Long value1, Long value2) { addCriterion("stock_id between", value1, value2, "stockId"); return (Criteria) this; } - + public Criteria andStockIdNotBetween(Long value1, Long value2) { addCriterion("stock_id not between", value1, value2, "stockId"); return (Criteria) this; } - + public Criteria andServerVersionIsNull() { addCriterion("server_version is null"); return (Criteria) this; } - + public Criteria andServerVersionIsNotNull() { addCriterion("server_version is not null"); return (Criteria) this; } - + public Criteria andServerVersionEqualTo(Long value) { addCriterion("server_version =", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionNotEqualTo(Long value) { addCriterion("server_version <>", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionGreaterThan(Long value) { addCriterion("server_version >", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionGreaterThanOrEqualTo(Long value) { addCriterion("server_version >=", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionLessThan(Long value) { addCriterion("server_version <", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionLessThanOrEqualTo(Long value) { addCriterion("server_version <=", value, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionIn(List values) { addCriterion("server_version in", values, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionNotIn(List values) { addCriterion("server_version not in", values, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionBetween(Long value1, Long value2) { addCriterion("server_version between", value1, value2, "serverVersion"); return (Criteria) this; } - + public Criteria andServerVersionNotBetween(Long value1, Long value2) { addCriterion("server_version not between", value1, value2, "serverVersion"); return (Criteria) this; } - + public Criteria andProviderIdIsNull() { addCriterion("provider_id is null"); return (Criteria) this; } - + public Criteria andProviderIdIsNotNull() { addCriterion("provider_id is not null"); return (Criteria) this; } - + public Criteria andProviderIdEqualTo(String value) { addCriterion("provider_id =", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotEqualTo(String value) { addCriterion("provider_id <>", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdGreaterThan(String value) { addCriterion("provider_id >", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdGreaterThanOrEqualTo(String value) { addCriterion("provider_id >=", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLessThan(String value) { addCriterion("provider_id <", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLessThanOrEqualTo(String value) { addCriterion("provider_id <=", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdLike(String value) { addCriterion("provider_id like", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotLike(String value) { addCriterion("provider_id not like", value, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdIn(List values) { addCriterion("provider_id in", values, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotIn(List values) { addCriterion("provider_id not in", values, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdBetween(String value1, String value2) { addCriterion("provider_id between", value1, value2, "providerId"); return (Criteria) this; } - + public Criteria andProviderIdNotBetween(String value1, String value2) { addCriterion("provider_id not between", value1, value2, "providerId"); return (Criteria) this; } - + public Criteria andLocationIdIsNull() { addCriterion("location_id is null"); return (Criteria) this; } - + public Criteria andLocationIdIsNotNull() { addCriterion("location_id is not null"); return (Criteria) this; } - + public Criteria andLocationIdEqualTo(String value) { addCriterion("location_id =", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotEqualTo(String value) { addCriterion("location_id <>", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdGreaterThan(String value) { addCriterion("location_id >", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdGreaterThanOrEqualTo(String value) { addCriterion("location_id >=", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdLessThan(String value) { addCriterion("location_id <", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdLessThanOrEqualTo(String value) { addCriterion("location_id <=", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdLike(String value) { addCriterion("location_id like", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotLike(String value) { addCriterion("location_id not like", value, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdIn(List values) { addCriterion("location_id in", values, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotIn(List values) { addCriterion("location_id not in", values, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdBetween(String value1, String value2) { addCriterion("location_id between", value1, value2, "locationId"); return (Criteria) this; } - + public Criteria andLocationIdNotBetween(String value1, String value2) { addCriterion("location_id not between", value1, value2, "locationId"); return (Criteria) this; } - + public Criteria andTeamIsNull() { addCriterion("team is null"); return (Criteria) this; } - + public Criteria andTeamIsNotNull() { addCriterion("team is not null"); return (Criteria) this; } - + public Criteria andTeamEqualTo(String value) { addCriterion("team =", value, "team"); return (Criteria) this; } - + public Criteria andTeamNotEqualTo(String value) { addCriterion("team <>", value, "team"); return (Criteria) this; } - + public Criteria andTeamGreaterThan(String value) { addCriterion("team >", value, "team"); return (Criteria) this; } - + public Criteria andTeamGreaterThanOrEqualTo(String value) { addCriterion("team >=", value, "team"); return (Criteria) this; } - + public Criteria andTeamLessThan(String value) { addCriterion("team <", value, "team"); return (Criteria) this; } - + public Criteria andTeamLessThanOrEqualTo(String value) { addCriterion("team <=", value, "team"); return (Criteria) this; } - + public Criteria andTeamLike(String value) { addCriterion("team like", value, "team"); return (Criteria) this; } - + public Criteria andTeamNotLike(String value) { addCriterion("team not like", value, "team"); return (Criteria) this; } - + public Criteria andTeamIn(List values) { addCriterion("team in", values, "team"); return (Criteria) this; } - + public Criteria andTeamNotIn(List values) { addCriterion("team not in", values, "team"); return (Criteria) this; } - + public Criteria andTeamBetween(String value1, String value2) { addCriterion("team between", value1, value2, "team"); return (Criteria) this; } - + public Criteria andTeamNotBetween(String value1, String value2) { addCriterion("team not between", value1, value2, "team"); return (Criteria) this; } - + public Criteria andTeamIdIsNull() { addCriterion("team_id is null"); return (Criteria) this; } - + public Criteria andTeamIdIsNotNull() { addCriterion("team_id is not null"); return (Criteria) this; } - + public Criteria andTeamIdEqualTo(String value) { addCriterion("team_id =", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotEqualTo(String value) { addCriterion("team_id <>", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdGreaterThan(String value) { addCriterion("team_id >", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdGreaterThanOrEqualTo(String value) { addCriterion("team_id >=", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdLessThan(String value) { addCriterion("team_id <", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdLessThanOrEqualTo(String value) { addCriterion("team_id <=", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdLike(String value) { addCriterion("team_id like", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotLike(String value) { addCriterion("team_id not like", value, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdIn(List values) { addCriterion("team_id in", values, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotIn(List values) { addCriterion("team_id not in", values, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdBetween(String value1, String value2) { addCriterion("team_id between", value1, value2, "teamId"); return (Criteria) this; } - + public Criteria andTeamIdNotBetween(String value1, String value2) { addCriterion("team_id not between", value1, value2, "teamId"); return (Criteria) this; @@ -625,57 +626,65 @@ public Criteria andTeamIdNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.stock_metadata - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ public static class Criterion { + private String condition; + private Object value; + private Object secondValue; + private boolean noValue; + private boolean singleValue; + private boolean betweenValue; + private boolean listValue; + private String typeHandler; - + public String getCondition() { return condition; } - + public Object getValue() { return value; } - + public Object getSecondValue() { return secondValue; } - + public boolean isNoValue() { return noValue; } - + public boolean isSingleValue() { return singleValue; } - + public boolean isBetweenValue() { return betweenValue; } - + public boolean isListValue() { return listValue; } - + public String getTypeHandler() { return typeHandler; } - + protected Criterion(String condition) { super(); this.condition = condition; this.typeHandler = null; this.noValue = true; } - + protected Criterion(String condition, Object value, String typeHandler) { super(); this.condition = condition; @@ -687,11 +696,11 @@ protected Criterion(String condition, Object value, String typeHandler) { this.singleValue = true; } } - + protected Criterion(String condition, Object value) { this(condition, value, null); } - + protected Criterion(String condition, Object value, Object secondValue, String typeHandler) { super(); this.condition = condition; @@ -700,7 +709,7 @@ protected Criterion(String condition, Object value, Object secondValue, String t this.typeHandler = typeHandler; this.betweenValue = true; } - + protected Criterion(String condition, Object value, Object secondValue) { this(condition, value, secondValue, null); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java new file mode 100644 index 0000000000..f6f7e7d1a0 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java @@ -0,0 +1,9 @@ +package org.opensrp.repository.postgres; + +public abstract class BaseRepositoryImpl { + + protected abstract Long retrievePrimaryKey(T t); + + protected abstract Object getUniqueField(T t); + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java index 049b779f40..08dbac5d18 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java @@ -1,17 +1,22 @@ package org.opensrp.repository.postgres; +import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; + import java.util.ArrayList; import java.util.Calendar; import java.util.List; import java.util.Map; import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.session.RowBounds; import org.joda.time.DateTime; import org.opensrp.common.AllConstants; import org.opensrp.domain.Client; import org.opensrp.domain.postgres.ClientMetadata; import org.opensrp.domain.postgres.ClientMetadataExample; import org.opensrp.repository.ClientsRepository; +import org.opensrp.repository.postgres.mapper.ClientMapper; +import org.opensrp.repository.postgres.mapper.ClientMetadataMapper; import org.opensrp.repository.postgres.mapper.custom.MyClientMapper; import org.opensrp.repository.postgres.mapper.custom.MyClientMetadataMapper; import org.opensrp.search.AddressSearchBean; @@ -22,23 +27,29 @@ import org.springframework.stereotype.Repository; @Repository -public class ClientsRepositoryImpl extends RepositoryHelper implements ClientsRepository { +public class ClientsRepositoryImpl extends BaseRepositoryImpl implements ClientsRepository { private static Logger logger = LoggerFactory.getLogger(ClientsRepository.class.toString()); @Autowired private MyClientMetadataMapper myClientMetadataMapper; + @Autowired + private ClientMetadataMapper clientMetadataMapper; + @Autowired private MyClientMapper myClientMapper; + @Autowired + private ClientMapper clientMapper; + @Override public Client get(String id) { if (StringUtils.isBlank(id)) { return null; } - org.opensrp.domain.postgres.Client pgClient = myClientMapper.selectByPrimaryKey(Long.valueOf(id)); + org.opensrp.domain.postgres.Client pgClient = myClientMapper.selectByDocumentId(id); if (pgClient == null) { return null; } @@ -51,24 +62,23 @@ public void add(Client entity) { return; } - org.opensrp.domain.postgres.Client pgClient = myClientMetadataMapper.selectOne(entity.getBaseEntityId()); - if (pgClient != null) { - update(entity); + if (retrievePrimaryKey(entity) != null) { //Client already added + return; } - pgClient = convert(entity); + org.opensrp.domain.postgres.Client pgClient = convert(entity, null); if (pgClient == null) { return; } int rowsAffected = myClientMapper.insertSelectiveAndSetId(pgClient); - if (rowsAffected <= 0 || pgClient.getId() == null) { + if (rowsAffected < 1 || pgClient.getId() == null) { return; } ClientMetadata clientMetadata = createMetadata(entity, pgClient.getId()); if (clientMetadata != null) { - myClientMetadataMapper.insertSelective(clientMetadata); + clientMetadataMapper.insertSelective(clientMetadata); } } @@ -78,18 +88,29 @@ public void update(Client entity) { return; } - org.opensrp.domain.postgres.Client pgClient = myClientMetadataMapper.selectOne(entity.getBaseEntityId()); + Long id = retrievePrimaryKey(entity); + if (id == null) { // Client not added + return; + } + + org.opensrp.domain.postgres.Client pgClient = convert(entity, id); if (pgClient == null) { return; } - org.opensrp.domain.postgres.Client convertedPgClient = convert(entity); - if (convertedPgClient == null) { + ClientMetadata clientMetadata = createMetadata(entity, id); + if (clientMetadata == null) { + return; + } + + int rowsAffected = clientMapper.updateByPrimaryKeySelective(pgClient); + if (rowsAffected < 1) { return; } - pgClient.setJson(convertedPgClient.getJson()); - myClientMapper.updateByPrimaryKey(pgClient); + ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); + clientMetadataExample.createCriteria().andClientIdEqualTo(id); + clientMetadataMapper.updateByExampleSelective(clientMetadata, clientMetadataExample); } @Override @@ -103,16 +124,20 @@ public void safeRemove(Client entity) { if (entity == null || entity.getBaseEntityId() == null) { return; } - org.opensrp.domain.postgres.Client pgClient = myClientMetadataMapper.selectOne(entity.getBaseEntityId()); - if (pgClient == null) { + + Long id = retrievePrimaryKey(entity); + if (id == null) { return; } ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); - clientMetadataExample.createCriteria().andClientIdEqualTo(pgClient.getId()); - myClientMetadataMapper.deleteByExample(clientMetadataExample); + clientMetadataExample.createCriteria().andClientIdEqualTo(id); + int rowsAffected = clientMetadataMapper.deleteByExample(clientMetadataExample); + if (rowsAffected < 1) { + return; + } - myClientMapper.deleteByPrimaryKey(pgClient.getId()); + clientMapper.deleteByPrimaryKey(id); } @Override @@ -120,14 +145,8 @@ public Client findByBaseEntityId(String baseEntityId) { if (StringUtils.isBlank(baseEntityId)) { return null; } - ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); - clientMetadataExample.createCriteria().andBaseEntityIdEqualTo(baseEntityId); - List clients = myClientMetadataMapper.selectMany(clientMetadataExample); - if (clients == null || clients.isEmpty()) { - return null; - } - - return convert(clients.get(0)); + org.opensrp.domain.postgres.Client pgClient = myClientMetadataMapper.selectOne(baseEntityId); + return convert(pgClient); } @Override @@ -137,76 +156,84 @@ public List findAllClients() { @Override public List findAllByIdentifier(String identifier) { - // TODO Auto-generated method stub - return null; + List clients = myClientMapper.selectByIdentifier(identifier); + return convert(clients); } @Override public List findAllByIdentifier(String identifierType, String identifier) { - // TODO Auto-generated method stub - return null; + List clients = myClientMapper.selectByIdentifierOfType(identifierType, + identifier); + return convert(clients); } @Override public List findAllByAttribute(String attributeType, String attribute) { - // TODO Auto-generated method stub - return null; + List clients = myClientMapper.selectByAttributeOfType(attributeType, attribute); + return convert(clients); } @Override public List findAllByMatchingName(String nameMatches) { - // TODO Auto-generated method stub - return null; + ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); + clientMetadataExample.createCriteria().andFirstNameLike(nameMatches); + clientMetadataExample.or(clientMetadataExample.createCriteria().andLastNameLike(nameMatches)); + List clients = myClientMetadataMapper.selectMany(clientMetadataExample); + return convert(clients); } @Override public List findByRelationshipIdAndDateCreated(String relationalId, String dateFrom, String dateTo) { - // TODO Auto-generated method stub - return null; + List clients = myClientMapper.selectByRelationshipIdAndDateCreated(relationalId, + dateFrom, dateTo); + return convert(clients); } public List findByRelationshipId(String relationshipType, String entityId) { - // TODO Auto-generated method stub - return null; + List clients = myClientMapper.selectByRelationshipIdOfType(relationshipType, + entityId); + return convert(clients); } @Override public List findByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean, DateTime lastEditFrom, DateTime lastEditTo) { // TODO Auto-generated method stub - return null; + return new ArrayList<>(); } @Override public List findByDynamicQuery(String query) { - // TODO Auto-generated method stub - return null; + List clients = myClientMapper.selectByDynamicQuery(query); + return convert(clients); } @Override public List findByCriteria(ClientSearchBean searchBean) { // TODO Auto-generated method stub - return null; + return new ArrayList<>(); } @Override public List findByCriteria(AddressSearchBean addressSearchBean, DateTime lastEditFrom, DateTime lastEditTo) { // TODO Auto-generated method stub - return null; + return new ArrayList<>(); } @Override public List findByRelationShip(String relationIndentier) { - // TODO Auto-generated method stub - return null; + List clients = myClientMapper.selectByRelationShip(relationIndentier); + return convert(clients); } @Override public List findByEmptyServerVersion() { ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); clientMetadataExample.createCriteria().andServerVersionIsNull(); + clientMetadataExample.setOrderByClause("client_id ASC"); - List clients = myClientMetadataMapper.selectMany(clientMetadataExample); + List clients = myClientMetadataMapper + .selectManyWithRowBounds(clientMetadataExample, new RowBounds(0, 200)); return convert(clients); } @@ -214,23 +241,42 @@ public List findByEmptyServerVersion() { public List findByServerVersion(long serverVersion) { ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); clientMetadataExample.createCriteria().andServerVersionEqualTo(serverVersion); + clientMetadataExample.setOrderByClause("server_version ASC"); - List clients = myClientMetadataMapper.selectMany(clientMetadataExample); + List clients = myClientMetadataMapper + .selectManyWithRowBounds(clientMetadataExample, new RowBounds(0, 1000)); return convert(clients); } @Override public List findByFieldValue(String field, List ids) { - // TODO Auto-generated method stub - return null; + if (field.equals(BASE_ENTITY_ID) && ids != null && !ids.isEmpty()) { + ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); + clientMetadataExample.createCriteria().andBaseEntityIdIn(ids); + + List clients = myClientMetadataMapper.selectMany(clientMetadataExample); + return convert(clients); + } + return new ArrayList<>(); } @Override public List notInOpenMRSByServerVersion(long serverVersion, Calendar calendar) { - // TODO Auto-generated method stub - return null; + long serverStartKey = serverVersion + 1; + long serverEndKey = calendar.getTimeInMillis(); + if (serverStartKey < serverEndKey) { + ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); + clientMetadataExample.createCriteria().andOpenmrsUuidIsNull().andServerVersionBetween(serverStartKey, + serverEndKey); + + List clients = myClientMetadataMapper + .selectManyWithRowBounds(clientMetadataExample, new RowBounds(0, 1000)); + return convert(clients); + } + return new ArrayList<>(); } + // Private Methods private List convert(List clients) { if (clients == null || clients.isEmpty()) { return new ArrayList<>(); @@ -248,52 +294,33 @@ private List convert(List clients) { } private Client convert(org.opensrp.domain.postgres.Client client) { - if (client == null || client.getJson() == null) { + if (client == null || client.getJson() == null || !(client.getJson() instanceof Client)) { return null; } - try { - - Object json = client.getJson(); - if (StringUtils.isBlank(json.toString())) { - return null; - } - - return RepositoryHelper.gson.fromJson(json.toString(), Client.class); - } - catch (Exception e) { - logger.error(e.getMessage(), e); - return null; - } + return (Client) client.getJson(); } - private org.opensrp.domain.postgres.Client convert(Client client) { + private org.opensrp.domain.postgres.Client convert(Client client, Long primaryKey) { if (client == null) { return null; } - try { - String jsonString = RepositoryHelper.gson.toJson(client); - - org.opensrp.domain.postgres.Client pgClient = new org.opensrp.domain.postgres.Client(); - pgClient.setJson(jsonString); - - return pgClient; - } - catch (Exception e) { - logger.error(e.getMessage(), e); - return null; - } + org.opensrp.domain.postgres.Client pgClient = new org.opensrp.domain.postgres.Client(); + pgClient.setId(primaryKey); + pgClient.setJson(client); + + return pgClient; } - private ClientMetadata createMetadata(Client client, Long savedId) { + private ClientMetadata createMetadata(Client client, Long clientId) { try { ClientMetadata clientMetadata = new ClientMetadata(); clientMetadata.setBaseEntityId(client.getBaseEntityId()); if (client.getBirthdate() != null) { clientMetadata.setBirthDate(client.getBirthdate().toDate()); } - clientMetadata.setClientId(savedId); + clientMetadata.setClientId(clientId); clientMetadata.setFirstName(client.getFirstName()); clientMetadata.setLastName(client.getLastName()); @@ -328,6 +355,7 @@ private ClientMetadata createMetadata(Client client, Long savedId) { clientMetadata.setUniqueId(uniqueId); clientMetadata.setOpenmrsUuid(openmrsUUID); + clientMetadata.setServerVersion(client.getServerVersion()); return clientMetadata; } catch (Exception e) { @@ -335,4 +363,31 @@ private ClientMetadata createMetadata(Client client, Long savedId) { return null; } } + + @Override + protected Long retrievePrimaryKey(Client t) { + Object uniqueId = getUniqueField(t); + if (uniqueId == null) { + return null; + } + + String baseEntityId = uniqueId.toString(); + + ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); + clientMetadataExample.createCriteria().andBaseEntityIdEqualTo(baseEntityId); + + org.opensrp.domain.postgres.Client pgClient = myClientMetadataMapper.selectOne(baseEntityId); + if (pgClient == null) { + return null; + } + return pgClient.getId(); + } + + @Override + protected Object getUniqueField(Client t) { + if (t == null) { + return null; + } + return t.getBaseEntityId(); + } } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/RepositoryHelper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/BaseTypeHandler.java similarity index 58% rename from opensrp-core/src/main/java/org/opensrp/repository/postgres/RepositoryHelper.java rename to opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/BaseTypeHandler.java index e6e02745d8..188908a451 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/RepositoryHelper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/BaseTypeHandler.java @@ -1,4 +1,4 @@ -package org.opensrp.repository.postgres; +package org.opensrp.repository.postgres.handler; import org.joda.time.DateTime; import org.opensrp.util.DateTimeTypeConverter; @@ -6,8 +6,9 @@ import com.google.gson.Gson; import com.google.gson.GsonBuilder; -public class RepositoryHelper { +public class BaseTypeHandler { + public static final Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") - .registerTypeAdapter(DateTime.class, new DateTimeTypeConverter()).create(); - -} \ No newline at end of file + .registerTypeAdapter(DateTime.class, new DateTimeTypeConverter()).create(); + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ClientTypeHandler.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ClientTypeHandler.java index 2a830ab348..98b6ca3b7f 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ClientTypeHandler.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ClientTypeHandler.java @@ -9,43 +9,66 @@ import org.apache.ibatis.type.JdbcType; import org.apache.ibatis.type.TypeHandler; import org.opensrp.domain.Client; -import org.opensrp.repository.postgres.RepositoryHelper; - -public class ClientTypeHandler implements TypeHandler { +import org.postgresql.util.PGobject; +public class ClientTypeHandler extends BaseTypeHandler implements TypeHandler { + @Override public void setParameter(PreparedStatement ps, int i, Client parameter, JdbcType jdbcType) throws SQLException { - if (parameter != null) { - String jsonString = RepositoryHelper.gson.toJson(parameter); - ps.setObject(i, jsonString); + try { + if (parameter != null) { + String jsonString = gson.toJson(parameter); + PGobject jsonObject = new PGobject(); + jsonObject.setType("jsonb"); + jsonObject.setValue(jsonString); + ps.setObject(i, jsonObject); + } + } + catch (Exception e) { + throw new SQLException(e); } } - + @Override public Client getResult(ResultSet rs, String columnName) throws SQLException { - String jsonString = rs.getString(columnName); - if (StringUtils.isBlank(jsonString)) { - return null; + try { + String jsonString = rs.getString(columnName); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return gson.fromJson(jsonString, Client.class); + } + catch (Exception e) { + throw new SQLException(e); } - return RepositoryHelper.gson.fromJson(jsonString, Client.class); } - + @Override public Client getResult(ResultSet rs, int columnIndex) throws SQLException { - String jsonString = rs.getString(columnIndex); - if (StringUtils.isBlank(jsonString)) { - return null; + try { + String jsonString = rs.getString(columnIndex); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return gson.fromJson(jsonString, Client.class); + } + catch (Exception e) { + throw new SQLException(e); } - return RepositoryHelper.gson.fromJson(jsonString, Client.class); } - + @Override public Client getResult(CallableStatement cs, int columnIndex) throws SQLException { - String jsonString = cs.getString(columnIndex); - if (StringUtils.isBlank(jsonString)) { - return null; + try { + String jsonString = cs.getString(columnIndex); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return gson.fromJson(jsonString, Client.class); + } + catch (Exception e) { + throw new SQLException(e); } - return RepositoryHelper.gson.fromJson(jsonString, Client.class); } - + } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java index 6d02fe73d3..d6f1768de3 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java @@ -4,93 +4,79 @@ import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.Action; import org.opensrp.domain.postgres.ActionExample; +import org.apache.ibatis.session.RowBounds; public interface ActionMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - long countByExample(ActionExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByExample(ActionExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + long countByExample(ActionExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByExample(ActionExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insert(Action record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insertSelective(Action record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insert(Action record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - List selectByExample(ActionExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insertSelective(Action record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - Action selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExampleWithRowbounds(ActionExample example, RowBounds rowBounds); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Action record, @Param("example") ActionExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExample(ActionExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExample(@Param("record") Action record, @Param("example") ActionExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + Action selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKeySelective(Action record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Action record, @Param("example") ActionExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKey(Action record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExample(@Param("record") Action record, @Param("example") ActionExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKeySelective(Action record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKey(Action record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java index ab3004858c..a8f0cfa482 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java @@ -4,93 +4,79 @@ import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.ActionMetadata; import org.opensrp.domain.postgres.ActionMetadataExample; +import org.apache.ibatis.session.RowBounds; public interface ActionMetadataMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - long countByExample(ActionMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByExample(ActionMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + long countByExample(ActionMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByExample(ActionMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insert(ActionMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insertSelective(ActionMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insert(ActionMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - List selectByExample(ActionMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insertSelective(ActionMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - ActionMetadata selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExampleWithRowbounds(ActionMetadataExample example, RowBounds rowBounds); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExampleSelective(@Param("record") ActionMetadata record, @Param("example") ActionMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExample(ActionMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExample(@Param("record") ActionMetadata record, @Param("example") ActionMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + ActionMetadata selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKeySelective(ActionMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExampleSelective(@Param("record") ActionMetadata record, @Param("example") ActionMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.action_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKey(ActionMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExample(@Param("record") ActionMetadata record, @Param("example") ActionMetadataExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKeySelective(ActionMetadata record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.action_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKey(ActionMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java index 85a5e333d2..a103a9a286 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java @@ -4,93 +4,79 @@ import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.Alert; import org.opensrp.domain.postgres.AlertExample; +import org.apache.ibatis.session.RowBounds; public interface AlertMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - long countByExample(AlertExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByExample(AlertExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + long countByExample(AlertExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByExample(AlertExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insert(Alert record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insertSelective(Alert record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insert(Alert record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - List selectByExample(AlertExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insertSelective(Alert record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - Alert selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExampleWithRowbounds(AlertExample example, RowBounds rowBounds); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Alert record, @Param("example") AlertExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExample(AlertExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExample(@Param("record") Alert record, @Param("example") AlertExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + Alert selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKeySelective(Alert record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Alert record, @Param("example") AlertExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKey(Alert record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExample(@Param("record") Alert record, @Param("example") AlertExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKeySelective(Alert record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKey(Alert record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java index c80bd2d4d9..0ffd442767 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java @@ -4,93 +4,79 @@ import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.AlertMetadata; import org.opensrp.domain.postgres.AlertMetadataExample; +import org.apache.ibatis.session.RowBounds; public interface AlertMetadataMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - long countByExample(AlertMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByExample(AlertMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + long countByExample(AlertMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByExample(AlertMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insert(AlertMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insertSelective(AlertMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insert(AlertMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - List selectByExample(AlertMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insertSelective(AlertMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - AlertMetadata selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExampleWithRowbounds(AlertMetadataExample example, RowBounds rowBounds); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExampleSelective(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExample(AlertMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExample(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + AlertMetadata selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKeySelective(AlertMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExampleSelective(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.alert_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKey(AlertMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExample(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKeySelective(AlertMetadata record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKey(AlertMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AppStateTokenMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AppStateTokenMapper.java index d308a66011..fa89ab8f9f 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AppStateTokenMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AppStateTokenMapper.java @@ -4,93 +4,79 @@ import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.AppStateToken; import org.opensrp.domain.postgres.AppStateTokenExample; +import org.apache.ibatis.session.RowBounds; public interface AppStateTokenMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.app_state_token - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - long countByExample(AppStateTokenExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.app_state_token - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByExample(AppStateTokenExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + long countByExample(AppStateTokenExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.app_state_token - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByExample(AppStateTokenExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.app_state_token - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insert(AppStateToken record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.app_state_token - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insertSelective(AppStateToken record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insert(AppStateToken record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.app_state_token - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - List selectByExample(AppStateTokenExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insertSelective(AppStateToken record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.app_state_token - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - AppStateToken selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExampleWithRowbounds(AppStateTokenExample example, RowBounds rowBounds); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.app_state_token - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExampleSelective(@Param("record") AppStateToken record, @Param("example") AppStateTokenExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExample(AppStateTokenExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.app_state_token - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExample(@Param("record") AppStateToken record, @Param("example") AppStateTokenExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + AppStateToken selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.app_state_token - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKeySelective(AppStateToken record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExampleSelective(@Param("record") AppStateToken record, @Param("example") AppStateTokenExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.app_state_token - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKey(AppStateToken record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExample(@Param("record") AppStateToken record, @Param("example") AppStateTokenExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKeySelective(AppStateToken record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.app_state_token + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKey(AppStateToken record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java index 3a1c10f634..77a14e625e 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java @@ -4,93 +4,79 @@ import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.Client; import org.opensrp.domain.postgres.ClientExample; +import org.apache.ibatis.session.RowBounds; public interface ClientMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - long countByExample(ClientExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByExample(ClientExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + long countByExample(ClientExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByExample(ClientExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insert(Client record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insertSelective(Client record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insert(Client record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - List selectByExample(ClientExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insertSelective(Client record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - Client selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExampleWithRowbounds(ClientExample example, RowBounds rowBounds); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Client record, @Param("example") ClientExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExample(ClientExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExample(@Param("record") Client record, @Param("example") ClientExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + Client selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKeySelective(Client record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Client record, @Param("example") ClientExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.client - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKey(Client record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExample(@Param("record") Client record, @Param("example") ClientExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKeySelective(Client record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKey(Client record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java index b3d4849def..a80313d042 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java @@ -4,72 +4,79 @@ import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.ClientMetadata; import org.opensrp.domain.postgres.ClientMetadataExample; +import org.apache.ibatis.session.RowBounds; public interface ClientMetadataMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ long countByExample(ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ int deleteByExample(ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ int insert(ClientMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ int insertSelective(ClientMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExampleWithRowbounds(ClientMetadataExample example, RowBounds rowBounds); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ List selectByExample(ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ ClientMetadata selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ int updateByExampleSelective(@Param("record") ClientMetadata record, @Param("example") ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ int updateByExample(@Param("record") ClientMetadata record, @Param("example") ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ int updateByPrimaryKeySelective(ClientMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Tue Mar 13 15:19:52 EAT 2018 + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 */ int updateByPrimaryKey(ClientMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java index 5d5cf1e7bf..1cc8d9cf9f 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java @@ -4,93 +4,79 @@ import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.ErrorTrace; import org.opensrp.domain.postgres.ErrorTraceExample; +import org.apache.ibatis.session.RowBounds; public interface ErrorTraceMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - long countByExample(ErrorTraceExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByExample(ErrorTraceExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + long countByExample(ErrorTraceExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByExample(ErrorTraceExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insert(ErrorTrace record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insertSelective(ErrorTrace record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insert(ErrorTrace record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - List selectByExample(ErrorTraceExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insertSelective(ErrorTrace record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - ErrorTrace selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExampleWithRowbounds(ErrorTraceExample example, RowBounds rowBounds); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExampleSelective(@Param("record") ErrorTrace record, @Param("example") ErrorTraceExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExample(ErrorTraceExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExample(@Param("record") ErrorTrace record, @Param("example") ErrorTraceExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + ErrorTrace selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKeySelective(ErrorTrace record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExampleSelective(@Param("record") ErrorTrace record, @Param("example") ErrorTraceExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table error.error_trace - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKey(ErrorTrace record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExample(@Param("record") ErrorTrace record, @Param("example") ErrorTraceExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKeySelective(ErrorTrace record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKey(ErrorTrace record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java index cca5255496..43e039d1f8 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java @@ -4,93 +4,79 @@ import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.Event; import org.opensrp.domain.postgres.EventExample; +import org.apache.ibatis.session.RowBounds; public interface EventMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - long countByExample(EventExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByExample(EventExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + long countByExample(EventExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByExample(EventExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insert(Event record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insertSelective(Event record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insert(Event record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - List selectByExample(EventExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insertSelective(Event record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - Event selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExampleWithRowbounds(EventExample example, RowBounds rowBounds); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Event record, @Param("example") EventExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExample(EventExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExample(@Param("record") Event record, @Param("example") EventExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + Event selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKeySelective(Event record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Event record, @Param("example") EventExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKey(Event record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExample(@Param("record") Event record, @Param("example") EventExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKeySelective(Event record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKey(Event record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java index 71f27ad1a6..6b29adab1d 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java @@ -4,93 +4,79 @@ import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.EventMetadata; import org.opensrp.domain.postgres.EventMetadataExample; +import org.apache.ibatis.session.RowBounds; public interface EventMetadataMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - long countByExample(EventMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByExample(EventMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + long countByExample(EventMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByExample(EventMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insert(EventMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insertSelective(EventMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insert(EventMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - List selectByExample(EventMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insertSelective(EventMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - EventMetadata selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExampleWithRowbounds(EventMetadataExample example, RowBounds rowBounds); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExampleSelective(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExample(EventMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExample(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + EventMetadata selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKeySelective(EventMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExampleSelective(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.event_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKey(EventMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExample(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKeySelective(EventMetadata record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKey(EventMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java index c7d5060315..1fa1ee7d6a 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java @@ -4,93 +4,79 @@ import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.MultiMedia; import org.opensrp.domain.postgres.MultiMediaExample; +import org.apache.ibatis.session.RowBounds; public interface MultiMediaMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.multi_media - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - long countByExample(MultiMediaExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.multi_media - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByExample(MultiMediaExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + long countByExample(MultiMediaExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.multi_media - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByExample(MultiMediaExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.multi_media - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insert(MultiMedia record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.multi_media - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insertSelective(MultiMedia record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insert(MultiMedia record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.multi_media - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - List selectByExample(MultiMediaExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insertSelective(MultiMedia record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.multi_media - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - MultiMedia selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExampleWithRowbounds(MultiMediaExample example, RowBounds rowBounds); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.multi_media - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExampleSelective(@Param("record") MultiMedia record, @Param("example") MultiMediaExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExample(MultiMediaExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.multi_media - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExample(@Param("record") MultiMedia record, @Param("example") MultiMediaExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + MultiMedia selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.multi_media - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKeySelective(MultiMedia record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExampleSelective(@Param("record") MultiMedia record, @Param("example") MultiMediaExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.multi_media - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKey(MultiMedia record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExample(@Param("record") MultiMedia record, @Param("example") MultiMediaExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKeySelective(MultiMedia record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKey(MultiMedia record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java index ef4a192814..893aa0d523 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java @@ -4,93 +4,79 @@ import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.Report; import org.opensrp.domain.postgres.ReportExample; +import org.apache.ibatis.session.RowBounds; public interface ReportMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - long countByExample(ReportExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByExample(ReportExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + long countByExample(ReportExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByExample(ReportExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insert(Report record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insertSelective(Report record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insert(Report record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - List selectByExample(ReportExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insertSelective(Report record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - Report selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExampleWithRowbounds(ReportExample example, RowBounds rowBounds); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Report record, @Param("example") ReportExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExample(ReportExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExample(@Param("record") Report record, @Param("example") ReportExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + Report selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKeySelective(Report record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Report record, @Param("example") ReportExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKey(Report record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExample(@Param("record") Report record, @Param("example") ReportExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKeySelective(Report record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKey(Report record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java index 2aae6d1f40..e9e22d50c2 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java @@ -4,93 +4,79 @@ import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.ReportMetadata; import org.opensrp.domain.postgres.ReportMetadataExample; +import org.apache.ibatis.session.RowBounds; public interface ReportMetadataMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - long countByExample(ReportMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByExample(ReportMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + long countByExample(ReportMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByExample(ReportMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insert(ReportMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insertSelective(ReportMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insert(ReportMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - List selectByExample(ReportMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insertSelective(ReportMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - ReportMetadata selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExampleWithRowbounds(ReportMetadataExample example, RowBounds rowBounds); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExampleSelective(@Param("record") ReportMetadata record, @Param("example") ReportMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExample(ReportMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExample(@Param("record") ReportMetadata record, @Param("example") ReportMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + ReportMetadata selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKeySelective(ReportMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExampleSelective(@Param("record") ReportMetadata record, @Param("example") ReportMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.report_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKey(ReportMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExample(@Param("record") ReportMetadata record, @Param("example") ReportMetadataExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKeySelective(ReportMetadata record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKey(ReportMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java index f732325bfb..2d8cdfde30 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java @@ -4,93 +4,79 @@ import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.Stock; import org.opensrp.domain.postgres.StockExample; +import org.apache.ibatis.session.RowBounds; public interface StockMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - long countByExample(StockExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByExample(StockExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + long countByExample(StockExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByExample(StockExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insert(Stock record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insertSelective(Stock record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insert(Stock record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - List selectByExample(StockExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insertSelective(Stock record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - Stock selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExampleWithRowbounds(StockExample example, RowBounds rowBounds); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExampleSelective(@Param("record") Stock record, @Param("example") StockExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExample(StockExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExample(@Param("record") Stock record, @Param("example") StockExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + Stock selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKeySelective(Stock record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExampleSelective(@Param("record") Stock record, @Param("example") StockExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKey(Stock record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExample(@Param("record") Stock record, @Param("example") StockExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKeySelective(Stock record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKey(Stock record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java index f186e6a821..03005c81cb 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java @@ -4,93 +4,79 @@ import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.StockMetadata; import org.opensrp.domain.postgres.StockMetadataExample; +import org.apache.ibatis.session.RowBounds; public interface StockMetadataMapper { - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - long countByExample(StockMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByExample(StockMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + long countByExample(StockMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int deleteByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByExample(StockMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insert(StockMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int deleteByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int insertSelective(StockMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insert(StockMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - List selectByExample(StockMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int insertSelective(StockMetadata record); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - StockMetadata selectByPrimaryKey(Long id); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExampleWithRowbounds(StockMetadataExample example, RowBounds rowBounds); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExampleSelective(@Param("record") StockMetadata record, @Param("example") StockMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + List selectByExample(StockMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByExample(@Param("record") StockMetadata record, @Param("example") StockMetadataExample example); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + StockMetadata selectByPrimaryKey(Long id); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKeySelective(StockMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExampleSelective(@Param("record") StockMetadata record, @Param("example") StockMetadataExample example); - /** - * This method was generated by MyBatis Generator. - * This method corresponds to the database table core.stock_metadata - * - * @mbg.generated Mon Mar 12 18:42:21 EAT 2018 - */ - int updateByPrimaryKey(StockMetadata record); + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByExample(@Param("record") StockMetadata record, @Param("example") StockMetadataExample example); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKeySelective(StockMetadata record); + + /** + * This method was generated by MyBatis Generator. This method corresponds to the database table core.stock_metadata + * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + */ + int updateByPrimaryKey(StockMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMapper.java index fa7b2156e3..f7a605d586 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMapper.java @@ -1,10 +1,30 @@ package org.opensrp.repository.postgres.mapper.custom; +import java.util.List; + +import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.Client; -import org.opensrp.repository.postgres.mapper.ClientMapper; -public interface MyClientMapper extends ClientMapper { +public interface MyClientMapper { int insertSelectiveAndSetId(Client record); + Client selectByDocumentId(String documentId); + + List selectByIdentifier(String identifier); + + List selectByIdentifierOfType(@Param("identifierType") String identifierType, + @Param("identifier") String identifier); + + List selectByAttributeOfType(@Param("attributeType") String attributeType, @Param("attribute") String attribute); + + List selectByRelationshipIdAndDateCreated(@Param("relationalId") String relationalId, + @Param("dateFrom") String dateFrom, @Param("dateTo") String dateTo); + + List selectByRelationshipIdOfType(@Param("relationshipType") String relationshipType, + @Param("relationshipId") String relationshipId); + + List selectByRelationShip(String relationshipId); + + List selectByDynamicQuery(String query); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMetadataMapper.java index 64d8c704af..f4b43e2b96 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMetadataMapper.java @@ -2,13 +2,15 @@ import java.util.List; +import org.apache.ibatis.session.RowBounds; import org.opensrp.domain.postgres.Client; import org.opensrp.domain.postgres.ClientMetadataExample; -import org.opensrp.repository.postgres.mapper.ClientMetadataMapper; -public interface MyClientMetadataMapper extends ClientMetadataMapper { +public interface MyClientMetadataMapper { List selectMany(ClientMetadataExample example); + List selectManyWithRowBounds(ClientMetadataExample example, RowBounds rowBounds); + Client selectOne(String baseEntityId); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMapper.xml index 3ba2d44001..f50ebba727 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMapper.xml @@ -1,6 +1,20 @@ + + + + + + + + + + id, json + + + insert into core.client @@ -17,8 +31,101 @@ #{id,jdbcType=BIGINT}, - #{json,jdbcType=OTHER}, + #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler}, + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMetadataMapper.xml index 8174e2d02e..62968bded6 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMetadataMapper.xml @@ -1,47 +1,58 @@ - + + + - + + + c.id, c.json + + - - - - - - - - - and cm.${criterion.condition} - - - and cm.${criterion.condition} #{criterion.value} - - - and cm.${criterion.condition} #{criterion.value} and #{criterion.secondValue} - - - and cm.${criterion.condition} - - #{listItem} - - - - - - - - - + + + + + + + + + and cm.${criterion.condition} + + + and cm.${criterion.condition} #{criterion.value} + + + and cm.${criterion.condition} #{criterion.value} + and + #{criterion.secondValue} + + + and cm.${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMapper.xml index f3f67ff288..86c4c68757 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.action where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.action @@ -140,7 +140,7 @@ insert into core.action (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.action @@ -173,7 +173,7 @@ select count(*) from core.action @@ -184,7 +184,7 @@ update core.action @@ -203,7 +203,7 @@ update core.action set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.action @@ -230,10 +230,29 @@ update core.action set json = #{json,jdbcType=OTHER} where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml index 94f8eb4578..3fad4bdded 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -20,7 +20,7 @@ @@ -54,7 +54,7 @@ @@ -88,7 +88,7 @@ id, action_id, base_entity_id, server_version, provider_id, location_id, team, team_id @@ -96,7 +96,7 @@ select @@ -115,7 +115,7 @@ select @@ -126,7 +126,7 @@ delete from core.action_metadata where id = #{id,jdbcType=BIGINT} @@ -135,7 +135,7 @@ delete from core.action_metadata @@ -146,7 +146,7 @@ insert into core.action_metadata (id, action_id, base_entity_id, server_version, provider_id, location_id, @@ -159,7 +159,7 @@ insert into core.action_metadata @@ -219,7 +219,7 @@ select count(*) from core.action_metadata @@ -230,7 +230,7 @@ update core.action_metadata @@ -267,7 +267,7 @@ update core.action_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -286,7 +286,7 @@ update core.action_metadata @@ -318,7 +318,7 @@ update core.action_metadata set action_id = #{actionId,jdbcType=BIGINT}, @@ -330,4 +330,23 @@ team_id = #{teamId,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml index e86b39125f..41041252fd 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.alert where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.alert @@ -140,7 +140,7 @@ insert into core.alert (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.alert @@ -173,7 +173,7 @@ select count(*) from core.alert @@ -184,7 +184,7 @@ update core.alert @@ -203,7 +203,7 @@ update core.alert set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.alert @@ -230,10 +230,29 @@ update core.alert set json = #{json,jdbcType=OTHER} where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml index 6beb4e4d10..25173a0cba 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -22,7 +22,7 @@ @@ -56,7 +56,7 @@ @@ -90,7 +90,7 @@ id, alert_id, base_entity_id, server_version, provider_id, location_id, team, team_id, is_active, trigger_name @@ -99,7 +99,7 @@ select @@ -118,7 +118,7 @@ select @@ -129,7 +129,7 @@ delete from core.alert_metadata where id = #{id,jdbcType=BIGINT} @@ -138,7 +138,7 @@ delete from core.alert_metadata @@ -149,7 +149,7 @@ insert into core.alert_metadata (id, alert_id, base_entity_id, server_version, provider_id, location_id, @@ -164,7 +164,7 @@ insert into core.alert_metadata @@ -236,7 +236,7 @@ select count(*) from core.alert_metadata @@ -247,7 +247,7 @@ update core.alert_metadata @@ -290,7 +290,7 @@ update core.alert_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -311,7 +311,7 @@ update core.alert_metadata @@ -349,7 +349,7 @@ update core.alert_metadata set alert_id = #{alertId,jdbcType=BIGINT}, @@ -363,4 +363,23 @@ trigger_name = #{triggerName,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AppStateTokenMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AppStateTokenMapper.xml index ac74d1b1cb..16f92d7bfc 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AppStateTokenMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AppStateTokenMapper.xml @@ -5,7 +5,7 @@ @@ -17,7 +17,7 @@ @@ -51,7 +51,7 @@ @@ -85,7 +85,7 @@ id, name, description, value, last_edited_date @@ -93,7 +93,7 @@ select @@ -112,7 +112,7 @@ select @@ -123,7 +123,7 @@ delete from core.app_state_token where id = #{id,jdbcType=BIGINT} @@ -132,7 +132,7 @@ delete from core.app_state_token @@ -143,7 +143,7 @@ insert into core.app_state_token (id, name, description, value, last_edited_date) @@ -154,7 +154,7 @@ insert into core.app_state_token @@ -196,7 +196,7 @@ select count(*) from core.app_state_token @@ -207,7 +207,7 @@ update core.app_state_token @@ -235,7 +235,7 @@ update core.app_state_token set id = #{record.id,jdbcType=BIGINT}, @@ -251,7 +251,7 @@ update core.app_state_token @@ -274,7 +274,7 @@ update core.app_state_token set name = #{name,jdbcType=VARCHAR}, @@ -283,4 +283,23 @@ last_edited_date = #{lastEditedDate,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml index 8266ed4590..bb06ea494d 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml @@ -5,16 +5,16 @@ - + @@ -39,6 +39,25 @@ + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler} and #{criterion.secondValue,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler} + + + and ${criterion.condition} + + #{listItem,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler} + + + + @@ -48,7 +67,7 @@ @@ -73,6 +92,25 @@ + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler} and #{criterion.secondValue,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler} + + + and ${criterion.condition} + + #{listItem,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler} + + + + @@ -82,7 +120,7 @@ id, json @@ -90,7 +128,7 @@ select @@ -109,7 +147,7 @@ select @@ -120,7 +158,7 @@ delete from core.client where id = #{id,jdbcType=BIGINT} @@ -129,7 +167,7 @@ delete from core.client @@ -140,16 +178,18 @@ - insert into core.client (id, json) - values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) + insert into core.client (id, json + ) + values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler} + ) insert into core.client @@ -165,7 +205,7 @@ #{id,jdbcType=BIGINT}, - #{json,jdbcType=OTHER}, + #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler}, @@ -173,7 +213,7 @@ select count(*) from core.client @@ -184,7 +224,7 @@ update core.client @@ -192,7 +232,7 @@ id = #{record.id,jdbcType=BIGINT}, - json = #{record.json,jdbcType=OTHER}, + json = #{record.json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler}, @@ -203,11 +243,11 @@ update core.client set id = #{record.id,jdbcType=BIGINT}, - json = #{record.json,jdbcType=OTHER} + json = #{record.json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler} @@ -216,12 +256,12 @@ update core.client - json = #{json,jdbcType=OTHER}, + json = #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler}, where id = #{id,jdbcType=BIGINT} @@ -230,10 +270,29 @@ update core.client - set json = #{json,jdbcType=OTHER} + set json = #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler} where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml index 82b34d3175..4689a03313 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -22,7 +22,7 @@ @@ -56,7 +56,7 @@ @@ -90,7 +90,7 @@ id, client_id, base_entity_id, relational_id, server_version, openmrs_uuid, unique_id, first_name, last_name, birth_date @@ -99,7 +99,7 @@ select @@ -118,7 +118,7 @@ select @@ -129,7 +129,7 @@ delete from core.client_metadata where id = #{id,jdbcType=BIGINT} @@ -138,7 +138,7 @@ delete from core.client_metadata @@ -149,7 +149,7 @@ insert into core.client_metadata (id, client_id, base_entity_id, relational_id, server_version, openmrs_uuid, @@ -164,7 +164,7 @@ insert into core.client_metadata @@ -236,7 +236,7 @@ select count(*) from core.client_metadata @@ -247,7 +247,7 @@ update core.client_metadata @@ -290,7 +290,7 @@ update core.client_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -311,7 +311,7 @@ update core.client_metadata @@ -349,7 +349,7 @@ update core.client_metadata set client_id = #{clientId,jdbcType=BIGINT}, @@ -363,4 +363,23 @@ birth_date = #{birthDate,jdbcType=DATE} where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ErrorTraceMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ErrorTraceMapper.xml index f2c7680be4..232ee3b8b9 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ErrorTraceMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ErrorTraceMapper.xml @@ -5,7 +5,7 @@ @@ -22,7 +22,7 @@ @@ -56,7 +56,7 @@ @@ -90,7 +90,7 @@ id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url @@ -99,7 +99,7 @@ select @@ -118,7 +118,7 @@ select @@ -129,7 +129,7 @@ delete from error.error_trace where id = #{id,jdbcType=BIGINT} @@ -138,7 +138,7 @@ delete from error.error_trace @@ -149,7 +149,7 @@ insert into error.error_trace (id, date_occurred, error_type, occurred_at, stack_trace, status, @@ -164,7 +164,7 @@ insert into error.error_trace @@ -236,7 +236,7 @@ select count(*) from error.error_trace @@ -247,7 +247,7 @@ update error.error_trace @@ -290,7 +290,7 @@ update error.error_trace set id = #{record.id,jdbcType=BIGINT}, @@ -311,7 +311,7 @@ update error.error_trace @@ -349,7 +349,7 @@ update error.error_trace set date_occurred = #{dateOccurred,jdbcType=DATE}, @@ -363,4 +363,23 @@ retry_url = #{retryUrl,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml index a9dedaa729..a08ec9bf33 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.event where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.event @@ -140,7 +140,7 @@ insert into core.event (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.event @@ -173,7 +173,7 @@ select count(*) from core.event @@ -184,7 +184,7 @@ update core.event @@ -203,7 +203,7 @@ update core.event set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.event @@ -230,10 +230,29 @@ update core.event set json = #{json,jdbcType=OTHER} where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml index e4e10c4fab..f0688a59b3 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -24,7 +24,7 @@ @@ -58,7 +58,7 @@ @@ -92,7 +92,7 @@ id, event_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, event_type, event_date, provider_id, location_id, team, team_id @@ -101,7 +101,7 @@ select @@ -120,7 +120,7 @@ select @@ -131,7 +131,7 @@ delete from core.event_metadata where id = #{id,jdbcType=BIGINT} @@ -140,7 +140,7 @@ delete from core.event_metadata @@ -151,7 +151,7 @@ insert into core.event_metadata (id, event_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, @@ -168,7 +168,7 @@ insert into core.event_metadata @@ -252,7 +252,7 @@ select count(*) from core.event_metadata @@ -263,7 +263,7 @@ update core.event_metadata @@ -312,7 +312,7 @@ update core.event_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -335,7 +335,7 @@ update core.event_metadata @@ -379,7 +379,7 @@ update core.event_metadata set event_id = #{eventId,jdbcType=BIGINT}, @@ -395,4 +395,23 @@ team_id = #{teamId,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/MultiMediaMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/MultiMediaMapper.xml index dbdd870dd6..014b002a36 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/MultiMediaMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/MultiMediaMapper.xml @@ -5,7 +5,7 @@ @@ -18,7 +18,7 @@ @@ -52,7 +52,7 @@ @@ -86,7 +86,7 @@ id, case_id, provider_id, content_type, file_path, file_category @@ -94,7 +94,7 @@ select @@ -113,7 +113,7 @@ select @@ -124,7 +124,7 @@ delete from core.multi_media where id = #{id,jdbcType=BIGINT} @@ -133,7 +133,7 @@ delete from core.multi_media @@ -144,7 +144,7 @@ insert into core.multi_media (id, case_id, provider_id, content_type, file_path, file_category @@ -157,7 +157,7 @@ insert into core.multi_media @@ -205,7 +205,7 @@ select count(*) from core.multi_media @@ -216,7 +216,7 @@ update core.multi_media @@ -247,7 +247,7 @@ update core.multi_media set id = #{record.id,jdbcType=BIGINT}, @@ -264,7 +264,7 @@ update core.multi_media @@ -290,7 +290,7 @@ update core.multi_media set case_id = #{caseId,jdbcType=VARCHAR}, @@ -300,4 +300,23 @@ file_category = #{fileCategory,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml index 2f982e1a5a..2fb8610fde 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.report where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.report @@ -140,7 +140,7 @@ insert into core.report (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.report @@ -173,7 +173,7 @@ select count(*) from core.report @@ -184,7 +184,7 @@ update core.report @@ -203,7 +203,7 @@ update core.report set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.report @@ -230,10 +230,29 @@ update core.report set json = #{json,jdbcType=OTHER} where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml index a5ea2f0369..f858c70a2e 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -21,7 +21,7 @@ @@ -55,7 +55,7 @@ @@ -89,7 +89,7 @@ id, report_id, base_entity_id, server_version, report_type, provider_id, location_id, team, team_id @@ -98,7 +98,7 @@ select @@ -117,7 +117,7 @@ select @@ -128,7 +128,7 @@ delete from core.report_metadata where id = #{id,jdbcType=BIGINT} @@ -137,7 +137,7 @@ delete from core.report_metadata @@ -148,7 +148,7 @@ insert into core.report_metadata (id, report_id, base_entity_id, server_version, report_type, provider_id, @@ -163,7 +163,7 @@ insert into core.report_metadata @@ -229,7 +229,7 @@ select count(*) from core.report_metadata @@ -240,7 +240,7 @@ update core.report_metadata @@ -280,7 +280,7 @@ update core.report_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -300,7 +300,7 @@ update core.report_metadata @@ -335,7 +335,7 @@ update core.report_metadata set report_id = #{reportId,jdbcType=BIGINT}, @@ -348,4 +348,23 @@ team_id = #{teamId,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMapper.xml index 97e22c2454..95b05977b7 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -48,7 +48,7 @@ @@ -82,7 +82,7 @@ id, json @@ -90,7 +90,7 @@ select @@ -109,7 +109,7 @@ select @@ -120,7 +120,7 @@ delete from core.stock where id = #{id,jdbcType=BIGINT} @@ -129,7 +129,7 @@ delete from core.stock @@ -140,7 +140,7 @@ insert into core.stock (id, json) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) @@ -149,7 +149,7 @@ insert into core.stock @@ -173,7 +173,7 @@ select count(*) from core.stock @@ -184,7 +184,7 @@ update core.stock @@ -203,7 +203,7 @@ update core.stock set id = #{record.id,jdbcType=BIGINT}, @@ -216,7 +216,7 @@ update core.stock @@ -230,10 +230,29 @@ update core.stock set json = #{json,jdbcType=OTHER} where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml index 879cb63f2c..a1ef77d30a 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -19,7 +19,7 @@ @@ -53,7 +53,7 @@ @@ -87,7 +87,7 @@ id, stock_id, server_version, provider_id, location_id, team, team_id @@ -95,7 +95,7 @@ select @@ -114,7 +114,7 @@ select @@ -125,7 +125,7 @@ delete from core.stock_metadata where id = #{id,jdbcType=BIGINT} @@ -134,7 +134,7 @@ delete from core.stock_metadata @@ -145,7 +145,7 @@ insert into core.stock_metadata (id, stock_id, server_version, provider_id, location_id, team, @@ -158,7 +158,7 @@ insert into core.stock_metadata @@ -212,7 +212,7 @@ select count(*) from core.stock_metadata @@ -223,7 +223,7 @@ update core.stock_metadata @@ -257,7 +257,7 @@ update core.stock_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -275,7 +275,7 @@ update core.stock_metadata @@ -304,7 +304,7 @@ update core.stock_metadata set stock_id = #{stockId,jdbcType=BIGINT}, @@ -315,4 +315,23 @@ team_id = #{teamId,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT} + \ No newline at end of file diff --git a/opensrp-web/pom.xml b/opensrp-web/pom.xml index 8884595bbc..0a7848ee5d 100644 --- a/opensrp-web/pom.xml +++ b/opensrp-web/pom.xml @@ -205,11 +205,6 @@ slf4j-log4j12 1.6.0 - mysql mysql-connector-java From 6976bdbb0c0ead4711f095eb10fdcc399ed5ac9d Mon Sep 17 00:00:00 2001 From: "Ephraim (Keyman) Muhia" Date: Thu, 15 Mar 2018 09:52:16 +0300 Subject: [PATCH 044/133] Merge pull request #417 from OpenSRP/issue401 Configure unit tests for Postgres Repositories --- .../repository/couch/AllAppStateTokens.java | 71 ++++++++++--------- 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java index 912ea9ca60..66b8369af2 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllAppStateTokens.java @@ -18,52 +18,52 @@ import com.mysql.jdbc.StringUtils; - @Repository("couchAppStateTokensRepository") @Primary public class AllAppStateTokens extends MotechBaseRepository implements AppStateTokensRepository { private CouchDbConnector db; - @Autowired - protected AllAppStateTokens(@Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) CouchDbConnector db) { - super(AppStateToken.class, db); - this.db=db; - } - - @GenerateView + @Autowired + protected AllAppStateTokens(@Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) CouchDbConnector db) { + super(AppStateToken.class, db); + this.db = db; + } + + @GenerateView public List findByName(String name) { - return queryView("by_name", name); + return queryView("by_name", name); } - @GenerateView - public List findByName(CouchDbConnector db,String name) { - return db.queryView(createQuery("by_name") - .includeDocs(true) - .key(name), - AppStateToken.class); + + @GenerateView + public List findByName(CouchDbConnector db, String name) { + return db.queryView(createQuery("by_name").includeDocs(true).key(name), AppStateToken.class); } - /** + + /** * @throws UpdateConflictException if there was an update conflict. */ public void update(AppStateToken entity) { Assert.notNull(entity, "entity may not be null"); db.update(entity); } + /** * @throws UpdateConflictException if there was an update conflict. */ public void add(AppStateToken entity) { - add(db,entity); + add(db, entity); } /** * @throws UpdateConflictException if there was an update conflict. */ - public void add(CouchDbConnector db,AppStateToken entity) { + public void add(CouchDbConnector db, AppStateToken entity) { Assert.notNull(entity, "entity may not be null"); Assert.isTrue(Documents.isNew(entity), "entity must be new"); db.create(entity); } + /** * Gets appstatetoken from the specified database * @@ -83,15 +83,15 @@ public AppStateToken getAppStateTokenByName(CouchDbConnector db, Enum tokenNa return ol.size() == 0 ? null : ol.get(0); } - - public void updateAppStateToken(CouchDbConnector db,Enum tokenName, Object value) { - List ol = findByName(db,tokenName.name()); - if(ol.size() > 1){ - throw new IllegalStateException("System was found to have multiple token with same name ("+tokenName.name()+"). This can lead to potential critical inconsistencies."); + public void updateAppStateToken(CouchDbConnector db, Enum tokenName, Object value) { + List ol = findByName(db, tokenName.name()); + if (ol.size() > 1) { + throw new IllegalStateException("System was found to have multiple token with same name (" + tokenName.name() + + "). This can lead to potential critical inconsistencies."); } - if(ol.size() == 0){ - throw new IllegalStateException("Property with name ("+tokenName.name()+") not found."); + if (ol.size() == 0) { + throw new IllegalStateException("Property with name (" + tokenName.name() + ") not found."); } AppStateToken ast = ol.get(0); @@ -101,7 +101,9 @@ public void updateAppStateToken(CouchDbConnector db,Enum tokenName, Object va } /** - * Registers a new token to manage the specified variable state (by token name) of App. The token is registered in the specified db + * Registers a new token to manage the specified variable state (by token name) of App. The + * token is registered in the specified db + * * @param db * @param tokenName * @param defaultValue @@ -109,22 +111,23 @@ public void updateAppStateToken(CouchDbConnector db,Enum tokenName, Object va * @param suppressExceptionIfExists * @return */ - public AppStateToken registerAppStateToken(CouchDbConnector db,Enum tokenName, Object defaultValue, String description, boolean suppressExceptionIfExists) { - if(tokenName == null || StringUtils.isEmptyOrWhitespaceOnly(description)){ + public AppStateToken registerAppStateToken(CouchDbConnector db, Enum tokenName, Object defaultValue, + String description, boolean suppressExceptionIfExists) { + if (tokenName == null || StringUtils.isEmptyOrWhitespaceOnly(description)) { throw new IllegalArgumentException("Token name and description must be provided"); } - List atl = findByName(db,tokenName.name()); - if(atl.size() > 0){ - if(!suppressExceptionIfExists){ - throw new IllegalArgumentException("Token with given name ("+tokenName.name()+") already exists."); + List atl = findByName(db, tokenName.name()); + if (atl.size() > 0) { + if (!suppressExceptionIfExists) { + throw new IllegalArgumentException("Token with given name (" + tokenName.name() + ") already exists."); } return atl.get(0); } AppStateToken token = new AppStateToken(tokenName.name(), defaultValue, 0L, description); - add(db,token); + add(db, token); return token; } - + } From a01b466384af19b19fa9190a0249036dc5e40951 Mon Sep 17 00:00:00 2001 From: Ephraim Muhia Date: Thu, 15 Mar 2018 09:57:40 +0300 Subject: [PATCH 045/133] Merge branch 'couchdb-to-postgres' into issue400 --- opensrp-core/pom.xml | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/opensrp-core/pom.xml b/opensrp-core/pom.xml index fc5a290532..a67205873f 100644 --- a/opensrp-core/pom.xml +++ b/opensrp-core/pom.xml @@ -244,11 +244,6 @@ mybatis-spring 1.1.0 - - org.postgresql - postgresql - 42.2.1.jre7 - org.jacoco org.jacoco.agent @@ -266,9 +261,9 @@ - postgresql + org.postgresql postgresql - 9.1-901-1.jdbc4 + 42.2.1.jre7 From 4812a9cd62cd3f6b79aa5e23d5de30126760f376 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 16 Mar 2018 11:54:04 +0300 Subject: [PATCH 046/133] Upgrade mybatis and spring-mybatis to support mapper inheritance --- opensrp-core/pom.xml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/opensrp-core/pom.xml b/opensrp-core/pom.xml index a67205873f..f9d42e614a 100644 --- a/opensrp-core/pom.xml +++ b/opensrp-core/pom.xml @@ -239,10 +239,16 @@ spring-orm ${spring.version} + + + org.mybatis + mybatis + 3.4.6 + org.mybatis mybatis-spring - 1.1.0 + 1.3.2 org.jacoco @@ -258,7 +264,6 @@ 7.0.85 - org.postgresql From 89c60d9e13e7105821e9e48b77f37a5e818df70a Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 16 Mar 2018 11:55:09 +0300 Subject: [PATCH 047/133] Implement postgres event repository --- .../AppStateTokensRepositoryImpl.java | 4 + .../postgres/BaseRepositoryImpl.java | 5 + .../postgres/EventsRepositoryImpl.java | 175 +++++++++++++++++- .../postgres/handler/EventTypeHandler.java | 75 ++++++++ .../mapper/custom/CustomEventMapper.java | 10 + .../custom/CustomEventMetadataMapper.java | 14 ++ .../mapper/custom/xml/CustomEventMapper.xml | 25 +++ .../custom/xml/CustomEventMetadataMapper.xml | 85 +++++++++ 8 files changed, 386 insertions(+), 7 deletions(-) create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/EventTypeHandler.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMetadataMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMetadataMapper.xml diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/AppStateTokensRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AppStateTokensRepositoryImpl.java index 33c9d0080d..575e573f73 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/AppStateTokensRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AppStateTokensRepositoryImpl.java @@ -3,6 +3,7 @@ import java.util.ArrayList; import java.util.List; +import org.apache.commons.lang3.StringUtils; import org.opensrp.domain.AppStateToken; import org.opensrp.domain.postgres.AppStateTokenExample; import org.opensrp.repository.AppStateTokensRepository; @@ -18,6 +19,9 @@ public class AppStateTokensRepositoryImpl implements AppStateTokensRepository { @Override public AppStateToken get(String id) { + if (StringUtils.isBlank(id)) { + return null; + } org.opensrp.domain.postgres.AppStateToken token = mapper.selectByPrimaryKey(Long.valueOf(id)); return getDomainEntity(token); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java index f6f7e7d1a0..e84fa1fefb 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java @@ -1,7 +1,12 @@ package org.opensrp.repository.postgres; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + public abstract class BaseRepositoryImpl { + protected static Logger logger = LoggerFactory.getLogger(BaseRepositoryImpl.class.toString()); + protected abstract Long retrievePrimaryKey(T t); protected abstract Object getUniqueField(T t); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java index 057efbcb11..2c717c7006 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java @@ -1,38 +1,113 @@ package org.opensrp.repository.postgres; +import java.util.ArrayList; import java.util.Calendar; import java.util.List; +import org.apache.commons.lang3.StringUtils; import org.joda.time.DateTime; +import org.opensrp.common.AllConstants; import org.opensrp.domain.Event; +import org.opensrp.domain.postgres.EventMetadata; +import org.opensrp.domain.postgres.EventMetadataExample; import org.opensrp.repository.EventsRepository; +import org.opensrp.repository.postgres.mapper.EventMapper; +import org.opensrp.repository.postgres.mapper.EventMetadataMapper; +import org.opensrp.repository.postgres.mapper.custom.CustomEventMapper; +import org.opensrp.repository.postgres.mapper.custom.CustomEventMetadataMapper; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; @Repository -public class EventsRepositoryImpl implements EventsRepository { +public class EventsRepositoryImpl extends BaseRepositoryImpl implements EventsRepository { + + @Autowired + private EventMapper eventMapper; + + @Autowired + private CustomEventMapper customEventMapper; + + @Autowired + private EventMetadataMapper eventMetadataMapper; + + @Autowired + private CustomEventMetadataMapper customEventMetadataMapper; @Override public Event get(String id) { - // TODO Auto-generated method stub - return null; + if (StringUtils.isBlank(id)) { + return null; + } + org.opensrp.domain.postgres.Event pgEvent = customEventMapper.selectByDocumentId(id); + if (pgEvent == null) { + return null; + } + return convert(pgEvent); } @Override public void add(Event entity) { - // TODO Auto-generated method stub + if (entity == null || entity.getBaseEntityId() == null) { + return; + } + + if (retrievePrimaryKey(entity) != null) { //Event already added + return; + } + + org.opensrp.domain.postgres.Event pgEvent = convert(entity, null); + if (pgEvent == null) { + return; + } + + int rowsAffected = customEventMapper.insertSelectiveAndSetId(pgEvent); + if (rowsAffected < 1 || pgEvent.getId() == null) { + return; + } + + EventMetadata eventMetadata = createMetadata(entity, pgEvent.getId()); + if (eventMetadata != null) { + eventMetadataMapper.insertSelective(eventMetadata); + } } @Override public void update(Event entity) { - // TODO Auto-generated method stub + if (entity == null || entity.getBaseEntityId() == null) { + return; + } + + Long id = retrievePrimaryKey(entity); + if (id == null) { // Event not added + return; + } + + org.opensrp.domain.postgres.Event pgEvent = convert(entity, id); + if (pgEvent == null) { + return; + } + + EventMetadata eventMetadata = createMetadata(entity, id); + if (eventMetadata == null) { + return; + } + + int rowsAffected = eventMapper.updateByPrimaryKeySelective(pgEvent); + if (rowsAffected < 1) { + return; + } + + EventMetadataExample eventMetadataExample = new EventMetadataExample(); + eventMetadataExample.createCriteria().andEventIdEqualTo(id); + eventMetadataMapper.updateByExampleSelective(eventMetadata, eventMetadataExample); } @Override public List getAll() { - // TODO Auto-generated method stub - return null; + List events = customEventMetadataMapper.selectMany(new EventMetadataExample()); + return convert(events); } @Override @@ -152,4 +227,90 @@ public List findEventByEventTypeBetweenTwoDates(String eventType) { return null; } + @Override + protected Long retrievePrimaryKey(Event t) { + Object uniqueId = getUniqueField(t); + if (uniqueId == null) { + return null; + } + + String baseEntityId = uniqueId.toString(); + + EventMetadataExample eventMetadataExample = new EventMetadataExample(); + eventMetadataExample.createCriteria().andBaseEntityIdEqualTo(baseEntityId); + + org.opensrp.domain.postgres.Event pgClient = customEventMetadataMapper.selectOne(baseEntityId); + if (pgClient == null) { + return null; + } + return pgClient.getId(); + } + + @Override + protected Object getUniqueField(Event t) { + if (t == null) { + return null; + } + return t.getBaseEntityId(); + } + + // Private Methods + private Event convert(org.opensrp.domain.postgres.Event event) { + if (event == null || event.getJson() == null || !(event.getJson() instanceof Event)) { + return null; + } + return (Event) event.getJson(); + } + + private org.opensrp.domain.postgres.Event convert(Event event, Long primaryKey) { + if (event == null) { + return null; + } + + org.opensrp.domain.postgres.Event pgEvent = new org.opensrp.domain.postgres.Event(); + pgEvent.setId(primaryKey); + pgEvent.setJson(event); + + return pgEvent; + } + + private List convert(List events) { + if (events == null || events.isEmpty()) { + return new ArrayList<>(); + } + + List convertedClients = new ArrayList<>(); + for (org.opensrp.domain.postgres.Event event : events) { + Event convertedEvent = convert(event); + if (convertedEvent != null) { + convertedClients.add(convertedEvent); + } + } + + return convertedClients; + } + + private EventMetadata createMetadata(Event event, Long eventId) { + try { + EventMetadata eventMetadata = new EventMetadata(); + eventMetadata.setBaseEntityId(event.getBaseEntityId()); + eventMetadata.setEventId(eventId); + eventMetadata.setBaseEntityId(event.getBaseEntityId()); + eventMetadata.setFormSubmissionId(event.getFormSubmissionId()); + eventMetadata.setOpenmrsUuid(event.getIdentifier(AllConstants.Client.OPENMRS_UUID_IDENTIFIER_TYPE)); + eventMetadata.setEventType(event.getEntityType()); + eventMetadata.setProviderId(event.getProviderId()); + eventMetadata.setLocationId(event.getLocationId()); + //TODO merge with PR that added team and teamid + //eventMetadata.setTeam(event.getTeam()); + //eventMetadata.setTeamId(event.getTeamId()); + eventMetadata.setServerVersion(event.getServerVersion()); + return eventMetadata; + } + catch (Exception e) { + logger.error(e.getMessage(), e); + return null; + } + } + } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/EventTypeHandler.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/EventTypeHandler.java new file mode 100644 index 0000000000..1ac64939d0 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/EventTypeHandler.java @@ -0,0 +1,75 @@ +package org.opensrp.repository.postgres.handler; + +import java.sql.CallableStatement; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.type.JdbcType; +import org.apache.ibatis.type.TypeHandler; +import org.postgresql.util.PGobject; + +import antlr.debug.Event; + +public class EventTypeHandler extends BaseTypeHandler implements TypeHandler { + + @Override + public void setParameter(PreparedStatement ps, int i, Event parameter, JdbcType jdbcType) throws SQLException { + try { + if (parameter != null) { + String jsonString = gson.toJson(parameter); + PGobject jsonObject = new PGobject(); + jsonObject.setType("jsonb"); + jsonObject.setValue(jsonString); + ps.setObject(i, jsonObject); + } + } + catch (Exception e) { + throw new SQLException(e); + } + } + + @Override + public Event getResult(ResultSet rs, String columnName) throws SQLException { + try { + String jsonString = rs.getString(columnName); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return gson.fromJson(jsonString, Event.class); + } + catch (Exception e) { + throw new SQLException(e); + } + } + + @Override + public Event getResult(ResultSet rs, int columnIndex) throws SQLException { + try { + String jsonString = rs.getString(columnIndex); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return gson.fromJson(jsonString, Event.class); + } + catch (Exception e) { + throw new SQLException(e); + } + } + + @Override + public Event getResult(CallableStatement cs, int columnIndex) throws SQLException { + try { + String jsonString = cs.getString(columnIndex); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return gson.fromJson(jsonString, Event.class); + } + catch (Exception e) { + throw new SQLException(e); + } + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java new file mode 100644 index 0000000000..cda7053a00 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java @@ -0,0 +1,10 @@ +package org.opensrp.repository.postgres.mapper.custom; + +import org.opensrp.domain.postgres.Event;; + +public interface CustomEventMapper { + + int insertSelectiveAndSetId(Event record); + + Event selectByDocumentId(String documentId); +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMetadataMapper.java new file mode 100644 index 0000000000..378f0bac54 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMetadataMapper.java @@ -0,0 +1,14 @@ +package org.opensrp.repository.postgres.mapper.custom; + +import java.util.List; + +import org.opensrp.domain.postgres.Event; +import org.opensrp.domain.postgres.EventMetadataExample; + +public interface CustomEventMetadataMapper { + + Event selectOne(String baseEntityId); + + List selectMany(EventMetadataExample eventMetadataExample); + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml new file mode 100644 index 0000000000..f2e021d592 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml @@ -0,0 +1,25 @@ + + + + + + + + + + + id, json + + + + + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMetadataMapper.xml new file mode 100644 index 0000000000..eb6387c9cc --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMetadataMapper.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + id, json + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and + #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + \ No newline at end of file From 9ea240a84d999388c1f23facbc3c901b2bccc4d6 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 16 Mar 2018 18:24:48 +0300 Subject: [PATCH 048/133] Implement events Repository, allow limit of limits fetched in database --- .../postgres/BaseRepositoryImpl.java | 2 + .../postgres/EventsRepositoryImpl.java | 169 +++++++++++++----- .../postgres/handler/EventTypeHandler.java | 2 +- .../mapper/custom/CustomEventMapper.java | 13 +- .../custom/CustomEventMetadataMapper.java | 7 +- .../mapper/custom/xml/CustomEventMapper.xml | 45 ++++- .../custom/xml/CustomEventMetadataMapper.xml | 70 +++++++- 7 files changed, 248 insertions(+), 60 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java index e84fa1fefb..ab8b636ec9 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java @@ -5,6 +5,8 @@ public abstract class BaseRepositoryImpl { + public static int DEFAULT_FETCH_SIZE = 1000; + protected static Logger logger = LoggerFactory.getLogger(BaseRepositoryImpl.class.toString()); protected abstract Long retrievePrimaryKey(T t); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java index 2c717c7006..bd3b44d03e 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java @@ -1,18 +1,19 @@ package org.opensrp.repository.postgres; import java.util.ArrayList; +import java.util.Arrays; import java.util.Calendar; import java.util.List; import org.apache.commons.lang3.StringUtils; import org.joda.time.DateTime; import org.opensrp.common.AllConstants; +import org.opensrp.common.AllConstants.BaseEntity; import org.opensrp.domain.Event; import org.opensrp.domain.postgres.EventMetadata; import org.opensrp.domain.postgres.EventMetadataExample; +import org.opensrp.domain.postgres.EventMetadataExample.Criteria; import org.opensrp.repository.EventsRepository; -import org.opensrp.repository.postgres.mapper.EventMapper; -import org.opensrp.repository.postgres.mapper.EventMetadataMapper; import org.opensrp.repository.postgres.mapper.custom.CustomEventMapper; import org.opensrp.repository.postgres.mapper.custom.CustomEventMetadataMapper; import org.springframework.beans.factory.annotation.Autowired; @@ -21,27 +22,21 @@ @Repository public class EventsRepositoryImpl extends BaseRepositoryImpl implements EventsRepository { - @Autowired - private EventMapper eventMapper; - - @Autowired - private CustomEventMapper customEventMapper; + public static String SERVER_VERSION = "server_version"; @Autowired - private EventMetadataMapper eventMetadataMapper; + private CustomEventMapper eventMapper; @Autowired - private CustomEventMetadataMapper customEventMetadataMapper; + private CustomEventMetadataMapper eventMetadataMapper; @Override public Event get(String id) { if (StringUtils.isBlank(id)) { return null; } - org.opensrp.domain.postgres.Event pgEvent = customEventMapper.selectByDocumentId(id); - if (pgEvent == null) { - return null; - } + org.opensrp.domain.postgres.Event pgEvent = eventMapper.selectByDocumentId(id); + return convert(pgEvent); } @@ -60,7 +55,7 @@ public void add(Event entity) { return; } - int rowsAffected = customEventMapper.insertSelectiveAndSetId(pgEvent); + int rowsAffected = eventMapper.insertSelectiveAndSetId(pgEvent); if (rowsAffected < 1 || pgEvent.getId() == null) { return; } @@ -106,87 +101,125 @@ public void update(Event entity) { @Override public List getAll() { - List events = customEventMetadataMapper.selectMany(new EventMetadataExample()); + List events = eventMetadataMapper.selectMany(new EventMetadataExample()); return convert(events); } @Override public void safeRemove(Event entity) { - // TODO Auto-generated method stub + if (entity == null || entity.getBaseEntityId() == null) { + return; + } + + Long id = retrievePrimaryKey(entity); + if (id == null) { + return; + } + + EventMetadataExample eventMetadataExample = new EventMetadataExample(); + eventMetadataExample.createCriteria().andEventIdEqualTo(id); + int rowsAffected = eventMetadataMapper.deleteByExample(eventMetadataExample); + if (rowsAffected < 1) { + return; + } + + eventMapper.deleteByPrimaryKey(id); } @Override public List findAllByIdentifier(String identifier) { - // TODO Auto-generated method stub - return null; + List events = eventMapper.selectByIdentifier(identifier); + return convert(events); } @Override public List findAllByIdentifier(String identifierType, String identifier) { - // TODO Auto-generated method stub - return null; + List events = eventMapper.selectByIdentifierOfType(identifierType, identifier); + return convert(events); } @Override public Event findById(String id) { - // TODO Auto-generated method stub - return null; + return get(id); } @Override public List findByFormSubmissionId(String formSubmissionId) { - // TODO Auto-generated method stub - return null; + EventMetadataExample example = new EventMetadataExample(); + example.createCriteria().andFormSubmissionIdEqualTo(formSubmissionId); + return convert(eventMetadataMapper.selectMany(example)); } @Override public List findByBaseEntityId(String baseEntityId) { - // TODO Auto-generated method stub - return null; + EventMetadataExample example = new EventMetadataExample(); + example.createCriteria().andBaseEntityIdEqualTo(baseEntityId); + return convert(eventMetadataMapper.selectMany(example)); } @Override public List findByBaseEntityAndFormSubmissionId(String baseEntityId, String formSubmissionId) { - // TODO Auto-generated method stub - return null; + EventMetadataExample example = new EventMetadataExample(); + example.createCriteria().andBaseEntityIdEqualTo(baseEntityId).andFormSubmissionIdEqualTo(formSubmissionId); + return convert(eventMetadataMapper.selectMany(example)); } @Override public List findByBaseEntityAndType(String baseEntityId, String eventType) { - // TODO Auto-generated method stub - return null; + EventMetadataExample example = new EventMetadataExample(); + example.createCriteria().andBaseEntityIdEqualTo(baseEntityId).andEventTypeEqualTo(eventType); + return convert(eventMetadataMapper.selectMany(example)); } @Override public List findEvents(String baseEntityId, DateTime from, DateTime to, String eventType, String entityType, String providerId, String locationId, DateTime lastEditFrom, DateTime lastEditTo) { - // TODO Auto-generated method stub - return null; + EventMetadataExample example = new EventMetadataExample(); + Criteria criteria = example.createCriteria(); + if (StringUtils.isNotEmpty(baseEntityId)) + criteria.andBaseEntityIdEqualTo(baseEntityId); + if (from != null && to != null) + criteria.andEventDateBetween(from.toDate(), to.toDate()); + if (StringUtils.isNotEmpty(eventType)) + criteria.andEventTypeEqualTo(eventType); + if (StringUtils.isNotEmpty(providerId)) + criteria.andProviderIdEqualTo(providerId); + if (StringUtils.isNotEmpty(locationId)) + criteria.andProviderIdEqualTo(locationId); + /* TODO remove after adding LastEdited to EventMetadata + if (lastEditFrom != null && lastEditTo != null) + criteria.andLastEditedBetween(from.toDate(), to.toDate());*/ + return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, DEFAULT_FETCH_SIZE)); } @Override public List findEventsByDynamicQuery(String query) { - // TODO Auto-generated method stub - return null; + throw new RuntimeException("Dynamic query feature not supported"); } @Override public List findByServerVersion(long serverVersion) { - // TODO Auto-generated method stub - return null; + EventMetadataExample example = new EventMetadataExample(); + example.createCriteria().andServerVersionGreaterThanOrEqualTo(serverVersion + 1); + return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, DEFAULT_FETCH_SIZE)); } @Override public List notInOpenMRSByServerVersion(long serverVersion, Calendar calendar) { - // TODO Auto-generated method stub - return null; + EventMetadataExample example = new EventMetadataExample(); + example.createCriteria().andServerVersionBetween(serverVersion + 1, calendar.getTimeInMillis()) + .andOpenmrsUuidIsNotNull().andOpenmrsUuidNotEqualTo(""); + return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, DEFAULT_FETCH_SIZE)); } @Override public List notInOpenMRSByServerVersionAndType(String type, long serverVersion, Calendar calendar) { - // TODO Auto-generated method stub - return null; + EventMetadataExample example = new EventMetadataExample(); + example.createCriteria().andEventTypeEqualTo(type) + .andServerVersionBetween(serverVersion + 1, calendar.getTimeInMillis()).andOpenmrsUuidIsNotNull() + .andOpenmrsUuidNotEqualTo(""); + return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, DEFAULT_FETCH_SIZE)); } @Override @@ -210,21 +243,62 @@ public List findByConceptAndValue(String concept, String conceptValue) { @Override public List findByEmptyServerVersion() { - // TODO Auto-generated method stub - return null; + EventMetadataExample example = new EventMetadataExample(); + example.createCriteria().andServerVersionIsNull(); + example.or(example.createCriteria().andServerVersionNotEqualTo(0l)); + return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, DEFAULT_FETCH_SIZE)); } @Override public List findEvents(String team, String providerId, String locationId, String baseEntityId, Long serverVersion, String sortBy, String sortOrder, int limit) { - // TODO Auto-generated method stub - return null; + EventMetadataExample example = new EventMetadataExample(); + Criteria criteria = example.createCriteria(); + //TODO refactor after adding team and teamid. provider can be list of values + if (StringUtils.isNotEmpty(team)) + criteria.andTeamEqualTo(team); + if (StringUtils.isNotEmpty(providerId)) { + if (providerId.contains(",")) { + String[] providersArray = org.apache.commons.lang.StringUtils.split(providerId, ","); + List providers = new ArrayList(Arrays.asList(providersArray)); + criteria.andProviderIdIn(providers); + } else { + criteria.andProviderIdEqualTo(providerId); + } + } + if (StringUtils.isNotEmpty(locationId)) { + if (locationId.contains(",")) { + String[] locationArray = org.apache.commons.lang.StringUtils.split(locationId, ","); + List locations = new ArrayList<>(Arrays.asList(locationArray)); + criteria.andLocationIdIn(locations); + } else { + criteria.andLocationIdEqualTo(locationId); + } + } + if (StringUtils.isNotEmpty(baseEntityId)) { + if (baseEntityId.contains(",")) { + String[] idsArray = org.apache.commons.lang.StringUtils.split(baseEntityId, ","); + List ids = new ArrayList(Arrays.asList(idsArray)); + criteria.andBaseEntityIdIn(ids); + } else { + criteria.andBaseEntityIdEqualTo(baseEntityId); + } + } + if (serverVersion != null) + criteria.andServerVersionGreaterThanOrEqualTo(serverVersion); + sortBy = sortBy == BaseEntity.SERVER_VERSIOIN ? SERVER_VERSION : sortBy; + example.setOrderByClause(sortBy + " " + sortOrder); + /* TODO remove after adding LastEdited to EventMetadata + if (lastEditFrom != null && lastEditTo != null) + criteria.andLastEditedBetween(from.toDate(), to.toDate());*/ + return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, limit)); } @Override public List findEventByEventTypeBetweenTwoDates(String eventType) { - // TODO Auto-generated method stub - return null; + EventMetadataExample example = new EventMetadataExample(); + example.createCriteria().andEventTypeEqualTo(eventType); + return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, DEFAULT_FETCH_SIZE)); } @Override @@ -239,7 +313,7 @@ protected Long retrievePrimaryKey(Event t) { EventMetadataExample eventMetadataExample = new EventMetadataExample(); eventMetadataExample.createCriteria().andBaseEntityIdEqualTo(baseEntityId); - org.opensrp.domain.postgres.Event pgClient = customEventMetadataMapper.selectOne(baseEntityId); + org.opensrp.domain.postgres.Event pgClient = eventMetadataMapper.selectOne(baseEntityId); if (pgClient == null) { return null; } @@ -299,6 +373,7 @@ private EventMetadata createMetadata(Event event, Long eventId) { eventMetadata.setFormSubmissionId(event.getFormSubmissionId()); eventMetadata.setOpenmrsUuid(event.getIdentifier(AllConstants.Client.OPENMRS_UUID_IDENTIFIER_TYPE)); eventMetadata.setEventType(event.getEntityType()); + eventMetadata.setEventDate(event.getEventDate().toDate()); eventMetadata.setProviderId(event.getProviderId()); eventMetadata.setLocationId(event.getLocationId()); //TODO merge with PR that added team and teamid diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/EventTypeHandler.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/EventTypeHandler.java index 1ac64939d0..d11b180f39 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/EventTypeHandler.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/EventTypeHandler.java @@ -8,9 +8,9 @@ import org.apache.commons.lang3.StringUtils; import org.apache.ibatis.type.JdbcType; import org.apache.ibatis.type.TypeHandler; +import org.opensrp.domain.Event; import org.postgresql.util.PGobject; -import antlr.debug.Event; public class EventTypeHandler extends BaseTypeHandler implements TypeHandler { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java index cda7053a00..a41dc8dba6 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java @@ -1,10 +1,19 @@ package org.opensrp.repository.postgres.mapper.custom; -import org.opensrp.domain.postgres.Event;; +import java.util.List; -public interface CustomEventMapper { +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.Event; +import org.opensrp.repository.postgres.mapper.EventMapper;; + +public interface CustomEventMapper extends EventMapper { int insertSelectiveAndSetId(Event record); Event selectByDocumentId(String documentId); + + List selectByIdentifier(String identifier); + + List selectByIdentifierOfType(@Param("identifierType") String identifierType, @Param("identifier") String identifier); + } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMetadataMapper.java index 378f0bac54..bcbbebc599 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMetadataMapper.java @@ -2,13 +2,18 @@ import java.util.List; +import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.Event; import org.opensrp.domain.postgres.EventMetadataExample; +import org.opensrp.repository.postgres.mapper.EventMetadataMapper; -public interface CustomEventMetadataMapper { +public interface CustomEventMetadataMapper extends EventMetadataMapper { Event selectOne(String baseEntityId); List selectMany(EventMetadataExample eventMetadataExample); + List selectManyWithRowBounds(@Param("example") EventMetadataExample example, + @Param("offset") int offset,@Param("limit") int limit); + } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml index f2e021d592..06bb74746d 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml @@ -12,7 +12,7 @@ id, json - + + + insert into core.event + + + id, + + + json, + + + + + #{id,jdbcType=BIGINT}, + + + #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.EventTypeHandler}, + + + + + + + + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMetadataMapper.xml index eb6387c9cc..5e1e7ea05d 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMetadataMapper.xml @@ -10,13 +10,10 @@ - id, json + e.id, e.json - @@ -24,17 +21,52 @@ - and ${criterion.condition} + and em.${criterion.condition} - and ${criterion.condition} #{criterion.value} + and em.${criterion.condition} #{criterion.value} - and ${criterion.condition} #{criterion.value} and + and em.${criterion.condition} #{criterion.value} + and #{criterion.secondValue} - and ${criterion.condition} + and em.${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and em.${criterion.condition} + + + and em.${criterion.condition} #{criterion.value} + + + and em.${criterion.condition} #{criterion.value} + and + #{criterion.secondValue} + + + and em.${criterion.condition} #{listItem} @@ -82,4 +114,26 @@ + + + + \ No newline at end of file From 3e8a28a5633f5aa4c45adf3564288bbb28ee2e57 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 19 Mar 2018 13:16:10 +0300 Subject: [PATCH 049/133] Completed postgres event Repository implementation --- .../migrations/generator/generatorConfig.xml | 19 +- .../20180307131329_create_event_table.sql | 1 + ...0307131558_create_event_metadata_table.sql | 3 + .../org/opensrp/domain/postgres/Event.java | 37 ++- .../opensrp/domain/postgres/EventExample.java | 178 ++++++++++++--- .../domain/postgres/EventMetadata.java | 141 +++++++++--- .../domain/postgres/EventMetadataExample.java | 212 ++++++++++++++++-- .../postgres/EventsRepositoryImpl.java | 20 +- .../postgres/mapper/EventMapper.java | 28 +-- .../postgres/mapper/EventMetadataMapper.java | 28 +-- .../mapper/custom/CustomEventMapper.java | 16 +- .../mapper/custom/xml/CustomEventMapper.xml | 55 ++++- .../postgres/mapper/xml/EventMapper.xml | 122 ++++++---- .../mapper/xml/EventMetadataMapper.xml | 106 +++++---- 14 files changed, 738 insertions(+), 228 deletions(-) diff --git a/assets/migrations/generator/generatorConfig.xml b/assets/migrations/generator/generatorConfig.xml index 9f82eba881..dc825c9110 100644 --- a/assets/migrations/generator/generatorConfig.xml +++ b/assets/migrations/generator/generatorConfig.xml @@ -2,9 +2,9 @@ + location="/Users/coder/Projects/opensrp-server/assets/migrations/drivers/postgresql-42.2.1.jar" /> - + -
+ +
+ typeHandler="org.opensrp.repository.postgres.handler.EventTypeHandler" />
- -
+
-
+ diff --git a/assets/migrations/scripts/20180307131329_create_event_table.sql b/assets/migrations/scripts/20180307131329_create_event_table.sql index e20a4dcdac..abf107bef0 100644 --- a/assets/migrations/scripts/20180307131329_create_event_table.sql +++ b/assets/migrations/scripts/20180307131329_create_event_table.sql @@ -21,6 +21,7 @@ CREATE TABLE core.event ( id bigserial NOT NULL, json jsonb NOT NULL, + date_deleted date, PRIMARY KEY (id) ) WITH ( diff --git a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql index 0f2eb49bea..8486dc2a21 100644 --- a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql +++ b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql @@ -31,6 +31,9 @@ CREATE TABLE core.event_metadata location_id character varying, team character varying, team_id character varying, + date_created date DEFAULT CURRENT_TIMESTAMP, + date_edited date, + date_deleted date, PRIMARY KEY (id) ) WITH ( diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java index 5bf048da39..8b99f5071a 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Event.java @@ -1,22 +1,29 @@ package org.opensrp.domain.postgres; +import java.util.Date; + public class Event { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event.json - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ private Object json; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event.date_deleted + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 + */ + private Date dateDeleted; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event.id * @return the value of core.event.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public Long getId() { return id; @@ -25,7 +32,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event.id * @param id the value for core.event.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +41,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event.json * @return the value of core.event.json - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public Object getJson() { return json; @@ -43,9 +50,27 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event.json * @param json the value for core.event.json - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setJson(Object json) { this.json = json; } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event.date_deleted + * @return the value of core.event.date_deleted + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 + */ + public Date getDateDeleted() { + return dateDeleted; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event.date_deleted + * @param dateDeleted the value for core.event.date_deleted + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 + */ + public void setDateDeleted(Date dateDeleted) { + this.dateDeleted = dateDeleted; + } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java index 942694aaa1..3368cb5192 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java @@ -2,27 +2,29 @@ import java.util.ArrayList; import java.util.List; +import java.util.Date; +import java.util.Iterator; public class EventExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public EventExample() { oredCriteria = new ArrayList(); @@ -30,7 +32,7 @@ public EventExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +40,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +48,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +56,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +64,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +72,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +80,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +90,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +102,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +111,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,23 +121,54 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ protected abstract static class GeneratedCriteria { + protected List jsonCriteria; + + protected List allCriteria; + protected List criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList(); + jsonCriteria = new ArrayList(); + } + + public List getJsonCriteria() { + return jsonCriteria; + } + + protected void addJsonCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + jsonCriteria.add(new Criterion(condition, value, "org.opensrp.repository.postgres.handler.EventTypeHandler")); + allCriteria = null; + } + + protected void addJsonCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + jsonCriteria.add( + new Criterion(condition, value1, value2, "org.opensrp.repository.postgres.handler.EventTypeHandler")); + allCriteria = null; } public boolean isValid() { - return criteria.size() > 0; + return criteria.size() > 0 || jsonCriteria.size() > 0; } public List getAllCriteria() { - return criteria; + if (allCriteria == null) { + allCriteria = new ArrayList(); + allCriteria.addAll(criteria); + allCriteria.addAll(jsonCriteria); + } + return allCriteria; } public List getCriteria() { @@ -147,6 +180,7 @@ protected void addCriterion(String condition) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); + allCriteria = null; } protected void addCriterion(String condition, Object value, String property) { @@ -154,6 +188,7 @@ protected void addCriterion(String condition, Object value, String property) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); + allCriteria = null; } protected void addCriterion(String condition, Object value1, Object value2, String property) { @@ -161,6 +196,33 @@ protected void addCriterion(String condition, Object value1, Object value2, Stri throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); + allCriteria = null; + } + + protected void addCriterionForJDBCDate(String condition, Date value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value.getTime()), property); + } + + protected void addCriterionForJDBCDate(String condition, List values, String property) { + if (values == null || values.size() == 0) { + throw new RuntimeException("Value list for " + property + " cannot be null or empty"); + } + List dateList = new ArrayList(); + Iterator iter = values.iterator(); + while (iter.hasNext()) { + dateList.add(new java.sql.Date(iter.next().getTime())); + } + addCriterion(condition, dateList, property); + } + + protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); } public Criteria andIdIsNull() { @@ -234,59 +296,119 @@ public Criteria andJsonIsNotNull() { } public Criteria andJsonEqualTo(Object value) { - addCriterion("json =", value, "json"); + addJsonCriterion("json =", value, "json"); return (Criteria) this; } public Criteria andJsonNotEqualTo(Object value) { - addCriterion("json <>", value, "json"); + addJsonCriterion("json <>", value, "json"); return (Criteria) this; } public Criteria andJsonGreaterThan(Object value) { - addCriterion("json >", value, "json"); + addJsonCriterion("json >", value, "json"); return (Criteria) this; } public Criteria andJsonGreaterThanOrEqualTo(Object value) { - addCriterion("json >=", value, "json"); + addJsonCriterion("json >=", value, "json"); return (Criteria) this; } public Criteria andJsonLessThan(Object value) { - addCriterion("json <", value, "json"); + addJsonCriterion("json <", value, "json"); return (Criteria) this; } public Criteria andJsonLessThanOrEqualTo(Object value) { - addCriterion("json <=", value, "json"); + addJsonCriterion("json <=", value, "json"); return (Criteria) this; } public Criteria andJsonIn(List values) { - addCriterion("json in", values, "json"); + addJsonCriterion("json in", values, "json"); return (Criteria) this; } public Criteria andJsonNotIn(List values) { - addCriterion("json not in", values, "json"); + addJsonCriterion("json not in", values, "json"); return (Criteria) this; } public Criteria andJsonBetween(Object value1, Object value2) { - addCriterion("json between", value1, value2, "json"); + addJsonCriterion("json between", value1, value2, "json"); return (Criteria) this; } public Criteria andJsonNotBetween(Object value1, Object value2) { - addCriterion("json not between", value1, value2, "json"); + addJsonCriterion("json not between", value1, value2, "json"); + return (Criteria) this; + } + + public Criteria andDateDeletedIsNull() { + addCriterion("date_deleted is null"); + return (Criteria) this; + } + + public Criteria andDateDeletedIsNotNull() { + addCriterion("date_deleted is not null"); + return (Criteria) this; + } + + public Criteria andDateDeletedEqualTo(Date value) { + addCriterionForJDBCDate("date_deleted =", value, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedNotEqualTo(Date value) { + addCriterionForJDBCDate("date_deleted <>", value, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedGreaterThan(Date value) { + addCriterionForJDBCDate("date_deleted >", value, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_deleted >=", value, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedLessThan(Date value) { + addCriterionForJDBCDate("date_deleted <", value, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_deleted <=", value, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedIn(List values) { + addCriterionForJDBCDate("date_deleted in", values, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedNotIn(List values) { + addCriterionForJDBCDate("date_deleted not in", values, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_deleted between", value1, value2, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_deleted not between", value1, value2, "dateDeleted"); return (Criteria) this; } } /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public static class Criterion { diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java index 7f65c1a71d..aab9703a68 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java @@ -6,69 +6,84 @@ public class EventMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ private Long eventId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.base_entity_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.form_submission_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ private String formSubmissionId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.server_version - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.openmrs_uuid - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ private String openmrsUuid; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_type - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ private String eventType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_date - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ private Date eventDate; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.provider_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.location_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.team - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.team_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ private String teamId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.date_created + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 + */ + private Date dateCreated; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.date_edited + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 + */ + private Date dateEdited; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.date_deleted + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 + */ + private Date dateDeleted; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.id * @return the value of core.event_metadata.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public Long getId() { return id; @@ -77,7 +92,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.id * @param id the value for core.event_metadata.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -86,7 +101,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_id * @return the value of core.event_metadata.event_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public Long getEventId() { return eventId; @@ -95,7 +110,7 @@ public Long getEventId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_id * @param eventId the value for core.event_metadata.event_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setEventId(Long eventId) { this.eventId = eventId; @@ -104,7 +119,7 @@ public void setEventId(Long eventId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.base_entity_id * @return the value of core.event_metadata.base_entity_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -113,7 +128,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.base_entity_id * @param baseEntityId the value for core.event_metadata.base_entity_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -122,7 +137,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.form_submission_id * @return the value of core.event_metadata.form_submission_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public String getFormSubmissionId() { return formSubmissionId; @@ -131,7 +146,7 @@ public String getFormSubmissionId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.form_submission_id * @param formSubmissionId the value for core.event_metadata.form_submission_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setFormSubmissionId(String formSubmissionId) { this.formSubmissionId = formSubmissionId; @@ -140,7 +155,7 @@ public void setFormSubmissionId(String formSubmissionId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.server_version * @return the value of core.event_metadata.server_version - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -149,7 +164,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.server_version * @param serverVersion the value for core.event_metadata.server_version - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -158,7 +173,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.openmrs_uuid * @return the value of core.event_metadata.openmrs_uuid - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public String getOpenmrsUuid() { return openmrsUuid; @@ -167,7 +182,7 @@ public String getOpenmrsUuid() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.openmrs_uuid * @param openmrsUuid the value for core.event_metadata.openmrs_uuid - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setOpenmrsUuid(String openmrsUuid) { this.openmrsUuid = openmrsUuid; @@ -176,7 +191,7 @@ public void setOpenmrsUuid(String openmrsUuid) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_type * @return the value of core.event_metadata.event_type - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public String getEventType() { return eventType; @@ -185,7 +200,7 @@ public String getEventType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_type * @param eventType the value for core.event_metadata.event_type - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setEventType(String eventType) { this.eventType = eventType; @@ -194,7 +209,7 @@ public void setEventType(String eventType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_date * @return the value of core.event_metadata.event_date - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public Date getEventDate() { return eventDate; @@ -203,7 +218,7 @@ public Date getEventDate() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_date * @param eventDate the value for core.event_metadata.event_date - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setEventDate(Date eventDate) { this.eventDate = eventDate; @@ -212,7 +227,7 @@ public void setEventDate(Date eventDate) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.provider_id * @return the value of core.event_metadata.provider_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public String getProviderId() { return providerId; @@ -221,7 +236,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.provider_id * @param providerId the value for core.event_metadata.provider_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -230,7 +245,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.location_id * @return the value of core.event_metadata.location_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public String getLocationId() { return locationId; @@ -239,7 +254,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.location_id * @param locationId the value for core.event_metadata.location_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -248,7 +263,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.team * @return the value of core.event_metadata.team - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public String getTeam() { return team; @@ -257,7 +272,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.team * @param team the value for core.event_metadata.team - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -266,7 +281,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.team_id * @return the value of core.event_metadata.team_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public String getTeamId() { return teamId; @@ -275,9 +290,63 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.team_id * @param teamId the value for core.event_metadata.team_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.date_created + * @return the value of core.event_metadata.date_created + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 + */ + public Date getDateCreated() { + return dateCreated; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.date_created + * @param dateCreated the value for core.event_metadata.date_created + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 + */ + public void setDateCreated(Date dateCreated) { + this.dateCreated = dateCreated; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.date_edited + * @return the value of core.event_metadata.date_edited + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 + */ + public Date getDateEdited() { + return dateEdited; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.date_edited + * @param dateEdited the value for core.event_metadata.date_edited + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 + */ + public void setDateEdited(Date dateEdited) { + this.dateEdited = dateEdited; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.date_deleted + * @return the value of core.event_metadata.date_deleted + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 + */ + public Date getDateDeleted() { + return dateDeleted; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.date_deleted + * @param dateDeleted the value for core.event_metadata.date_deleted + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 + */ + public void setDateDeleted(Date dateDeleted) { + this.dateDeleted = dateDeleted; + } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java index 1602a75953..f1fa732cfc 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java @@ -8,23 +8,23 @@ public class EventMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public EventMetadataExample() { oredCriteria = new ArrayList(); @@ -32,7 +32,7 @@ public EventMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -40,7 +40,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -48,7 +48,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -56,7 +56,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -64,7 +64,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -72,7 +72,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -80,7 +80,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -90,7 +90,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -102,7 +102,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -111,7 +111,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -121,7 +121,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ protected abstract static class GeneratedCriteria { @@ -990,11 +990,191 @@ public Criteria andTeamIdNotBetween(String value1, String value2) { addCriterion("team_id not between", value1, value2, "teamId"); return (Criteria) this; } + + public Criteria andDateCreatedIsNull() { + addCriterion("date_created is null"); + return (Criteria) this; + } + + public Criteria andDateCreatedIsNotNull() { + addCriterion("date_created is not null"); + return (Criteria) this; + } + + public Criteria andDateCreatedEqualTo(Date value) { + addCriterionForJDBCDate("date_created =", value, "dateCreated"); + return (Criteria) this; + } + + public Criteria andDateCreatedNotEqualTo(Date value) { + addCriterionForJDBCDate("date_created <>", value, "dateCreated"); + return (Criteria) this; + } + + public Criteria andDateCreatedGreaterThan(Date value) { + addCriterionForJDBCDate("date_created >", value, "dateCreated"); + return (Criteria) this; + } + + public Criteria andDateCreatedGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_created >=", value, "dateCreated"); + return (Criteria) this; + } + + public Criteria andDateCreatedLessThan(Date value) { + addCriterionForJDBCDate("date_created <", value, "dateCreated"); + return (Criteria) this; + } + + public Criteria andDateCreatedLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_created <=", value, "dateCreated"); + return (Criteria) this; + } + + public Criteria andDateCreatedIn(List values) { + addCriterionForJDBCDate("date_created in", values, "dateCreated"); + return (Criteria) this; + } + + public Criteria andDateCreatedNotIn(List values) { + addCriterionForJDBCDate("date_created not in", values, "dateCreated"); + return (Criteria) this; + } + + public Criteria andDateCreatedBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_created between", value1, value2, "dateCreated"); + return (Criteria) this; + } + + public Criteria andDateCreatedNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_created not between", value1, value2, "dateCreated"); + return (Criteria) this; + } + + public Criteria andDateEditedIsNull() { + addCriterion("date_edited is null"); + return (Criteria) this; + } + + public Criteria andDateEditedIsNotNull() { + addCriterion("date_edited is not null"); + return (Criteria) this; + } + + public Criteria andDateEditedEqualTo(Date value) { + addCriterionForJDBCDate("date_edited =", value, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedNotEqualTo(Date value) { + addCriterionForJDBCDate("date_edited <>", value, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedGreaterThan(Date value) { + addCriterionForJDBCDate("date_edited >", value, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_edited >=", value, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedLessThan(Date value) { + addCriterionForJDBCDate("date_edited <", value, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_edited <=", value, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedIn(List values) { + addCriterionForJDBCDate("date_edited in", values, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedNotIn(List values) { + addCriterionForJDBCDate("date_edited not in", values, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_edited between", value1, value2, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_edited not between", value1, value2, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateDeletedIsNull() { + addCriterion("date_deleted is null"); + return (Criteria) this; + } + + public Criteria andDateDeletedIsNotNull() { + addCriterion("date_deleted is not null"); + return (Criteria) this; + } + + public Criteria andDateDeletedEqualTo(Date value) { + addCriterionForJDBCDate("date_deleted =", value, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedNotEqualTo(Date value) { + addCriterionForJDBCDate("date_deleted <>", value, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedGreaterThan(Date value) { + addCriterionForJDBCDate("date_deleted >", value, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_deleted >=", value, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedLessThan(Date value) { + addCriterionForJDBCDate("date_deleted <", value, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_deleted <=", value, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedIn(List values) { + addCriterionForJDBCDate("date_deleted in", values, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedNotIn(List values) { + addCriterionForJDBCDate("date_deleted not in", values, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_deleted between", value1, value2, "dateDeleted"); + return (Criteria) this; + } + + public Criteria andDateDeletedNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_deleted not between", value1, value2, "dateDeleted"); + return (Criteria) this; + } } /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ public static class Criterion { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java index bd3b44d03e..080aa1705b 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java @@ -146,6 +146,7 @@ public Event findById(String id) { @Override public List findByFormSubmissionId(String formSubmissionId) { + //TODO convert findByFormSubmissionId to return single object EventMetadataExample example = new EventMetadataExample(); example.createCriteria().andFormSubmissionIdEqualTo(formSubmissionId); return convert(eventMetadataMapper.selectMany(example)); @@ -187,9 +188,8 @@ public List findEvents(String baseEntityId, DateTime from, DateTime to, S criteria.andProviderIdEqualTo(providerId); if (StringUtils.isNotEmpty(locationId)) criteria.andProviderIdEqualTo(locationId); - /* TODO remove after adding LastEdited to EventMetadata - if (lastEditFrom != null && lastEditTo != null) - criteria.andLastEditedBetween(from.toDate(), to.toDate());*/ + if (lastEditFrom != null && lastEditTo != null) + criteria.andDateEditedBetween(from.toDate(), to.toDate()); return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, DEFAULT_FETCH_SIZE)); } @@ -225,20 +225,19 @@ public List notInOpenMRSByServerVersionAndType(String type, long serverVe @Override public List findByClientAndConceptAndDate(String baseEntityId, String concept, String conceptValue, String dateFrom, String dateTo) { - // TODO Auto-generated method stub - return null; + return convert( + eventMapper.selectByBaseEntityIdConceptAndDate(baseEntityId, concept, conceptValue, dateFrom, dateTo)); } @Override public List findByBaseEntityIdAndConceptParentCode(String baseEntityId, String concept, String parentCode) { - // TODO Auto-generated method stub - return null; + return convert( + eventMapper.selectByBaseEntityIdAndConceptParentCode(baseEntityId, concept, parentCode)); } @Override public List findByConceptAndValue(String concept, String conceptValue) { - // TODO Auto-generated method stub - return null; + return convert(eventMapper.selectByConceptAndValue(concept, conceptValue)); } @Override @@ -288,9 +287,6 @@ public List findEvents(String team, String providerId, String locationId, criteria.andServerVersionGreaterThanOrEqualTo(serverVersion); sortBy = sortBy == BaseEntity.SERVER_VERSIOIN ? SERVER_VERSION : sortBy; example.setOrderByClause(sortBy + " " + sortOrder); - /* TODO remove after adding LastEdited to EventMetadata - if (lastEditFrom != null && lastEditTo != null) - criteria.andLastEditedBetween(from.toDate(), to.toDate());*/ return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, limit)); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java index 43e039d1f8..4123f2486f 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java @@ -10,73 +10,67 @@ public interface EventMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ long countByExample(EventExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ int deleteByExample(EventExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ int insert(Event record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ int insertSelective(Event record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 - */ - List selectByExampleWithRowbounds(EventExample example, RowBounds rowBounds); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ List selectByExample(EventExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ Event selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ int updateByExampleSelective(@Param("record") Event record, @Param("example") EventExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ int updateByExample(@Param("record") Event record, @Param("example") EventExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ int updateByPrimaryKeySelective(Event record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ int updateByPrimaryKey(Event record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java index 6b29adab1d..46f92a916c 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java @@ -10,73 +10,67 @@ public interface EventMetadataMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ long countByExample(EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ int deleteByExample(EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ int insert(EventMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ int insertSelective(EventMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 - */ - List selectByExampleWithRowbounds(EventMetadataExample example, RowBounds rowBounds); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ List selectByExample(EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ EventMetadata selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ int updateByExampleSelective(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ int updateByExample(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ int updateByPrimaryKeySelective(EventMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 19 11:54:09 EAT 2018 */ int updateByPrimaryKey(EventMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java index a41dc8dba6..82fbab2498 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java @@ -14,6 +14,18 @@ public interface CustomEventMapper extends EventMapper { List selectByIdentifier(String identifier); - List selectByIdentifierOfType(@Param("identifierType") String identifierType, @Param("identifier") String identifier); - + List selectByIdentifierOfType(@Param("identifierType") String identifierType, + @Param("identifier") String identifier); + + List selectByBaseEntityIdConceptAndDate(@Param("baseEntityId") String baseEntityId, + @Param("concept") String concept, + @Param("conceptValue") String conceptValue, + @Param("dateFrom") String dateFrom, @Param("dateTo") String dateTo); + + List selectByBaseEntityIdAndConceptParentCode(@Param("baseEntityId") String baseEntityId, + @Param("concept") String concept, + @Param("parentCode") String parentCode); + + List selectByConceptAndValue(@Param("concept") String concept, @Param("conceptValue") String conceptValue); + } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml index 06bb74746d..b9b3d37e15 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml @@ -60,8 +60,59 @@ from core.event where json -> 'identifiers' ->> - #{identifierType,jdbcType=VARCHAR} = - #{identifier,jdbcType=VARCHAR} + #{identifierType,jdbcType=VARCHAR} = + #{identifier,jdbcType=VARCHAR} + + + + + + + + + diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml index a08ec9bf33..382c35cabb 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml @@ -5,16 +5,17 @@ - + + @@ -39,6 +40,25 @@ + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.EventTypeHandler} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.EventTypeHandler} and #{criterion.secondValue,typeHandler=org.opensrp.repository.postgres.handler.EventTypeHandler} + + + and ${criterion.condition} + + #{listItem,typeHandler=org.opensrp.repository.postgres.handler.EventTypeHandler} + + + + @@ -48,7 +68,7 @@ @@ -73,6 +93,25 @@ + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.EventTypeHandler} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.EventTypeHandler} and #{criterion.secondValue,typeHandler=org.opensrp.repository.postgres.handler.EventTypeHandler} + + + and ${criterion.condition} + + #{listItem,typeHandler=org.opensrp.repository.postgres.handler.EventTypeHandler} + + + + @@ -82,15 +121,15 @@ - id, json + id, json, date_deleted - - select - - distinct - - - from core.event - - - - - order by ${orderByClause} - - \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml index f0688a59b3..91d3fb37cb 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -19,12 +19,15 @@ + + + @@ -58,7 +61,7 @@ @@ -92,16 +95,16 @@ id, event_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, event_type, - event_date, provider_id, location_id, team, team_id + event_date, provider_id, location_id, team, team_id, date_created, date_edited, date_deleted select count(*) from core.event_metadata @@ -263,7 +286,7 @@ update core.event_metadata @@ -303,6 +326,15 @@ team_id = #{record.teamId,jdbcType=VARCHAR}, + + date_created = #{record.dateCreated,jdbcType=DATE}, + + + date_edited = #{record.dateEdited,jdbcType=DATE}, + + + date_deleted = #{record.dateDeleted,jdbcType=DATE}, + @@ -312,7 +344,7 @@ update core.event_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -326,7 +358,10 @@ provider_id = #{record.providerId,jdbcType=VARCHAR}, location_id = #{record.locationId,jdbcType=VARCHAR}, team = #{record.team,jdbcType=VARCHAR}, - team_id = #{record.teamId,jdbcType=VARCHAR} + team_id = #{record.teamId,jdbcType=VARCHAR}, + date_created = #{record.dateCreated,jdbcType=DATE}, + date_edited = #{record.dateEdited,jdbcType=DATE}, + date_deleted = #{record.dateDeleted,jdbcType=DATE} @@ -335,7 +370,7 @@ update core.event_metadata @@ -372,6 +407,15 @@ team_id = #{teamId,jdbcType=VARCHAR}, + + date_created = #{dateCreated,jdbcType=DATE}, + + + date_edited = #{dateEdited,jdbcType=DATE}, + + + date_deleted = #{dateDeleted,jdbcType=DATE}, + where id = #{id,jdbcType=BIGINT} @@ -379,7 +423,7 @@ update core.event_metadata set event_id = #{eventId,jdbcType=BIGINT}, @@ -392,26 +436,10 @@ provider_id = #{providerId,jdbcType=VARCHAR}, location_id = #{locationId,jdbcType=VARCHAR}, team = #{team,jdbcType=VARCHAR}, - team_id = #{teamId,jdbcType=VARCHAR} + team_id = #{teamId,jdbcType=VARCHAR}, + date_created = #{dateCreated,jdbcType=DATE}, + date_edited = #{dateEdited,jdbcType=DATE}, + date_deleted = #{dateDeleted,jdbcType=DATE} where id = #{id,jdbcType=BIGINT} - \ No newline at end of file From 55db75a1cd8c8b5654e431630a5254ec5ef7f60d Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 22 Dec 2017 15:19:03 +0300 Subject: [PATCH 050/133] Add Team and TeamId to Event, client to Client in EC model --- .../src/main/java/org/opensrp/common/AllConstants.java | 4 ++++ .../src/main/java/org/opensrp/domain/Event.java | 2 +- .../repository/lucene/LuceneEventRepository.java | 10 ++++++++++ 3 files changed, 15 insertions(+), 1 deletion(-) diff --git a/opensrp-common/src/main/java/org/opensrp/common/AllConstants.java b/opensrp-common/src/main/java/org/opensrp/common/AllConstants.java index 9618ae28fb..98fa8f2091 100644 --- a/opensrp-common/src/main/java/org/opensrp/common/AllConstants.java +++ b/opensrp-common/src/main/java/org/opensrp/common/AllConstants.java @@ -107,6 +107,10 @@ public static class Event { public static final String OPENMRS_UUID_IDENTIFIER_TYPE = "OPENMRS_UUID"; + public static final String TEAM = "team"; + + public static final String TEAM_ID = "teamId"; + } public static class Stock { diff --git a/opensrp-core/src/main/java/org/opensrp/domain/Event.java b/opensrp-core/src/main/java/org/opensrp/domain/Event.java index 1049a080a4..d33ed88292 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/Event.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/Event.java @@ -281,7 +281,7 @@ public void setVersion(long version) { public String getTeamId() { return teamId; } - + public void setTeamId(String teamId) { this.teamId = teamId; } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneEventRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneEventRepository.java index 0971375a21..1df5b6c23c 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneEventRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneEventRepository.java @@ -152,6 +152,16 @@ public List getByCriteria(String team, String teamId,String providerId, S qf.eq(LOCATION_ID, locationId); } + if (locationId != null || !StringUtils.isEmptyOrWhitespaceOnly(locationId)) { + if (locationId.contains(",")) { + String[] locationArray = org.apache.commons.lang.StringUtils.split(locationId, ","); + List locations = new ArrayList<>(Arrays.asList(locationArray)); + qf.inList(LOCATION_ID, locations); + } else { + qf.eq(LOCATION_ID, locationId); + } + } + if (locationId != null || !StringUtils.isEmptyOrWhitespaceOnly(locationId)) { if (locationId.contains(",")) { String[] locationArray = org.apache.commons.lang.StringUtils.split(locationId, ","); From f7c40ed2e1599eb13648ba61144189083f5f1805 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Tue, 2 Jan 2018 15:39:12 +0300 Subject: [PATCH 051/133] Add getters --- opensrp-core/src/main/java/org/opensrp/domain/Event.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensrp-core/src/main/java/org/opensrp/domain/Event.java b/opensrp-core/src/main/java/org/opensrp/domain/Event.java index d33ed88292..1049a080a4 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/Event.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/Event.java @@ -281,7 +281,7 @@ public void setVersion(long version) { public String getTeamId() { return teamId; } - + public void setTeamId(String teamId) { this.teamId = teamId; } From 10bf513b3af05a1a0b68eb06fa290bd9b024481e Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Tue, 2 Jan 2018 16:20:06 +0300 Subject: [PATCH 052/133] Fix Codacy Complexity Issue --- .../lucene/LuceneEventRepository.java | 49 ++++++++----------- 1 file changed, 21 insertions(+), 28 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneEventRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneEventRepository.java index 1df5b6c23c..2aecc5e9e6 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneEventRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneEventRepository.java @@ -50,34 +50,16 @@ public List getByCriteria(String baseEntityId, DateTime eventDatefrom, Da LuceneQuery query = new LuceneQuery("Event", "by_all_criteria"); Query qf = new Query(FilterType.AND); - if (eventDatefrom != null && eventDateto != null) { - qf.between(EVENT_DATE, eventDatefrom, eventDateto); - } - if (lastEditFrom != null && lastEditTo != null) { - qf.between(LAST_UPDATE, lastEditFrom, lastEditTo); - } - if (!StringUtils.isEmptyOrWhitespaceOnly(baseEntityId)) { - qf.eq(BASE_ENTITY_ID, baseEntityId); - } - if (!StringUtils.isEmptyOrWhitespaceOnly(eventType)) { - qf.eq(EVENT_TYPE, eventType); - } - if (!StringUtils.isEmptyOrWhitespaceOnly(entityType)) { - qf.eq(ENTITY_TYPE, entityType); - } - if (!StringUtils.isEmptyOrWhitespaceOnly(providerId)) { - qf.eq(PROVIDER_ID, providerId); - } - if (!StringUtils.isEmptyOrWhitespaceOnly(locationId)) { - qf.eq(LOCATION_ID, locationId); - } - if (!StringUtils.isEmptyOrWhitespaceOnly(team)) { - qf.eq(TEAM, team); - } - if (!StringUtils.isEmptyOrWhitespaceOnly(teamId)) { - qf.eq(TEAM_ID, teamId); - } - + addQueryParameter(qf, EVENT_DATE, eventDatefrom, eventDateto); + addQueryParameter(qf, LAST_UPDATE, lastEditFrom, lastEditTo); + addQueryParameter(qf, BASE_ENTITY_ID, baseEntityId); + addQueryParameter(qf, EVENT_TYPE, eventType); + addQueryParameter(qf, ENTITY_TYPE, entityType); + addQueryParameter(qf, PROVIDER_ID, providerId); + addQueryParameter(qf, LOCATION_ID, locationId); + addQueryParameter(qf, TEAM, team); + addQueryParameter(qf, TEAM_ID, teamId); + if (StringUtils.isEmptyOrWhitespaceOnly(qf.query())) { throw new RuntimeException("Atleast one search filter must be specified"); } @@ -94,6 +76,17 @@ public List getByCriteria(String baseEntityId, DateTime eventDatefrom, Da throw new RuntimeException(e); } } + + private void addQueryParameter(Query query, String parameter, String value) { + if (!StringUtils.isEmptyOrWhitespaceOnly(value)) + query.eq(parameter, value); + } + + private void addQueryParameter(Query query, String parameter, DateTime from, DateTime to) { + if (from != null && to != null) { + query.between(parameter, from, to); + } + } /** * @param providerId- health worker id or comma separated health worker ids From abfe1b8e24dbbeb1957aa274fbeb2e977b6f52b2 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Wed, 3 Jan 2018 12:50:21 +0300 Subject: [PATCH 053/133] Change Client Lucene indexes --- .../opensrp/repository/lucene/LuceneClientRepository.java | 5 ++--- .../test/java/org/opensrp/service/OpenmrsIDServiceTest.java | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java index 6880db3f02..692dd08ff6 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java @@ -31,14 +31,13 @@ import com.github.ldriscoll.ektorplucene.LuceneResult; import com.github.ldriscoll.ektorplucene.designdocument.annotation.FullText; import com.github.ldriscoll.ektorplucene.designdocument.annotation.Index; -import com.mysql.jdbc.StringUtils; +import com.mysql.jdbc.StringUtils; @FullText({ @Index(name = "by_all_criteria", analyzer = "perfield:{baseEntityId:\"keyword\",mother:\"keyword\"}", index = "function (doc) { if(doc.type !== 'Client') return null; var docl = new Array(); var len = doc.addresses && doc.addresses.length >0 ? doc.addresses.length : 1; for(var al = 0; al < len; al++) { var arr1 = ['firstName', 'middleName', 'lastName', 'gender']; var arr2 = ['addressType', 'country', 'stateProvince', 'cityVillage', 'countyDistrict', 'subDistrict', 'town', 'subTown']; var ret = new Document(); var baseEntityId = doc.baseEntityId;ret.add(baseEntityId, {'field': 'baseEntityId'}); for(var i in arr1) { ret.add(doc[arr1[i]], {'field' : arr1[i]}); } for(var key in doc.attributes) { ret.add(doc.attributes[key], {'field' : key}); } if (doc.relationships) { for (var key in doc.relationships) { ret.add(doc.relationships[key], { 'field': key }); }} if(doc.addresses) { var ad = doc.addresses[al]; if(ad){ for(var i in arr2) { ret.add(ad[arr2[i]], {'field' : arr2[i]}); } } } var bd = doc.birthdate.substring(0, 19); ret.add(bd, {'field' : 'birthdate','type' : 'date'}); var crd = doc.dateCreated.substring(0, 19); ret.add(crd, {'field' : 'lastEdited','type' : 'date'}); if(doc.dateEdited){ var led = doc.dateEdited.substring(0, 19); ret.add(led, {'field' : 'lastEdited','type' : 'date'}); } docl.push(ret); } return docl; }"), @Index(name = "by_all_criteria_v2", analyzer = "perfield:{baseEntityId:\"keyword\",mother:\"keyword\"}", // index = "function (doc) { if(doc.type !== 'Client') return null; var docl = new Array(); var len = doc.addresses ? doc.addresses.length : 1; for(var al = 0; al < len; al++) { var arr1 = ['firstName', 'middleName', 'lastName', 'gender']; var arr2 = ['addressType', 'country', 'stateProvince', 'cityVillage', 'countyDistrict', 'subDistrict', 'town', 'subTown']; var ret = new Document(); var baseEntityId = doc.baseEntityId;ret.add(baseEntityId, {'field': 'baseEntityId'}); for(var i in arr1) { ret.add(doc[arr1[i]], {'field' : arr1[i]}); } for (var key in doc.identifiers) { ret.add(doc.identifiers[key], {'field': key}); } for(var key in doc.attributes) { ret.add(doc.attributes[key], {'field' : key}); } if(doc.addresses) { var ad = doc.addresses[al]; if(ad){ for(var i in arr2) { ret.add(ad[arr2[i]], {'field' : arr2[i]}); } } } var bd = doc.birthdate.substring(0, 19); ret.add(bd, {'field' : 'birthdate','type' : 'date'}); var crd = doc.dateCreated.substring(0, 19); ret.add(crd, {'field' : 'lastEdited','type' : 'date'}); if(doc.dateEdited){ var led = doc.dateEdited.substring(0, 19); ret.add(led, {'field' : 'lastEdited','type' : 'date'}); } docl.push(ret); } return docl; }" - index = "function (doc) { if(doc.type !== 'Client') return null; var docl = new Array(); var len = doc.addresses && doc.addresses.length >0 ? doc.addresses.length : 1; for(var al = 0; al < len; al++) { var arr1 = ['firstName', 'middleName', 'lastName', 'gender']; var arr2 = ['addressType', 'country', 'stateProvince', 'cityVillage', 'countyDistrict', 'subDistrict', 'town', 'subTown']; var ret = new Document(); var baseEntityId = doc.baseEntityId;ret.add(baseEntityId, {'field': 'baseEntityId'}); for(var i in arr1) { ret.add(doc[arr1[i]], {'field' : arr1[i]}); } for(var key in doc.attributes) { ret.add(doc.attributes[key], {'field' : key}); } if (doc.relationships) {for (var key in doc.relationships) {ret.add(doc.relationships[key][0], {'field': key });}} if(doc.addresses) { var ad = doc.addresses[al]; if(ad){ for(var i in arr2) { ret.add(ad[arr2[i]], {'field' : arr2[i]}); } } } var bd = doc.birthdate.substring(0, 19); ret.add(bd, {'field' : 'birthdate','type' : 'date'}); var crd = doc.dateCreated.substring(0, 19); ret.add(crd, {'field' : 'lastEdited','type' : 'date'}); if(doc.dateEdited){ var led = doc.dateEdited.substring(0, 19); ret.add(led, {'field' : 'lastEdited','type' : 'date'}); } docl.push(ret); } return docl; }" - + index = "function (doc) { if(doc.type !== 'Client') return null; var docl = new Array(); var len = doc.addresses && doc.addresses.length >0 ? doc.addresses.length : 1; for(var al = 0; al < len; al++) { var arr1 = ['firstName', 'middleName', 'lastName', 'gender']; var arr2 = ['addressType', 'country', 'stateProvince', 'cityVillage', 'countyDistrict', 'subDistrict', 'town', 'subTown']; var ret = new Document(); var baseEntityId = doc.baseEntityId;ret.add(baseEntityId, {'field': 'baseEntityId'}); for(var i in arr1) { ret.add(doc[arr1[i]], {'field' : arr1[i]}); } for(var key in doc.attributes) { ret.add(doc.attributes[key], {'field' : key}); } if (doc.relationships) {for (var key in doc.relationships) {ret.add(doc.relationships[key][0], {'field': key });}} if(doc.addresses) { var ad = doc.addresses[al]; if(ad){ for(var i in arr2) { ret.add(ad[arr2[i]], {'field' : arr2[i]}); } } } var bd = doc.birthdate.substring(0, 19); ret.add(bd, {'field' : 'birthdate','type' : 'date'}); var crd = doc.dateCreated.substring(0, 19); ret.add(crd, {'field' : 'lastEdited','type' : 'date'}); if(doc.dateEdited){ var led = doc.dateEdited.substring(0, 19); ret.add(led, {'field' : 'lastEdited','type' : 'date'}); } docl.push(ret); } return docl; }" ) }) @Component public class LuceneClientRepository extends CouchDbRepositorySupportWithLucene { diff --git a/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java index 60ae1904eb..c03fd11c53 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java @@ -109,7 +109,7 @@ public void testCheckClientWithFalseData() throws SQLException { @Test public void testCheckClientWithInvalidData() throws SQLException {Client client = this.createClient("*", "Jane", "Doe", "Female", "*"); - assertNull(openmrsIDService.checkIfClientExists(null)); + assertNull(openmrsIDService.checkIfClientExists(client)); } @Test From e203d8b92ff3f995b247bffd5dc1c6124e973586 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Wed, 3 Jan 2018 17:37:06 +0300 Subject: [PATCH 054/133] Correct Date Durations calculations --- .../src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java index c03fd11c53..60ae1904eb 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/OpenmrsIDServiceTest.java @@ -109,7 +109,7 @@ public void testCheckClientWithFalseData() throws SQLException { @Test public void testCheckClientWithInvalidData() throws SQLException {Client client = this.createClient("*", "Jane", "Doe", "Female", "*"); - assertNull(openmrsIDService.checkIfClientExists(client)); + assertNull(openmrsIDService.checkIfClientExists(null)); } @Test From ba34cf0378be6848108e343337572123a999f44c Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 4 Jan 2018 15:08:30 +0300 Subject: [PATCH 055/133] Trigger Codacy Analysis From 4ad98b9d5726d575284b710363ab390e7a8074c4 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 19 Mar 2018 15:20:06 +0300 Subject: [PATCH 056/133] Add team and teamId to postgres events repository --- .../postgres/EventsRepositoryImpl.java | 50 ++++++++++++------- .../mapper/custom/xml/CustomEventMapper.xml | 26 +++------- 2 files changed, 39 insertions(+), 37 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java index 080aa1705b..ccf0afae7a 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java @@ -175,7 +175,8 @@ public List findByBaseEntityAndType(String baseEntityId, String eventType @Override public List findEvents(String baseEntityId, DateTime from, DateTime to, String eventType, String entityType, - String providerId, String locationId, DateTime lastEditFrom, DateTime lastEditTo) { + String providerId, String locationId, DateTime lastEditFrom, DateTime lastEditTo, + String team, String teamId) { EventMetadataExample example = new EventMetadataExample(); Criteria criteria = example.createCriteria(); if (StringUtils.isNotEmpty(baseEntityId)) @@ -190,6 +191,10 @@ public List findEvents(String baseEntityId, DateTime from, DateTime to, S criteria.andProviderIdEqualTo(locationId); if (lastEditFrom != null && lastEditTo != null) criteria.andDateEditedBetween(from.toDate(), to.toDate()); + if (StringUtils.isNotEmpty(team)) + criteria.andTeamEqualTo(team); + if (StringUtils.isNotEmpty(teamId)) + criteria.andTeamIdEqualTo(teamId); return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, DEFAULT_FETCH_SIZE)); } @@ -231,8 +236,7 @@ public List findByClientAndConceptAndDate(String baseEntityId, String con @Override public List findByBaseEntityIdAndConceptParentCode(String baseEntityId, String concept, String parentCode) { - return convert( - eventMapper.selectByBaseEntityIdAndConceptParentCode(baseEntityId, concept, parentCode)); + return convert(eventMapper.selectByBaseEntityIdAndConceptParentCode(baseEntityId, concept, parentCode)); } @Override @@ -249,18 +253,33 @@ public List findByEmptyServerVersion() { } @Override - public List findEvents(String team, String providerId, String locationId, String baseEntityId, Long serverVersion, - String sortBy, String sortOrder, int limit) { + public List findEvents(String team, String teamId, String providerId, String locationId, String baseEntityId, + Long serverVersion, String sortBy, String sortOrder, int limit) { EventMetadataExample example = new EventMetadataExample(); Criteria criteria = example.createCriteria(); - //TODO refactor after adding team and teamid. provider can be list of values - if (StringUtils.isNotEmpty(team)) - criteria.andTeamEqualTo(team); + + if (StringUtils.isNotEmpty(team)) { + if (team.contains(",")) { + String[] teamsArray = org.apache.commons.lang.StringUtils.split(team, ","); + criteria.andTeamIn(Arrays.asList(teamsArray)); + } else { + criteria.andTeamEqualTo(team); + } + } + + if (StringUtils.isNotEmpty(teamId)) { + if (teamId.contains(",")) { + String[] teamsArray = org.apache.commons.lang.StringUtils.split(teamId, ","); + criteria.andTeamIdIn(Arrays.asList(teamsArray)); + } else { + criteria.andTeamIdEqualTo(teamId); + } + } + if (StringUtils.isNotEmpty(providerId)) { if (providerId.contains(",")) { String[] providersArray = org.apache.commons.lang.StringUtils.split(providerId, ","); - List providers = new ArrayList(Arrays.asList(providersArray)); - criteria.andProviderIdIn(providers); + criteria.andProviderIdIn(Arrays.asList(providersArray)); } else { criteria.andProviderIdEqualTo(providerId); } @@ -268,8 +287,7 @@ public List findEvents(String team, String providerId, String locationId, if (StringUtils.isNotEmpty(locationId)) { if (locationId.contains(",")) { String[] locationArray = org.apache.commons.lang.StringUtils.split(locationId, ","); - List locations = new ArrayList<>(Arrays.asList(locationArray)); - criteria.andLocationIdIn(locations); + criteria.andLocationIdIn(Arrays.asList(locationArray)); } else { criteria.andLocationIdEqualTo(locationId); } @@ -277,8 +295,7 @@ public List findEvents(String team, String providerId, String locationId, if (StringUtils.isNotEmpty(baseEntityId)) { if (baseEntityId.contains(",")) { String[] idsArray = org.apache.commons.lang.StringUtils.split(baseEntityId, ","); - List ids = new ArrayList(Arrays.asList(idsArray)); - criteria.andBaseEntityIdIn(ids); + criteria.andBaseEntityIdIn(Arrays.asList(idsArray)); } else { criteria.andBaseEntityIdEqualTo(baseEntityId); } @@ -372,9 +389,8 @@ private EventMetadata createMetadata(Event event, Long eventId) { eventMetadata.setEventDate(event.getEventDate().toDate()); eventMetadata.setProviderId(event.getProviderId()); eventMetadata.setLocationId(event.getLocationId()); - //TODO merge with PR that added team and teamid - //eventMetadata.setTeam(event.getTeam()); - //eventMetadata.setTeamId(event.getTeamId()); + eventMetadata.setTeam(event.getTeam()); + eventMetadata.setTeamId(event.getTeamId()); eventMetadata.setServerVersion(event.getServerVersion()); return eventMetadata; } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml index b9b3d37e15..d60d9c0d43 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml @@ -72,26 +72,12 @@ jsonb_array_elements_text(jsonb_array_elements(json->'obs')->'values') as obs_value from core.event ) j join event_metadata e on e.event_id=j.id - where e.base_entity_id= #{baseEntityId,jdbcType=VARCHAR} - and e.date_edited between #{dateFrom,jdbcType=DATE} and #{dateTo,jdbcType=DATE} - and obs_object->>'fieldCode'=#{concept,jdbcType=VARCHAR} + where e.base_entity_id= #{baseEntityId,jdbcType=VARCHAR} + and e.date_edited between #{dateFrom,jdbcType=DATE} and #{dateTo,jdbcType=DATE} + and obs_object->>'fieldCode'=#{concept,jdbcType=VARCHAR} and obs_value=#{conceptValue,jdbcType=VARCHAR} - -
--> - +
@@ -22,12 +22,13 @@ + @@ -61,7 +62,7 @@ @@ -95,16 +96,17 @@ id, event_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, event_type, - event_date, provider_id, location_id, team, team_id, date_created, date_edited, date_deleted + event_date, provider_id, location_id, team, team_id, date_created, date_edited, date_deleted, + document_id select count(*) from core.event_metadata @@ -286,7 +294,7 @@ update core.event_metadata @@ -335,6 +343,9 @@ date_deleted = #{record.dateDeleted,jdbcType=DATE}, + + document_id = #{record.documentId,jdbcType=VARCHAR}, + @@ -344,7 +355,7 @@ update core.event_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -361,7 +372,8 @@ team_id = #{record.teamId,jdbcType=VARCHAR}, date_created = #{record.dateCreated,jdbcType=DATE}, date_edited = #{record.dateEdited,jdbcType=DATE}, - date_deleted = #{record.dateDeleted,jdbcType=DATE} + date_deleted = #{record.dateDeleted,jdbcType=DATE}, + document_id = #{record.documentId,jdbcType=VARCHAR} @@ -370,7 +382,7 @@ update core.event_metadata @@ -416,6 +428,9 @@ date_deleted = #{dateDeleted,jdbcType=DATE}, + + document_id = #{documentId,jdbcType=VARCHAR}, + where id = #{id,jdbcType=BIGINT} @@ -423,7 +438,7 @@ update core.event_metadata set event_id = #{eventId,jdbcType=BIGINT}, @@ -439,7 +454,8 @@ team_id = #{teamId,jdbcType=VARCHAR}, date_created = #{dateCreated,jdbcType=DATE}, date_edited = #{dateEdited,jdbcType=DATE}, - date_deleted = #{dateDeleted,jdbcType=DATE} + date_deleted = #{dateDeleted,jdbcType=DATE}, + document_id = #{documentId,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/AppStateTokensRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/AppStateTokensRepositoryTest.java index 4a564f5016..0523519c0e 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/AppStateTokensRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/AppStateTokensRepositoryTest.java @@ -1,11 +1,15 @@ package org.opensrp.repository.postgres; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; import java.util.List; +import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runner.RunWith; +import org.junit.runners.MethodSorters; import org.opensrp.domain.AppStateToken; import org.opensrp.repository.AppStateTokensRepository; import org.springframework.beans.factory.annotation.Autowired; @@ -15,6 +19,7 @@ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("classpath:test-applicationContext-opensrp.xml") +@FixMethodOrder(MethodSorters.NAME_ASCENDING) public class AppStateTokensRepositoryTest { @Autowired @@ -22,7 +27,7 @@ public class AppStateTokensRepositoryTest { private AppStateTokensRepository appStateTokensRepository; @Test - public void testget() { + public void test1Get() { AppStateToken token = appStateTokensRepository.get("1"); assertEquals("sync_schedule_tracker_by_last_update_enrollment", token.getName()); assertEquals("34343", token.getValue().toString()); @@ -33,21 +38,13 @@ public void testget() { } @Test - public void testGetAll() { + public void test2GetAll() { List tokens = appStateTokensRepository.getAll(); assertEquals(5, tokens.size()); } @Test - public void testSafeRemove() { - int tokens = appStateTokensRepository.getAll().size(); - appStateTokensRepository.safeRemove(appStateTokensRepository.get("3")); - assertNull(appStateTokensRepository.get("3")); - assertEquals(tokens - 1, appStateTokensRepository.getAll().size()); - } - - @Test - public void testFindByName() { + public void test3FindByName() { List tokens = appStateTokensRepository.findByName("sync_event_by_date_updated"); assertEquals(1, tokens.size()); assertEquals("343232", tokens.get(0).getValue()); @@ -57,7 +54,15 @@ public void testFindByName() { } @Test - public void testUpdate() { + public void test4SafeRemove() { + int tokens = appStateTokensRepository.getAll().size(); + appStateTokensRepository.safeRemove(appStateTokensRepository.get("3")); + assertNull(appStateTokensRepository.get("3")); + assertEquals(tokens - 1, appStateTokensRepository.getAll().size()); + } + + @Test + public void test5Update() { AppStateToken token = new AppStateToken("sync_event_by_date_updated", "4564353453434", 1521019916); appStateTokensRepository.update(token); @@ -69,7 +74,7 @@ public void testUpdate() { } @Test - public void testAdd() { + public void test6Add() { AppStateToken token = new AppStateToken("sync_apptoken_custom", "45643534MKHT", 15210234516l, "Custom Test App Token"); appStateTokensRepository.add(token); diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java new file mode 100644 index 0000000000..ac84fcddc9 --- /dev/null +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java @@ -0,0 +1,76 @@ +package org.opensrp.repository.postgres; + +import static org.junit.Assert.*; + +import java.util.List; + +import org.junit.FixMethodOrder; +import org.junit.Test; +import org.junit.runner.RunWith; +import org.junit.runners.MethodSorters; +import org.opensrp.domain.Event; +import org.opensrp.repository.EventsRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public class EventsRepositoryTest { + + @Autowired + @Qualifier("eventsRepositoryPostgres") + private EventsRepository eventsRepository; + + @Test + public void test1Get() { + Event event = eventsRepository.get("05934ae338431f28bf6793b2419c319a"); + assertEquals("ea1f9439-a663-4073-93b9-6ef2b8bca3c1", event.getBaseEntityId()); + assertEquals("d960046a-e2a0-4bbf-b687-d41c2a52d8c8", event.getFormSubmissionId()); + assertEquals("Vaccination", event.getEventType()); + //find non existent event + assertNull(eventsRepository.get("05934ae338431f28bf4234gvnbvvh")); + } + + @Test + public void test2GetAll() { + List events = eventsRepository.getAll(); + assertEquals(15, events.size()); + } + + @Test + public void test3FindAllByIdentifier() { + assertTrue(eventsRepository.findAllByIdentifier(null).isEmpty()); + List events = eventsRepository.findAllByIdentifier("06c8644b-b560-45fd-9af5-b6b1484e3504"); + assertEquals("d59504cc-09ef-4d09-9dc3-8f7eb65882fd", events.get(0).getFormSubmissionId()); + assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); + } + + @Test + public void test4findAllByIdentifierAndType() { + assertTrue(eventsRepository.findAllByIdentifier(null, null).isEmpty()); + List events = eventsRepository.findAllByIdentifier("OPENMRS_UUID", "06c8644b-b560-45fd-9af5-b6b1484e3504"); + assertEquals("d59504cc-09ef-4d09-9dc3-8f7eb65882fd", events.get(0).getFormSubmissionId()); + assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); + } + + @Test + public void test30Add() { + List events = eventsRepository.getAll(); + assertEquals(15, events.size()); + } + + @Test + public void test31Update() { + List events = eventsRepository.getAll(); + assertEquals(15, events.size()); + } + + @Test + public void test32SafeRemove() { + List events = eventsRepository.getAll(); + assertEquals(15, events.size()); + } +} diff --git a/opensrp-core/src/test/resources/test-persistence-postgres.xml b/opensrp-core/src/test/resources/test-persistence-postgres.xml index a17461f3d4..0c2679381a 100644 --- a/opensrp-core/src/test/resources/test-persistence-postgres.xml +++ b/opensrp-core/src/test/resources/test-persistence-postgres.xml @@ -30,7 +30,7 @@ + value="classpath*:org/opensrp/repository/postgres/mapper/**/*.xml" /> diff --git a/opensrp-core/src/test/resources/test-scripts/data.sql b/opensrp-core/src/test/resources/test-scripts/data.sql index faac49506c..364fd88ae8 100644 --- a/opensrp-core/src/test/resources/test-scripts/data.sql +++ b/opensrp-core/src/test/resources/test-scripts/data.sql @@ -6,3 +6,39 @@ INSERT INTO core.app_state_token (id, name, description, value, last_edited_date (4, 'sync_event_by_date_updated', 'OpenMRS data pusher token to keep track of new / updated events synced ', '343232', 1521017416), (5, 'sync_event_by_date_voided', 'OpenMRS data pusher token to keep track of voided events synced ', '23432', 1521017416); +--events + +INSERT INTO core.event (id, json, date_deleted) VALUES +(1, '{"id": "05934ae338431f28bf6793b2417696bf", "obs": [{"set": [], "values": ["2018-03-13"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162586AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "mr_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162586AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "mr_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1520941739448, "duration": 0, "revision": "1-069bfb5078ff17f922c0bba799222878", "eventDate": "2018-03-13T17:42:03.326+03:00", "eventType": "Vaccination", "entityType": "vaccination", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:26.477+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1520945634380, "formSubmissionId": "29243014-48df-4165-a82d-f4878f6a830e"}', null), +(2, '{"id": "05934ae338431f28bf6793b24199e690", "obs": [{"set": [], "values": ["2018-03-14 10:31:33"], "fieldCode": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "start", "formSubmissionField": "start", "humanReadableValues": []}, {"set": [], "values": ["2018-03-14 10:39:56"], "fieldCode": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "end", "formSubmissionField": "end", "humanReadableValues": []}, {"set": [], "values": ["867104020634913"], "fieldCode": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "deviceid", "formSubmissionField": "deviceid", "humanReadableValues": []}], "type": "Event", "version": 1521016796414, "duration": 0, "revision": "2-615390b17f8f2f9e9aa92f5f4a8a7aaf", "eventDate": "2018-03-14T03:00:00.000+03:00", "eventType": "New Woman Registration", "dateEdited": "2018-03-14T11:39:35.826+03:00", "entityType": "mother", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:28.717+03:00", "identifiers": {"OPENMRS_UUID": "d3630a60-a1f4-4267-9225-f4cb728f4178"}, "baseEntityId": "43930c23-c787-4ddb-ab76-770f77e7b17d", "serverVersion": 1521016638453, "formSubmissionId": "6b3243e9-3d45-495c-af69-f012061def01"}', null), +(3, '{"id": "05934ae338431f28bf6793b2419c64fb", "obs": [{"set": [], "values": ["2018-03-14"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "measles_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "measles_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521033238310, "duration": 0, "revision": "1-dff06b7575a5177c7200b08570d14f4b", "eventDate": "2018-03-14T19:09:51.379+03:00", "eventType": "Vaccination", "entityType": "vaccination", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:28.750+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521033533700, "formSubmissionId": "bfbfabe8-d4ae-4db2-940f-a6f126ef7829"}', null), +(4, '{"id": "05934ae338431f28bf6793b2419c319a", "obs": [{"set": [], "values": ["2018-03-13"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "measles_1_", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "measles_1__dose", "humanReadableValues": []}], "type": "Event", "version": 1521044035486, "duration": 0, "revision": "3-2d669093b06c73fcd5c0fa7c4782e21d", "eventDate": "2018-03-13T22:10:00.321+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-14T19:21:38.401+03:00", "entityType": "vaccination", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.019+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521044588444, "formSubmissionId": "d960046a-e2a0-4bbf-b687-d41c2a52d8c8"}', null), +(5, '{"id": "05934ae338431f28bf6793b241bdb88c", "obs": [{"set": [], "values": ["42abc582-6658-488b-922e-7be500c070f3"], "fieldCode": "Home_Facility", "fieldType": "formsubmissionField", "parentCode": "", "fieldDataType": "text", "formSubmissionField": "Home_Facility", "humanReadableValues": []}, {"set": [], "values": ["2018-02-16"], "fieldCode": "163260AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "date", "formSubmissionField": "First_Health_Facility_Contact", "humanReadableValues": []}, {"set": [], "values": ["2.5"], "fieldCode": "5916AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "text", "formSubmissionField": "Birth_Weight", "humanReadableValues": []}, {"set": [], "values": ["1588AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"], "fieldCode": "1572AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "select one", "formSubmissionField": "Place_Birth", "humanReadableValues": ["Health facility"]}, {"set": [], "values": ["Happy Kids Clinic"], "fieldCode": "163531AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "text", "formSubmissionField": "Birth_Facility_Name", "humanReadableValues": []}, {"set": [], "values": ["664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"], "fieldCode": "1396AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "text", "formSubmissionField": "PMTCT_Status", "humanReadableValues": ["CNE"]}, {"set": [], "values": ["2018-03-16 08:57:43"], "fieldCode": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "start", "formSubmissionField": "start", "humanReadableValues": []}, {"set": [], "values": ["2018-03-16 08:59:04"], "fieldCode": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "end", "formSubmissionField": "end", "humanReadableValues": []}, {"set": [], "values": ["867104020633980"], "fieldCode": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "deviceid", "formSubmissionField": "deviceid", "humanReadableValues": []}], "type": "Event", "version": 1521183544980, "duration": 0, "revision": "2-04d992d294837437d5fc099fae979049", "eventDate": "2018-03-16T03:00:00.000+03:00", "eventType": "Birth Registration", "dateEdited": "2018-03-16T10:03:00.759+03:00", "entityType": "child", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.364+03:00", "identifiers": {"OPENMRS_UUID": "06c8644b-b560-45fd-9af5-b6b1484e3504"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183592609, "formSubmissionId": "d59504cc-09ef-4d09-9dc3-8f7eb65882fd"}', null), +(6, '{"id": "05934ae338431f28bf6793b241bdbb60", "obs": [{"set": [], "values": ["2018-01-10"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "opv_0", "humanReadableValues": []}, {"set": [], "values": ["0"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "opv_0_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602537, "duration": 0, "revision": "2-45e4b7c82520480edbc1adecec55f6ae", "eventDate": "2018-01-10T11:59:37.380+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:00.949+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.371+03:00", "identifiers": {"OPENMRS_UUID": "35d6a414-a379-4ada-97ee-39f680eecb91"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "baf8e663-71a1-4a30-8d40-2f3cab45a6d7"}', null), +(7, '{"id": "05934ae338431f28bf6793b241bdbc55", "obs": [{"set": [], "values": ["2018-01-10"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "bcg", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "bcg_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602575, "duration": 0, "revision": "2-1f5e07f8e65a09d5ca34cb21e6a29b41", "eventDate": "2018-01-10T11:59:41.058+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.148+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.376+03:00", "identifiers": {"OPENMRS_UUID": "94ec8561-14ab-48d1-a6d4-4ae05191f6e6"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "014413c8-4dbf-4876-977d-0c1dfb9e4d05"}', null), +(8, '{"id": "05934ae338431f28bf6793b241bdc231", "obs": [{"set": [], "values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "1685AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "penta_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "1685AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "penta_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602635, "duration": 0, "revision": "2-ad81df44c1f2eaba862585dd8918a16e", "eventDate": "2018-02-21T11:59:50.145+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.341+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.385+03:00", "identifiers": {"OPENMRS_UUID": "85abab15-0be3-4a9d-962d-de99a920d3cb"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "5f1b201d-2132-4eb9-8fa1-3169a61cc50a"}', null), +(9, '{"id": "05934ae338431f28bf6793b241bdc3df", "obs": [{"set": [], "values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "opv_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "opv_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602672, "duration": 0, "revision": "2-9f892924c7e9afe675bdb9f9a3d6231f", "eventDate": "2018-02-21T11:59:55.977+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.537+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.390+03:00", "identifiers": {"OPENMRS_UUID": "28baa742-4a00-480f-9fff-12629c765cc2"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "4bc04bbe-bb2f-4e4e-b123-0c6131b91fec"}', null), +(10, '{"id": "05934ae338431f28bf6793b241bdc44a", "obs": [{"set": [], "values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "159698AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "rota_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "159698AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "rota_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602735, "duration": 0, "revision": "2-3514437b6b19290b16b49714bf0182e8", "eventDate": "2018-02-21T12:00:02.298+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.729+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.394+03:00", "identifiers": {"OPENMRS_UUID": "34701637-5c2f-4483-a05e-46df003990ef"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "6947237c-5e2b-4ccd-953b-dd8b019e0484"}', null), +(11, '{"id": "05934ae338431f28bf6793b241be69a5", "obs": [{"set": [], "values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "pcv_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "pcv_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183849328, "duration": 0, "revision": "2-1ef09e6758ecd9f2adaa1eb35e143a7b", "eventDate": "2018-02-21T12:00:08.788+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:13:03.469+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.398+03:00", "identifiers": {"OPENMRS_UUID": "4aecc0c1-e008-4227-938d-66db17236a3d"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521184133098, "formSubmissionId": "d6c08393-ebde-4faa-ac94-11429c1233dd"}', null), +(12, '{"id": "05934ae338431f28bf6793b24177a1dc", "obs": [{"set": [], "values": ["8.6"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"set": [], "values": ["-0.3160736521259359"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468856705, "duration": 0, "revision": "65-9ed92fd61bd67d89325ee3ea35c3f3cb", "eventDate": "2018-01-13T19:37:11.954+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:15.649+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:28:40.255+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045587, "formSubmissionId": "306b6dc2-fa15-4e48-9ac3-4f8044899051"}', null), +(13, '{"id": "05934ae338431f28bf6793b241780bac", "obs": [{"set": [], "values": ["11.8"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"set": [], "values": ["2.0903075436287146"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468857114, "duration": 0, "revision": "65-81466693915e45bc1feb1f8ccc466475", "eventDate": "2018-03-12T19:40:01.023+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:15.789+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:28:40.260+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045588, "formSubmissionId": "9bd94f7b-d7f5-4e38-bc0d-2fa7eb84dad3"}', null), +(14, '{"id": "05934ae338431f28bf6793b241781149", "obs": [{"set": [], "values": ["7.6"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"set": [], "values": ["0.10700349151262006"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468857524, "duration": 0, "revision": "65-9a91db1bb8e76c4c8a163c282c5d7479", "eventDate": "2017-09-06T19:40:24.702+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:15.929+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:28:40.264+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045589, "formSubmissionId": "31c4a45a-09f4-4b01-abe8-a87526827df6"}', null), +(15, '{"id": "05934ae338431f28bf6793b241781a1e", "obs": [{"set": [], "values": ["9.3"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"set": [], "values": ["1.0535868964441777"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468857912, "duration": 0, "revision": "65-bb37dd0fda12683a31217d1157d86539", "eventDate": "2017-11-06T19:42:02.327+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:16.069+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:28:40.268+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045590, "formSubmissionId": "3f66450e-2b66-43da-9b9b-dae5fced764f"}', null); + + +INSERT INTO core.event_metadata (id, event_id, document_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, event_type, event_date, provider_id, location_id, team, team_id, date_created, date_edited, date_deleted) VALUES +(1, 1, '05934ae338431f28bf6793b2417696bf', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '29243014-48df-4165-a82d-f4878f6a830e', 1520945634380, null, 'vaccination', '2018-03-13', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), +(2, 3, '05934ae338431f28bf6793b24199e690', '43930c23-c787-4ddb-ab76-770f77e7b17d', '6b3243e9-3d45-495c-af69-f012061def01', 1521016638453, 'd3630a60-a1f4-4267-9225-f4cb728f4178', 'mother', '2018-03-14', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), +(3, 3, '05934ae338431f28bf6793b2419c64fb', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', 'bfbfabe8-d4ae-4db2-940f-a6f126ef7829', 1521033533700, null, 'vaccination', '2018-03-14', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), +(4, 4, '05934ae338431f28bf6793b2419c319a', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', 'd960046a-e2a0-4bbf-b687-d41c2a52d8c8', 1521044588444, null, 'vaccination', '2018-03-13', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), +(5, 5, '05934ae338431f28bf6793b241bdb88c', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'd59504cc-09ef-4d09-9dc3-8f7eb65882fd', 1521183592609, '06c8644b-b560-45fd-9af5-b6b1484e3504', 'child', '2018-03-16', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), +(6, 6, '05934ae338431f28bf6793b241bdbb60', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'baf8e663-71a1-4a30-8d40-2f3cab45a6d7', 1521183593424, '35d6a414-a379-4ada-97ee-39f680eecb91', 'vaccination', '2018-01-10', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), +(7, 7, '05934ae338431f28bf6793b241bdbc55', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '014413c8-4dbf-4876-977d-0c1dfb9e4d05', 1521183593424, '94ec8561-14ab-48d1-a6d4-4ae05191f6e6', 'vaccination', '2018-01-10', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), +(8, 8, '05934ae338431f28bf6793b241bdc231', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '5f1b201d-2132-4eb9-8fa1-3169a61cc50a', 1521183593424, '85abab15-0be3-4a9d-962d-de99a920d3cb', 'vaccination', '2018-02-21', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), +(9, 9, '05934ae338431f28bf6793b241bdc3df', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '4bc04bbe-bb2f-4e4e-b123-0c6131b91fec', 1521183593424, '28baa742-4a00-480f-9fff-12629c765cc2', 'vaccination', '2018-02-21', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), +(10, 10, '05934ae338431f28bf6793b241bdc44a', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '6947237c-5e2b-4ccd-953b-dd8b019e0484', 1521183593424, '34701637-5c2f-4483-a05e-46df003990ef', 'vaccination', '2018-02-21', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), +(11, 11, '05934ae338431f28bf6793b241be69a5', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'd6c08393-ebde-4faa-ac94-11429c1233dd', 1521184133098, '4aecc0c1-e008-4227-938d-66db17236a3d', 'vaccination', '2018-02-21', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), +(12, 12, '05934ae338431f28bf6793b24177a1dc', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '306b6dc2-fa15-4e48-9ac3-4f8044899051', 1521469045587, null, 'weight', '2018-01-13', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), +(13, 13, '05934ae338431f28bf6793b241780bac', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '9bd94f7b-d7f5-4e38-bc0d-2fa7eb84dad3', 1521469045588, null, 'weight', '2018-03-12', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), +(14, 14, '05934ae338431f28bf6793b241781149', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '31c4a45a-09f4-4b01-abe8-a87526827df6', 1521469045589, null, 'weight', '2017-09-06', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), +(15, 15, '05934ae338431f28bf6793b241781a1e', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '3f66450e-2b66-43da-9b9b-dae5fced764f', 1521469045590, null, 'weight', '2017-11-06', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null); diff --git a/opensrp-core/src/test/resources/test-scripts/schema.sql b/opensrp-core/src/test/resources/test-scripts/schema.sql index 53d2943bf8..e5d05a46ca 100644 --- a/opensrp-core/src/test/resources/test-scripts/schema.sql +++ b/opensrp-core/src/test/resources/test-scripts/schema.sql @@ -1,2 +1,9 @@ TRUNCATE TABLE core.app_state_token; -ALTER SEQUENCE core.app_state_token_id_seq RESTART WITH 6; \ No newline at end of file + +TRUNCATE TABLE core.event CASCADE; + +ALTER SEQUENCE core.app_state_token_id_seq RESTART WITH 6; + +ALTER SEQUENCE core.event_id_seq RESTART WITH 16; + +ALTER SEQUENCE core.event_metadata_id_seq RESTART WITH 16; \ No newline at end of file From 2cdb0b37159dd5394976817651439d1e3ced529c Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Tue, 20 Mar 2018 17:25:28 +0300 Subject: [PATCH 059/133] Events Repository Unit tests --- ...0307131558_create_event_metadata_table.sql | 5 + .../domain/postgres/EventMetadata.java | 159 +++++++----- .../domain/postgres/EventMetadataExample.java | 242 +++++++++++------- .../opensrp/repository/EventsRepository.java | 2 +- .../opensrp/repository/couch/AllEvents.java | 20 +- .../postgres/EventsRepositoryImpl.java | 67 +++-- .../postgres/mapper/EventMetadataMapper.java | 22 +- .../mapper/custom/CustomEventMapper.java | 3 +- .../custom/CustomEventMetadataMapper.java | 10 +- .../mapper/custom/xml/CustomEventMapper.xml | 12 +- .../custom/xml/CustomEventMetadataMapper.xml | 37 ++- .../mapper/xml/EventMetadataMapper.xml | 109 ++++---- .../org/opensrp/service/EventService.java | 20 +- .../postgres/EventsRepositoryTest.java | 227 +++++++++++++++- .../resources/test-persistence-postgres.xml | 2 +- .../src/test/resources/test-scripts/data.sql | 46 ++-- 16 files changed, 696 insertions(+), 287 deletions(-) diff --git a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql index 84c84492bd..f4e5af2dd8 100644 --- a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql +++ b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql @@ -28,6 +28,7 @@ CREATE TABLE core.event_metadata openmrs_uuid character varying, event_type character varying, event_date date, + entity_type character varying, provider_id character varying, location_id character varying, team character varying, @@ -43,6 +44,7 @@ WITH ( CREATE UNIQUE INDEX event_metadata_relational_id_unique_index ON core.event_metadata (form_submission_id); +CREATE INDEX event_metadata_document_id_index ON core.event_metadata (document_id); CREATE INDEX event_metadata_base_entity_id_index ON core.event_metadata (base_entity_id); CREATE INDEX event_metadata_server_version_index ON core.event_metadata (server_version); CREATE INDEX event_metadata_openmrs_uuid_index ON core.event_metadata (openmrs_uuid); @@ -52,6 +54,9 @@ CREATE INDEX event_metadata_provider_id_index ON core.event_metadata (provider_i CREATE INDEX event_metadata_location_id_index ON core.event_metadata (location_id); CREATE INDEX event_metadata_team_index ON core.event_metadata (team); CREATE INDEX event_metadata_team_id_index ON core.event_metadata (team_id); +CREATE INDEX event_metadata_date_created_index ON core.event_metadata (date_created); +CREATE INDEX event_metadata_date_edited_index ON core.event_metadata (date_edited); +CREATE INDEX event_metadata_date_deleted_index ON core.event_metadata (date_deleted); -- //@UNDO diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java index ccd138cf8a..c2d579e641 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java @@ -6,89 +6,94 @@ public class EventMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ private Long eventId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.document_id + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + */ + private String documentId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.base_entity_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.form_submission_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ private String formSubmissionId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.server_version - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.openmrs_uuid - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ private String openmrsUuid; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_type - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ private String eventType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_date - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ private Date eventDate; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.entity_type + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + */ + private String entityType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.provider_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.location_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.team - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.team_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ private String teamId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.date_created - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ private Date dateCreated; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.date_edited - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ private Date dateEdited; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.date_deleted - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ private Date dateDeleted; - /** - * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.document_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 - */ - private String documentId; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.id * @return the value of core.event_metadata.id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public Long getId() { return id; @@ -97,7 +102,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.id * @param id the value for core.event_metadata.id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -106,7 +111,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_id * @return the value of core.event_metadata.event_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public Long getEventId() { return eventId; @@ -115,16 +120,34 @@ public Long getEventId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_id * @param eventId the value for core.event_metadata.event_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void setEventId(Long eventId) { this.eventId = eventId; } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.document_id + * @return the value of core.event_metadata.document_id + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + */ + public String getDocumentId() { + return documentId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.document_id + * @param documentId the value for core.event_metadata.document_id + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + */ + public void setDocumentId(String documentId) { + this.documentId = documentId; + } + /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.base_entity_id * @return the value of core.event_metadata.base_entity_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -133,7 +156,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.base_entity_id * @param baseEntityId the value for core.event_metadata.base_entity_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -142,7 +165,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.form_submission_id * @return the value of core.event_metadata.form_submission_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public String getFormSubmissionId() { return formSubmissionId; @@ -151,7 +174,7 @@ public String getFormSubmissionId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.form_submission_id * @param formSubmissionId the value for core.event_metadata.form_submission_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void setFormSubmissionId(String formSubmissionId) { this.formSubmissionId = formSubmissionId; @@ -160,7 +183,7 @@ public void setFormSubmissionId(String formSubmissionId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.server_version * @return the value of core.event_metadata.server_version - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -169,7 +192,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.server_version * @param serverVersion the value for core.event_metadata.server_version - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -178,7 +201,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.openmrs_uuid * @return the value of core.event_metadata.openmrs_uuid - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public String getOpenmrsUuid() { return openmrsUuid; @@ -187,7 +210,7 @@ public String getOpenmrsUuid() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.openmrs_uuid * @param openmrsUuid the value for core.event_metadata.openmrs_uuid - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void setOpenmrsUuid(String openmrsUuid) { this.openmrsUuid = openmrsUuid; @@ -196,7 +219,7 @@ public void setOpenmrsUuid(String openmrsUuid) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_type * @return the value of core.event_metadata.event_type - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public String getEventType() { return eventType; @@ -205,7 +228,7 @@ public String getEventType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_type * @param eventType the value for core.event_metadata.event_type - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void setEventType(String eventType) { this.eventType = eventType; @@ -214,7 +237,7 @@ public void setEventType(String eventType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_date * @return the value of core.event_metadata.event_date - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public Date getEventDate() { return eventDate; @@ -223,16 +246,34 @@ public Date getEventDate() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_date * @param eventDate the value for core.event_metadata.event_date - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void setEventDate(Date eventDate) { this.eventDate = eventDate; } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.entity_type + * @return the value of core.event_metadata.entity_type + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + */ + public String getEntityType() { + return entityType; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.entity_type + * @param entityType the value for core.event_metadata.entity_type + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + */ + public void setEntityType(String entityType) { + this.entityType = entityType; + } + /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.provider_id * @return the value of core.event_metadata.provider_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public String getProviderId() { return providerId; @@ -241,7 +282,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.provider_id * @param providerId the value for core.event_metadata.provider_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -250,7 +291,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.location_id * @return the value of core.event_metadata.location_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public String getLocationId() { return locationId; @@ -259,7 +300,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.location_id * @param locationId the value for core.event_metadata.location_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -268,7 +309,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.team * @return the value of core.event_metadata.team - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public String getTeam() { return team; @@ -277,7 +318,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.team * @param team the value for core.event_metadata.team - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -286,7 +327,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.team_id * @return the value of core.event_metadata.team_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public String getTeamId() { return teamId; @@ -295,7 +336,7 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.team_id * @param teamId the value for core.event_metadata.team_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; @@ -304,7 +345,7 @@ public void setTeamId(String teamId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.date_created * @return the value of core.event_metadata.date_created - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public Date getDateCreated() { return dateCreated; @@ -313,7 +354,7 @@ public Date getDateCreated() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.date_created * @param dateCreated the value for core.event_metadata.date_created - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void setDateCreated(Date dateCreated) { this.dateCreated = dateCreated; @@ -322,7 +363,7 @@ public void setDateCreated(Date dateCreated) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.date_edited * @return the value of core.event_metadata.date_edited - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public Date getDateEdited() { return dateEdited; @@ -331,7 +372,7 @@ public Date getDateEdited() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.date_edited * @param dateEdited the value for core.event_metadata.date_edited - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void setDateEdited(Date dateEdited) { this.dateEdited = dateEdited; @@ -340,7 +381,7 @@ public void setDateEdited(Date dateEdited) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.date_deleted * @return the value of core.event_metadata.date_deleted - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public Date getDateDeleted() { return dateDeleted; @@ -349,27 +390,9 @@ public Date getDateDeleted() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.date_deleted * @param dateDeleted the value for core.event_metadata.date_deleted - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void setDateDeleted(Date dateDeleted) { this.dateDeleted = dateDeleted; } - - /** - * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.document_id - * @return the value of core.event_metadata.document_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 - */ - public String getDocumentId() { - return documentId; - } - - /** - * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.document_id - * @param documentId the value for core.event_metadata.document_id - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 - */ - public void setDocumentId(String documentId) { - this.documentId = documentId; - } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java index 173d3d4d02..89636747b9 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java @@ -8,23 +8,23 @@ public class EventMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public EventMetadataExample() { oredCriteria = new ArrayList(); @@ -32,7 +32,7 @@ public EventMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -40,7 +40,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -48,7 +48,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -56,7 +56,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -64,7 +64,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -72,7 +72,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -80,7 +80,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -90,7 +90,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -102,7 +102,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -111,7 +111,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -121,7 +121,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ protected abstract static class GeneratedCriteria { @@ -311,6 +311,76 @@ public Criteria andEventIdNotBetween(Long value1, Long value2) { return (Criteria) this; } + public Criteria andDocumentIdIsNull() { + addCriterion("document_id is null"); + return (Criteria) this; + } + + public Criteria andDocumentIdIsNotNull() { + addCriterion("document_id is not null"); + return (Criteria) this; + } + + public Criteria andDocumentIdEqualTo(String value) { + addCriterion("document_id =", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotEqualTo(String value) { + addCriterion("document_id <>", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdGreaterThan(String value) { + addCriterion("document_id >", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdGreaterThanOrEqualTo(String value) { + addCriterion("document_id >=", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLessThan(String value) { + addCriterion("document_id <", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLessThanOrEqualTo(String value) { + addCriterion("document_id <=", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLike(String value) { + addCriterion("document_id like", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotLike(String value) { + addCriterion("document_id not like", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdIn(List values) { + addCriterion("document_id in", values, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotIn(List values) { + addCriterion("document_id not in", values, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdBetween(String value1, String value2) { + addCriterion("document_id between", value1, value2, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotBetween(String value1, String value2) { + addCriterion("document_id not between", value1, value2, "documentId"); + return (Criteria) this; + } + public Criteria andBaseEntityIdIsNull() { addCriterion("base_entity_id is null"); return (Criteria) this; @@ -711,6 +781,76 @@ public Criteria andEventDateNotBetween(Date value1, Date value2) { return (Criteria) this; } + public Criteria andEntityTypeIsNull() { + addCriterion("entity_type is null"); + return (Criteria) this; + } + + public Criteria andEntityTypeIsNotNull() { + addCriterion("entity_type is not null"); + return (Criteria) this; + } + + public Criteria andEntityTypeEqualTo(String value) { + addCriterion("entity_type =", value, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeNotEqualTo(String value) { + addCriterion("entity_type <>", value, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeGreaterThan(String value) { + addCriterion("entity_type >", value, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeGreaterThanOrEqualTo(String value) { + addCriterion("entity_type >=", value, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeLessThan(String value) { + addCriterion("entity_type <", value, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeLessThanOrEqualTo(String value) { + addCriterion("entity_type <=", value, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeLike(String value) { + addCriterion("entity_type like", value, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeNotLike(String value) { + addCriterion("entity_type not like", value, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeIn(List values) { + addCriterion("entity_type in", values, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeNotIn(List values) { + addCriterion("entity_type not in", values, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeBetween(String value1, String value2) { + addCriterion("entity_type between", value1, value2, "entityType"); + return (Criteria) this; + } + + public Criteria andEntityTypeNotBetween(String value1, String value2) { + addCriterion("entity_type not between", value1, value2, "entityType"); + return (Criteria) this; + } + public Criteria andProviderIdIsNull() { addCriterion("provider_id is null"); return (Criteria) this; @@ -1170,81 +1310,11 @@ public Criteria andDateDeletedNotBetween(Date value1, Date value2) { addCriterionForJDBCDate("date_deleted not between", value1, value2, "dateDeleted"); return (Criteria) this; } - - public Criteria andDocumentIdIsNull() { - addCriterion("document_id is null"); - return (Criteria) this; - } - - public Criteria andDocumentIdIsNotNull() { - addCriterion("document_id is not null"); - return (Criteria) this; - } - - public Criteria andDocumentIdEqualTo(String value) { - addCriterion("document_id =", value, "documentId"); - return (Criteria) this; - } - - public Criteria andDocumentIdNotEqualTo(String value) { - addCriterion("document_id <>", value, "documentId"); - return (Criteria) this; - } - - public Criteria andDocumentIdGreaterThan(String value) { - addCriterion("document_id >", value, "documentId"); - return (Criteria) this; - } - - public Criteria andDocumentIdGreaterThanOrEqualTo(String value) { - addCriterion("document_id >=", value, "documentId"); - return (Criteria) this; - } - - public Criteria andDocumentIdLessThan(String value) { - addCriterion("document_id <", value, "documentId"); - return (Criteria) this; - } - - public Criteria andDocumentIdLessThanOrEqualTo(String value) { - addCriterion("document_id <=", value, "documentId"); - return (Criteria) this; - } - - public Criteria andDocumentIdLike(String value) { - addCriterion("document_id like", value, "documentId"); - return (Criteria) this; - } - - public Criteria andDocumentIdNotLike(String value) { - addCriterion("document_id not like", value, "documentId"); - return (Criteria) this; - } - - public Criteria andDocumentIdIn(List values) { - addCriterion("document_id in", values, "documentId"); - return (Criteria) this; - } - - public Criteria andDocumentIdNotIn(List values) { - addCriterion("document_id not in", values, "documentId"); - return (Criteria) this; - } - - public Criteria andDocumentIdBetween(String value1, String value2) { - addCriterion("document_id between", value1, value2, "documentId"); - return (Criteria) this; - } - - public Criteria andDocumentIdNotBetween(String value1, String value2) { - addCriterion("document_id not between", value1, value2, "documentId"); - return (Criteria) this; - } } /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ public static class Criterion { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/EventsRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/EventsRepository.java index 9363e2fa34..818f37c0b1 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/EventsRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/EventsRepository.java @@ -18,7 +18,7 @@ public interface EventsRepository extends BaseRepository { List findByBaseEntityId(String baseEntityId); - List findByBaseEntityAndFormSubmissionId(String baseEntityId, String formSubmissionId); + Event findByBaseEntityAndFormSubmissionId(String baseEntityId, String formSubmissionId); List findByBaseEntityAndType(String baseEntityId, String eventType); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java index 321f220cbe..8cebb445ff 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java @@ -53,10 +53,12 @@ public Event findById(String id) { @GenerateView public Event findByFormSubmissionId(String formSubmissionId) { List events = queryView("by_formSubmissionId", formSubmissionId); - if (events != null && !events.isEmpty()) - return events.get(0); - else + if (events == null || events.isEmpty()) return null; + else if (events.size() > 1) { + throw new IllegalStateException("Multiple events for formSubmissionId " + formSubmissionId); + } else + return events.get(0); } @GenerateView @@ -65,10 +67,18 @@ public List findByBaseEntityId(String baseEntityId) { } @View(name = "all_events_by_base_entity_and_form_submission", map = "function(doc) { if (doc.type === 'Event'){ emit([doc.baseEntityId, doc.formSubmissionId], doc); } }") - public List findByBaseEntityAndFormSubmissionId(String baseEntityId, String formSubmissionId) { - return db.queryView(createQuery("all_events_by_base_entity_and_form_submission") + public Event findByBaseEntityAndFormSubmissionId(String baseEntityId, String formSubmissionId) { + List events = db.queryView(createQuery("all_events_by_base_entity_and_form_submission") .key(ComplexKey.of(baseEntityId, formSubmissionId)).includeDocs(true), Event.class); + if (events == null || events.isEmpty()) + return null; + else if (events.size() > 1) { + throw new IllegalStateException("Multiple events for baseEntityId and formSubmissionId combination (" + + baseEntityId + "," + formSubmissionId + ")"); + } else + return events.get(0); + } @View(name = "all_events_by_base_entity_and_type", map = "function(doc) { if (doc.type === 'Event'){ emit([doc.baseEntityId, doc.eventType], doc); } }") diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java index c56288c86b..11ec3ed545 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java @@ -3,6 +3,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; +import java.util.Date; import java.util.List; import org.apache.commons.lang3.StringUtils; @@ -146,10 +147,15 @@ public Event findById(String id) { @Override public Event findByFormSubmissionId(String formSubmissionId) { + if (StringUtils.isBlank(formSubmissionId)) { + return null; + } EventMetadataExample example = new EventMetadataExample(); example.createCriteria().andFormSubmissionIdEqualTo(formSubmissionId); List events = eventMetadataMapper.selectMany(example); - if (events != null && !events.isEmpty()) + if (events.size() > 1) { + throw new IllegalStateException("Multiple events for formSubmissionId " + formSubmissionId); + } else if (!events.isEmpty()) return convert(events.get(0)); else return null; @@ -163,10 +169,17 @@ public List findByBaseEntityId(String baseEntityId) { } @Override - public List findByBaseEntityAndFormSubmissionId(String baseEntityId, String formSubmissionId) { + public Event findByBaseEntityAndFormSubmissionId(String baseEntityId, String formSubmissionId) { EventMetadataExample example = new EventMetadataExample(); example.createCriteria().andBaseEntityIdEqualTo(baseEntityId).andFormSubmissionIdEqualTo(formSubmissionId); - return convert(eventMetadataMapper.selectMany(example)); + List events = eventMetadataMapper.selectMany(example); + if (events.size() > 1) { + throw new IllegalStateException("Multiple events for baseEntityId and formSubmissionId combination (" + + baseEntityId + "," + formSubmissionId + ")"); + } else if (!events.isEmpty()) + return convert(events.get(0)); + else + return null; } @Override @@ -188,10 +201,12 @@ public List findEvents(String baseEntityId, DateTime from, DateTime to, S criteria.andEventDateBetween(from.toDate(), to.toDate()); if (StringUtils.isNotEmpty(eventType)) criteria.andEventTypeEqualTo(eventType); + if (StringUtils.isNotEmpty(entityType)) + criteria.andEntityTypeEqualTo(entityType); if (StringUtils.isNotEmpty(providerId)) criteria.andProviderIdEqualTo(providerId); if (StringUtils.isNotEmpty(locationId)) - criteria.andProviderIdEqualTo(locationId); + criteria.andLocationIdEqualTo(locationId); if (lastEditFrom != null && lastEditTo != null) criteria.andDateEditedBetween(from.toDate(), to.toDate()); if (StringUtils.isNotEmpty(team)) @@ -215,35 +230,40 @@ public List findByServerVersion(long serverVersion) { @Override public List notInOpenMRSByServerVersion(long serverVersion, Calendar calendar) { - EventMetadataExample example = new EventMetadataExample(); - example.createCriteria().andServerVersionBetween(serverVersion + 1, calendar.getTimeInMillis()) - .andOpenmrsUuidIsNotNull().andOpenmrsUuidNotEqualTo(""); - return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, DEFAULT_FETCH_SIZE)); + return convert(eventMetadataMapper.selectNotInOpenMRSByServerVersion(serverVersion, calendar.getTimeInMillis(), + DEFAULT_FETCH_SIZE)); } @Override public List notInOpenMRSByServerVersionAndType(String type, long serverVersion, Calendar calendar) { - EventMetadataExample example = new EventMetadataExample(); - example.createCriteria().andEventTypeEqualTo(type) - .andServerVersionBetween(serverVersion + 1, calendar.getTimeInMillis()).andOpenmrsUuidIsNotNull() - .andOpenmrsUuidNotEqualTo(""); - return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, DEFAULT_FETCH_SIZE)); + return convert(eventMetadataMapper.selectNotInOpenMRSByServerVersionAndType(type, serverVersion, + calendar.getTimeInMillis(), DEFAULT_FETCH_SIZE)); } @Override public List findByClientAndConceptAndDate(String baseEntityId, String concept, String conceptValue, String dateFrom, String dateTo) { - return convert( - eventMapper.selectByBaseEntityIdConceptAndDate(baseEntityId, concept, conceptValue, dateFrom, dateTo)); + if (StringUtils.isBlank(baseEntityId) && StringUtils.isBlank(concept) && StringUtils.isBlank(conceptValue)) + return new ArrayList(); + Date from = null, to = null; + if (StringUtils.isNotEmpty(dateFrom)) + from = new DateTime(dateFrom).toDate(); + if (StringUtils.isNotEmpty(dateTo)) + to = new DateTime(dateTo).toDate(); + return convert(eventMapper.selectByBaseEntityIdConceptAndDate(baseEntityId, concept, conceptValue, from, to)); } @Override public List findByBaseEntityIdAndConceptParentCode(String baseEntityId, String concept, String parentCode) { + if (StringUtils.isBlank(baseEntityId) && StringUtils.isBlank(concept) && StringUtils.isBlank(parentCode)) + return new ArrayList(); return convert(eventMapper.selectByBaseEntityIdAndConceptParentCode(baseEntityId, concept, parentCode)); } @Override public List findByConceptAndValue(String concept, String conceptValue) { + if (StringUtils.isBlank(concept) && StringUtils.isBlank(conceptValue)) + return new ArrayList(); return convert(eventMapper.selectByConceptAndValue(concept, conceptValue)); } @@ -251,7 +271,7 @@ public List findByConceptAndValue(String concept, String conceptValue) { public List findByEmptyServerVersion() { EventMetadataExample example = new EventMetadataExample(); example.createCriteria().andServerVersionIsNull(); - example.or(example.createCriteria().andServerVersionNotEqualTo(0l)); + example.or(example.createCriteria().andServerVersionEqualTo(0l)); return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, DEFAULT_FETCH_SIZE)); } @@ -310,10 +330,18 @@ public List findEvents(String team, String teamId, String providerId, Str return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, limit)); } + /** + * Compatibility method inherited from couch to fetch events of a given type within the current month + * @param eventType the type of event to query + * @return list of events of given type within the current month + */ @Override public List findEventByEventTypeBetweenTwoDates(String eventType) { + Calendar calendar = Calendar.getInstance(); + calendar.set(Calendar.DATE, 1); EventMetadataExample example = new EventMetadataExample(); - example.createCriteria().andEventTypeEqualTo(eventType); + example.createCriteria().andEventTypeEqualTo(eventType).andServerVersionBetween(calendar.getTimeInMillis(), + System.currentTimeMillis()); return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, DEFAULT_FETCH_SIZE)); } @@ -389,13 +417,16 @@ private EventMetadata createMetadata(Event event, Long eventId) { eventMetadata.setBaseEntityId(event.getBaseEntityId()); eventMetadata.setFormSubmissionId(event.getFormSubmissionId()); eventMetadata.setOpenmrsUuid(event.getIdentifier(AllConstants.Client.OPENMRS_UUID_IDENTIFIER_TYPE)); - eventMetadata.setEventType(event.getEntityType()); + eventMetadata.setEventType(event.getEventType()); eventMetadata.setEventDate(event.getEventDate().toDate()); + eventMetadata.setEntityType(event.getEntityType()); eventMetadata.setProviderId(event.getProviderId()); eventMetadata.setLocationId(event.getLocationId()); eventMetadata.setTeam(event.getTeam()); eventMetadata.setTeamId(event.getTeamId()); eventMetadata.setServerVersion(event.getServerVersion()); + if (event.getDateCreated() != null) + eventMetadata.setDateCreated(event.getDateCreated().toDate()); return eventMetadata; } catch (Exception e) { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java index 56951da9d2..256db74d23 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java @@ -10,67 +10,67 @@ public interface EventMetadataMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ long countByExample(EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ int deleteByExample(EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ int insert(EventMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ int insertSelective(EventMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ List selectByExample(EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ EventMetadata selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ int updateByExampleSelective(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ int updateByExample(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ int updateByPrimaryKeySelective(EventMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Mon Mar 19 17:20:11 EAT 2018 + * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 */ int updateByPrimaryKey(EventMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java index 82fbab2498..b0fcf82bbd 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java @@ -1,5 +1,6 @@ package org.opensrp.repository.postgres.mapper.custom; +import java.util.Date; import java.util.List; import org.apache.ibatis.annotations.Param; @@ -20,7 +21,7 @@ List selectByIdentifierOfType(@Param("identifierType") String identifierT List selectByBaseEntityIdConceptAndDate(@Param("baseEntityId") String baseEntityId, @Param("concept") String concept, @Param("conceptValue") String conceptValue, - @Param("dateFrom") String dateFrom, @Param("dateTo") String dateTo); + @Param("dateFrom") Date dateFrom, @Param("dateTo") Date dateTo); List selectByBaseEntityIdAndConceptParentCode(@Param("baseEntityId") String baseEntityId, @Param("concept") String concept, diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMetadataMapper.java index 8ff1978c11..4d7ea4185f 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMetadataMapper.java @@ -13,7 +13,13 @@ public interface CustomEventMetadataMapper extends EventMetadataMapper { List selectMany(EventMetadataExample eventMetadataExample); - List selectManyWithRowBounds(@Param("example") EventMetadataExample example, - @Param("offset") int offset,@Param("limit") int limit); + List selectManyWithRowBounds(@Param("example") EventMetadataExample example, @Param("offset") int offset, + @Param("limit") int limit); + + List selectNotInOpenMRSByServerVersion(@Param("from") long serverVersion, @Param("to") long calendar, + @Param("limit") int limit); + + List selectNotInOpenMRSByServerVersionAndType(@Param("eventType") String type, @Param("from") long serverVersion, + @Param("to") long calendar, @Param("limit") int limit); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml index d60d9c0d43..44c639b59a 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMapper.xml @@ -68,12 +68,14 @@ resultMap="BaseEventResultMap"> select - from ( select id, json,jsonb_array_elements(json->'obs') as obs_object, + from ( select id id_, json,jsonb_array_elements(json->'obs') as obs_object, jsonb_array_elements_text(jsonb_array_elements(json->'obs')->'values') as obs_value from core.event ) j - join event_metadata e on e.event_id=j.id + join core.event_metadata e on e.event_id=j.id_ where e.base_entity_id= #{baseEntityId,jdbcType=VARCHAR} - and e.date_edited between #{dateFrom,jdbcType=DATE} and #{dateTo,jdbcType=DATE} + + and e.date_created between #{dateFrom,jdbcType=DATE} and #{dateTo,jdbcType=DATE} + and obs_object->>'fieldCode'=#{concept,jdbcType=VARCHAR} and obs_value=#{conceptValue,jdbcType=VARCHAR} @@ -82,9 +84,9 @@ resultMap="BaseEventResultMap"> select - from ( select id, json,jsonb_array_elements(json->'obs') as obs_object + from ( select id id_, json,jsonb_array_elements(json->'obs') as obs_object from core.event ) j - join event_metadata e on e.event_id=j.id + join core.event_metadata e on e.event_id=j.id_ where e.base_entity_id= #{baseEntityId,jdbcType=VARCHAR} and obs_object->>'fieldCode'=#{concept,jdbcType=VARCHAR} and obs_object->>'parentCode'=#{parentCode,jdbcType=VARCHAR} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMetadataMapper.xml index 75609b9a09..d4bba42642 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomEventMetadataMapper.xml @@ -85,7 +85,7 @@ select from core.event_metadata em - inner join core.event e on em.event_id = e.id + join core.event e on em.event_id = e.id where em.document_id = #{documentId,jdbcType=VARCHAR} @@ -97,10 +97,7 @@ from core.event_metadata em - inner join core.event e - on - em.event_id = - e.id + join core.event e on em.event_id = e.id @@ -110,6 +107,30 @@ + + + + + diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml index c72d802ef4..2870e74f4b 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml @@ -5,16 +5,18 @@ + + @@ -22,13 +24,12 @@ - @@ -62,7 +63,7 @@ @@ -96,17 +97,17 @@ - id, event_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, event_type, - event_date, provider_id, location_id, team, team_id, date_created, date_edited, date_deleted, - document_id + id, event_id, document_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, + event_type, event_date, entity_type, provider_id, location_id, team, team_id, date_created, + date_edited, date_deleted select count(*) from core.event_metadata @@ -294,7 +301,7 @@ update core.event_metadata @@ -304,6 +311,9 @@ event_id = #{record.eventId,jdbcType=BIGINT}, + + document_id = #{record.documentId,jdbcType=VARCHAR}, + base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, @@ -322,6 +332,9 @@ event_date = #{record.eventDate,jdbcType=DATE}, + + entity_type = #{record.entityType,jdbcType=VARCHAR}, + provider_id = #{record.providerId,jdbcType=VARCHAR}, @@ -343,9 +356,6 @@ date_deleted = #{record.dateDeleted,jdbcType=DATE}, - - document_id = #{record.documentId,jdbcType=VARCHAR}, - @@ -355,25 +365,26 @@ update core.event_metadata set id = #{record.id,jdbcType=BIGINT}, event_id = #{record.eventId,jdbcType=BIGINT}, + document_id = #{record.documentId,jdbcType=VARCHAR}, base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, form_submission_id = #{record.formSubmissionId,jdbcType=VARCHAR}, server_version = #{record.serverVersion,jdbcType=BIGINT}, openmrs_uuid = #{record.openmrsUuid,jdbcType=VARCHAR}, event_type = #{record.eventType,jdbcType=VARCHAR}, event_date = #{record.eventDate,jdbcType=DATE}, + entity_type = #{record.entityType,jdbcType=VARCHAR}, provider_id = #{record.providerId,jdbcType=VARCHAR}, location_id = #{record.locationId,jdbcType=VARCHAR}, team = #{record.team,jdbcType=VARCHAR}, team_id = #{record.teamId,jdbcType=VARCHAR}, date_created = #{record.dateCreated,jdbcType=DATE}, date_edited = #{record.dateEdited,jdbcType=DATE}, - date_deleted = #{record.dateDeleted,jdbcType=DATE}, - document_id = #{record.documentId,jdbcType=VARCHAR} + date_deleted = #{record.dateDeleted,jdbcType=DATE} @@ -382,13 +393,16 @@ update core.event_metadata event_id = #{eventId,jdbcType=BIGINT}, + + document_id = #{documentId,jdbcType=VARCHAR}, + base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, @@ -407,6 +421,9 @@ event_date = #{eventDate,jdbcType=DATE}, + + entity_type = #{entityType,jdbcType=VARCHAR}, + provider_id = #{providerId,jdbcType=VARCHAR}, @@ -428,9 +445,6 @@ date_deleted = #{dateDeleted,jdbcType=DATE}, - - document_id = #{documentId,jdbcType=VARCHAR}, - where id = #{id,jdbcType=BIGINT} @@ -438,24 +452,25 @@ update core.event_metadata set event_id = #{eventId,jdbcType=BIGINT}, + document_id = #{documentId,jdbcType=VARCHAR}, base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, form_submission_id = #{formSubmissionId,jdbcType=VARCHAR}, server_version = #{serverVersion,jdbcType=BIGINT}, openmrs_uuid = #{openmrsUuid,jdbcType=VARCHAR}, event_type = #{eventType,jdbcType=VARCHAR}, event_date = #{eventDate,jdbcType=DATE}, + entity_type = #{entityType,jdbcType=VARCHAR}, provider_id = #{providerId,jdbcType=VARCHAR}, location_id = #{locationId,jdbcType=VARCHAR}, team = #{team,jdbcType=VARCHAR}, team_id = #{teamId,jdbcType=VARCHAR}, date_created = #{dateCreated,jdbcType=DATE}, date_edited = #{dateEdited,jdbcType=DATE}, - date_deleted = #{dateDeleted,jdbcType=DATE}, - document_id = #{documentId,jdbcType=VARCHAR} + date_deleted = #{dateDeleted,jdbcType=DATE} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/service/EventService.java b/opensrp-core/src/main/java/org/opensrp/service/EventService.java index 6df33f3403..8182e96c19 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/EventService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/EventService.java @@ -4,6 +4,7 @@ import java.lang.reflect.Field; import java.util.Arrays; +import java.util.Calendar; import java.util.HashMap; import java.util.List; import java.util.Map; @@ -50,15 +51,7 @@ public Event getById(String id) { } public Event getByBaseEntityAndFormSubmissionId(String baseEntityId, String formSubmissionId) { - List el = allEvents.findByBaseEntityAndFormSubmissionId(baseEntityId, formSubmissionId); - if (el.size() > 1) { - throw new IllegalStateException("Multiple events for baseEntityId and formSubmissionId combination (" - + baseEntityId + "," + formSubmissionId + ")"); - } - if (el.size() == 0) { - return null; - } - return el.get(0); + return allEvents.findByBaseEntityAndFormSubmissionId(baseEntityId, formSubmissionId); } public List findByBaseEntityId(String baseEntityId) { @@ -268,6 +261,15 @@ public List findByServerVersion(long serverVersion) { return allEvents.findByServerVersion(serverVersion); } + + public List notInOpenMRSByServerVersion(long serverVersion, Calendar calendar) { + return allEvents.notInOpenMRSByServerVersion(serverVersion, calendar); + } + + public List notInOpenMRSByServerVersionAndType(String type, long serverVersion, Calendar calendar) { + return allEvents.notInOpenMRSByServerVersionAndType(type, serverVersion, calendar); + } + public List getAll() { return allEvents.getAll(); } diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java index ac84fcddc9..338db8b23f 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java @@ -1,9 +1,13 @@ package org.opensrp.repository.postgres; -import static org.junit.Assert.*; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import java.util.Calendar; import java.util.List; +import org.joda.time.DateTime; import org.junit.FixMethodOrder; import org.junit.Test; import org.junit.runner.RunWith; @@ -32,6 +36,7 @@ public void test1Get() { assertEquals("Vaccination", event.getEventType()); //find non existent event assertNull(eventsRepository.get("05934ae338431f28bf4234gvnbvvh")); + assertNull(eventsRepository.get(null)); } @Test @@ -49,13 +54,231 @@ public void test3FindAllByIdentifier() { } @Test - public void test4findAllByIdentifierAndType() { + public void test4FindAllByIdentifierAndType() { assertTrue(eventsRepository.findAllByIdentifier(null, null).isEmpty()); List events = eventsRepository.findAllByIdentifier("OPENMRS_UUID", "06c8644b-b560-45fd-9af5-b6b1484e3504"); assertEquals("d59504cc-09ef-4d09-9dc3-8f7eb65882fd", events.get(0).getFormSubmissionId()); assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); + + assertTrue(eventsRepository.findAllByIdentifier("OPENMRS", "06c8644b-b560-45fd-9af5-b6b1484e3504").isEmpty()); } + @Test + public void test5FindById() { + Event event = eventsRepository.findById("05934ae338431f28bf6793b2419c319a"); + assertEquals("ea1f9439-a663-4073-93b9-6ef2b8bca3c1", event.getBaseEntityId()); + assertEquals("d960046a-e2a0-4bbf-b687-d41c2a52d8c8", event.getFormSubmissionId()); + assertEquals("Vaccination", event.getEventType()); + //find non existent event + assertNull(eventsRepository.findById("05934ae338431f28bf4234gvnbvvh")); + assertNull(eventsRepository.findById(null)); + } + + @Test + public void test6FindByFormSubmissionId() { + Event event = eventsRepository.findByFormSubmissionId("31c4a45a-09f4-4b01-abe8-a87526827df6"); + assertEquals("ea1f9439-a663-4073-93b9-6ef2b8bca3c1", event.getBaseEntityId()); + assertEquals("05934ae338431f28bf6793b241781149", event.getId()); + assertEquals("Growth Monitoring", event.getEventType()); + //find non existent event + assertNull(eventsRepository.findByFormSubmissionId("05934ae338431f28bf4234gvnbvvh")); + assertNull(eventsRepository.findByFormSubmissionId(null)); + } + + @Test + public void test7FindByBaseEntityId() { + List events = eventsRepository.findByBaseEntityId("58b33379-dab2-4f5c-8f09-6d2bd63023d8"); + assertEquals(7, events.size()); + + events = eventsRepository.findByBaseEntityId("43930c23-c787-4ddb-ab76-770f77e7b17d"); + assertEquals(1, events.size()); + assertEquals("6b3243e9-3d45-495c-af69-f012061def01", events.get(0).getFormSubmissionId()); + assertEquals("05934ae338431f28bf6793b24199e690", events.get(0).getId()); + assertEquals("New Woman Registration", events.get(0).getEventType()); + //non-existent records + assertTrue(eventsRepository.findByBaseEntityId("05934ae338431f28bf4234gvnbvvh").isEmpty()); + } + + @Test + public void test8FindByBaseEntityAndFormSubmissionId() { + Event event = eventsRepository.findByBaseEntityAndFormSubmissionId("58b33379-dab2-4f5c-8f09-6d2bd63023d8", + "baf8e663-71a1-4a30-8d40-2f3cab45a6d7"); + assertEquals("05934ae338431f28bf6793b241bdbb60", event.getId()); + + event = eventsRepository.findByBaseEntityAndFormSubmissionId("43930c23-c787-4ddb-ab76-770f77e7b17d", + "6b3243e9-3d45-495c-af69-f012061def01"); + assertEquals(3, event.getObs().size()); + assertEquals("05934ae338431f28bf6793b24199e690", event.getId()); + assertEquals("New Woman Registration", event.getEventType()); + //non-existent records + assertNull(eventsRepository.findByBaseEntityAndFormSubmissionId("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "34354")); + } + + @Test + public void test9FindByBaseEntityAndType() { + List events = eventsRepository.findByBaseEntityAndType("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "Vaccination"); + assertEquals(6, events.size()); + + events = eventsRepository.findByBaseEntityAndType("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "Birth Registration"); + assertEquals(1, events.size()); + assertEquals("d59504cc-09ef-4d09-9dc3-8f7eb65882fd", events.get(0).getFormSubmissionId()); + assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); + assertEquals(1521183592609l, events.get(0).getServerVersion().longValue()); + //non-existent records + assertTrue( + eventsRepository.findByBaseEntityAndType("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "Growth Monitoring").isEmpty()); + assertTrue(eventsRepository.findByBaseEntityAndType("58b33379", "Vaccination").isEmpty()); + } + + @Test + public void test10FindEvents() { + List events = eventsRepository.findEvents("58b33379-dab2-4f5c-8f09-6d2bd63023d8", null, null, null, null, + null, null, null, null, null, null); + assertEquals(7, events.size()); + + events = eventsRepository.findEvents("58b33379-dab2-4f5c-8f09-6d2bd63023d8", new DateTime("2018-01-10"), + new DateTime("2018-02-21"), null, null, null, null, null, null, null, null); + assertEquals(6, events.size()); + + events = eventsRepository.findEvents("58b33379-dab2-4f5c-8f09-6d2bd63023d8", new DateTime("2018-01-10"), + new DateTime(), "Vaccination", null, null, null, null, null, null, null); + assertEquals(6, events.size()); + + events = eventsRepository.findEvents("58b33379-dab2-4f5c-8f09-6d2bd63023d8", new DateTime("2018-01-10"), + new DateTime(), "Vaccination", "vaccination", null, null, null, null, null, null); + assertEquals(6, events.size()); + + events = eventsRepository.findEvents("58b33379-dab2-4f5c-8f09-6d2bd63023d8", new DateTime("2018-01-10"), + new DateTime(), "Vaccination", "vaccination", "biddemo", "42abc582-6658-488b-922e-7be500c070f3", null, null, + null, null); + assertEquals(6, events.size()); + + events = eventsRepository.findEvents("58b33379-dab2-4f5c-8f09-6d2bd63023d8", new DateTime("2018-01-10"), + new DateTime(), "Vaccination", "vaccination", "biddemo", "42abc582-6658-488b-922e-7be500c070f3", null, null, + "ATeam", "3453hgb454-4j345n-llk345"); + assertEquals(2, events.size()); + + events = eventsRepository.findEvents("58b33379-dab2-4f5c-8f09-6d2bd63023d8", new DateTime("2018-01-10"), + new DateTime(), "Vaccination", "vaccination", "biddemo", "42abc582-6658-488b-922e-7be500c070f3", new DateTime(), + new DateTime(), "ATeam", "3453hgb454-4j345n-llk345"); + assertTrue(events.isEmpty()); + } + + @Test(expected = RuntimeException.class) + public void test11FindEventsByDynamicQuery() { + eventsRepository.findEventsByDynamicQuery("baseEntityId:4234324"); + } + + @Test + public void test12FindByServerVersion() { + assertEquals(15, eventsRepository.findByServerVersion(0).size()); + assertEquals(10, eventsRepository.findByServerVersion(1521183592609l).size()); + assertTrue(eventsRepository.findByServerVersion(1521469045597l).isEmpty()); + } + + @Test + public void test13NotInOpenMRSByServerVersion() { + Calendar cal = Calendar.getInstance(); + assertEquals(7, eventsRepository.notInOpenMRSByServerVersion(0, cal).size()); + assertEquals(3, eventsRepository.notInOpenMRSByServerVersion(1521469045588l, cal).size()); + assertTrue(eventsRepository.notInOpenMRSByServerVersion(1521469045597l, cal).isEmpty()); + } + + @Test + public void test14NotInOpenMRSByServerVersionAndType() { + Calendar cal = Calendar.getInstance(); + assertEquals(4, eventsRepository.notInOpenMRSByServerVersionAndType("Growth Monitoring", 0, cal).size()); + assertEquals(3, + eventsRepository.notInOpenMRSByServerVersionAndType("Growth Monitoring", 1521469045588l, cal).size()); + assertTrue(eventsRepository.notInOpenMRSByServerVersion(1521469045597l, cal).isEmpty()); + } + + @Test + public void test15FindByClientAndConceptAndDate() { + List events = eventsRepository.findByClientAndConceptAndDate("58b33379-dab2-4f5c-8f09-6d2bd63023d8", + "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "1", "2018-01-10", new DateTime().toString("yyyy-MM-dd")); + assertEquals(5, events.size()); + + events = eventsRepository.findByClientAndConceptAndDate("58b33379-dab2-4f5c-8f09-6d2bd63023d8", + "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "1", "2018-03-20", new DateTime().toString("yyyy-MM-dd")); + + assertTrue(events.isEmpty()); + + events = eventsRepository.findByClientAndConceptAndDate("58b33379-dab2-4f5c-8f09-6d2bd63023d8", + "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "2018-02-21", "2018-03-19", new DateTime().toString("yyyy-MM-dd")); + + assertEquals(4, events.size()); + + events = eventsRepository.findByClientAndConceptAndDate("58b33379-dab2-4f5c-8f09-6d2bd63023d8", + "163531AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "Happy Kids Clinic", "2018-03-19", + new DateTime().toString("yyyy-MM-dd")); + + assertEquals(1, events.size()); + + } + + @Test + public void test16FindByBaseEntityIdAndConceptParentCode() { + List events = eventsRepository.findByBaseEntityIdAndConceptParentCode("58b33379-dab2-4f5c-8f09-6d2bd63023d8", + "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); + assertEquals(2, events.size()); + + events = eventsRepository.findByBaseEntityIdAndConceptParentCode("58b33379-dab2-4f5c-8f09-6d2bd63023d8", + "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); + + assertEquals(1, events.size()); + + assertEquals("05934ae338431f28bf6793b241bdbc55", events.get(0).getId()); + + events = eventsRepository.findByBaseEntityIdAndConceptParentCode("58b33379-dab2-4f5c-8f09-6d2bd63023d8", + "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); + + assertTrue(events.isEmpty()); + } + + @Test + public void test15FindByConceptAndValue() { + List events = eventsRepository.findByConceptAndValue("1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "1"); + assertEquals(8, events.size()); + + events = eventsRepository.findByConceptAndValue("1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "5"); + + assertTrue(events.isEmpty()); + + events = eventsRepository.findByConceptAndValue("1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "2018-02-21"); + + assertEquals(4, events.size()); + + events = eventsRepository.findByConceptAndValue("163531AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "Happy Kids Clinic"); + + assertEquals(1, events.size()); + + } + + @Test + public void test16findByEmptyServerVersion() { + assertEquals(0, eventsRepository.findByEmptyServerVersion().size()); + } + + @Test + public void test17findEvents() { + + } + + /*@Test + public void test18findEventByEventTypeBetweenTwoDates() { + List events = eventsRepository.getAll(); + for (Event event : events) { + Calendar cal = Calendar.getInstance(); + cal.set(Calendar.DATE, 1); + event.setServerVersion(cal.getTimeInMillis()); + eventsRepository.update(event); + } + assertEquals(10, eventsRepository.findEventByEventTypeBetweenTwoDates("Vaccination").size()); + assertEquals(4, eventsRepository.findEventByEventTypeBetweenTwoDates("Growth Monitoring").size()); + assertEquals(1, eventsRepository.findEventByEventTypeBetweenTwoDates("Birth Registration").size()); + }*/ + @Test public void test30Add() { List events = eventsRepository.getAll(); diff --git a/opensrp-core/src/test/resources/test-persistence-postgres.xml b/opensrp-core/src/test/resources/test-persistence-postgres.xml index 0c2679381a..ebd082c8d4 100644 --- a/opensrp-core/src/test/resources/test-persistence-postgres.xml +++ b/opensrp-core/src/test/resources/test-persistence-postgres.xml @@ -15,7 +15,7 @@ + ignore-failures="ALL" > diff --git a/opensrp-core/src/test/resources/test-scripts/data.sql b/opensrp-core/src/test/resources/test-scripts/data.sql index 364fd88ae8..a21f376cba 100644 --- a/opensrp-core/src/test/resources/test-scripts/data.sql +++ b/opensrp-core/src/test/resources/test-scripts/data.sql @@ -6,6 +6,10 @@ INSERT INTO core.app_state_token (id, name, description, value, last_edited_date (4, 'sync_event_by_date_updated', 'OpenMRS data pusher token to keep track of new / updated events synced ', '343232', 1521017416), (5, 'sync_event_by_date_voided', 'OpenMRS data pusher token to keep track of voided events synced ', '23432', 1521017416); + +--clients + + --events INSERT INTO core.event (id, json, date_deleted) VALUES @@ -17,28 +21,28 @@ INSERT INTO core.event (id, json, date_deleted) VALUES (6, '{"id": "05934ae338431f28bf6793b241bdbb60", "obs": [{"set": [], "values": ["2018-01-10"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "opv_0", "humanReadableValues": []}, {"set": [], "values": ["0"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "opv_0_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602537, "duration": 0, "revision": "2-45e4b7c82520480edbc1adecec55f6ae", "eventDate": "2018-01-10T11:59:37.380+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:00.949+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.371+03:00", "identifiers": {"OPENMRS_UUID": "35d6a414-a379-4ada-97ee-39f680eecb91"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "baf8e663-71a1-4a30-8d40-2f3cab45a6d7"}', null), (7, '{"id": "05934ae338431f28bf6793b241bdbc55", "obs": [{"set": [], "values": ["2018-01-10"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "bcg", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "bcg_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602575, "duration": 0, "revision": "2-1f5e07f8e65a09d5ca34cb21e6a29b41", "eventDate": "2018-01-10T11:59:41.058+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.148+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.376+03:00", "identifiers": {"OPENMRS_UUID": "94ec8561-14ab-48d1-a6d4-4ae05191f6e6"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "014413c8-4dbf-4876-977d-0c1dfb9e4d05"}', null), (8, '{"id": "05934ae338431f28bf6793b241bdc231", "obs": [{"set": [], "values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "1685AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "penta_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "1685AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "penta_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602635, "duration": 0, "revision": "2-ad81df44c1f2eaba862585dd8918a16e", "eventDate": "2018-02-21T11:59:50.145+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.341+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.385+03:00", "identifiers": {"OPENMRS_UUID": "85abab15-0be3-4a9d-962d-de99a920d3cb"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "5f1b201d-2132-4eb9-8fa1-3169a61cc50a"}', null), -(9, '{"id": "05934ae338431f28bf6793b241bdc3df", "obs": [{"set": [], "values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "opv_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "opv_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602672, "duration": 0, "revision": "2-9f892924c7e9afe675bdb9f9a3d6231f", "eventDate": "2018-02-21T11:59:55.977+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.537+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.390+03:00", "identifiers": {"OPENMRS_UUID": "28baa742-4a00-480f-9fff-12629c765cc2"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "4bc04bbe-bb2f-4e4e-b123-0c6131b91fec"}', null), -(10, '{"id": "05934ae338431f28bf6793b241bdc44a", "obs": [{"set": [], "values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "159698AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "rota_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "159698AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "rota_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602735, "duration": 0, "revision": "2-3514437b6b19290b16b49714bf0182e8", "eventDate": "2018-02-21T12:00:02.298+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.729+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.394+03:00", "identifiers": {"OPENMRS_UUID": "34701637-5c2f-4483-a05e-46df003990ef"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "6947237c-5e2b-4ccd-953b-dd8b019e0484"}', null), -(11, '{"id": "05934ae338431f28bf6793b241be69a5", "obs": [{"set": [], "values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "pcv_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "pcv_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183849328, "duration": 0, "revision": "2-1ef09e6758ecd9f2adaa1eb35e143a7b", "eventDate": "2018-02-21T12:00:08.788+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:13:03.469+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.398+03:00", "identifiers": {"OPENMRS_UUID": "4aecc0c1-e008-4227-938d-66db17236a3d"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521184133098, "formSubmissionId": "d6c08393-ebde-4faa-ac94-11429c1233dd"}', null), +(9, '{"id": "05934ae338431f28bf6793b241bdc3df", "obs": [{"set": [], "values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "opv_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "opv_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602672, "duration": 0, "revision": "2-9f892924c7e9afe675bdb9f9a3d6231f", "eventDate": "2018-02-21T11:59:55.977+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.537+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.390+03:00", "identifiers": {"OPENMRS_UUID": "28baa742-4a00-480f-9fff-12629c765cc2"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "team":"ATeam", "teamId":"3453hgb454-4j345n-llk345","serverVersion": 1521183593424, "formSubmissionId": "4bc04bbe-bb2f-4e4e-b123-0c6131b91fec"}', null), +(10, '{"id": "05934ae338431f28bf6793b241bdc44a", "obs": [{"set": [], "values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "159698AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "rota_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "159698AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "rota_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602735, "duration": 0, "revision": "2-3514437b6b19290b16b49714bf0182e8", "eventDate": "2018-02-21T12:00:02.298+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.729+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.394+03:00", "identifiers": {"OPENMRS_UUID": "34701637-5c2f-4483-a05e-46df003990ef"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8","team":"ATeam", "teamId":"3453hgb454-4j345n-llk345", "serverVersion": 1521183593424, "formSubmissionId": "6947237c-5e2b-4ccd-953b-dd8b019e0484"}', null), +(11, '{"id": "05934ae338431f28bf6793b241be69a5", "obs": [{"set": [], "values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "pcv_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "pcv_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183849328, "duration": 0, "revision": "2-1ef09e6758ecd9f2adaa1eb35e143a7b", "eventDate": "2018-02-21T12:00:08.788+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:13:03.469+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.398+03:00", "identifiers": {"OPENMRS_UUID": "4aecc0c1-e008-4227-938d-66db17236a3d"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "team":"ATeam", "teamId":"3453hgb454-4j345n-llk345","serverVersion": 1521184133098, "formSubmissionId": "d6c08393-ebde-4faa-ac94-11429c1233dd"}', null), (12, '{"id": "05934ae338431f28bf6793b24177a1dc", "obs": [{"set": [], "values": ["8.6"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"set": [], "values": ["-0.3160736521259359"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468856705, "duration": 0, "revision": "65-9ed92fd61bd67d89325ee3ea35c3f3cb", "eventDate": "2018-01-13T19:37:11.954+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:15.649+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:28:40.255+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045587, "formSubmissionId": "306b6dc2-fa15-4e48-9ac3-4f8044899051"}', null), (13, '{"id": "05934ae338431f28bf6793b241780bac", "obs": [{"set": [], "values": ["11.8"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"set": [], "values": ["2.0903075436287146"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468857114, "duration": 0, "revision": "65-81466693915e45bc1feb1f8ccc466475", "eventDate": "2018-03-12T19:40:01.023+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:15.789+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:28:40.260+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045588, "formSubmissionId": "9bd94f7b-d7f5-4e38-bc0d-2fa7eb84dad3"}', null), -(14, '{"id": "05934ae338431f28bf6793b241781149", "obs": [{"set": [], "values": ["7.6"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"set": [], "values": ["0.10700349151262006"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468857524, "duration": 0, "revision": "65-9a91db1bb8e76c4c8a163c282c5d7479", "eventDate": "2017-09-06T19:40:24.702+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:15.929+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:28:40.264+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045589, "formSubmissionId": "31c4a45a-09f4-4b01-abe8-a87526827df6"}', null), -(15, '{"id": "05934ae338431f28bf6793b241781a1e", "obs": [{"set": [], "values": ["9.3"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"set": [], "values": ["1.0535868964441777"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468857912, "duration": 0, "revision": "65-bb37dd0fda12683a31217d1157d86539", "eventDate": "2017-11-06T19:42:02.327+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:16.069+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:28:40.268+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045590, "formSubmissionId": "3f66450e-2b66-43da-9b9b-dae5fced764f"}', null); +(14, '{"id": "05934ae338431f28bf6793b241781149", "obs": [{"set": [], "values": ["7.6"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"set": [], "values": ["0.10700349151262006"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468857524, "duration": 0, "revision": "65-9a91db1bb8e76c4c8a163c282c5d7479", "eventDate": "2017-09-06T19:40:24.702+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:15.929+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af5", "providerId": "biddemo2", "dateCreated": "2018-03-19T17:28:40.264+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045589, "formSubmissionId": "31c4a45a-09f4-4b01-abe8-a87526827df6"}', null), +(15, '{"id": "05934ae338431f28bf6793b241781a1e", "obs": [{"set": [], "values": ["9.3"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"set": [], "values": ["1.0535868964441777"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468857912, "duration": 0, "revision": "65-bb37dd0fda12683a31217d1157d86539", "eventDate": "2017-11-06T19:42:02.327+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:16.069+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af5", "providerId": "biddemo2", "dateCreated": "2018-03-19T17:28:40.268+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045590, "formSubmissionId": "3f66450e-2b66-43da-9b9b-dae5fced764f"}', null); -INSERT INTO core.event_metadata (id, event_id, document_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, event_type, event_date, provider_id, location_id, team, team_id, date_created, date_edited, date_deleted) VALUES -(1, 1, '05934ae338431f28bf6793b2417696bf', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '29243014-48df-4165-a82d-f4878f6a830e', 1520945634380, null, 'vaccination', '2018-03-13', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), -(2, 3, '05934ae338431f28bf6793b24199e690', '43930c23-c787-4ddb-ab76-770f77e7b17d', '6b3243e9-3d45-495c-af69-f012061def01', 1521016638453, 'd3630a60-a1f4-4267-9225-f4cb728f4178', 'mother', '2018-03-14', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), -(3, 3, '05934ae338431f28bf6793b2419c64fb', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', 'bfbfabe8-d4ae-4db2-940f-a6f126ef7829', 1521033533700, null, 'vaccination', '2018-03-14', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), -(4, 4, '05934ae338431f28bf6793b2419c319a', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', 'd960046a-e2a0-4bbf-b687-d41c2a52d8c8', 1521044588444, null, 'vaccination', '2018-03-13', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), -(5, 5, '05934ae338431f28bf6793b241bdb88c', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'd59504cc-09ef-4d09-9dc3-8f7eb65882fd', 1521183592609, '06c8644b-b560-45fd-9af5-b6b1484e3504', 'child', '2018-03-16', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), -(6, 6, '05934ae338431f28bf6793b241bdbb60', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'baf8e663-71a1-4a30-8d40-2f3cab45a6d7', 1521183593424, '35d6a414-a379-4ada-97ee-39f680eecb91', 'vaccination', '2018-01-10', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), -(7, 7, '05934ae338431f28bf6793b241bdbc55', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '014413c8-4dbf-4876-977d-0c1dfb9e4d05', 1521183593424, '94ec8561-14ab-48d1-a6d4-4ae05191f6e6', 'vaccination', '2018-01-10', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), -(8, 8, '05934ae338431f28bf6793b241bdc231', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '5f1b201d-2132-4eb9-8fa1-3169a61cc50a', 1521183593424, '85abab15-0be3-4a9d-962d-de99a920d3cb', 'vaccination', '2018-02-21', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), -(9, 9, '05934ae338431f28bf6793b241bdc3df', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '4bc04bbe-bb2f-4e4e-b123-0c6131b91fec', 1521183593424, '28baa742-4a00-480f-9fff-12629c765cc2', 'vaccination', '2018-02-21', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), -(10, 10, '05934ae338431f28bf6793b241bdc44a', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '6947237c-5e2b-4ccd-953b-dd8b019e0484', 1521183593424, '34701637-5c2f-4483-a05e-46df003990ef', 'vaccination', '2018-02-21', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), -(11, 11, '05934ae338431f28bf6793b241be69a5', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'd6c08393-ebde-4faa-ac94-11429c1233dd', 1521184133098, '4aecc0c1-e008-4227-938d-66db17236a3d', 'vaccination', '2018-02-21', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), -(12, 12, '05934ae338431f28bf6793b24177a1dc', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '306b6dc2-fa15-4e48-9ac3-4f8044899051', 1521469045587, null, 'weight', '2018-01-13', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), -(13, 13, '05934ae338431f28bf6793b241780bac', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '9bd94f7b-d7f5-4e38-bc0d-2fa7eb84dad3', 1521469045588, null, 'weight', '2018-03-12', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), -(14, 14, '05934ae338431f28bf6793b241781149', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '31c4a45a-09f4-4b01-abe8-a87526827df6', 1521469045589, null, 'weight', '2017-09-06', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), -(15, 15, '05934ae338431f28bf6793b241781a1e', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '3f66450e-2b66-43da-9b9b-dae5fced764f', 1521469045590, null, 'weight', '2017-11-06', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null); +INSERT INTO core.event_metadata (id, event_id, document_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, event_type, event_date, entity_type ,provider_id, location_id, team, team_id, date_created, date_edited, date_deleted) VALUES +(1, 1, '05934ae338431f28bf6793b2417696bf', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '29243014-48df-4165-a82d-f4878f6a830e', 1520945634380, null, 'Vaccination', '2018-03-13', 'vaccination', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), +(2, 2, '05934ae338431f28bf6793b24199e690', '43930c23-c787-4ddb-ab76-770f77e7b17d', '6b3243e9-3d45-495c-af69-f012061def01', 1521016638453, 'd3630a60-a1f4-4267-9225-f4cb728f4178', 'Vaccination', '2018-03-14', 'mother', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), +(3, 3, '05934ae338431f28bf6793b2419c64fb', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', 'bfbfabe8-d4ae-4db2-940f-a6f126ef7829', 1521033533700, null, 'Vaccination', '2018-03-14', 'vaccination', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), +(4, 4, '05934ae338431f28bf6793b2419c319a', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', 'd960046a-e2a0-4bbf-b687-d41c2a52d8c8', 1521044588444, null, 'Vaccination', '2018-03-13', 'vaccination', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), +(5, 5, '05934ae338431f28bf6793b241bdb88c', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'd59504cc-09ef-4d09-9dc3-8f7eb65882fd', 1521183592609, '06c8644b-b560-45fd-9af5-b6b1484e3504', 'Birth Registration', '2018-03-16', 'child', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), +(6, 6, '05934ae338431f28bf6793b241bdbb60', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'baf8e663-71a1-4a30-8d40-2f3cab45a6d7', 1521183593424, '35d6a414-a379-4ada-97ee-39f680eecb91', 'Vaccination', '2018-01-10', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), +(7, 7, '05934ae338431f28bf6793b241bdbc55', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '014413c8-4dbf-4876-977d-0c1dfb9e4d05', 1521183593424, '94ec8561-14ab-48d1-a6d4-4ae05191f6e6', 'Vaccination', '2018-01-10', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), +(8, 8, '05934ae338431f28bf6793b241bdc231', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '5f1b201d-2132-4eb9-8fa1-3169a61cc50a', 1521183593424, '85abab15-0be3-4a9d-962d-de99a920d3cb', 'Vaccination', '2018-02-21', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), +(9, 9, '05934ae338431f28bf6793b241bdc3df', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '4bc04bbe-bb2f-4e4e-b123-0c6131b91fec', 1521183593424, '28baa742-4a00-480f-9fff-12629c765cc2', 'Vaccination', '2018-02-21', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', 'ATeam', '3453hgb454-4j345n-llk345', '2018-03-19', null, null), +(10, 10, '05934ae338431f28bf6793b241bdc44a', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '6947237c-5e2b-4ccd-953b-dd8b019e0484', 1521183593424, '34701637-5c2f-4483-a05e-46df003990ef', 'Vaccination', '2018-02-21', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', 'ATeam', '3453hgb454-4j345n-llk345', '2018-03-19', null, null), +(11, 11, '05934ae338431f28bf6793b241be69a5', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'd6c08393-ebde-4faa-ac94-11429c1233dd', 1521184133098, '4aecc0c1-e008-4227-938d-66db17236a3d', 'Vaccination', '2018-02-21', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', 'BTeam', '3453hgb454-4j345n-llk348', '2018-03-19', null, null), +(12, 12, '05934ae338431f28bf6793b24177a1dc', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '306b6dc2-fa15-4e48-9ac3-4f8044899051', 1521469045587, null, 'Growth Monitoring', '2018-01-13', 'weight', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), +(13, 13, '05934ae338431f28bf6793b241780bac', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '9bd94f7b-d7f5-4e38-bc0d-2fa7eb84dad3', 1521469045588, null, 'Growth Monitoring', '2018-03-12', 'weight', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), +(14, 14, '05934ae338431f28bf6793b241781149', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '31c4a45a-09f4-4b01-abe8-a87526827df6', 1521469045589, null, 'Growth Monitoring', '2017-09-06', 'weight', 'biddemo2', '42b88545-7ebb-4e11-8d1a-3d3a924c8af5', null, null, '2018-03-19', null, null), +(15, 15, '05934ae338431f28bf6793b241781a1e', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '3f66450e-2b66-43da-9b9b-dae5fced764f', 1521469045590, null, 'Growth Monitoring', '2017-11-06', 'weight', 'biddemo2', '42b88545-7ebb-4e11-8d1a-3d3a924c8af5', null, null, '2018-03-19', null, null); From cd69e3e0288b7fe89caf00158c0356fcd17a5004 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Tue, 20 Mar 2018 19:17:54 +0300 Subject: [PATCH 060/133] Events Repository Unit tests --- .../postgres/EventsRepositoryImpl.java | 19 ++- .../postgres/EventsRepositoryTest.java | 130 +++++++++++++----- 2 files changed, 109 insertions(+), 40 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java index 11ec3ed545..6d955ecf2a 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java @@ -5,6 +5,7 @@ import java.util.Calendar; import java.util.Date; import java.util.List; +import java.util.UUID; import org.apache.commons.lang3.StringUtils; import org.joda.time.DateTime; @@ -51,6 +52,9 @@ public void add(Event entity) { return; } + if (entity.getId() == null) + entity.setId(UUID.randomUUID().toString()); + org.opensrp.domain.postgres.Event pgEvent = convert(entity, null); if (pgEvent == null) { return; @@ -213,6 +217,8 @@ public List findEvents(String baseEntityId, DateTime from, DateTime to, S criteria.andTeamEqualTo(team); if (StringUtils.isNotEmpty(teamId)) criteria.andTeamIdEqualTo(teamId); + if (example.getOredCriteria().isEmpty()) + throw new RuntimeException("Atleast one search filter must be specified"); return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, DEFAULT_FETCH_SIZE)); } @@ -325,13 +331,19 @@ public List findEvents(String team, String teamId, String providerId, Str } if (serverVersion != null) criteria.andServerVersionGreaterThanOrEqualTo(serverVersion); - sortBy = sortBy == BaseEntity.SERVER_VERSIOIN ? SERVER_VERSION : sortBy; + if (example.getOredCriteria().isEmpty()) + throw new RuntimeException("Atleast one search filter must be specified"); + sortBy = sortBy == null || sortBy == BaseEntity.SERVER_VERSIOIN ? SERVER_VERSION : sortBy; + if (sortOrder == null || !sortOrder.toLowerCase().matches("(asc)|(desc)")) + sortOrder = "asc"; example.setOrderByClause(sortBy + " " + sortOrder); return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, limit)); } /** - * Compatibility method inherited from couch to fetch events of a given type within the current month + * Compatibility method inherited from couch to fetch events of a given type within the current + * month + * * @param eventType the type of event to query * @return list of events of given type within the current month */ @@ -339,6 +351,9 @@ public List findEvents(String team, String teamId, String providerId, Str public List findEventByEventTypeBetweenTwoDates(String eventType) { Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.DATE, 1); + calendar.set(Calendar.HOUR, 0); + calendar.set(Calendar.MINUTE, 0); + calendar.set(Calendar.MILLISECOND, 0); EventMetadataExample example = new EventMetadataExample(); example.createCriteria().andEventTypeEqualTo(eventType).andServerVersionBetween(calendar.getTimeInMillis(), System.currentTimeMillis()); diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java index 338db8b23f..3f066b2d7c 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java @@ -12,7 +12,9 @@ import org.junit.Test; import org.junit.runner.RunWith; import org.junit.runners.MethodSorters; +import org.opensrp.common.AllConstants.BaseEntity; import org.opensrp.domain.Event; +import org.opensrp.domain.Obs; import org.opensrp.repository.EventsRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; @@ -29,7 +31,7 @@ public class EventsRepositoryTest { private EventsRepository eventsRepository; @Test - public void test1Get() { + public void testGet() { Event event = eventsRepository.get("05934ae338431f28bf6793b2419c319a"); assertEquals("ea1f9439-a663-4073-93b9-6ef2b8bca3c1", event.getBaseEntityId()); assertEquals("d960046a-e2a0-4bbf-b687-d41c2a52d8c8", event.getFormSubmissionId()); @@ -40,13 +42,13 @@ public void test1Get() { } @Test - public void test2GetAll() { + public void testGetAll() { List events = eventsRepository.getAll(); assertEquals(15, events.size()); } @Test - public void test3FindAllByIdentifier() { + public void testFindAllByIdentifier() { assertTrue(eventsRepository.findAllByIdentifier(null).isEmpty()); List events = eventsRepository.findAllByIdentifier("06c8644b-b560-45fd-9af5-b6b1484e3504"); assertEquals("d59504cc-09ef-4d09-9dc3-8f7eb65882fd", events.get(0).getFormSubmissionId()); @@ -54,7 +56,7 @@ public void test3FindAllByIdentifier() { } @Test - public void test4FindAllByIdentifierAndType() { + public void testFindAllByIdentifierAndType() { assertTrue(eventsRepository.findAllByIdentifier(null, null).isEmpty()); List events = eventsRepository.findAllByIdentifier("OPENMRS_UUID", "06c8644b-b560-45fd-9af5-b6b1484e3504"); assertEquals("d59504cc-09ef-4d09-9dc3-8f7eb65882fd", events.get(0).getFormSubmissionId()); @@ -64,7 +66,7 @@ public void test4FindAllByIdentifierAndType() { } @Test - public void test5FindById() { + public void testFindById() { Event event = eventsRepository.findById("05934ae338431f28bf6793b2419c319a"); assertEquals("ea1f9439-a663-4073-93b9-6ef2b8bca3c1", event.getBaseEntityId()); assertEquals("d960046a-e2a0-4bbf-b687-d41c2a52d8c8", event.getFormSubmissionId()); @@ -75,7 +77,7 @@ public void test5FindById() { } @Test - public void test6FindByFormSubmissionId() { + public void testFindByFormSubmissionId() { Event event = eventsRepository.findByFormSubmissionId("31c4a45a-09f4-4b01-abe8-a87526827df6"); assertEquals("ea1f9439-a663-4073-93b9-6ef2b8bca3c1", event.getBaseEntityId()); assertEquals("05934ae338431f28bf6793b241781149", event.getId()); @@ -86,7 +88,7 @@ public void test6FindByFormSubmissionId() { } @Test - public void test7FindByBaseEntityId() { + public void testFindByBaseEntityId() { List events = eventsRepository.findByBaseEntityId("58b33379-dab2-4f5c-8f09-6d2bd63023d8"); assertEquals(7, events.size()); @@ -100,7 +102,7 @@ public void test7FindByBaseEntityId() { } @Test - public void test8FindByBaseEntityAndFormSubmissionId() { + public void testFindByBaseEntityAndFormSubmissionId() { Event event = eventsRepository.findByBaseEntityAndFormSubmissionId("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "baf8e663-71a1-4a30-8d40-2f3cab45a6d7"); assertEquals("05934ae338431f28bf6793b241bdbb60", event.getId()); @@ -115,7 +117,7 @@ public void test8FindByBaseEntityAndFormSubmissionId() { } @Test - public void test9FindByBaseEntityAndType() { + public void testFindByBaseEntityAndType() { List events = eventsRepository.findByBaseEntityAndType("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "Vaccination"); assertEquals(6, events.size()); @@ -131,7 +133,7 @@ public void test9FindByBaseEntityAndType() { } @Test - public void test10FindEvents() { + public void testFindEvents() { List events = eventsRepository.findEvents("58b33379-dab2-4f5c-8f09-6d2bd63023d8", null, null, null, null, null, null, null, null, null, null); assertEquals(7, events.size()); @@ -165,19 +167,19 @@ public void test10FindEvents() { } @Test(expected = RuntimeException.class) - public void test11FindEventsByDynamicQuery() { + public void testFindEventsByDynamicQuery() { eventsRepository.findEventsByDynamicQuery("baseEntityId:4234324"); } @Test - public void test12FindByServerVersion() { + public void testFindByServerVersion() { assertEquals(15, eventsRepository.findByServerVersion(0).size()); assertEquals(10, eventsRepository.findByServerVersion(1521183592609l).size()); assertTrue(eventsRepository.findByServerVersion(1521469045597l).isEmpty()); } @Test - public void test13NotInOpenMRSByServerVersion() { + public void testNotInOpenMRSByServerVersion() { Calendar cal = Calendar.getInstance(); assertEquals(7, eventsRepository.notInOpenMRSByServerVersion(0, cal).size()); assertEquals(3, eventsRepository.notInOpenMRSByServerVersion(1521469045588l, cal).size()); @@ -185,7 +187,7 @@ public void test13NotInOpenMRSByServerVersion() { } @Test - public void test14NotInOpenMRSByServerVersionAndType() { + public void testNotInOpenMRSByServerVersionAndType() { Calendar cal = Calendar.getInstance(); assertEquals(4, eventsRepository.notInOpenMRSByServerVersionAndType("Growth Monitoring", 0, cal).size()); assertEquals(3, @@ -194,7 +196,7 @@ public void test14NotInOpenMRSByServerVersionAndType() { } @Test - public void test15FindByClientAndConceptAndDate() { + public void testFindByClientAndConceptAndDate() { List events = eventsRepository.findByClientAndConceptAndDate("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "1", "2018-01-10", new DateTime().toString("yyyy-MM-dd")); assertEquals(5, events.size()); @@ -218,7 +220,7 @@ public void test15FindByClientAndConceptAndDate() { } @Test - public void test16FindByBaseEntityIdAndConceptParentCode() { + public void testFindByBaseEntityIdAndConceptParentCode() { List events = eventsRepository.findByBaseEntityIdAndConceptParentCode("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); assertEquals(2, events.size()); @@ -237,7 +239,7 @@ public void test16FindByBaseEntityIdAndConceptParentCode() { } @Test - public void test15FindByConceptAndValue() { + public void testFindByConceptAndValue() { List events = eventsRepository.findByConceptAndValue("1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "1"); assertEquals(8, events.size()); @@ -256,44 +258,96 @@ public void test15FindByConceptAndValue() { } @Test - public void test16findByEmptyServerVersion() { - assertEquals(0, eventsRepository.findByEmptyServerVersion().size()); + public void testFindEvents2() { + List events = eventsRepository.findEvents("ATeam", "3453hgb454-4j345n-llk345", null, null, null, null, null, + null, 20); + assertEquals(2, events.size()); + + events = eventsRepository.findEvents("ATeam,BTeam", null, null, null, null, null, null, null, 20); + assertEquals(3, events.size()); + + events = eventsRepository.findEvents(null, null, "biddemo,biddemo2", + "42b88545-7ebb-4e11-8d1a-3d3a924c8af4,42b88545-7ebb-4e11-8d1a-3d3a924c8af5", null, null, null, null, 20); + assertEquals(7, events.size()); + + events = eventsRepository.findEvents(null, null, "biddemo,biddemo2", + "42b88545-7ebb-4e11-8d1a-3d3a924c8af4,42b88545-7ebb-4e11-8d1a-3d3a924c8af5", + "58b33379-dab2-4f5c-8f09-6d2bd63023d8", null, null, null, 20); + assertEquals(0, events.size()); + + events = eventsRepository.findEvents(null, null, "biddemo,biddemo2", "42abc582-6658-488b-922e-7be500c070f3", + "58b33379-dab2-4f5c-8f09-6d2bd63023d8", null, null, null, 20); + assertEquals(7, events.size()); + + events = eventsRepository.findEvents("ATeam,BTeam", "3453hgb454-4j345n-llk345,3453hgb454-4j345n-llk348", "biddemo", + "42abc582-6658-488b-922e-7be500c070f3", "58b33379-dab2-4f5c-8f09-6d2bd63023d8", 0l, BaseEntity.SERVER_VERSIOIN, + "asc", 20); + assertEquals(3, events.size()); } @Test - public void test17findEvents() { - + public void testZ1Update() { + Event event = eventsRepository.get("05934ae338431f28bf6793b2419c64fb"); + long now = System.currentTimeMillis(); + event.setServerVersion(now); + event.setDateEdited(new DateTime(now)); + Obs obs = new Obs("concept", "text", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "25-Apr-2017", null, + "Date_Reaction"); + event.addObs(obs); + eventsRepository.update(event); + event = eventsRepository.get("05934ae338431f28bf6793b2419c64fb"); + assertEquals(now, event.getServerVersion().longValue()); + assertEquals(new DateTime(now), event.getDateEdited()); + assertEquals(3, event.getObs().size()); + assertEquals(obs.getValue(), event.getObs(null, "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValue()); + } + + @Test + public void testZ2FindByEmptyServerVersion() { + assertEquals(0, eventsRepository.findByEmptyServerVersion().size()); + Event event = eventsRepository.get("05934ae338431f28bf6793b241bdb88c"); + event.setServerVersion(0l); + eventsRepository.update(event); + assertEquals(1, eventsRepository.findByEmptyServerVersion().size()); + assertEquals("05934ae338431f28bf6793b241bdb88c", eventsRepository.findByEmptyServerVersion().get(0).getId()); } - /*@Test - public void test18findEventByEventTypeBetweenTwoDates() { + @Test + public void testZ3findEventByEventTypeBetweenTwoDates() { List events = eventsRepository.getAll(); + Calendar cal = Calendar.getInstance(); + cal.set(Calendar.DATE, 1); for (Event event : events) { - Calendar cal = Calendar.getInstance(); - cal.set(Calendar.DATE, 1); event.setServerVersion(cal.getTimeInMillis()); eventsRepository.update(event); } - assertEquals(10, eventsRepository.findEventByEventTypeBetweenTwoDates("Vaccination").size()); + assertEquals(9, eventsRepository.findEventByEventTypeBetweenTwoDates("Vaccination").size()); assertEquals(4, eventsRepository.findEventByEventTypeBetweenTwoDates("Growth Monitoring").size()); assertEquals(1, eventsRepository.findEventByEventTypeBetweenTwoDates("Birth Registration").size()); - }*/ - - @Test - public void test30Add() { - List events = eventsRepository.getAll(); - assertEquals(15, events.size()); } @Test - public void test31Update() { - List events = eventsRepository.getAll(); - assertEquals(15, events.size()); + public void testZ4SafeRemove() { + Event event = eventsRepository.get("05934ae338431f28bf6793b241bdb88c"); + eventsRepository.safeRemove(event); + assertEquals(14, eventsRepository.getAll().size()); + assertNull(eventsRepository.get("05934ae338431f28bf6793b241bdb88c")); } @Test - public void test32SafeRemove() { - List events = eventsRepository.getAll(); - assertEquals(15, events.size()); + public void testZ5Add() { + Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); + Event event = new Event().withBaseEntityId("435534534543").withEventType("Growth Monitoring") + .withFormSubmissionId("gjhg34534 nvbnv3345345__4").withEventDate(new DateTime()).withObs(obs); + + eventsRepository.add(event); + + event = eventsRepository.findByFormSubmissionId("gjhg34534 nvbnv3345345__4"); + assertEquals("435534534543", event.getBaseEntityId()); + assertEquals("Growth Monitoring", event.getEventType()); + assertEquals(1, event.getObs().size()); + assertEquals("3.5", event.getObs(null, "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValue()); + } + } From 0dbaa102983305caaf4c8d2526fb9ed478c4bab7 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Wed, 21 Mar 2018 11:21:57 +0300 Subject: [PATCH 061/133] Load only relevant db init scripts for each Test suite --- .../AppStateTokensRepositoryTest.java | 20 +++--- .../postgres/BaseRepositoryTest.java | 64 +++++++++++++++++++ .../postgres/EventsRepositoryTest.java | 20 +++--- .../resources/test-persistence-postgres.xml | 6 -- .../test-scripts/app_state_token.sql | 12 ++++ .../test-scripts/{data.sql => event.sql} | 16 ++--- .../test/resources/test-scripts/schema.sql | 9 --- 7 files changed, 103 insertions(+), 44 deletions(-) create mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java create mode 100644 opensrp-core/src/test/resources/test-scripts/app_state_token.sql rename opensrp-core/src/test/resources/test-scripts/{data.sql => event.sql} (96%) delete mode 100644 opensrp-core/src/test/resources/test-scripts/schema.sql diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/AppStateTokensRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/AppStateTokensRepositoryTest.java index 0523519c0e..1b474674aa 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/AppStateTokensRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/AppStateTokensRepositoryTest.java @@ -4,28 +4,30 @@ import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import java.util.HashSet; import java.util.List; +import java.util.Set; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.MethodSorters; import org.opensrp.domain.AppStateToken; import org.opensrp.repository.AppStateTokensRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -@FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class AppStateTokensRepositoryTest { +public class AppStateTokensRepositoryTest extends BaseRepositoryTest{ @Autowired @Qualifier("appStateTokensRepositoryPostgres") private AppStateTokensRepository appStateTokensRepository; + + @Override + protected Set getDatabaseScripts() { + Set scripts = new HashSet(); + scripts.add("app_state_token.sql"); + return scripts; + } + @Test public void test1Get() { AppStateToken token = appStateTokensRepository.get("1"); diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java new file mode 100644 index 0000000000..8a6a9a75ba --- /dev/null +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java @@ -0,0 +1,64 @@ +package org.opensrp.repository.postgres; + +import java.sql.Connection; +import java.sql.SQLException; +import java.util.Set; + +import javax.sql.DataSource; + +import org.junit.Before; +import org.junit.FixMethodOrder; +import org.junit.runner.RunWith; +import org.junit.runners.MethodSorters; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.core.io.ClassPathResource; +import org.springframework.jdbc.datasource.DataSourceUtils; +import org.springframework.jdbc.datasource.init.ResourceDatabasePopulator; +import org.springframework.test.context.ContextConfiguration; +import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; + +@RunWith(SpringJUnit4ClassRunner.class) +@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") +@FixMethodOrder(MethodSorters.NAME_ASCENDING) +public abstract class BaseRepositoryTest { + + private static String TEST_SCRIPTS_ROOT_DIRECTORY = "test-scripts/"; + + @Autowired + private DataSource openSRPDataSource; + + protected boolean dbInitialized = false; + + /** + * Populates the configured {@link DataSource} with data from passed scripts + * + * @param the scripts to load + * @throws SQLException + */ + + @Before + public void populateDatabase() throws SQLException { + + if (dbInitialized) + return; + ResourceDatabasePopulator populator = new ResourceDatabasePopulator(); + for (String script : getDatabaseScripts()) { + populator.addScript(new ClassPathResource(TEST_SCRIPTS_ROOT_DIRECTORY + script)); + } + + Connection connection = null; + + try { + connection = DataSourceUtils.getConnection(openSRPDataSource); + populator.populate(connection); + } + finally { + if (connection != null) { + DataSourceUtils.releaseConnection(connection, openSRPDataSource); + } + } + dbInitialized = true; + } + + protected abstract Set getDatabaseScripts(); +} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java index 3f066b2d7c..aa909ec055 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java @@ -5,31 +5,33 @@ import static org.junit.Assert.assertTrue; import java.util.Calendar; +import java.util.HashSet; import java.util.List; +import java.util.Set; import org.joda.time.DateTime; -import org.junit.FixMethodOrder; import org.junit.Test; -import org.junit.runner.RunWith; -import org.junit.runners.MethodSorters; import org.opensrp.common.AllConstants.BaseEntity; import org.opensrp.domain.Event; import org.opensrp.domain.Obs; import org.opensrp.repository.EventsRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -import org.springframework.test.context.ContextConfiguration; -import org.springframework.test.context.junit4.SpringJUnit4ClassRunner; -@RunWith(SpringJUnit4ClassRunner.class) -@ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -@FixMethodOrder(MethodSorters.NAME_ASCENDING) -public class EventsRepositoryTest { +public class EventsRepositoryTest extends BaseRepositoryTest { @Autowired @Qualifier("eventsRepositoryPostgres") private EventsRepository eventsRepository; + + @Override + protected Set getDatabaseScripts() { + Set scripts = new HashSet(); + scripts.add("event.sql"); + return scripts; + } + @Test public void testGet() { Event event = eventsRepository.get("05934ae338431f28bf6793b2419c319a"); diff --git a/opensrp-core/src/test/resources/test-persistence-postgres.xml b/opensrp-core/src/test/resources/test-persistence-postgres.xml index ebd082c8d4..52da328195 100644 --- a/opensrp-core/src/test/resources/test-persistence-postgres.xml +++ b/opensrp-core/src/test/resources/test-persistence-postgres.xml @@ -14,12 +14,6 @@ - - - - - diff --git a/opensrp-core/src/test/resources/test-scripts/app_state_token.sql b/opensrp-core/src/test/resources/test-scripts/app_state_token.sql new file mode 100644 index 0000000000..e80e056e89 --- /dev/null +++ b/opensrp-core/src/test/resources/test-scripts/app_state_token.sql @@ -0,0 +1,12 @@ +--clear data +TRUNCATE TABLE core.app_state_token; + +ALTER SEQUENCE core.app_state_token_id_seq RESTART WITH 6; + +--insert data +INSERT INTO core.app_state_token (id, name, description, value, last_edited_date) VALUES +(1, 'sync_schedule_tracker_by_last_update_enrollment', 'ScheduleTracker token to keep track of enrollment', '34343', 1521017416), +(2, 'sync_client_by_date_updated', 'OpenMRS data pusher token to keep track of new / updated clients', '65765', 1521217416), +(3, 'sync_client_by_date_voided', 'OpenMRS data pusher token to keep track of voided clients synced ', '122001', 1521017416), +(4, 'sync_event_by_date_updated', 'OpenMRS data pusher token to keep track of new / updated events synced ', '343232', 1521017416), +(5, 'sync_event_by_date_voided', 'OpenMRS data pusher token to keep track of voided events synced ', '23432', 1521017416); diff --git a/opensrp-core/src/test/resources/test-scripts/data.sql b/opensrp-core/src/test/resources/test-scripts/event.sql similarity index 96% rename from opensrp-core/src/test/resources/test-scripts/data.sql rename to opensrp-core/src/test/resources/test-scripts/event.sql index a21f376cba..a371041eb7 100644 --- a/opensrp-core/src/test/resources/test-scripts/data.sql +++ b/opensrp-core/src/test/resources/test-scripts/event.sql @@ -1,17 +1,11 @@ ---app_state_token -INSERT INTO core.app_state_token (id, name, description, value, last_edited_date) VALUES -(1, 'sync_schedule_tracker_by_last_update_enrollment', 'ScheduleTracker token to keep track of enrollment', '34343', 1521017416), -(2, 'sync_client_by_date_updated', 'OpenMRS data pusher token to keep track of new / updated clients', '65765', 1521217416), -(3, 'sync_client_by_date_voided', 'OpenMRS data pusher token to keep track of voided clients synced ', '122001', 1521017416), -(4, 'sync_event_by_date_updated', 'OpenMRS data pusher token to keep track of new / updated events synced ', '343232', 1521017416), -(5, 'sync_event_by_date_voided', 'OpenMRS data pusher token to keep track of voided events synced ', '23432', 1521017416); +--clear data +TRUNCATE TABLE core.event CASCADE; +ALTER SEQUENCE core.event_id_seq RESTART WITH 16; ---clients - - ---events +ALTER SEQUENCE core.event_metadata_id_seq RESTART WITH 16; +--insert data INSERT INTO core.event (id, json, date_deleted) VALUES (1, '{"id": "05934ae338431f28bf6793b2417696bf", "obs": [{"set": [], "values": ["2018-03-13"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162586AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "mr_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162586AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "mr_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1520941739448, "duration": 0, "revision": "1-069bfb5078ff17f922c0bba799222878", "eventDate": "2018-03-13T17:42:03.326+03:00", "eventType": "Vaccination", "entityType": "vaccination", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:26.477+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1520945634380, "formSubmissionId": "29243014-48df-4165-a82d-f4878f6a830e"}', null), (2, '{"id": "05934ae338431f28bf6793b24199e690", "obs": [{"set": [], "values": ["2018-03-14 10:31:33"], "fieldCode": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "start", "formSubmissionField": "start", "humanReadableValues": []}, {"set": [], "values": ["2018-03-14 10:39:56"], "fieldCode": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "end", "formSubmissionField": "end", "humanReadableValues": []}, {"set": [], "values": ["867104020634913"], "fieldCode": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "deviceid", "formSubmissionField": "deviceid", "humanReadableValues": []}], "type": "Event", "version": 1521016796414, "duration": 0, "revision": "2-615390b17f8f2f9e9aa92f5f4a8a7aaf", "eventDate": "2018-03-14T03:00:00.000+03:00", "eventType": "New Woman Registration", "dateEdited": "2018-03-14T11:39:35.826+03:00", "entityType": "mother", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:28.717+03:00", "identifiers": {"OPENMRS_UUID": "d3630a60-a1f4-4267-9225-f4cb728f4178"}, "baseEntityId": "43930c23-c787-4ddb-ab76-770f77e7b17d", "serverVersion": 1521016638453, "formSubmissionId": "6b3243e9-3d45-495c-af69-f012061def01"}', null), diff --git a/opensrp-core/src/test/resources/test-scripts/schema.sql b/opensrp-core/src/test/resources/test-scripts/schema.sql deleted file mode 100644 index e5d05a46ca..0000000000 --- a/opensrp-core/src/test/resources/test-scripts/schema.sql +++ /dev/null @@ -1,9 +0,0 @@ -TRUNCATE TABLE core.app_state_token; - -TRUNCATE TABLE core.event CASCADE; - -ALTER SEQUENCE core.app_state_token_id_seq RESTART WITH 6; - -ALTER SEQUENCE core.event_id_seq RESTART WITH 16; - -ALTER SEQUENCE core.event_metadata_id_seq RESTART WITH 16; \ No newline at end of file From 12abeed4d53ae52549b4910c7567f56e89a7dc94 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Wed, 21 Mar 2018 14:52:37 +0300 Subject: [PATCH 062/133] Use generic Type handler --- .../postgres/handler/ActionTypeHandler.java | 7 ++ .../postgres/handler/BaseTypeHandler.java | 73 ++++++++++++++++++- .../postgres/handler/ClientTypeHandler.java | 69 +----------------- .../postgres/handler/EventTypeHandler.java | 70 +----------------- 4 files changed, 81 insertions(+), 138 deletions(-) create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ActionTypeHandler.java diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ActionTypeHandler.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ActionTypeHandler.java new file mode 100644 index 0000000000..eb977661a1 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ActionTypeHandler.java @@ -0,0 +1,7 @@ +package org.opensrp.repository.postgres.handler; + +import org.opensrp.scheduler.Action; + +public class ActionTypeHandler extends BaseTypeHandler { + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/BaseTypeHandler.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/BaseTypeHandler.java index 188908a451..eeea279168 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/BaseTypeHandler.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/BaseTypeHandler.java @@ -1,14 +1,85 @@ package org.opensrp.repository.postgres.handler; +import java.lang.reflect.Type; +import java.sql.CallableStatement; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.type.JdbcType; +import org.apache.ibatis.type.TypeHandler; import org.joda.time.DateTime; import org.opensrp.util.DateTimeTypeConverter; +import org.postgresql.util.PGobject; import com.google.gson.Gson; import com.google.gson.GsonBuilder; +import com.google.gson.reflect.TypeToken; -public class BaseTypeHandler { +public abstract class BaseTypeHandler implements TypeHandler { public static final Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") .registerTypeAdapter(DateTime.class, new DateTimeTypeConverter()).create(); + private Type typeToken = new TypeToken() {}.getType(); + + @Override + public void setParameter(PreparedStatement ps, int i, T parameter, JdbcType jdbcType) throws SQLException { + try { + if (parameter != null) { + String jsonString = gson.toJson(parameter); + PGobject jsonObject = new PGobject(); + jsonObject.setType("jsonb"); + jsonObject.setValue(jsonString); + ps.setObject(i, jsonObject); + } + } + catch (Exception e) { + throw new SQLException(e); + } + } + + @Override + public T getResult(ResultSet rs, String columnName) throws SQLException { + try { + String jsonString = rs.getString(columnName); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return gson.fromJson(jsonString, typeToken); + } + catch (Exception e) { + throw new SQLException(e); + } + } + + @Override + public T getResult(ResultSet rs, int columnIndex) throws SQLException { + try { + String jsonString = rs.getString(columnIndex); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return gson.fromJson(jsonString, typeToken); + } + catch (Exception e) { + throw new SQLException(e); + } + } + + @Override + public T getResult(CallableStatement cs, int columnIndex) throws SQLException { + try { + String jsonString = cs.getString(columnIndex); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return gson.fromJson(jsonString, typeToken); + } + catch (Exception e) { + throw new SQLException(e); + } + } + } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ClientTypeHandler.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ClientTypeHandler.java index 98b6ca3b7f..b777eb3470 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ClientTypeHandler.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ClientTypeHandler.java @@ -1,74 +1,7 @@ package org.opensrp.repository.postgres.handler; -import java.sql.CallableStatement; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; - -import org.apache.commons.lang3.StringUtils; -import org.apache.ibatis.type.JdbcType; -import org.apache.ibatis.type.TypeHandler; import org.opensrp.domain.Client; -import org.postgresql.util.PGobject; -public class ClientTypeHandler extends BaseTypeHandler implements TypeHandler { - - @Override - public void setParameter(PreparedStatement ps, int i, Client parameter, JdbcType jdbcType) throws SQLException { - try { - if (parameter != null) { - String jsonString = gson.toJson(parameter); - PGobject jsonObject = new PGobject(); - jsonObject.setType("jsonb"); - jsonObject.setValue(jsonString); - ps.setObject(i, jsonObject); - } - } - catch (Exception e) { - throw new SQLException(e); - } - } - - @Override - public Client getResult(ResultSet rs, String columnName) throws SQLException { - try { - String jsonString = rs.getString(columnName); - if (StringUtils.isBlank(jsonString)) { - return null; - } - return gson.fromJson(jsonString, Client.class); - } - catch (Exception e) { - throw new SQLException(e); - } - } - - @Override - public Client getResult(ResultSet rs, int columnIndex) throws SQLException { - try { - String jsonString = rs.getString(columnIndex); - if (StringUtils.isBlank(jsonString)) { - return null; - } - return gson.fromJson(jsonString, Client.class); - } - catch (Exception e) { - throw new SQLException(e); - } - } - - @Override - public Client getResult(CallableStatement cs, int columnIndex) throws SQLException { - try { - String jsonString = cs.getString(columnIndex); - if (StringUtils.isBlank(jsonString)) { - return null; - } - return gson.fromJson(jsonString, Client.class); - } - catch (Exception e) { - throw new SQLException(e); - } - } +public class ClientTypeHandler extends BaseTypeHandler { } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/EventTypeHandler.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/EventTypeHandler.java index d11b180f39..9697417a26 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/EventTypeHandler.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/EventTypeHandler.java @@ -1,75 +1,7 @@ package org.opensrp.repository.postgres.handler; -import java.sql.CallableStatement; -import java.sql.PreparedStatement; -import java.sql.ResultSet; -import java.sql.SQLException; - -import org.apache.commons.lang3.StringUtils; -import org.apache.ibatis.type.JdbcType; -import org.apache.ibatis.type.TypeHandler; import org.opensrp.domain.Event; -import org.postgresql.util.PGobject; - -public class EventTypeHandler extends BaseTypeHandler implements TypeHandler { - - @Override - public void setParameter(PreparedStatement ps, int i, Event parameter, JdbcType jdbcType) throws SQLException { - try { - if (parameter != null) { - String jsonString = gson.toJson(parameter); - PGobject jsonObject = new PGobject(); - jsonObject.setType("jsonb"); - jsonObject.setValue(jsonString); - ps.setObject(i, jsonObject); - } - } - catch (Exception e) { - throw new SQLException(e); - } - } - - @Override - public Event getResult(ResultSet rs, String columnName) throws SQLException { - try { - String jsonString = rs.getString(columnName); - if (StringUtils.isBlank(jsonString)) { - return null; - } - return gson.fromJson(jsonString, Event.class); - } - catch (Exception e) { - throw new SQLException(e); - } - } - - @Override - public Event getResult(ResultSet rs, int columnIndex) throws SQLException { - try { - String jsonString = rs.getString(columnIndex); - if (StringUtils.isBlank(jsonString)) { - return null; - } - return gson.fromJson(jsonString, Event.class); - } - catch (Exception e) { - throw new SQLException(e); - } - } - - @Override - public Event getResult(CallableStatement cs, int columnIndex) throws SQLException { - try { - String jsonString = cs.getString(columnIndex); - if (StringUtils.isBlank(jsonString)) { - return null; - } - return gson.fromJson(jsonString, Event.class); - } - catch (Exception e) { - throw new SQLException(e); - } - } +public class EventTypeHandler extends BaseTypeHandler { } From 73a21f686a05f19ca6ea5eb9145ea758ef90832b Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Wed, 21 Mar 2018 19:10:12 +0300 Subject: [PATCH 063/133] Add Action Repository --- .../migrations/generator/generatorConfig.xml | 16 +- ...307145358_create_action_metadata_table.sql | 2 + .../org/opensrp/domain/postgres/Action.java | 12 +- .../domain/postgres/ActionExample.java | 90 +++++--- .../domain/postgres/ActionMetadata.java | 71 ++++-- .../postgres/ActionMetadataExample.java | 102 +++++++-- .../postgres/ActionRepositoryImpl.java | 212 +++++++++++++++--- .../postgres/EventsRepositoryImpl.java | 9 +- .../postgres/handler/ActionTypeHandler.java | 68 +++++- .../postgres/handler/BaseTypeHandler.java | 73 +----- .../postgres/handler/ClientTypeHandler.java | 69 +++++- .../postgres/handler/EventTypeHandler.java | 70 +++++- .../postgres/mapper/ActionMapper.java | 28 +-- .../postgres/mapper/ActionMetadataMapper.java | 28 +-- .../mapper/custom/CustomActionMapper.java | 11 + .../custom/CustomActionMetadataMapper.java | 16 ++ .../mapper/custom/xml/CustomActionMapper.xml | 34 +++ .../custom/xml/CustomActionMetadataMapper.xml | 69 ++++++ .../custom/xml/CustomEventMetadataMapper.xml | 1 + .../postgres/mapper/xml/ActionMapper.xml | 105 +++++---- .../mapper/xml/ActionMetadataMapper.xml | 81 ++++--- .../postgres/BaseRepositoryTest.java | 13 +- .../postgres/EventsRepositoryTest.java | 11 +- 23 files changed, 875 insertions(+), 316 deletions(-) create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomActionMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomActionMetadataMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMetadataMapper.xml diff --git a/assets/migrations/generator/generatorConfig.xml b/assets/migrations/generator/generatorConfig.xml index 7519b9ef17..f11501dff9 100644 --- a/assets/migrations/generator/generatorConfig.xml +++ b/assets/migrations/generator/generatorConfig.xml @@ -17,16 +17,20 @@ - - -
-
-
+ - + @@ -39,6 +39,25 @@ + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.ActionTypeHandler} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.ActionTypeHandler} and #{criterion.secondValue,typeHandler=org.opensrp.repository.postgres.handler.ActionTypeHandler} + + + and ${criterion.condition} + + #{listItem,typeHandler=org.opensrp.repository.postgres.handler.ActionTypeHandler} + + + + @@ -48,7 +67,7 @@ @@ -73,6 +92,25 @@ + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.ActionTypeHandler} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.ActionTypeHandler} and #{criterion.secondValue,typeHandler=org.opensrp.repository.postgres.handler.ActionTypeHandler} + + + and ${criterion.condition} + + #{listItem,typeHandler=org.opensrp.repository.postgres.handler.ActionTypeHandler} + + + + @@ -82,7 +120,7 @@ id, json @@ -90,7 +128,7 @@ select @@ -109,7 +147,7 @@ select @@ -120,7 +158,7 @@ delete from core.action where id = #{id,jdbcType=BIGINT} @@ -129,7 +167,7 @@ delete from core.action @@ -140,16 +178,18 @@ - insert into core.action (id, json) - values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) + insert into core.action (id, json + ) + values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ActionTypeHandler} + ) insert into core.action @@ -165,7 +205,7 @@ #{id,jdbcType=BIGINT}, - #{json,jdbcType=OTHER}, + #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ActionTypeHandler}, @@ -173,7 +213,7 @@ select count(*) from core.action @@ -184,7 +224,7 @@ update core.action @@ -192,7 +232,7 @@ id = #{record.id,jdbcType=BIGINT}, - json = #{record.json,jdbcType=OTHER}, + json = #{record.json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ActionTypeHandler}, @@ -203,11 +243,11 @@ update core.action set id = #{record.id,jdbcType=BIGINT}, - json = #{record.json,jdbcType=OTHER} + json = #{record.json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ActionTypeHandler} @@ -216,12 +256,12 @@ update core.action - json = #{json,jdbcType=OTHER}, + json = #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ActionTypeHandler}, where id = #{id,jdbcType=BIGINT} @@ -230,29 +270,10 @@ update core.action - set json = #{json,jdbcType=OTHER} + set json = #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ActionTypeHandler} where id = #{id,jdbcType=BIGINT} - \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml index 3fad4bdded..564024e259 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ActionMetadataMapper.xml @@ -5,10 +5,11 @@ + @@ -20,7 +21,7 @@ @@ -54,7 +55,7 @@ @@ -88,15 +89,16 @@ - id, action_id, base_entity_id, server_version, provider_id, location_id, team, team_id + id, action_id, document_id, base_entity_id, server_version, provider_id, location_id, + team, team_id - - select - - distinct - - - from core.action_metadata - - - - - order by ${orderByClause} - - \ No newline at end of file diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java index 8a6a9a75ba..3b712c4193 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java @@ -7,9 +7,8 @@ import javax.sql.DataSource; import org.junit.Before; -import org.junit.FixMethodOrder; +import org.junit.BeforeClass; import org.junit.runner.RunWith; -import org.junit.runners.MethodSorters; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.io.ClassPathResource; import org.springframework.jdbc.datasource.DataSourceUtils; @@ -19,7 +18,6 @@ @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration("classpath:test-applicationContext-opensrp.xml") -@FixMethodOrder(MethodSorters.NAME_ASCENDING) public abstract class BaseRepositoryTest { private static String TEST_SCRIPTS_ROOT_DIRECTORY = "test-scripts/"; @@ -27,7 +25,10 @@ public abstract class BaseRepositoryTest { @Autowired private DataSource openSRPDataSource; - protected boolean dbInitialized = false; + @BeforeClass + void init() { + + } /** * Populates the configured {@link DataSource} with data from passed scripts @@ -38,8 +39,7 @@ public abstract class BaseRepositoryTest { @Before public void populateDatabase() throws SQLException { - - if (dbInitialized) + if (getDatabaseScripts() == null || getDatabaseScripts().isEmpty()) return; ResourceDatabasePopulator populator = new ResourceDatabasePopulator(); for (String script : getDatabaseScripts()) { @@ -57,7 +57,6 @@ public void populateDatabase() throws SQLException { DataSourceUtils.releaseConnection(connection, openSRPDataSource); } } - dbInitialized = true; } protected abstract Set getDatabaseScripts(); diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java index aa909ec055..0bbdc6378c 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java @@ -24,7 +24,6 @@ public class EventsRepositoryTest extends BaseRepositoryTest { @Qualifier("eventsRepositoryPostgres") private EventsRepository eventsRepository; - @Override protected Set getDatabaseScripts() { Set scripts = new HashSet(); @@ -288,7 +287,7 @@ public void testFindEvents2() { } @Test - public void testZ1Update() { + public void testUpdate() { Event event = eventsRepository.get("05934ae338431f28bf6793b2419c64fb"); long now = System.currentTimeMillis(); event.setServerVersion(now); @@ -305,7 +304,7 @@ public void testZ1Update() { } @Test - public void testZ2FindByEmptyServerVersion() { + public void testFindByEmptyServerVersion() { assertEquals(0, eventsRepository.findByEmptyServerVersion().size()); Event event = eventsRepository.get("05934ae338431f28bf6793b241bdb88c"); event.setServerVersion(0l); @@ -315,7 +314,7 @@ public void testZ2FindByEmptyServerVersion() { } @Test - public void testZ3findEventByEventTypeBetweenTwoDates() { + public void testFindEventByEventTypeBetweenTwoDates() { List events = eventsRepository.getAll(); Calendar cal = Calendar.getInstance(); cal.set(Calendar.DATE, 1); @@ -329,7 +328,7 @@ public void testZ3findEventByEventTypeBetweenTwoDates() { } @Test - public void testZ4SafeRemove() { + public void testSafeRemove() { Event event = eventsRepository.get("05934ae338431f28bf6793b241bdb88c"); eventsRepository.safeRemove(event); assertEquals(14, eventsRepository.getAll().size()); @@ -337,7 +336,7 @@ public void testZ4SafeRemove() { } @Test - public void testZ5Add() { + public void testAdd() { Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); Event event = new Event().withBaseEntityId("435534534543").withEventType("Growth Monitoring") .withFormSubmissionId("gjhg34534 nvbnv3345345__4").withEventDate(new DateTime()).withObs(obs); From 246eb0c77bb65a78398898d85d36b2b87540a522 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 22 Mar 2018 16:58:06 +0300 Subject: [PATCH 064/133] Finished implementing ActionsRepository --- .../postgres/ActionRepositoryImpl.java | 73 ++++++++++++++++--- .../mapper/custom/CustomActionMapper.java | 4 + .../custom/CustomActionMetadataMapper.java | 6 ++ .../mapper/custom/xml/CustomActionMapper.xml | 5 ++ .../custom/xml/CustomActionMetadataMapper.xml | 24 ++++++ .../postgres/BaseRepositoryTest.java | 5 -- 6 files changed, 100 insertions(+), 17 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java index 2a113e4390..b199f8c85c 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java @@ -1,6 +1,7 @@ package org.opensrp.repository.postgres; import java.util.ArrayList; +import java.util.Arrays; import java.util.List; import java.util.UUID; @@ -9,6 +10,7 @@ import org.opensrp.domain.postgres.ActionExample; import org.opensrp.domain.postgres.ActionMetadata; import org.opensrp.domain.postgres.ActionMetadataExample; +import org.opensrp.domain.postgres.ActionMetadataExample.Criteria; import org.opensrp.domain.postgres.EventMetadataExample; import org.opensrp.repository.postgres.mapper.custom.CustomActionMapper; import org.opensrp.repository.postgres.mapper.custom.CustomActionMetadataMapper; @@ -137,51 +139,98 @@ public List findByProviderIdAndTimeStamp(String providerId, long timeSta public List findAlertByANMIdEntityIdScheduleName(String providerId, String baseEntityId, String scheduleName) { ActionMetadataExample example = new ActionMetadataExample(); example.createCriteria().andProviderIdEqualTo(providerId).andBaseEntityIdEqualTo(baseEntityId); - return convert(actionMetadataMapper.selectMany(example, 0, DEFAULT_FETCH_SIZE)); + return convert(actionMetadataMapper.selectManyBySchedule(example, scheduleName, 0, DEFAULT_FETCH_SIZE)); } @Override public List findByCaseIdScheduleAndTimeStamp(String baseEntityId, String schedule, DateTime start, DateTime end) { - // TODO Auto-generated method stub - return null; + if (start == null || end == null) + throw new RuntimeException("start and/or end date is null"); + ActionMetadataExample example = new ActionMetadataExample(); + example.createCriteria().andBaseEntityIdEqualTo(baseEntityId).andServerVersionBetween(start.getMillis(), + end.getMillis() + 1); + return convert(actionMetadataMapper.selectManyBySchedule(example, schedule, 0, DEFAULT_FETCH_SIZE)); } @Override public List findByCaseIdAndTimeStamp(String baseEntityId, long timeStamp) { - // TODO Auto-generated method stub - return null; + ActionMetadataExample example = new ActionMetadataExample(); + example.createCriteria().andBaseEntityIdEqualTo(baseEntityId).andServerVersionGreaterThanOrEqualTo(timeStamp); + return convert(actionMetadataMapper.selectMany(example, 0, DEFAULT_FETCH_SIZE)); } @Override public void deleteAllByTarget(String target) { - // TODO Auto-generated method stub + List idsToDelete = actionMapper.selectIdsByTarget(target); + ActionMetadataExample metadataExample = new ActionMetadataExample(); + metadataExample.createCriteria().andActionIdIn(idsToDelete); + actionMetadataMapper.deleteByExample(metadataExample); + ActionExample example = new ActionExample(); + example.createCriteria().andIdIn(idsToDelete); + actionMapper.deleteByExample(example); } @Override public void markAllAsInActiveFor(String baseEntityId) { - // TODO Auto-generated method stub - + ActionMetadataExample metadataExample = new ActionMetadataExample(); + metadataExample.createCriteria().andBaseEntityIdEqualTo(baseEntityId); + List actions = convert(actionMetadataMapper.selectMany(metadataExample, 0, DEFAULT_FETCH_SIZE)); + for (Action action : actions) { + action.markAsInActive(); + update(action); + } } @Override public void addOrUpdateAlert(Action alertAction) { - // TODO Auto-generated method stub + if (alertAction == null || alertAction.baseEntityId() == null) { + return; + } + + Long id = retrievePrimaryKey(alertAction); + if (id == null) { + add(alertAction); + } else + update(alertAction); } @Override public void markAlertAsInactiveFor(String providerId, String baseEntityId, String scheduleName) { - // TODO Auto-generated method stub + ActionMetadataExample metadataExample = new ActionMetadataExample(); + metadataExample.createCriteria().andBaseEntityIdEqualTo(baseEntityId); + Long actionsSize = actionMetadataMapper.countByExample(metadataExample); + List actions = convert(actionMetadataMapper.selectMany(metadataExample, 0, actionsSize.intValue())); + for (Action action : actions) { + action.markAsInActive(); + update(action); + } } @Override public List findByCriteria(String team, String providerId, long timeStamp, String sortBy, String sortOrder, int limit) { - // TODO Auto-generated method stub - return null; + ActionMetadataExample metadataExample = new ActionMetadataExample(); + Criteria criteria = metadataExample.createCriteria().andServerVersionGreaterThanOrEqualTo(timeStamp); + + if (team != null && !team.isEmpty()) { + String[] idsArray = org.apache.commons.lang.StringUtils.split(team, ","); + List ids = new ArrayList(Arrays.asList(idsArray)); + //include providerId records also + if (providerId != null && !ids.contains(providerId)) { + ids.add(providerId); + } + criteria.andProviderIdIn(ids); + } else if ((providerId != null && !StringUtils.isNotEmpty(providerId))) { + criteria.andProviderIdEqualTo(providerId); + } + if (sortOrder == null || !sortOrder.toLowerCase().matches("(asc)|(desc)")) + sortOrder = "asc"; + metadataExample.setOrderByClause(sortBy + " " + sortOrder); + return convert(actionMetadataMapper.selectMany(metadataExample, 0, limit)); } //private methods diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomActionMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomActionMapper.java index 6852dcb5e9..90c37f7846 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomActionMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomActionMapper.java @@ -1,5 +1,7 @@ package org.opensrp.repository.postgres.mapper.custom; +import java.util.List; + import org.opensrp.domain.postgres.Action; import org.opensrp.repository.postgres.mapper.ActionMapper; @@ -8,4 +10,6 @@ public interface CustomActionMapper extends ActionMapper { int insertSelectiveAndSetId(Action action); Action selectByDocumentId(String documentId); + + List selectIdsByTarget(String actionTarget); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomActionMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomActionMetadataMapper.java index b6a1300229..360dd7d703 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomActionMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomActionMetadataMapper.java @@ -13,4 +13,10 @@ public interface CustomActionMetadataMapper extends ActionMetadataMapper { List selectMany(@Param("example") ActionMetadataExample example, @Param("offset") int offset, @Param("limit") int limit); + + List selectManyBySchedule(@Param("example") ActionMetadataExample example, + @Param("scheduleName") String scheduleName, @Param("offset") int offset, + @Param("limit") int limit); + + Long countAll(@Param("example") ActionMetadataExample example); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMapper.xml index 81284236bd..47efaa5744 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMapper.xml @@ -31,4 +31,9 @@ + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMetadataMapper.xml index 4ee9fab7e9..41c965f186 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMetadataMapper.xml @@ -66,4 +66,28 @@ LIMIT #{limit} OFFSET #{offset} + + \ No newline at end of file diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java index 3b712c4193..e1d708e743 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java @@ -25,11 +25,6 @@ public abstract class BaseRepositoryTest { @Autowired private DataSource openSRPDataSource; - @BeforeClass - void init() { - - } - /** * Populates the configured {@link DataSource} with data from passed scripts * From 0e656015e8c1d2a353bddbe0b53f00a2222f5a04 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 22 Mar 2018 18:49:43 +0300 Subject: [PATCH 065/133] Implement Alert Postgres Repository --- .../migrations/generator/generatorConfig.xml | 15 +- ...0309113954_create_alert_metadata_table.sql | 2 + .../org/opensrp/domain/postgres/Alert.java | 12 +- .../opensrp/domain/postgres/AlertExample.java | 90 +++-- .../domain/postgres/AlertMetadata.java | 83 +++-- .../domain/postgres/AlertMetadataExample.java | 102 +++++- .../postgres/ActionRepositoryImpl.java | 16 +- .../postgres/AlertsRepositoryImpl.java | 316 +++++++++++++++--- .../postgres/handler/AlertTypeHandler.java | 73 ++++ .../postgres/mapper/AlertMapper.java | 28 +- .../postgres/mapper/AlertMetadataMapper.java | 28 +- .../mapper/custom/CustomAlertMapper.java | 11 + .../custom/CustomAlertMetadataMapper.java | 16 + .../custom/xml/CustomActionMetadataMapper.xml | 6 +- .../mapper/custom/xml/CustomAlertMapper.xml | 25 ++ .../custom/xml/CustomAlertMetadataMapper.xml | 69 ++++ .../postgres/mapper/xml/AlertMapper.xml | 105 +++--- .../mapper/xml/AlertMetadataMapper.xml | 84 +++-- 18 files changed, 818 insertions(+), 263 deletions(-) create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/AlertTypeHandler.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomAlertMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomAlertMetadataMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomAlertMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomAlertMetadataMapper.xml diff --git a/assets/migrations/generator/generatorConfig.xml b/assets/migrations/generator/generatorConfig.xml index f11501dff9..6b96b91bb6 100644 --- a/assets/migrations/generator/generatorConfig.xml +++ b/assets/migrations/generator/generatorConfig.xml @@ -21,22 +21,27 @@
-
--> + +
--> + + +
- +
+
-->
-
+ diff --git a/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql b/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql index 9c03641946..ec0004e2bf 100644 --- a/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql +++ b/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql @@ -21,6 +21,7 @@ CREATE TABLE core.alert_metadata ( id bigserial NOT NULL, alert_id bigint REFERENCES core.alert (id), + document_id character varying NOT NULL, base_entity_id character varying NOT NULL, server_version bigint, provider_id character varying, @@ -35,6 +36,7 @@ WITH ( OIDS = FALSE ) TABLESPACE core_space; +CREATE INDEX alert_metadata_document_id_index ON core.alert_metadata (document_id); CREATE INDEX alert_metadata_base_entity_id_index ON core.alert_metadata (base_entity_id); CREATE INDEX alert_metadata_server_version_index ON core.alert_metadata (server_version); CREATE INDEX alert_metadata_provider_id_index ON core.alert_metadata (provider_id); diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java index 7298ba9c1b..b565184bb5 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Alert.java @@ -4,19 +4,19 @@ public class Alert { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert.json - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert.id * @return the value of core.alert.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert.id * @param id the value for core.alert.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert.json * @return the value of core.alert.json - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert.json * @param json the value for core.alert.json - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java index 887cddb123..2b9b0018ab 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertExample.java @@ -6,23 +6,23 @@ public class AlertExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public AlertExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public AlertExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,23 +119,54 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ protected abstract static class GeneratedCriteria { + protected List jsonCriteria; + + protected List allCriteria; + protected List criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList(); + jsonCriteria = new ArrayList(); + } + + public List getJsonCriteria() { + return jsonCriteria; + } + + protected void addJsonCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + jsonCriteria.add(new Criterion(condition, value, "org.opensrp.repository.postgres.handler.AlertTypeHandler")); + allCriteria = null; + } + + protected void addJsonCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + jsonCriteria.add( + new Criterion(condition, value1, value2, "org.opensrp.repository.postgres.handler.AlertTypeHandler")); + allCriteria = null; } public boolean isValid() { - return criteria.size() > 0; + return criteria.size() > 0 || jsonCriteria.size() > 0; } public List getAllCriteria() { - return criteria; + if (allCriteria == null) { + allCriteria = new ArrayList(); + allCriteria.addAll(criteria); + allCriteria.addAll(jsonCriteria); + } + return allCriteria; } public List getCriteria() { @@ -147,6 +178,7 @@ protected void addCriterion(String condition) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); + allCriteria = null; } protected void addCriterion(String condition, Object value, String property) { @@ -154,6 +186,7 @@ protected void addCriterion(String condition, Object value, String property) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); + allCriteria = null; } protected void addCriterion(String condition, Object value1, Object value2, String property) { @@ -161,6 +194,7 @@ protected void addCriterion(String condition, Object value1, Object value2, Stri throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); + allCriteria = null; } public Criteria andIdIsNull() { @@ -234,59 +268,59 @@ public Criteria andJsonIsNotNull() { } public Criteria andJsonEqualTo(Object value) { - addCriterion("json =", value, "json"); + addJsonCriterion("json =", value, "json"); return (Criteria) this; } public Criteria andJsonNotEqualTo(Object value) { - addCriterion("json <>", value, "json"); + addJsonCriterion("json <>", value, "json"); return (Criteria) this; } public Criteria andJsonGreaterThan(Object value) { - addCriterion("json >", value, "json"); + addJsonCriterion("json >", value, "json"); return (Criteria) this; } public Criteria andJsonGreaterThanOrEqualTo(Object value) { - addCriterion("json >=", value, "json"); + addJsonCriterion("json >=", value, "json"); return (Criteria) this; } public Criteria andJsonLessThan(Object value) { - addCriterion("json <", value, "json"); + addJsonCriterion("json <", value, "json"); return (Criteria) this; } public Criteria andJsonLessThanOrEqualTo(Object value) { - addCriterion("json <=", value, "json"); + addJsonCriterion("json <=", value, "json"); return (Criteria) this; } public Criteria andJsonIn(List values) { - addCriterion("json in", values, "json"); + addJsonCriterion("json in", values, "json"); return (Criteria) this; } public Criteria andJsonNotIn(List values) { - addCriterion("json not in", values, "json"); + addJsonCriterion("json not in", values, "json"); return (Criteria) this; } public Criteria andJsonBetween(Object value1, Object value2) { - addCriterion("json between", value1, value2, "json"); + addJsonCriterion("json between", value1, value2, "json"); return (Criteria) this; } public Criteria andJsonNotBetween(Object value1, Object value2) { - addCriterion("json not between", value1, value2, "json"); + addJsonCriterion("json not between", value1, value2, "json"); return (Criteria) this; } } /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public static class Criterion { diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java index 63e037e0d3..4ead47b7b9 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadata.java @@ -4,59 +4,64 @@ public class AlertMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.alert_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ private Long alertId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.document_id + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 + */ + private String documentId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.base_entity_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.server_version - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.provider_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.location_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.team - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.team_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ private String teamId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.is_active - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ private Boolean isActive; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.alert_metadata.trigger_name - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ private String triggerName; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.id * @return the value of core.alert_metadata.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public Long getId() { return id; @@ -65,7 +70,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.id * @param id the value for core.alert_metadata.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -74,7 +79,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.alert_id * @return the value of core.alert_metadata.alert_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public Long getAlertId() { return alertId; @@ -83,16 +88,34 @@ public Long getAlertId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.alert_id * @param alertId the value for core.alert_metadata.alert_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void setAlertId(Long alertId) { this.alertId = alertId; } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.document_id + * @return the value of core.alert_metadata.document_id + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 + */ + public String getDocumentId() { + return documentId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.document_id + * @param documentId the value for core.alert_metadata.document_id + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 + */ + public void setDocumentId(String documentId) { + this.documentId = documentId; + } + /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.base_entity_id * @return the value of core.alert_metadata.base_entity_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -101,7 +124,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.base_entity_id * @param baseEntityId the value for core.alert_metadata.base_entity_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -110,7 +133,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.server_version * @return the value of core.alert_metadata.server_version - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -119,7 +142,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.server_version * @param serverVersion the value for core.alert_metadata.server_version - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -128,7 +151,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.provider_id * @return the value of core.alert_metadata.provider_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public String getProviderId() { return providerId; @@ -137,7 +160,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.provider_id * @param providerId the value for core.alert_metadata.provider_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -146,7 +169,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.location_id * @return the value of core.alert_metadata.location_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public String getLocationId() { return locationId; @@ -155,7 +178,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.location_id * @param locationId the value for core.alert_metadata.location_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -164,7 +187,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.team * @return the value of core.alert_metadata.team - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public String getTeam() { return team; @@ -173,7 +196,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.team * @param team the value for core.alert_metadata.team - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -182,7 +205,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.team_id * @return the value of core.alert_metadata.team_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public String getTeamId() { return teamId; @@ -191,7 +214,7 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.team_id * @param teamId the value for core.alert_metadata.team_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; @@ -200,7 +223,7 @@ public void setTeamId(String teamId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.is_active * @return the value of core.alert_metadata.is_active - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public Boolean getIsActive() { return isActive; @@ -209,7 +232,7 @@ public Boolean getIsActive() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.is_active * @param isActive the value for core.alert_metadata.is_active - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void setIsActive(Boolean isActive) { this.isActive = isActive; @@ -218,7 +241,7 @@ public void setIsActive(Boolean isActive) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.alert_metadata.trigger_name * @return the value of core.alert_metadata.trigger_name - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public String getTriggerName() { return triggerName; @@ -227,7 +250,7 @@ public String getTriggerName() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.alert_metadata.trigger_name * @param triggerName the value for core.alert_metadata.trigger_name - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void setTriggerName(String triggerName) { this.triggerName = triggerName; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java index 140ae99c89..b2b4bb40d2 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/AlertMetadataExample.java @@ -6,23 +6,23 @@ public class AlertMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public AlertMetadataExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public AlertMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ protected abstract static class GeneratedCriteria { @@ -283,6 +283,76 @@ public Criteria andAlertIdNotBetween(Long value1, Long value2) { return (Criteria) this; } + public Criteria andDocumentIdIsNull() { + addCriterion("document_id is null"); + return (Criteria) this; + } + + public Criteria andDocumentIdIsNotNull() { + addCriterion("document_id is not null"); + return (Criteria) this; + } + + public Criteria andDocumentIdEqualTo(String value) { + addCriterion("document_id =", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotEqualTo(String value) { + addCriterion("document_id <>", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdGreaterThan(String value) { + addCriterion("document_id >", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdGreaterThanOrEqualTo(String value) { + addCriterion("document_id >=", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLessThan(String value) { + addCriterion("document_id <", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLessThanOrEqualTo(String value) { + addCriterion("document_id <=", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLike(String value) { + addCriterion("document_id like", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotLike(String value) { + addCriterion("document_id not like", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdIn(List values) { + addCriterion("document_id in", values, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotIn(List values) { + addCriterion("document_id not in", values, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdBetween(String value1, String value2) { + addCriterion("document_id between", value1, value2, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotBetween(String value1, String value2) { + addCriterion("document_id not between", value1, value2, "documentId"); + return (Criteria) this; + } + public Criteria andBaseEntityIdIsNull() { addCriterion("base_entity_id is null"); return (Criteria) this; @@ -826,7 +896,7 @@ public Criteria andTriggerNameNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ public static class Criterion { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java index b199f8c85c..b72cf46a32 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java @@ -11,7 +11,6 @@ import org.opensrp.domain.postgres.ActionMetadata; import org.opensrp.domain.postgres.ActionMetadataExample; import org.opensrp.domain.postgres.ActionMetadataExample.Criteria; -import org.opensrp.domain.postgres.EventMetadataExample; import org.opensrp.repository.postgres.mapper.custom.CustomActionMapper; import org.opensrp.repository.postgres.mapper.custom.CustomActionMetadataMapper; import org.opensrp.scheduler.Action; @@ -33,7 +32,7 @@ public Action get(String id) { if (StringUtils.isBlank(id)) { return null; } - org.opensrp.domain.postgres.Action pgAction = actionMapper.selectByDocumentId(id); + org.opensrp.domain.postgres.Action pgAction = actionMetadataMapper.selectByDocumentId(id); return convert(pgAction); } @@ -102,7 +101,8 @@ public void update(Action entity) { @Override public List getAll() { - List actions = actionMapper.selectByExample(new ActionExample()); + List actions = actionMetadataMapper.selectMany(new ActionMetadataExample(), 0, + DEFAULT_FETCH_SIZE); return convert(actions); } @@ -275,14 +275,14 @@ protected Long retrievePrimaryKey(Action entity) { } String documentId = entity.getId(); - EventMetadataExample eventMetadataExample = new EventMetadataExample(); - eventMetadataExample.createCriteria().andDocumentIdEqualTo(documentId); + ActionMetadataExample actionMetadataExample = new ActionMetadataExample(); + actionMetadataExample.createCriteria().andDocumentIdEqualTo(documentId); - org.opensrp.domain.postgres.Action pgClient = actionMetadataMapper.selectByDocumentId(documentId); - if (pgClient == null) { + org.opensrp.domain.postgres.Action pgAction = actionMetadataMapper.selectByDocumentId(documentId); + if (pgAction == null) { return null; } - return pgClient.getId(); + return pgAction.getId(); } private ActionMetadata createMetadata(Action entity, Long primaryKey) { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java index 8dd3505838..ec7a465405 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java @@ -1,118 +1,340 @@ package org.opensrp.repository.postgres; +import java.text.MessageFormat; +import java.util.ArrayList; import java.util.List; +import java.util.UUID; +import org.apache.commons.lang3.StringUtils; import org.joda.time.DateTime; +import org.opensrp.domain.postgres.AlertMetadata; +import org.opensrp.domain.postgres.AlertMetadataExample; import org.opensrp.dto.AlertStatus; +import org.opensrp.repository.postgres.mapper.custom.CustomAlertMapper; +import org.opensrp.repository.postgres.mapper.custom.CustomAlertMetadataMapper; +import org.opensrp.scheduler.Action; import org.opensrp.scheduler.Alert; +import org.opensrp.scheduler.Alert.AlertType; +import org.opensrp.scheduler.Alert.TriggerType; import org.opensrp.scheduler.repository.AlertsRepository; import org.springframework.stereotype.Repository; -@Repository -public class AlertsRepositoryImpl implements AlertsRepository{ - +@Repository("alertsRepositoryPostgres") +public class AlertsRepositoryImpl extends BaseRepositoryImpl implements AlertsRepository { + + private CustomAlertMapper alertMapper; + + private CustomAlertMetadataMapper alertMetadataMapper; + @Override public Alert get(String id) { - // TODO Auto-generated method stub - return null; + if (StringUtils.isBlank(id)) { + return null; + } + org.opensrp.domain.postgres.Alert pgAlert = alertMetadataMapper.selectByDocumentId(id); + + return convert(pgAlert); } - + @Override public void add(Alert entity) { - // TODO Auto-generated method stub + + if (entity == null || entity.entityId() == null) { + return; + } + + if (retrievePrimaryKey(entity) != null) { //Event already added + return; + } + + if (entity.getId() == null) + entity.setId(UUID.randomUUID().toString()); + + org.opensrp.domain.postgres.Alert pgAlert = convert(entity, null); + if (pgAlert == null) { + return; + } + + int rowsAffected = alertMapper.insertSelectiveAndSetId(pgAlert); + if (rowsAffected < 1 || pgAlert.getId() == null) { + return; + } + + AlertMetadata eventMetadata = createMetadata(entity, pgAlert.getId()); + if (eventMetadata != null) { + alertMetadataMapper.insertSelective(eventMetadata); + } } - + @Override public void update(Alert entity) { - // TODO Auto-generated method stub + if (entity == null || entity.entityId() == null) { + return; + } + + Long id = retrievePrimaryKey(entity); + if (id == null) { // Alert not added + return; + } + + org.opensrp.domain.postgres.Alert pgAlert = convert(entity, id); + if (pgAlert == null) { + return; + } + + AlertMetadata actionMetadata = createMetadata(entity, id); + if (actionMetadata == null) { + return; + } + + int rowsAffected = alertMapper.updateByPrimaryKeySelective(pgAlert); + if (rowsAffected < 1) { + return; + } + + AlertMetadataExample alertMetadataExample = new AlertMetadataExample(); + alertMetadataExample.createCriteria().andAlertIdEqualTo(id); + alertMetadataMapper.updateByExampleSelective(actionMetadata, alertMetadataExample); } - + @Override public List getAll() { - // TODO Auto-generated method stub - return null; + List actions = alertMetadataMapper.selectMany(new AlertMetadataExample(), 0, + DEFAULT_FETCH_SIZE); + return convert(actions); } - + @Override public void safeRemove(Alert entity) { - // TODO Auto-generated method stub + if (entity == null || entity.entityId() == null) { + return; + } + + Long id = retrievePrimaryKey(entity); + if (id == null) { + return; + } + + AlertMetadataExample alertMetadataExample = new AlertMetadataExample(); + alertMetadataExample.createCriteria().andAlertIdEqualTo(id); + int rowsAffected = alertMetadataMapper.deleteByExample(alertMetadataExample); + if (rowsAffected < 1) { + return; + } + + alertMapper.deleteByPrimaryKey(id); } - + @Override public List findByProviderAndTimestamp(String provider, long timeStamp) { - // TODO Auto-generated method stub - return null; + AlertMetadataExample alertMetadataExample = new AlertMetadataExample(); + alertMetadataExample.createCriteria().andProviderIdEqualTo(provider) + .andServerVersionGreaterThanOrEqualTo(timeStamp + 1); + return convert(alertMetadataMapper.selectMany(alertMetadataExample, 0, DEFAULT_FETCH_SIZE)); } - + @Override public List findActiveByProviderAndTimestamp(String provider, long timeStamp) { - // TODO Auto-generated method stub - return null; + AlertMetadataExample alertMetadataExample = new AlertMetadataExample(); + alertMetadataExample.createCriteria().andProviderIdEqualTo(provider) + .andServerVersionGreaterThanOrEqualTo(timeStamp + 1).andIsActiveEqualTo(true); + return convert(alertMetadataMapper.selectMany(alertMetadataExample, 0, DEFAULT_FETCH_SIZE)); } - + @Override public List findAlertByProviderEntityIdTriggerName(String provider, String entityId, String triggerName) { - // TODO Auto-generated method stub - return null; + AlertMetadataExample alertMetadataExample = new AlertMetadataExample(); + alertMetadataExample.createCriteria().andProviderIdEqualTo(provider).andBaseEntityIdEqualTo(entityId) + .andTriggerNameEqualTo(triggerName); + return convert(alertMetadataMapper.selectMany(alertMetadataExample, 0, DEFAULT_FETCH_SIZE)); } - + @Override public List findActiveAlertByProviderEntityIdTriggerName(String provider, String entityId, String triggerName) { - // TODO Auto-generated method stub - return null; + AlertMetadataExample alertMetadataExample = new AlertMetadataExample(); + alertMetadataExample.createCriteria().andProviderIdEqualTo(provider).andBaseEntityIdEqualTo(entityId) + .andTriggerNameEqualTo(triggerName).andIsActiveEqualTo(true); + return convert(alertMetadataMapper.selectMany(alertMetadataExample, 0, DEFAULT_FETCH_SIZE)); } - + @Override public List findActiveAlertByEntityIdTriggerName(String entityId, String triggerName) { - // TODO Auto-generated method stub - return null; + AlertMetadataExample alertMetadataExample = new AlertMetadataExample(); + alertMetadataExample.createCriteria().andBaseEntityIdEqualTo(entityId).andTriggerNameEqualTo(triggerName) + .andIsActiveEqualTo(true); + return convert(alertMetadataMapper.selectMany(alertMetadataExample, 0, DEFAULT_FETCH_SIZE)); } - + @Override public List findActiveAlertByEntityId(String entityId) { - // TODO Auto-generated method stub - return null; + AlertMetadataExample alertMetadataExample = new AlertMetadataExample(); + alertMetadataExample.createCriteria().andBaseEntityIdEqualTo(entityId).andIsActiveEqualTo(true); + return convert(alertMetadataMapper.selectMany(alertMetadataExample, 0, DEFAULT_FETCH_SIZE)); } - + @Override public List findByEntityIdTriggerAndTimeStamp(String entityId, String trigger, DateTime start, DateTime end) { - // TODO Auto-generated method stub - return null; + AlertMetadataExample alertMetadataExample = new AlertMetadataExample(); + alertMetadataExample.createCriteria().andBaseEntityIdEqualTo(entityId).andTriggerNameEqualTo(trigger) + .andServerVersionBetween(start.getMillis() + 1, end.getMillis()); + return convert(alertMetadataMapper.selectMany(alertMetadataExample, 0, DEFAULT_FETCH_SIZE)); } - + @Override public void markAllAsClosedFor(String entityId, String reasonForClose) { - // TODO Auto-generated method stub - + List alerts = findActiveAlertByEntityId(entityId); + for (Alert alert : alerts) { + alert.markAlertAsClosed(reasonForClose); + update(alert); + } } - + @Override public void markAlertAsClosedFor(String providerId, String entityId, String triggerName, String reasonForClose) { - // TODO Auto-generated method stub - + List alerts = findActiveAlertByProviderEntityIdTriggerName(providerId, entityId, triggerName); + if (alerts.size() > 1) { + logger.warn(MessageFormat.format( + "Found more than one alert for the combination of providerId: {0}, entityId: {1} and triggerName : {2}. Alerts : {3}", + providerId, entityId, triggerName, alerts)); + } + for (Alert alert : alerts) { + alert.markAlertAsClosed(reasonForClose); + update(alert); + } } - + @Override public void markAlertAsCompleteFor(String providerId, String entityId, String triggerName, String completionDate) { - // TODO Auto-generated method stub + List alerts = findActiveAlertByProviderEntityIdTriggerName(providerId, entityId, triggerName); + if (alerts.size() > 1) { + logger.warn(MessageFormat.format( + "Found more than one alert for the combination of providerId: {0}, entityId: {1} and triggerName : {2}. Alerts : {3}", + providerId, entityId, triggerName, alerts)); + } + for (Alert alert : alerts) { + alert.markAlertAsComplete(completionDate); + update(alert); + } } - + @Override public void addOrUpdateScheduleNotificationAlert(String beneficiaryType, String entityId, String providerId, String triggerName, String triggerCode, AlertStatus alertStatus, DateTime startDate, DateTime expiryDate) { - // TODO Auto-generated method stub + List existingAlerts = findActiveAlertByProviderEntityIdTriggerName(providerId, entityId, triggerName); + if (existingAlerts.size() > 1) { + logger.warn(MessageFormat.format("Found more than one active alerts for the combination of " + + "providerId: {0}, entityId: {1} and triggerName: {2}", + providerId, entityId, triggerName)); + } + + if (existingAlerts.size() == 0) { + add(new Alert(providerId, entityId, beneficiaryType, AlertType.notification, TriggerType.schedule, triggerName, + triggerCode, startDate, expiryDate, alertStatus, null)); + } else { + Alert al = existingAlerts.get(0); + // if visit code is same then update otherwise add another record + if (StringUtils.isNotBlank(al.triggerCode()) && StringUtils.isNotBlank(triggerCode) + && al.triggerCode().equalsIgnoreCase(triggerCode)) { + al.setAlertStatus(alertStatus.name()); + al.setStartDate(startDate.toString()); + al.setExpiryDate(expiryDate.toString()); + al.details().put(alertStatus.name() + ":start", startDate.toString()); + al.details().put(alertStatus.name() + ":end", expiryDate.toString()); + + update(al); + } else { + add(new Alert(providerId, entityId, beneficiaryType, AlertType.notification, TriggerType.schedule, + triggerName, triggerCode, startDate, expiryDate, alertStatus, null)); + } + } } - + @Override public void markAlertAsCompleteFor(String entityId, String triggerName, String completionDate) { - // TODO Auto-generated method stub + List alerts = findActiveAlertByEntityIdTriggerName(entityId, triggerName); + for (Alert alert : alerts) { + alert.markAlertAsComplete(completionDate); + update(alert); + } + } + + @Override + protected Long retrievePrimaryKey(Alert alert) { + if (alert == null) { + return null; + } + String documentId = alert.getId(); + + AlertMetadataExample alertMetadataExample = new AlertMetadataExample(); + alertMetadataExample.createCriteria().andDocumentIdEqualTo(documentId); + + org.opensrp.domain.postgres.Alert pgAlert = alertMetadataMapper.selectByDocumentId(documentId); + if (pgAlert == null) { + return null; + } + return pgAlert.getId(); + } + + @Override + protected Object getUniqueField(Alert alert) { + if (alert == null) { + return null; + } + return alert.getId(); + } + + //private methods + private Alert convert(org.opensrp.domain.postgres.Alert pgAlert) { + if (pgAlert == null || pgAlert.getJson() == null || !(pgAlert.getJson() instanceof Action)) { + return null; + } + return (Alert) pgAlert.getJson(); + } + + private org.opensrp.domain.postgres.Alert convert(Alert entity, Long primaryKey) { + if (entity == null) { + return null; + } + + org.opensrp.domain.postgres.Alert pgAlert = new org.opensrp.domain.postgres.Alert(); + pgAlert.setId(primaryKey); + pgAlert.setJson(entity); + return pgAlert; + } + + private List convert(List alerts) { + if (alerts == null || alerts.isEmpty()) { + return new ArrayList<>(); + } + + List convertedAlerts = new ArrayList<>(); + for (org.opensrp.domain.postgres.Alert alert : alerts) { + Alert convertedAlert = convert(alert); + if (convertedAlert != null) { + convertedAlerts.add(convertedAlert); + } + } + + return convertedAlerts; + } + + private AlertMetadata createMetadata(Alert entity, Long id) { + AlertMetadata metadata = new AlertMetadata(); + metadata.setAlertId(id); + metadata.setDocumentId(entity.getId()); + metadata.setBaseEntityId(entity.entityId()); + metadata.setProviderId(entity.providerId()); + metadata.setServerVersion(entity.timestamp()); + metadata.setIsActive(entity.getIsActive()); + metadata.setTriggerName(entity.triggerName()); + return metadata; } } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/AlertTypeHandler.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/AlertTypeHandler.java new file mode 100644 index 0000000000..3559e52fb0 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/AlertTypeHandler.java @@ -0,0 +1,73 @@ +package org.opensrp.repository.postgres.handler; + +import java.sql.CallableStatement; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.type.JdbcType; +import org.apache.ibatis.type.TypeHandler; +import org.opensrp.scheduler.Alert; +import org.postgresql.util.PGobject; + +public class AlertTypeHandler extends BaseTypeHandler implements TypeHandler { + + @Override + public void setParameter(PreparedStatement ps, int i, Alert parameter, JdbcType jdbcType) throws SQLException { + try { + if (parameter != null) { + String jsonString = gson.toJson(parameter); + PGobject jsonObject = new PGobject(); + jsonObject.setType("jsonb"); + jsonObject.setValue(jsonString); + ps.setObject(i, jsonObject); + } + } + catch (Exception e) { + throw new SQLException(e); + } + } + + @Override + public Alert getResult(ResultSet rs, String columnName) throws SQLException { + try { + String jsonString = rs.getString(columnName); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return gson.fromJson(jsonString, Alert.class); + } + catch (Exception e) { + throw new SQLException(e); + } + } + + @Override + public Alert getResult(ResultSet rs, int columnIndex) throws SQLException { + try { + String jsonString = rs.getString(columnIndex); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return gson.fromJson(jsonString, Alert.class); + } + catch (Exception e) { + throw new SQLException(e); + } + } + + @Override + public Alert getResult(CallableStatement cs, int columnIndex) throws SQLException { + try { + String jsonString = cs.getString(columnIndex); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return gson.fromJson(jsonString, Alert.class); + } + catch (Exception e) { + throw new SQLException(e); + } + } +} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java index a103a9a286..eb47c6c3b8 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java @@ -10,73 +10,67 @@ public interface AlertMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ long countByExample(AlertExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ int deleteByExample(AlertExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ int insert(Alert record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ int insertSelective(Alert record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 - */ - List selectByExampleWithRowbounds(AlertExample example, RowBounds rowBounds); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ List selectByExample(AlertExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ Alert selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ int updateByExampleSelective(@Param("record") Alert record, @Param("example") AlertExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ int updateByExample(@Param("record") Alert record, @Param("example") AlertExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ int updateByPrimaryKeySelective(Alert record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ int updateByPrimaryKey(Alert record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java index 0ffd442767..f47a3d3f86 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java @@ -10,73 +10,67 @@ public interface AlertMetadataMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ long countByExample(AlertMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ int deleteByExample(AlertMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ int insert(AlertMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ int insertSelective(AlertMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 - */ - List selectByExampleWithRowbounds(AlertMetadataExample example, RowBounds rowBounds); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ List selectByExample(AlertMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ AlertMetadata selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ int updateByExampleSelective(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ int updateByExample(@Param("record") AlertMetadata record, @Param("example") AlertMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ int updateByPrimaryKeySelective(AlertMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.alert_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Thu Mar 22 17:10:48 EAT 2018 */ int updateByPrimaryKey(AlertMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomAlertMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomAlertMapper.java new file mode 100644 index 0000000000..df1e180633 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomAlertMapper.java @@ -0,0 +1,11 @@ +package org.opensrp.repository.postgres.mapper.custom; + +import org.opensrp.domain.postgres.Alert; +import org.opensrp.repository.postgres.mapper.AlertMapper; + + +public interface CustomAlertMapper extends AlertMapper { + + int insertSelectiveAndSetId(Alert pgAlert); + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomAlertMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomAlertMetadataMapper.java new file mode 100644 index 0000000000..e92b434d6a --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomAlertMetadataMapper.java @@ -0,0 +1,16 @@ +package org.opensrp.repository.postgres.mapper.custom; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.Alert; +import org.opensrp.domain.postgres.AlertMetadataExample; +import org.opensrp.repository.postgres.mapper.AlertMetadataMapper; + +public interface CustomAlertMetadataMapper extends AlertMetadataMapper { + + Alert selectByDocumentId(String documentId); + + List selectMany(@Param("example") AlertMetadataExample example, @Param("offset") int offset, + @Param("limit") int limit); +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMetadataMapper.xml index 41c965f186..cee69e3e70 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMetadataMapper.xml @@ -12,7 +12,7 @@ select from core.action_metadata am - join core.action a on am.event_id = a.id + join core.action a on am.action_id = a.id where am.document_id = #{documentId,jdbcType=VARCHAR} @@ -57,7 +57,7 @@ from core.action_metadata am - join core.action a on am.event_id = a.id + join core.action a on am.action_id = a.id @@ -75,7 +75,7 @@ from core.action_metadata am - join core.action a on am.event_id = a.id + join core.action a on am.action_id = a.id diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomAlertMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomAlertMapper.xml new file mode 100644 index 0000000000..755b7eb574 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomAlertMapper.xml @@ -0,0 +1,25 @@ + + + + + insert into core.action + + + id, + + + json, + + + + + #{id,jdbcType=BIGINT}, + + + #{json,jdbcType=OTHER}, + + + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomAlertMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomAlertMetadataMapper.xml new file mode 100644 index 0000000000..7daa931a59 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomAlertMetadataMapper.xml @@ -0,0 +1,69 @@ + + + + + + a.id, a.json + + + + + + + + + + + + + + and am.${criterion.condition} + + + and am.${criterion.condition} #{criterion.value} + + + and am.${criterion.condition} #{criterion.value} and + am.#{criterion.secondValue} + + + and am.${criterion.condition} + + #{listItem} + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml index 41041252fd..1c9e81f937 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMapper.xml @@ -5,16 +5,16 @@ - + @@ -39,6 +39,25 @@ + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.AlertTypeHandler} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.AlertTypeHandler} and #{criterion.secondValue,typeHandler=org.opensrp.repository.postgres.handler.AlertTypeHandler} + + + and ${criterion.condition} + + #{listItem,typeHandler=org.opensrp.repository.postgres.handler.AlertTypeHandler} + + + + @@ -48,7 +67,7 @@ @@ -73,6 +92,25 @@ + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.AlertTypeHandler} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.AlertTypeHandler} and #{criterion.secondValue,typeHandler=org.opensrp.repository.postgres.handler.AlertTypeHandler} + + + and ${criterion.condition} + + #{listItem,typeHandler=org.opensrp.repository.postgres.handler.AlertTypeHandler} + + + + @@ -82,7 +120,7 @@ id, json @@ -90,7 +128,7 @@ select @@ -109,7 +147,7 @@ select @@ -120,7 +158,7 @@ delete from core.alert where id = #{id,jdbcType=BIGINT} @@ -129,7 +167,7 @@ delete from core.alert @@ -140,16 +178,18 @@ - insert into core.alert (id, json) - values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) + insert into core.alert (id, json + ) + values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.AlertTypeHandler} + ) insert into core.alert @@ -165,7 +205,7 @@ #{id,jdbcType=BIGINT}, - #{json,jdbcType=OTHER}, + #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.AlertTypeHandler}, @@ -173,7 +213,7 @@ select count(*) from core.alert @@ -184,7 +224,7 @@ update core.alert @@ -192,7 +232,7 @@ id = #{record.id,jdbcType=BIGINT}, - json = #{record.json,jdbcType=OTHER}, + json = #{record.json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.AlertTypeHandler}, @@ -203,11 +243,11 @@ update core.alert set id = #{record.id,jdbcType=BIGINT}, - json = #{record.json,jdbcType=OTHER} + json = #{record.json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.AlertTypeHandler} @@ -216,12 +256,12 @@ update core.alert - json = #{json,jdbcType=OTHER}, + json = #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.AlertTypeHandler}, where id = #{id,jdbcType=BIGINT} @@ -230,29 +270,10 @@ update core.alert - set json = #{json,jdbcType=OTHER} + set json = #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.AlertTypeHandler} where id = #{id,jdbcType=BIGINT} - \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml index 25173a0cba..84ce1ac437 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/AlertMetadataMapper.xml @@ -5,10 +5,11 @@ + @@ -22,7 +23,7 @@ @@ -56,7 +57,7 @@ @@ -90,16 +91,16 @@ - id, alert_id, base_entity_id, server_version, provider_id, location_id, team, team_id, - is_active, trigger_name + id, alert_id, document_id, base_entity_id, server_version, provider_id, location_id, + team, team_id, is_active, trigger_name - - select - - distinct - - - from core.alert_metadata - - - - - order by ${orderByClause} - - \ No newline at end of file From facfda75a5b82f396d937720f8ee5d3ca65d6454 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 23 Mar 2018 11:26:33 +0300 Subject: [PATCH 066/133] Add Unique indexes --- .../scripts/20180307131558_create_event_metadata_table.sql | 2 +- .../scripts/20180307145358_create_action_metadata_table.sql | 2 +- .../scripts/20180309113954_create_alert_metadata_table.sql | 5 +++-- .../scripts/20180309135847_create_mutli_media_table.sql | 4 +++- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql index f4e5af2dd8..b11839f562 100644 --- a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql +++ b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql @@ -21,7 +21,7 @@ CREATE TABLE core.event_metadata ( id bigserial NOT NULL, event_id bigint REFERENCES core.event (id), - document_id character varying NOT NULL, + document_id character varying UNIQUE NOT NULL, base_entity_id character varying NOT NULL, form_submission_id character varying NOT NULL, server_version bigint, diff --git a/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql b/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql index 84e1da5052..e95a8f8f77 100644 --- a/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql +++ b/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql @@ -21,7 +21,7 @@ CREATE TABLE core.action_metadata ( id bigserial NOT NULL, action_id bigint REFERENCES core.action (id), - document_id character varying NOT NULL, + document_id character varying UNIQUE NOT NULL, base_entity_id character varying NOT NULL, server_version bigint, provider_id character varying, diff --git a/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql b/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql index ec0004e2bf..cef33ff7f7 100644 --- a/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql +++ b/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql @@ -21,7 +21,7 @@ CREATE TABLE core.alert_metadata ( id bigserial NOT NULL, alert_id bigint REFERENCES core.alert (id), - document_id character varying NOT NULL, + document_id character varying UNIQUE NOT NULL, base_entity_id character varying NOT NULL, server_version bigint, provider_id character varying, @@ -30,7 +30,8 @@ CREATE TABLE core.alert_metadata team_id character varying, is_active boolean, trigger_name character varying, - PRIMARY KEY (id) + PRIMARY KEY (id), + UNIQUE(base_entity_id,provider_id,trigger_name) ) WITH ( OIDS = FALSE diff --git a/assets/migrations/scripts/20180309135847_create_mutli_media_table.sql b/assets/migrations/scripts/20180309135847_create_mutli_media_table.sql index 5f491d9a3a..2361a60c3b 100644 --- a/assets/migrations/scripts/20180309135847_create_mutli_media_table.sql +++ b/assets/migrations/scripts/20180309135847_create_mutli_media_table.sql @@ -20,7 +20,8 @@ CREATE TABLE core.multi_media ( id bigserial NOT NULL, - case_id character varying NOT NULL, + document_id character varying UNIQUE NOT NULL, + case_id character varying NOT NULL, provider_id character varying, content_type character varying, file_path character varying, @@ -31,6 +32,7 @@ WITH ( OIDS = FALSE ) TABLESPACE core_space; +CREATE INDEX multi_media_document_id_index ON core.multi_media (document_id); CREATE INDEX multi_media_case_id_index ON core.multi_media (case_id); CREATE INDEX multi_media_provider_id_index ON core.multi_media (provider_id); From d8dbd3f1750e25c9477be514d79eb10dc9126269 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 23 Mar 2018 11:27:40 +0300 Subject: [PATCH 067/133] MultiMedia repository --- .../opensrp/domain/postgres/MultiMedia.java | 59 +++++--- .../domain/postgres/MultiMediaExample.java | 102 +++++++++++--- .../postgres/AlertsRepositoryImpl.java | 19 +-- .../postgres/MultimediaRepositoryImpl.java | 132 ++++++++++++++++-- .../postgres/mapper/MultiMediaMapper.java | 28 ++-- .../postgres/mapper/xml/MultiMediaMapper.xml | 80 +++++------ 6 files changed, 299 insertions(+), 121 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMedia.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMedia.java index 2a605be75e..d03fdf4126 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMedia.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMedia.java @@ -4,39 +4,44 @@ public class MultiMedia { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ private Long id; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.document_id + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 + */ + private String documentId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.case_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ private String caseId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.provider_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.content_type - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ private String contentType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.file_path - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ private String filePath; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.multi_media.file_category - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ private String fileCategory; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.id * @return the value of core.multi_media.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public Long getId() { return id; @@ -45,16 +50,34 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.id * @param id the value for core.multi_media.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public void setId(Long id) { this.id = id; } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.document_id + * @return the value of core.multi_media.document_id + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 + */ + public String getDocumentId() { + return documentId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.document_id + * @param documentId the value for core.multi_media.document_id + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 + */ + public void setDocumentId(String documentId) { + this.documentId = documentId; + } + /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.case_id * @return the value of core.multi_media.case_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public String getCaseId() { return caseId; @@ -63,7 +86,7 @@ public String getCaseId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.case_id * @param caseId the value for core.multi_media.case_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public void setCaseId(String caseId) { this.caseId = caseId; @@ -72,7 +95,7 @@ public void setCaseId(String caseId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.provider_id * @return the value of core.multi_media.provider_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public String getProviderId() { return providerId; @@ -81,7 +104,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.provider_id * @param providerId the value for core.multi_media.provider_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -90,7 +113,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.content_type * @return the value of core.multi_media.content_type - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public String getContentType() { return contentType; @@ -99,7 +122,7 @@ public String getContentType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.content_type * @param contentType the value for core.multi_media.content_type - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public void setContentType(String contentType) { this.contentType = contentType; @@ -108,7 +131,7 @@ public void setContentType(String contentType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.file_path * @return the value of core.multi_media.file_path - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public String getFilePath() { return filePath; @@ -117,7 +140,7 @@ public String getFilePath() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.file_path * @param filePath the value for core.multi_media.file_path - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public void setFilePath(String filePath) { this.filePath = filePath; @@ -126,7 +149,7 @@ public void setFilePath(String filePath) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.multi_media.file_category * @return the value of core.multi_media.file_category - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public String getFileCategory() { return fileCategory; @@ -135,7 +158,7 @@ public String getFileCategory() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.multi_media.file_category * @param fileCategory the value for core.multi_media.file_category - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public void setFileCategory(String fileCategory) { this.fileCategory = fileCategory; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMediaExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMediaExample.java index ffb69cfc69..fc148eaafe 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMediaExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/MultiMediaExample.java @@ -6,23 +6,23 @@ public class MultiMediaExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public MultiMediaExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public MultiMediaExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ protected abstract static class GeneratedCriteria { @@ -223,6 +223,76 @@ public Criteria andIdNotBetween(Long value1, Long value2) { return (Criteria) this; } + public Criteria andDocumentIdIsNull() { + addCriterion("document_id is null"); + return (Criteria) this; + } + + public Criteria andDocumentIdIsNotNull() { + addCriterion("document_id is not null"); + return (Criteria) this; + } + + public Criteria andDocumentIdEqualTo(String value) { + addCriterion("document_id =", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotEqualTo(String value) { + addCriterion("document_id <>", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdGreaterThan(String value) { + addCriterion("document_id >", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdGreaterThanOrEqualTo(String value) { + addCriterion("document_id >=", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLessThan(String value) { + addCriterion("document_id <", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLessThanOrEqualTo(String value) { + addCriterion("document_id <=", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLike(String value) { + addCriterion("document_id like", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotLike(String value) { + addCriterion("document_id not like", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdIn(List values) { + addCriterion("document_id in", values, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotIn(List values) { + addCriterion("document_id not in", values, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdBetween(String value1, String value2) { + addCriterion("document_id between", value1, value2, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotBetween(String value1, String value2) { + addCriterion("document_id not between", value1, value2, "documentId"); + return (Criteria) this; + } + public Criteria andCaseIdIsNull() { addCriterion("case_id is null"); return (Criteria) this; @@ -576,7 +646,7 @@ public Criteria andFileCategoryNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ public static class Criterion { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java index ec7a465405..26ef9ca772 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java @@ -1,6 +1,5 @@ package org.opensrp.repository.postgres; -import java.text.MessageFormat; import java.util.ArrayList; import java.util.List; import java.util.UUID; @@ -195,11 +194,6 @@ public void markAllAsClosedFor(String entityId, String reasonForClose) { @Override public void markAlertAsClosedFor(String providerId, String entityId, String triggerName, String reasonForClose) { List alerts = findActiveAlertByProviderEntityIdTriggerName(providerId, entityId, triggerName); - if (alerts.size() > 1) { - logger.warn(MessageFormat.format( - "Found more than one alert for the combination of providerId: {0}, entityId: {1} and triggerName : {2}. Alerts : {3}", - providerId, entityId, triggerName, alerts)); - } for (Alert alert : alerts) { alert.markAlertAsClosed(reasonForClose); update(alert); @@ -209,11 +203,6 @@ public void markAlertAsClosedFor(String providerId, String entityId, String trig @Override public void markAlertAsCompleteFor(String providerId, String entityId, String triggerName, String completionDate) { List alerts = findActiveAlertByProviderEntityIdTriggerName(providerId, entityId, triggerName); - if (alerts.size() > 1) { - logger.warn(MessageFormat.format( - "Found more than one alert for the combination of providerId: {0}, entityId: {1} and triggerName : {2}. Alerts : {3}", - providerId, entityId, triggerName, alerts)); - } for (Alert alert : alerts) { alert.markAlertAsComplete(completionDate); update(alert); @@ -226,13 +215,7 @@ public void addOrUpdateScheduleNotificationAlert(String beneficiaryType, String String triggerName, String triggerCode, AlertStatus alertStatus, DateTime startDate, DateTime expiryDate) { List existingAlerts = findActiveAlertByProviderEntityIdTriggerName(providerId, entityId, triggerName); - if (existingAlerts.size() > 1) { - logger.warn(MessageFormat.format("Found more than one active alerts for the combination of " - + "providerId: {0}, entityId: {1} and triggerName: {2}", - providerId, entityId, triggerName)); - } - - if (existingAlerts.size() == 0) { + if (existingAlerts.isEmpty()) { add(new Alert(providerId, entityId, beneficiaryType, AlertType.notification, TriggerType.schedule, triggerName, triggerCode, startDate, expiryDate, alertStatus, null)); } else { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java index d6b0ef3349..8a1f70bfd6 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java @@ -1,29 +1,68 @@ package org.opensrp.repository.postgres; +import java.util.ArrayList; import java.util.List; +import java.util.UUID; import org.opensrp.domain.Multimedia; +import org.opensrp.domain.postgres.MultiMedia; +import org.opensrp.domain.postgres.MultiMediaExample; import org.opensrp.repository.MultimediaRepository; +import org.opensrp.repository.postgres.mapper.MultiMediaMapper; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; @Repository -public class MultimediaRepositoryImpl implements MultimediaRepository { +public class MultimediaRepositoryImpl extends BaseRepositoryImpl implements MultimediaRepository { + + @Autowired + private MultiMediaMapper multiMediaMapper; @Override public Multimedia get(String id) { - // TODO Auto-generated method stub - return null; + MultiMediaExample example = new MultiMediaExample(); + example.createCriteria().andDocumentIdEqualTo(id); + List files = multiMediaMapper.selectByExample(example); + return files.isEmpty() ? null : convert(files.get(0)); } @Override public void add(Multimedia entity) { - // TODO Auto-generated method stub + if (entity == null || entity.getCaseId() == null) { + return; + } + + if (retrievePrimaryKey(entity) != null) { //Multimedia already added + return; + } + + if (entity.getId() == null) + entity.setId(UUID.randomUUID().toString()); + + org.opensrp.domain.postgres.MultiMedia pgMultiMedia = convert(entity, null); + if (pgMultiMedia == null) { + return; + } + + multiMediaMapper.updateByPrimaryKey(pgMultiMedia); + multiMediaMapper.insertSelective(pgMultiMedia); } @Override public void update(Multimedia entity) { - // TODO Auto-generated method stub + if (entity == null || entity.getId() == null || entity.getCaseId() == null) { + return; + } + + Long id = retrievePrimaryKey(entity); + + if (id == null) { //Multimedia doesn't not exist + return; + } + + MultiMedia pgEntity = convert(entity, id); + multiMediaMapper.updateByPrimaryKey(pgEntity); } @@ -35,20 +74,93 @@ public List getAll() { @Override public void safeRemove(Multimedia entity) { - // TODO Auto-generated method stub + if (entity == null || entity.getCaseId() == null) { + return; + } + + Long id = retrievePrimaryKey(entity); + if (id == null) { + return; + } + + multiMediaMapper.deleteByPrimaryKey(id); } @Override public Multimedia findByCaseId(String entityId) { - // TODO Auto-generated method stub - return null; + MultiMediaExample example = new MultiMediaExample(); + example.createCriteria().andCaseIdEqualTo(entityId); + List multiMediaFiles = multiMediaMapper.selectByExample(example); + return multiMediaFiles.isEmpty() ? null : convert(multiMediaFiles.get(0)); } @Override public List all(String providerId) { - // TODO Auto-generated method stub - return null; + MultiMediaExample example = new MultiMediaExample(); + example.createCriteria().andProviderIdEqualTo(providerId); + List multiMediaFiles = multiMediaMapper.selectByExample(example); + return convert(multiMediaFiles); + } + + @Override + protected Long retrievePrimaryKey(Multimedia multimedia) { + if (multimedia == null) { + return null; + } + String documentId = multimedia.getId(); + + MultiMediaExample example = new MultiMediaExample(); + example.createCriteria().andDocumentIdEqualTo(documentId); + List files = multiMediaMapper.selectByExample(example); + return files.isEmpty() ? null : files.get(0).getId(); + } + + @Override + protected Object getUniqueField(Multimedia multiMedia) { + return multiMedia == null ? multiMedia : multiMedia.getId(); + } + + //private Methods + private Multimedia convert(MultiMedia pgMultiMedia) { + Multimedia multimedia = new Multimedia(); + multimedia.setId(pgMultiMedia.getDocumentId()); + multimedia.setCaseId(pgMultiMedia.getCaseId()); + multimedia.setProviderId(pgMultiMedia.getProviderId()); + multimedia.setContentType(pgMultiMedia.getContentType()); + multimedia.setFilePath(pgMultiMedia.getFilePath()); + multimedia.setFileCategory(pgMultiMedia.getFileCategory()); + return multimedia; + } + + private MultiMedia convert(Multimedia entity, Long primaryKey) { + if (entity == null) { + return null; + } + MultiMedia pgMultiMedia = new MultiMedia(); + pgMultiMedia.setId(primaryKey); + pgMultiMedia.setDocumentId(entity.getId()); + pgMultiMedia.setCaseId(entity.getCaseId()); + pgMultiMedia.setProviderId(entity.getProviderId()); + pgMultiMedia.setContentType(entity.getContentType()); + pgMultiMedia.setFilePath(entity.getFilePath()); + pgMultiMedia.setFileCategory(entity.getFileCategory()); + return pgMultiMedia; + } + + private List convert(List multiMediaFiles) { + if (multiMediaFiles == null || multiMediaFiles.isEmpty()) { + return new ArrayList<>(); + } + List convertedList = new ArrayList<>(); + for (MultiMedia pgMultiMedia : multiMediaFiles) { + Multimedia multimedia = convert(pgMultiMedia); + if (multimedia != null) { + convertedList.add(multimedia); + } + } + + return convertedList; } } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java index 1fa1ee7d6a..249f905cd3 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java @@ -10,73 +10,67 @@ public interface MultiMediaMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ long countByExample(MultiMediaExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ int deleteByExample(MultiMediaExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ int insert(MultiMedia record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ int insertSelective(MultiMedia record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 - */ - List selectByExampleWithRowbounds(MultiMediaExample example, RowBounds rowBounds); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ List selectByExample(MultiMediaExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ MultiMedia selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ int updateByExampleSelective(@Param("record") MultiMedia record, @Param("example") MultiMediaExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ int updateByExample(@Param("record") MultiMedia record, @Param("example") MultiMediaExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ int updateByPrimaryKeySelective(MultiMedia record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.multi_media - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 09:39:36 EAT 2018 */ int updateByPrimaryKey(MultiMedia record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/MultiMediaMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/MultiMediaMapper.xml index 014b002a36..239670e46e 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/MultiMediaMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/MultiMediaMapper.xml @@ -5,9 +5,10 @@ + @@ -18,7 +19,7 @@ @@ -52,7 +53,7 @@ @@ -86,15 +87,15 @@ - id, case_id, provider_id, content_type, file_path, file_category + id, document_id, case_id, provider_id, content_type, file_path, file_category - - select - - distinct - - - from core.multi_media - - - - - order by ${orderByClause} - - \ No newline at end of file From be88f909971c4befc96977fa0e82e338b4968334 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 23 Mar 2018 12:45:55 +0300 Subject: [PATCH 068/133] Add custom CustomMultiMediaMapper --- .../postgres/MultimediaRepositoryImpl.java | 7 +-- .../mapper/custom/CustomMultiMediaMapper.java | 14 +++++ .../custom/xml/CustomMultiMediaMapper.xml | 56 +++++++++++++++++++ 3 files changed, 73 insertions(+), 4 deletions(-) create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomMultiMediaMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomMultiMediaMapper.xml diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java index 8a1f70bfd6..2c22c1212b 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java @@ -8,7 +8,7 @@ import org.opensrp.domain.postgres.MultiMedia; import org.opensrp.domain.postgres.MultiMediaExample; import org.opensrp.repository.MultimediaRepository; -import org.opensrp.repository.postgres.mapper.MultiMediaMapper; +import org.opensrp.repository.postgres.mapper.custom.CustomMultiMediaMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; @@ -16,7 +16,7 @@ public class MultimediaRepositoryImpl extends BaseRepositoryImpl implements MultimediaRepository { @Autowired - private MultiMediaMapper multiMediaMapper; + private CustomMultiMediaMapper multiMediaMapper; @Override public Multimedia get(String id) { @@ -68,8 +68,7 @@ public void update(Multimedia entity) { @Override public List getAll() { - // TODO Auto-generated method stub - return null; + return convert(multiMediaMapper.selectMany(new MultiMediaExample(), 0, DEFAULT_FETCH_SIZE)); } @Override diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomMultiMediaMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomMultiMediaMapper.java new file mode 100644 index 0000000000..e8157364d0 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomMultiMediaMapper.java @@ -0,0 +1,14 @@ +package org.opensrp.repository.postgres.mapper.custom; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.MultiMedia; +import org.opensrp.domain.postgres.MultiMediaExample; +import org.opensrp.repository.postgres.mapper.MultiMediaMapper; + +public interface CustomMultiMediaMapper extends MultiMediaMapper { + + List selectMany(@Param("example") MultiMediaExample example, @Param("offset") int offset, + @Param("limit") int limit); +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomMultiMediaMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomMultiMediaMapper.xml new file mode 100644 index 0000000000..1c4a7332dd --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomMultiMediaMapper.xml @@ -0,0 +1,56 @@ + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} + and + #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + \ No newline at end of file From 81de736b8a571d416bf3fe0d85d7239dda115e94 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 23 Mar 2018 15:27:05 +0300 Subject: [PATCH 069/133] Implement Reports Repository --- .../migrations/generator/generatorConfig.xml | 15 +- ...0307131558_create_event_metadata_table.sql | 2 +- ...307150448_create_report_metadata_table.sql | 8 + .../org/opensrp/domain/postgres/Report.java | 12 +- .../domain/postgres/ReportExample.java | 90 +++-- .../domain/postgres/ReportMetadata.java | 148 ++++++-- .../postgres/ReportMetadataExample.java | 320 +++++++++++++++++- .../postgres/ActionRepositoryImpl.java | 6 +- .../postgres/EventsRepositoryImpl.java | 4 +- .../postgres/ReportsRepositoryImpl.java | 259 ++++++++++++-- .../postgres/handler/ReportTypeHandler.java | 73 ++++ .../postgres/mapper/ReportMapper.java | 28 +- .../postgres/mapper/ReportMetadataMapper.java | 28 +- .../mapper/custom/CustomReportMapper.java | 16 + .../custom/CustomReportMetadataMapper.java | 17 + .../mapper/custom/xml/CustomReportMapper.xml | 39 +++ .../custom/xml/CustomReportMetadataMapper.xml | 72 ++++ .../postgres/mapper/xml/ReportMapper.xml | 105 +++--- .../mapper/xml/ReportMetadataMapper.xml | 135 +++++--- 19 files changed, 1140 insertions(+), 237 deletions(-) create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ReportTypeHandler.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomReportMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomReportMetadataMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomReportMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomReportMetadataMapper.xml diff --git a/assets/migrations/generator/generatorConfig.xml b/assets/migrations/generator/generatorConfig.xml index 6b96b91bb6..735552be98 100644 --- a/assets/migrations/generator/generatorConfig.xml +++ b/assets/migrations/generator/generatorConfig.xml @@ -26,22 +26,25 @@
-
--> + + typeHandler="org.opensrp.repository.postgres.handler.AlertTypeHandler" /> +
--> + +
- - - diff --git a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql index b11839f562..f38bc2f5e1 100644 --- a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql +++ b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql @@ -23,7 +23,7 @@ CREATE TABLE core.event_metadata event_id bigint REFERENCES core.event (id), document_id character varying UNIQUE NOT NULL, base_entity_id character varying NOT NULL, - form_submission_id character varying NOT NULL, + form_submission_id character varying UNIQUE NOT NULL, server_version bigint, openmrs_uuid character varying, event_type character varying, diff --git a/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql b/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql index 94801e9928..6d1c2f6a7f 100644 --- a/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql +++ b/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql @@ -21,19 +21,25 @@ CREATE TABLE core.report_metadata ( id bigserial NOT NULL, report_id bigint REFERENCES core.report (id), + document_id character varying UNIQUE NOT NULL, + form_submission_id character varying UNIQUE NOT NULL, base_entity_id character varying NOT NULL, server_version bigint, report_type character varying, + report_date date, provider_id character varying, location_id character varying, team character varying, team_id character varying, + date_edited date, PRIMARY KEY (id) ) WITH ( OIDS = FALSE ) TABLESPACE core_space; +CREATE INDEX report_metadata_document_id_index ON core.report_metadata (document_id); +CREATE INDEX report_metadata_form_submission_id_index ON core.report_metadata (form_submission_id); CREATE INDEX report_metadata_base_entity_id_index ON core.report_metadata (base_entity_id); CREATE INDEX report_metadata_server_version_index ON core.report_metadata (server_version); CREATE INDEX report_metadata_report_type_index ON core.report_metadata (report_type); @@ -41,6 +47,8 @@ CREATE INDEX report_metadata_provider_id_index ON core.report_metadata (provider CREATE INDEX report_metadata_location_id_index ON core.report_metadata (location_id); CREATE INDEX report_metadata_team_index ON core.report_metadata (team); CREATE INDEX report_metadata_team_id_index ON core.report_metadata (team_id); +CREATE INDEX report_metadata_report_date_index ON core.report_metadata (report_date); +CREATE INDEX report_metadata_date_edited_index ON core.report_metadata (date_edited); -- //@UNDO diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java index 7c9ad43b0a..791aa2b46a 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Report.java @@ -4,19 +4,19 @@ public class Report { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report.json - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report.id * @return the value of core.report.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report.id * @param id the value for core.report.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report.json * @return the value of core.report.json - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report.json * @param json the value for core.report.json - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java index 569058ea88..dbd68aa09e 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportExample.java @@ -6,23 +6,23 @@ public class ReportExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public ReportExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public ReportExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,23 +119,54 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ protected abstract static class GeneratedCriteria { + protected List jsonCriteria; + + protected List allCriteria; + protected List criteria; protected GeneratedCriteria() { super(); criteria = new ArrayList(); + jsonCriteria = new ArrayList(); + } + + public List getJsonCriteria() { + return jsonCriteria; + } + + protected void addJsonCriterion(String condition, Object value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + jsonCriteria.add(new Criterion(condition, value, "org.opensrp.repository.postgres.handler.ReportTypeHandler")); + allCriteria = null; + } + + protected void addJsonCriterion(String condition, Object value1, Object value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + jsonCriteria.add( + new Criterion(condition, value1, value2, "org.opensrp.repository.postgres.handler.ReportTypeHandler")); + allCriteria = null; } public boolean isValid() { - return criteria.size() > 0; + return criteria.size() > 0 || jsonCriteria.size() > 0; } public List getAllCriteria() { - return criteria; + if (allCriteria == null) { + allCriteria = new ArrayList(); + allCriteria.addAll(criteria); + allCriteria.addAll(jsonCriteria); + } + return allCriteria; } public List getCriteria() { @@ -147,6 +178,7 @@ protected void addCriterion(String condition) { throw new RuntimeException("Value for condition cannot be null"); } criteria.add(new Criterion(condition)); + allCriteria = null; } protected void addCriterion(String condition, Object value, String property) { @@ -154,6 +186,7 @@ protected void addCriterion(String condition, Object value, String property) { throw new RuntimeException("Value for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value)); + allCriteria = null; } protected void addCriterion(String condition, Object value1, Object value2, String property) { @@ -161,6 +194,7 @@ protected void addCriterion(String condition, Object value1, Object value2, Stri throw new RuntimeException("Between values for " + property + " cannot be null"); } criteria.add(new Criterion(condition, value1, value2)); + allCriteria = null; } public Criteria andIdIsNull() { @@ -234,59 +268,59 @@ public Criteria andJsonIsNotNull() { } public Criteria andJsonEqualTo(Object value) { - addCriterion("json =", value, "json"); + addJsonCriterion("json =", value, "json"); return (Criteria) this; } public Criteria andJsonNotEqualTo(Object value) { - addCriterion("json <>", value, "json"); + addJsonCriterion("json <>", value, "json"); return (Criteria) this; } public Criteria andJsonGreaterThan(Object value) { - addCriterion("json >", value, "json"); + addJsonCriterion("json >", value, "json"); return (Criteria) this; } public Criteria andJsonGreaterThanOrEqualTo(Object value) { - addCriterion("json >=", value, "json"); + addJsonCriterion("json >=", value, "json"); return (Criteria) this; } public Criteria andJsonLessThan(Object value) { - addCriterion("json <", value, "json"); + addJsonCriterion("json <", value, "json"); return (Criteria) this; } public Criteria andJsonLessThanOrEqualTo(Object value) { - addCriterion("json <=", value, "json"); + addJsonCriterion("json <=", value, "json"); return (Criteria) this; } public Criteria andJsonIn(List values) { - addCriterion("json in", values, "json"); + addJsonCriterion("json in", values, "json"); return (Criteria) this; } public Criteria andJsonNotIn(List values) { - addCriterion("json not in", values, "json"); + addJsonCriterion("json not in", values, "json"); return (Criteria) this; } public Criteria andJsonBetween(Object value1, Object value2) { - addCriterion("json between", value1, value2, "json"); + addJsonCriterion("json between", value1, value2, "json"); return (Criteria) this; } public Criteria andJsonNotBetween(Object value1, Object value2) { - addCriterion("json not between", value1, value2, "json"); + addJsonCriterion("json not between", value1, value2, "json"); return (Criteria) this; } } /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public static class Criterion { diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java index 450d2e7d92..cda46965d1 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadata.java @@ -1,57 +1,79 @@ package org.opensrp.domain.postgres; +import java.util.Date; + public class ReportMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.report_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ private Long reportId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.document_id + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 + */ + private String documentId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.form_submission_id + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 + */ + private String formSubmissionId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.base_entity_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.server_version - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.report_type - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ private String reportType; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.report_date + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 + */ + private Date reportDate; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.provider_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.location_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.team - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.team_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ private String teamId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.report_metadata.date_edited + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 + */ + private Date dateEdited; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.id * @return the value of core.report_metadata.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public Long getId() { return id; @@ -60,7 +82,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.id * @param id the value for core.report_metadata.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -69,7 +91,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.report_id * @return the value of core.report_metadata.report_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public Long getReportId() { return reportId; @@ -78,16 +100,52 @@ public Long getReportId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.report_id * @param reportId the value for core.report_metadata.report_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void setReportId(Long reportId) { this.reportId = reportId; } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.document_id + * @return the value of core.report_metadata.document_id + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 + */ + public String getDocumentId() { + return documentId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.document_id + * @param documentId the value for core.report_metadata.document_id + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 + */ + public void setDocumentId(String documentId) { + this.documentId = documentId; + } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.form_submission_id + * @return the value of core.report_metadata.form_submission_id + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 + */ + public String getFormSubmissionId() { + return formSubmissionId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.form_submission_id + * @param formSubmissionId the value for core.report_metadata.form_submission_id + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 + */ + public void setFormSubmissionId(String formSubmissionId) { + this.formSubmissionId = formSubmissionId; + } + /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.base_entity_id * @return the value of core.report_metadata.base_entity_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -96,7 +154,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.base_entity_id * @param baseEntityId the value for core.report_metadata.base_entity_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -105,7 +163,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.server_version * @return the value of core.report_metadata.server_version - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -114,7 +172,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.server_version * @param serverVersion the value for core.report_metadata.server_version - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -123,7 +181,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.report_type * @return the value of core.report_metadata.report_type - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public String getReportType() { return reportType; @@ -132,16 +190,34 @@ public String getReportType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.report_type * @param reportType the value for core.report_metadata.report_type - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void setReportType(String reportType) { this.reportType = reportType; } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.report_date + * @return the value of core.report_metadata.report_date + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 + */ + public Date getReportDate() { + return reportDate; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.report_date + * @param reportDate the value for core.report_metadata.report_date + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 + */ + public void setReportDate(Date reportDate) { + this.reportDate = reportDate; + } + /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.provider_id * @return the value of core.report_metadata.provider_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public String getProviderId() { return providerId; @@ -150,7 +226,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.provider_id * @param providerId the value for core.report_metadata.provider_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -159,7 +235,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.location_id * @return the value of core.report_metadata.location_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public String getLocationId() { return locationId; @@ -168,7 +244,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.location_id * @param locationId the value for core.report_metadata.location_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -177,7 +253,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.team * @return the value of core.report_metadata.team - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public String getTeam() { return team; @@ -186,7 +262,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.team * @param team the value for core.report_metadata.team - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -195,7 +271,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.team_id * @return the value of core.report_metadata.team_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public String getTeamId() { return teamId; @@ -204,9 +280,27 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.team_id * @param teamId the value for core.report_metadata.team_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; } + + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.report_metadata.date_edited + * @return the value of core.report_metadata.date_edited + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 + */ + public Date getDateEdited() { + return dateEdited; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.report_metadata.date_edited + * @param dateEdited the value for core.report_metadata.date_edited + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 + */ + public void setDateEdited(Date dateEdited) { + this.dateEdited = dateEdited; + } } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java index 27a6ce0593..40233b58d5 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ReportMetadataExample.java @@ -2,27 +2,29 @@ import java.util.ArrayList; import java.util.List; +import java.util.Date; +import java.util.Iterator; public class ReportMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public ReportMetadataExample() { oredCriteria = new ArrayList(); @@ -30,7 +32,7 @@ public ReportMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +40,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +48,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +56,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +64,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +72,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +80,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +90,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +102,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +111,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +121,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ protected abstract static class GeneratedCriteria { @@ -163,6 +165,32 @@ protected void addCriterion(String condition, Object value1, Object value2, Stri criteria.add(new Criterion(condition, value1, value2)); } + protected void addCriterionForJDBCDate(String condition, Date value, String property) { + if (value == null) { + throw new RuntimeException("Value for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value.getTime()), property); + } + + protected void addCriterionForJDBCDate(String condition, List values, String property) { + if (values == null || values.size() == 0) { + throw new RuntimeException("Value list for " + property + " cannot be null or empty"); + } + List dateList = new ArrayList(); + Iterator iter = values.iterator(); + while (iter.hasNext()) { + dateList.add(new java.sql.Date(iter.next().getTime())); + } + addCriterion(condition, dateList, property); + } + + protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { + if (value1 == null || value2 == null) { + throw new RuntimeException("Between values for " + property + " cannot be null"); + } + addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); + } + public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; @@ -283,6 +311,146 @@ public Criteria andReportIdNotBetween(Long value1, Long value2) { return (Criteria) this; } + public Criteria andDocumentIdIsNull() { + addCriterion("document_id is null"); + return (Criteria) this; + } + + public Criteria andDocumentIdIsNotNull() { + addCriterion("document_id is not null"); + return (Criteria) this; + } + + public Criteria andDocumentIdEqualTo(String value) { + addCriterion("document_id =", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotEqualTo(String value) { + addCriterion("document_id <>", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdGreaterThan(String value) { + addCriterion("document_id >", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdGreaterThanOrEqualTo(String value) { + addCriterion("document_id >=", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLessThan(String value) { + addCriterion("document_id <", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLessThanOrEqualTo(String value) { + addCriterion("document_id <=", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLike(String value) { + addCriterion("document_id like", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotLike(String value) { + addCriterion("document_id not like", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdIn(List values) { + addCriterion("document_id in", values, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotIn(List values) { + addCriterion("document_id not in", values, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdBetween(String value1, String value2) { + addCriterion("document_id between", value1, value2, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotBetween(String value1, String value2) { + addCriterion("document_id not between", value1, value2, "documentId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdIsNull() { + addCriterion("form_submission_id is null"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdIsNotNull() { + addCriterion("form_submission_id is not null"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdEqualTo(String value) { + addCriterion("form_submission_id =", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdNotEqualTo(String value) { + addCriterion("form_submission_id <>", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdGreaterThan(String value) { + addCriterion("form_submission_id >", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdGreaterThanOrEqualTo(String value) { + addCriterion("form_submission_id >=", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdLessThan(String value) { + addCriterion("form_submission_id <", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdLessThanOrEqualTo(String value) { + addCriterion("form_submission_id <=", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdLike(String value) { + addCriterion("form_submission_id like", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdNotLike(String value) { + addCriterion("form_submission_id not like", value, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdIn(List values) { + addCriterion("form_submission_id in", values, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdNotIn(List values) { + addCriterion("form_submission_id not in", values, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdBetween(String value1, String value2) { + addCriterion("form_submission_id between", value1, value2, "formSubmissionId"); + return (Criteria) this; + } + + public Criteria andFormSubmissionIdNotBetween(String value1, String value2) { + addCriterion("form_submission_id not between", value1, value2, "formSubmissionId"); + return (Criteria) this; + } + public Criteria andBaseEntityIdIsNull() { addCriterion("base_entity_id is null"); return (Criteria) this; @@ -483,6 +651,66 @@ public Criteria andReportTypeNotBetween(String value1, String value2) { return (Criteria) this; } + public Criteria andReportDateIsNull() { + addCriterion("report_date is null"); + return (Criteria) this; + } + + public Criteria andReportDateIsNotNull() { + addCriterion("report_date is not null"); + return (Criteria) this; + } + + public Criteria andReportDateEqualTo(Date value) { + addCriterionForJDBCDate("report_date =", value, "reportDate"); + return (Criteria) this; + } + + public Criteria andReportDateNotEqualTo(Date value) { + addCriterionForJDBCDate("report_date <>", value, "reportDate"); + return (Criteria) this; + } + + public Criteria andReportDateGreaterThan(Date value) { + addCriterionForJDBCDate("report_date >", value, "reportDate"); + return (Criteria) this; + } + + public Criteria andReportDateGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("report_date >=", value, "reportDate"); + return (Criteria) this; + } + + public Criteria andReportDateLessThan(Date value) { + addCriterionForJDBCDate("report_date <", value, "reportDate"); + return (Criteria) this; + } + + public Criteria andReportDateLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("report_date <=", value, "reportDate"); + return (Criteria) this; + } + + public Criteria andReportDateIn(List values) { + addCriterionForJDBCDate("report_date in", values, "reportDate"); + return (Criteria) this; + } + + public Criteria andReportDateNotIn(List values) { + addCriterionForJDBCDate("report_date not in", values, "reportDate"); + return (Criteria) this; + } + + public Criteria andReportDateBetween(Date value1, Date value2) { + addCriterionForJDBCDate("report_date between", value1, value2, "reportDate"); + return (Criteria) this; + } + + public Criteria andReportDateNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("report_date not between", value1, value2, "reportDate"); + return (Criteria) this; + } + public Criteria andProviderIdIsNull() { addCriterion("provider_id is null"); return (Criteria) this; @@ -762,11 +990,71 @@ public Criteria andTeamIdNotBetween(String value1, String value2) { addCriterion("team_id not between", value1, value2, "teamId"); return (Criteria) this; } + + public Criteria andDateEditedIsNull() { + addCriterion("date_edited is null"); + return (Criteria) this; + } + + public Criteria andDateEditedIsNotNull() { + addCriterion("date_edited is not null"); + return (Criteria) this; + } + + public Criteria andDateEditedEqualTo(Date value) { + addCriterionForJDBCDate("date_edited =", value, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedNotEqualTo(Date value) { + addCriterionForJDBCDate("date_edited <>", value, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedGreaterThan(Date value) { + addCriterionForJDBCDate("date_edited >", value, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedGreaterThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_edited >=", value, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedLessThan(Date value) { + addCriterionForJDBCDate("date_edited <", value, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedLessThanOrEqualTo(Date value) { + addCriterionForJDBCDate("date_edited <=", value, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedIn(List values) { + addCriterionForJDBCDate("date_edited in", values, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedNotIn(List values) { + addCriterionForJDBCDate("date_edited not in", values, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_edited between", value1, value2, "dateEdited"); + return (Criteria) this; + } + + public Criteria andDateEditedNotBetween(Date value1, Date value2) { + addCriterionForJDBCDate("date_edited not between", value1, value2, "dateEdited"); + return (Criteria) this; + } } /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ public static class Criterion { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java index b72cf46a32..0b966bcf50 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java @@ -230,7 +230,11 @@ public List findByCriteria(String team, String providerId, long timeStam if (sortOrder == null || !sortOrder.toLowerCase().matches("(asc)|(desc)")) sortOrder = "asc"; metadataExample.setOrderByClause(sortBy + " " + sortOrder); - return convert(actionMetadataMapper.selectMany(metadataExample, 0, limit)); + + if (!criteria.isValid()) { + throw new RuntimeException("Atleast one search filter must be specified"); + } else + return convert(actionMetadataMapper.selectMany(metadataExample, 0, limit)); } //private methods diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java index 2330b39da4..c1d280b7c4 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java @@ -218,7 +218,7 @@ public List findEvents(String baseEntityId, DateTime from, DateTime to, S criteria.andTeamEqualTo(team); if (StringUtils.isNotEmpty(teamId)) criteria.andTeamIdEqualTo(teamId); - if (example.getOredCriteria().isEmpty()) + if (!criteria.isValid()) throw new RuntimeException("Atleast one search filter must be specified"); return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, DEFAULT_FETCH_SIZE)); } @@ -332,7 +332,7 @@ public List findEvents(String team, String teamId, String providerId, Str } if (serverVersion != null) criteria.andServerVersionGreaterThanOrEqualTo(serverVersion); - if (example.getOredCriteria().isEmpty()) + if (!criteria.isValid()) throw new RuntimeException("Atleast one search filter must be specified"); sortBy = sortBy == null || sortBy == BaseEntity.SERVER_VERSIOIN ? SERVER_VERSION : sortBy; if (sortOrder == null || !sortOrder.toLowerCase().matches("(asc)|(desc)")) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java index 5abd53a15e..a9f5d7ce71 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java @@ -1,105 +1,308 @@ package org.opensrp.repository.postgres; +import java.util.ArrayList; +import java.util.Arrays; import java.util.List; +import java.util.UUID; +import org.apache.commons.lang3.StringUtils; import org.joda.time.DateTime; import org.opensrp.domain.Report; +import org.opensrp.domain.postgres.ReportMetadata; +import org.opensrp.domain.postgres.ReportMetadataExample; +import org.opensrp.domain.postgres.ReportMetadataExample.Criteria; import org.opensrp.repository.ReportsRepository; +import org.opensrp.repository.postgres.mapper.custom.CustomReportMapper; +import org.opensrp.repository.postgres.mapper.custom.CustomReportMetadataMapper; +import org.opensrp.scheduler.Action; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; @Repository -public class ReportsRepositoryImpl implements ReportsRepository { +public class ReportsRepositoryImpl extends BaseRepositoryImpl implements ReportsRepository { + + @Autowired + private CustomReportMapper reportMapper; + + @Autowired + private CustomReportMetadataMapper reportMetadataMapper; @Override public Report get(String id) { - // TODO Auto-generated method stub - return null; + if (StringUtils.isBlank(id)) { + return null; + } + org.opensrp.domain.postgres.Report pgReport = reportMetadataMapper.selectByDocumentId(id); + + return convert(pgReport); } @Override public void add(Report entity) { - // TODO Auto-generated method stub + if (entity == null) { + return; + } + + if (retrievePrimaryKey(entity) != null) { //Report already added + return; + } + + if (entity.getId() == null) + entity.setId(UUID.randomUUID().toString()); + + org.opensrp.domain.postgres.Report pgReport = convert(entity, null); + if (pgReport == null) { + return; + } + + int rowsAffected = reportMapper.insertSelectiveAndSetId(pgReport); + if (rowsAffected < 1 || pgReport.getId() == null) { + return; + } + + ReportMetadata reportMetadata = createMetadata(entity, pgReport.getId()); + if (reportMetadata != null) { + reportMetadataMapper.insertSelective(reportMetadata); + } } @Override public void update(Report entity) { - // TODO Auto-generated method stub + if (entity == null) { + return; + } + + Long id = retrievePrimaryKey(entity); + if (id == null) { // Alert not added + return; + } + + org.opensrp.domain.postgres.Report pgReport = convert(entity, id); + if (pgReport == null) { + return; + } + + ReportMetadata reportMetadata = createMetadata(entity, id); + if (reportMetadata == null) { + return; + } + + int rowsAffected = reportMapper.updateByPrimaryKeySelective(pgReport); + if (rowsAffected < 1) { + return; + } + + ReportMetadataExample reportMetadataExample = new ReportMetadataExample(); + reportMetadataExample.createCriteria().andReportIdEqualTo(id); + reportMetadataMapper.updateByExampleSelective(reportMetadata, reportMetadataExample); } @Override public List getAll() { - // TODO Auto-generated method stub - return null; + List reports = reportMetadataMapper.selectMany(new ReportMetadataExample(), 0, + DEFAULT_FETCH_SIZE); + return convert(reports); } @Override public void safeRemove(Report entity) { - // TODO Auto-generated method stub + if (entity == null) { + return; + } + + Long id = retrievePrimaryKey(entity); + if (id == null) { + return; + } + + ReportMetadataExample reportMetadataExample = new ReportMetadataExample(); + reportMetadataExample.createCriteria().andReportIdEqualTo(id); + int rowsAffected = reportMetadataMapper.deleteByExample(reportMetadataExample); + if (rowsAffected < 1) { + return; + } + + reportMapper.deleteByPrimaryKey(id); } @Override public Report findById(String id) { - // TODO Auto-generated method stub - return null; + return get(id); } @Override public List findByBaseEntityId(String baseEntityId) { - // TODO Auto-generated method stub - return null; + ReportMetadataExample reportMetadataExample = new ReportMetadataExample(); + reportMetadataExample.createCriteria().andBaseEntityIdEqualTo(baseEntityId); + return convert(reportMetadataMapper.selectMany(reportMetadataExample, 0, DEFAULT_FETCH_SIZE)); } @Override public List findAllByIdentifier(String identifier) { - // TODO Auto-generated method stub - return null; + return convert(reportMapper.selectByIdentifier(identifier, 0, DEFAULT_FETCH_SIZE)); } @Override public List findByBaseEntityAndType(String baseEntityId, String reportType) { - // TODO Auto-generated method stub - return null; + ReportMetadataExample reportMetadataExample = new ReportMetadataExample(); + reportMetadataExample.createCriteria().andBaseEntityIdEqualTo(baseEntityId).andReportTypeEqualTo(reportType); + return convert(reportMetadataMapper.selectMany(reportMetadataExample, 0, DEFAULT_FETCH_SIZE)); } @Override public List findByEmptyServerVersion() { - // TODO Auto-generated method stub - return null; + ReportMetadataExample reportMetadataExample = new ReportMetadataExample(); + reportMetadataExample.createCriteria().andServerVersionIsNull(); + reportMetadataExample.or(reportMetadataExample.createCriteria().andServerVersionNotEqualTo(0l)); + return convert(reportMetadataMapper.selectMany(reportMetadataExample, 0, DEFAULT_FETCH_SIZE)); } @Override public List findByServerVersion(long serverVersion) { - // TODO Auto-generated method stub - return null; + ReportMetadataExample reportMetadataExample = new ReportMetadataExample(); + reportMetadataExample.createCriteria().andServerVersionGreaterThanOrEqualTo(serverVersion + 1); + return convert(reportMetadataMapper.selectMany(reportMetadataExample, 0, DEFAULT_FETCH_SIZE)); } @Override public List findByBaseEntityAndFormSubmissionId(String baseEntityId, String formSubmissionId) { - // TODO Auto-generated method stub - return null; + ReportMetadataExample reportMetadataExample = new ReportMetadataExample(); + reportMetadataExample.createCriteria().andBaseEntityIdEqualTo(baseEntityId) + .andFormSubmissionIdEqualTo(formSubmissionId); + return convert(reportMetadataMapper.selectMany(reportMetadataExample, 0, DEFAULT_FETCH_SIZE)); } @Override public List findReports(String team, String providerId, String locationId, String baseEntityId, Long serverVersion, String sortBy, String sortOrder, int limit) { - // TODO Auto-generated method stub - return null; + ReportMetadataExample reportMetadataExample = new ReportMetadataExample(); + Criteria criteria = reportMetadataExample.createCriteria(); + if (team != null && !team.isEmpty()) { + String[] idsArray = org.apache.commons.lang.StringUtils.split(team, ","); + List ids = new ArrayList(Arrays.asList(idsArray)); + if (providerId != null && !ids.contains(providerId)) { + ids.add(providerId); + } + criteria.andProviderIdIn(ids); + } else if ((providerId != null && !StringUtils.isNotEmpty(providerId))) { + criteria.andProviderIdEqualTo(providerId); + } + if (StringUtils.isNotBlank(locationId)) + criteria.andLocationIdEqualTo(locationId); + if (StringUtils.isNotBlank(baseEntityId)) + criteria.andBaseEntityIdEqualTo(baseEntityId); + if (serverVersion != null) + criteria.andServerVersionGreaterThanOrEqualTo(serverVersion); + if (sortOrder == null || !sortOrder.toLowerCase().matches("(asc)|(desc)")) + sortOrder = "asc"; + reportMetadataExample.setOrderByClause(sortBy + " " + sortOrder); + if (reportMetadataExample.getOredCriteria().isEmpty()) { + throw new RuntimeException("Atleast one search filter must be specified"); + } else + return convert(reportMetadataMapper.selectMany(reportMetadataExample, 0, limit)); } @Override public List findReports(String baseEntityId, DateTime from, DateTime to, String reportType, String providerId, String locationId, DateTime lastEditFrom, DateTime lastEditTo) { - // TODO Auto-generated method stub - return null; + ReportMetadataExample reportMetadataExample = new ReportMetadataExample(); + Criteria criteria = reportMetadataExample.createCriteria(); + if (StringUtils.isNotBlank(baseEntityId)) + criteria.andBaseEntityIdEqualTo(baseEntityId); + if (StringUtils.isNotBlank(locationId)) + criteria.andReportTypeEqualTo(reportType); + if (StringUtils.isNotBlank(providerId)) + criteria.andProviderIdEqualTo(providerId); + if (StringUtils.isNotBlank(locationId)) + criteria.andLocationIdEqualTo(locationId); + if (from != null || to != null) + criteria.andReportDateBetween(from.toDate(), to.toDate()); + if (from != null || to != null) + criteria.andDateEditedBetween(lastEditFrom.toDate(), lastEditTo.toDate()); + if (!criteria.isValid()) + throw new RuntimeException("Atleast one search filter must be specified"); + else + return convert(reportMetadataMapper.selectMany(reportMetadataExample, 0, DEFAULT_FETCH_SIZE)); } @Override public List findReportsByDynamicQuery(String query) { - // TODO Auto-generated method stub - return null; + throw new RuntimeException("Method not supported"); + } + + @Override + protected Long retrievePrimaryKey(Report entity) { + if (entity == null) { + return null; + } + String documentId = entity.getId(); + + ReportMetadataExample reportMetadataExample = new ReportMetadataExample(); + reportMetadataExample.createCriteria().andDocumentIdEqualTo(documentId); + + org.opensrp.domain.postgres.Report pgReport = reportMetadataMapper.selectByDocumentId(documentId); + if (pgReport == null) { + return null; + } + return pgReport.getId(); + } + + @Override + protected Object getUniqueField(Report report) { + return report == null ? null : report.getId(); + } + + //private Methods + private Report convert(org.opensrp.domain.postgres.Report pgReport) { + if (pgReport == null || pgReport.getJson() == null || !(pgReport.getJson() instanceof Action)) { + return null; + } + return (Report) pgReport.getJson(); + } + + private org.opensrp.domain.postgres.Report convert(Report entity, Long primaryKey) { + if (entity == null) { + return null; + } + + org.opensrp.domain.postgres.Report pgReport = new org.opensrp.domain.postgres.Report(); + pgReport.setId(primaryKey); + pgReport.setJson(entity); + + return pgReport; + } + + private List convert(List reports) { + if (reports == null || reports.isEmpty()) { + return new ArrayList<>(); + } + + List convertedReports = new ArrayList<>(); + for (org.opensrp.domain.postgres.Report event : reports) { + Report convertedReport = convert(event); + if (convertedReport != null) { + convertedReports.add(convertedReport); + } + } + return convertedReports; + } + + private ReportMetadata createMetadata(Report entity, Long id) { + ReportMetadata reportMetadata = new ReportMetadata(); + reportMetadata.setReportId(id); + reportMetadata.setDocumentId(entity.getId()); + reportMetadata.setBaseEntityId(entity.getBaseEntityId()); + reportMetadata.setFormSubmissionId(entity.getFormSubmissionId()); + reportMetadata.setReportType(entity.getReportType()); + reportMetadata.setReportDate(entity.getReportDate().toDate()); + reportMetadata.setServerVersion(entity.getServerVersion()); + reportMetadata.setProviderId(entity.getProviderId()); + reportMetadata.setLocationId(entity.getLocationId()); + reportMetadata.setDateEdited(entity.getDateEdited().toDate()); + return reportMetadata; } } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ReportTypeHandler.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ReportTypeHandler.java new file mode 100644 index 0000000000..b674912e2f --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ReportTypeHandler.java @@ -0,0 +1,73 @@ +package org.opensrp.repository.postgres.handler; + +import java.sql.CallableStatement; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.apache.commons.lang3.StringUtils; +import org.apache.ibatis.type.JdbcType; +import org.apache.ibatis.type.TypeHandler; +import org.opensrp.domain.Report; +import org.postgresql.util.PGobject; + +public class ReportTypeHandler extends BaseTypeHandler implements TypeHandler { + + @Override + public void setParameter(PreparedStatement ps, int i, Report parameter, JdbcType jdbcType) throws SQLException { + try { + if (parameter != null) { + String jsonString = gson.toJson(parameter); + PGobject jsonObject = new PGobject(); + jsonObject.setType("jsonb"); + jsonObject.setValue(jsonString); + ps.setObject(i, jsonObject); + } + } + catch (Exception e) { + throw new SQLException(e); + } + } + + @Override + public Report getResult(ResultSet rs, String columnName) throws SQLException { + try { + String jsonString = rs.getString(columnName); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return gson.fromJson(jsonString, Report.class); + } + catch (Exception e) { + throw new SQLException(e); + } + } + + @Override + public Report getResult(ResultSet rs, int columnIndex) throws SQLException { + try { + String jsonString = rs.getString(columnIndex); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return gson.fromJson(jsonString, Report.class); + } + catch (Exception e) { + throw new SQLException(e); + } + } + + @Override + public Report getResult(CallableStatement cs, int columnIndex) throws SQLException { + try { + String jsonString = cs.getString(columnIndex); + if (StringUtils.isBlank(jsonString)) { + return null; + } + return gson.fromJson(jsonString, Report.class); + } + catch (Exception e) { + throw new SQLException(e); + } + } +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java index 893aa0d523..59718f82b4 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java @@ -10,73 +10,67 @@ public interface ReportMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ long countByExample(ReportExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ int deleteByExample(ReportExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ int insert(Report record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ int insertSelective(Report record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 - */ - List selectByExampleWithRowbounds(ReportExample example, RowBounds rowBounds); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ List selectByExample(ReportExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ Report selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ int updateByExampleSelective(@Param("record") Report record, @Param("example") ReportExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ int updateByExample(@Param("record") Report record, @Param("example") ReportExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ int updateByPrimaryKeySelective(Report record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ int updateByPrimaryKey(Report record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java index e9e22d50c2..dc1c407c44 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java @@ -10,73 +10,67 @@ public interface ReportMetadataMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ long countByExample(ReportMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ int deleteByExample(ReportMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ int insert(ReportMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ int insertSelective(ReportMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 - */ - List selectByExampleWithRowbounds(ReportMetadataExample example, RowBounds rowBounds); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ List selectByExample(ReportMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ ReportMetadata selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ int updateByExampleSelective(@Param("record") ReportMetadata record, @Param("example") ReportMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ int updateByExample(@Param("record") ReportMetadata record, @Param("example") ReportMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ int updateByPrimaryKeySelective(ReportMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.report_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Fri Mar 23 14:23:39 EAT 2018 */ int updateByPrimaryKey(ReportMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomReportMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomReportMapper.java new file mode 100644 index 0000000000..0e8e8f1697 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomReportMapper.java @@ -0,0 +1,16 @@ +package org.opensrp.repository.postgres.mapper.custom; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.Report; +import org.opensrp.repository.postgres.mapper.ReportMapper; + +public interface CustomReportMapper extends ReportMapper { + + int insertSelectiveAndSetId(Report report); + + List selectByIdentifier(@Param("identifier") String identifier, @Param("offset") int offset, + @Param("limit") int limit); + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomReportMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomReportMetadataMapper.java new file mode 100644 index 0000000000..9c82819aa7 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomReportMetadataMapper.java @@ -0,0 +1,17 @@ +package org.opensrp.repository.postgres.mapper.custom; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.Report; +import org.opensrp.domain.postgres.ReportMetadataExample; +import org.opensrp.repository.postgres.mapper.ReportMetadataMapper; + +public interface CustomReportMetadataMapper extends ReportMetadataMapper { + + Report selectByDocumentId(String documentId); + + List selectMany(@Param("example") ReportMetadataExample example, @Param("offset") int offset, + @Param("limit") int limit); + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomReportMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomReportMapper.xml new file mode 100644 index 0000000000..d40324007b --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomReportMapper.xml @@ -0,0 +1,39 @@ + + + + + insert into core.report + + + id, + + + json, + + + + + #{id,jdbcType=BIGINT}, + + + #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ReportTypeHandler}, + + + + + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomReportMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomReportMetadataMapper.xml new file mode 100644 index 0000000000..e505f3b63e --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomReportMetadataMapper.xml @@ -0,0 +1,72 @@ + + + + + + a.id, a.json + + + + from core.report_metadata rm + join core.report r on rm.report_id = r.id + + + + + + + + + + + + + + and rm.${criterion.condition} + + + and rm.${criterion.condition} #{criterion.value} + + + and rm.${criterion.condition} #{criterion.value} and rm.#{criterion.secondValue} + + + and rm.${criterion.condition} + + #{listItem} + + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml index 2fb8610fde..8c12a3f938 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMapper.xml @@ -5,16 +5,16 @@ - + @@ -39,6 +39,25 @@ + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.ReportTypeHandler} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.ReportTypeHandler} and #{criterion.secondValue,typeHandler=org.opensrp.repository.postgres.handler.ReportTypeHandler} + + + and ${criterion.condition} + + #{listItem,typeHandler=org.opensrp.repository.postgres.handler.ReportTypeHandler} + + + + @@ -48,7 +67,7 @@ @@ -73,6 +92,25 @@ + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.ReportTypeHandler} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.ReportTypeHandler} and #{criterion.secondValue,typeHandler=org.opensrp.repository.postgres.handler.ReportTypeHandler} + + + and ${criterion.condition} + + #{listItem,typeHandler=org.opensrp.repository.postgres.handler.ReportTypeHandler} + + + + @@ -82,7 +120,7 @@ id, json @@ -90,7 +128,7 @@ select @@ -109,7 +147,7 @@ select @@ -120,7 +158,7 @@ delete from core.report where id = #{id,jdbcType=BIGINT} @@ -129,7 +167,7 @@ delete from core.report @@ -140,16 +178,18 @@ - insert into core.report (id, json) - values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) + insert into core.report (id, json + ) + values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ReportTypeHandler} + ) insert into core.report @@ -165,7 +205,7 @@ #{id,jdbcType=BIGINT}, - #{json,jdbcType=OTHER}, + #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ReportTypeHandler}, @@ -173,7 +213,7 @@ select count(*) from core.report @@ -184,7 +224,7 @@ update core.report @@ -192,7 +232,7 @@ id = #{record.id,jdbcType=BIGINT}, - json = #{record.json,jdbcType=OTHER}, + json = #{record.json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ReportTypeHandler}, @@ -203,11 +243,11 @@ update core.report set id = #{record.id,jdbcType=BIGINT}, - json = #{record.json,jdbcType=OTHER} + json = #{record.json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ReportTypeHandler} @@ -216,12 +256,12 @@ update core.report - json = #{json,jdbcType=OTHER}, + json = #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ReportTypeHandler}, where id = #{id,jdbcType=BIGINT} @@ -230,29 +270,10 @@ update core.report - set json = #{json,jdbcType=OTHER} + set json = #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ReportTypeHandler} where id = #{id,jdbcType=BIGINT} - \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml index f858c70a2e..d9f03d1188 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ReportMetadataMapper.xml @@ -5,23 +5,27 @@ + + + + @@ -55,7 +59,7 @@ @@ -89,16 +93,16 @@ - id, report_id, base_entity_id, server_version, report_type, provider_id, location_id, - team, team_id + id, report_id, document_id, form_submission_id, base_entity_id, server_version, report_type, + report_date, provider_id, location_id, team, team_id, date_edited select count(*) from core.report_metadata @@ -240,7 +270,7 @@ update core.report_metadata @@ -250,6 +280,12 @@ report_id = #{record.reportId,jdbcType=BIGINT}, + + document_id = #{record.documentId,jdbcType=VARCHAR}, + + + form_submission_id = #{record.formSubmissionId,jdbcType=VARCHAR}, + base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, @@ -259,6 +295,9 @@ report_type = #{record.reportType,jdbcType=VARCHAR}, + + report_date = #{record.reportDate,jdbcType=DATE}, + provider_id = #{record.providerId,jdbcType=VARCHAR}, @@ -271,6 +310,9 @@ team_id = #{record.teamId,jdbcType=VARCHAR}, + + date_edited = #{record.dateEdited,jdbcType=DATE}, + @@ -280,18 +322,22 @@ update core.report_metadata set id = #{record.id,jdbcType=BIGINT}, report_id = #{record.reportId,jdbcType=BIGINT}, + document_id = #{record.documentId,jdbcType=VARCHAR}, + form_submission_id = #{record.formSubmissionId,jdbcType=VARCHAR}, base_entity_id = #{record.baseEntityId,jdbcType=VARCHAR}, server_version = #{record.serverVersion,jdbcType=BIGINT}, report_type = #{record.reportType,jdbcType=VARCHAR}, + report_date = #{record.reportDate,jdbcType=DATE}, provider_id = #{record.providerId,jdbcType=VARCHAR}, location_id = #{record.locationId,jdbcType=VARCHAR}, team = #{record.team,jdbcType=VARCHAR}, - team_id = #{record.teamId,jdbcType=VARCHAR} + team_id = #{record.teamId,jdbcType=VARCHAR}, + date_edited = #{record.dateEdited,jdbcType=DATE} @@ -300,13 +346,19 @@ update core.report_metadata report_id = #{reportId,jdbcType=BIGINT}, + + document_id = #{documentId,jdbcType=VARCHAR}, + + + form_submission_id = #{formSubmissionId,jdbcType=VARCHAR}, + base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, @@ -316,6 +368,9 @@ report_type = #{reportType,jdbcType=VARCHAR}, + + report_date = #{reportDate,jdbcType=DATE}, + provider_id = #{providerId,jdbcType=VARCHAR}, @@ -328,6 +383,9 @@ team_id = #{teamId,jdbcType=VARCHAR}, + + date_edited = #{dateEdited,jdbcType=DATE}, + where id = #{id,jdbcType=BIGINT} @@ -335,36 +393,21 @@ update core.report_metadata set report_id = #{reportId,jdbcType=BIGINT}, + document_id = #{documentId,jdbcType=VARCHAR}, + form_submission_id = #{formSubmissionId,jdbcType=VARCHAR}, base_entity_id = #{baseEntityId,jdbcType=VARCHAR}, server_version = #{serverVersion,jdbcType=BIGINT}, report_type = #{reportType,jdbcType=VARCHAR}, + report_date = #{reportDate,jdbcType=DATE}, provider_id = #{providerId,jdbcType=VARCHAR}, location_id = #{locationId,jdbcType=VARCHAR}, team = #{team,jdbcType=VARCHAR}, - team_id = #{teamId,jdbcType=VARCHAR} + team_id = #{teamId,jdbcType=VARCHAR}, + date_edited = #{dateEdited,jdbcType=DATE} where id = #{id,jdbcType=BIGINT} - \ No newline at end of file From 62caba1480be80a96503b2d35edc7502a5dbc576 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 23 Mar 2018 18:23:16 +0300 Subject: [PATCH 070/133] Implement Stock Repository --- .../migrations/generator/generatorConfig.xml | 13 +- ...0307151623_create_stock_metadata_table.sql | 2 + .../org/opensrp/domain/postgres/Stock.java | 12 +- .../opensrp/domain/postgres/StockExample.java | 90 +++++--- .../domain/postgres/StockMetadata.java | 65 ++++-- .../domain/postgres/StockMetadataExample.java | 102 +++++++-- .../postgres/AlertsRepositoryImpl.java | 3 +- .../postgres/BaseRepositoryImpl.java | 2 + .../postgres/EventsRepositoryImpl.java | 2 - .../postgres/ReportsRepositoryImpl.java | 5 +- .../postgres/StocksRepositoryImpl.java | 197 ++++++++++++++++-- .../postgres/handler/StockTypeHandler.java | 73 +++++++ .../postgres/mapper/StockMapper.java | 28 +-- .../postgres/mapper/StockMetadataMapper.java | 28 +-- .../mapper/custom/CustomStockMapper.java | 11 + .../custom/CustomStockMetadataMapper.java | 25 +++ .../custom/xml/CustomReportMetadataMapper.xml | 4 +- .../mapper/custom/xml/CustomStockMapper.xml | 26 +++ .../custom/xml/CustomStockMetadataMapper.xml | 88 ++++++++ .../postgres/mapper/xml/StockMapper.xml | 105 ++++++---- .../mapper/xml/StockMetadataMapper.xml | 78 ++++--- 21 files changed, 736 insertions(+), 223 deletions(-) create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/StockTypeHandler.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomStockMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomStockMetadataMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMetadataMapper.xml diff --git a/assets/migrations/generator/generatorConfig.xml b/assets/migrations/generator/generatorConfig.xml index 735552be98..d9f23337f9 100644 --- a/assets/migrations/generator/generatorConfig.xml +++ b/assets/migrations/generator/generatorConfig.xml @@ -31,18 +31,21 @@
-
--> + +
--> + +
- -
-
--> + - + @@ -39,6 +39,25 @@ + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.StockTypeHandler} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.StockTypeHandler} and #{criterion.secondValue,typeHandler=org.opensrp.repository.postgres.handler.StockTypeHandler} + + + and ${criterion.condition} + + #{listItem,typeHandler=org.opensrp.repository.postgres.handler.StockTypeHandler} + + + + @@ -48,7 +67,7 @@ @@ -73,6 +92,25 @@ + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.StockTypeHandler} + + + and ${criterion.condition} #{criterion.value,typeHandler=org.opensrp.repository.postgres.handler.StockTypeHandler} and #{criterion.secondValue,typeHandler=org.opensrp.repository.postgres.handler.StockTypeHandler} + + + and ${criterion.condition} + + #{listItem,typeHandler=org.opensrp.repository.postgres.handler.StockTypeHandler} + + + + @@ -82,7 +120,7 @@ id, json @@ -90,7 +128,7 @@ select @@ -109,7 +147,7 @@ select @@ -120,7 +158,7 @@ delete from core.stock where id = #{id,jdbcType=BIGINT} @@ -129,7 +167,7 @@ delete from core.stock @@ -140,16 +178,18 @@ - insert into core.stock (id, json) - values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER}) + insert into core.stock (id, json + ) + values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.StockTypeHandler} + ) insert into core.stock @@ -165,7 +205,7 @@ #{id,jdbcType=BIGINT}, - #{json,jdbcType=OTHER}, + #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.StockTypeHandler}, @@ -173,7 +213,7 @@ select count(*) from core.stock @@ -184,7 +224,7 @@ update core.stock @@ -192,7 +232,7 @@ id = #{record.id,jdbcType=BIGINT}, - json = #{record.json,jdbcType=OTHER}, + json = #{record.json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.StockTypeHandler}, @@ -203,11 +243,11 @@ update core.stock set id = #{record.id,jdbcType=BIGINT}, - json = #{record.json,jdbcType=OTHER} + json = #{record.json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.StockTypeHandler} @@ -216,12 +256,12 @@ update core.stock - json = #{json,jdbcType=OTHER}, + json = #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.StockTypeHandler}, where id = #{id,jdbcType=BIGINT} @@ -230,29 +270,10 @@ update core.stock - set json = #{json,jdbcType=OTHER} + set json = #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.StockTypeHandler} where id = #{id,jdbcType=BIGINT} - \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml index a1ef77d30a..9ad83783eb 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/StockMetadataMapper.xml @@ -5,10 +5,11 @@ + @@ -19,7 +20,7 @@ @@ -53,7 +54,7 @@ @@ -87,15 +88,15 @@ - id, stock_id, server_version, provider_id, location_id, team, team_id + id, stock_id, document_id, server_version, provider_id, location_id, team, team_id - - select - - distinct - - - from core.stock_metadata - - - - - order by ${orderByClause} - - \ No newline at end of file From 379ee8b7bce2fd816cfcf2b98604aed6af29d9a9 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 26 Mar 2018 11:09:49 +0300 Subject: [PATCH 071/133] Clients Repository code cleaup --- .../migrations/generator/generatorConfig.xml | 19 +-- ...307115355_create_client_metadata_table.sql | 7 +- .../org/opensrp/domain/postgres/Client.java | 12 +- .../domain/postgres/ClientExample.java | 32 ++--- .../domain/postgres/ClientMetadata.java | 83 +++++++---- .../postgres/ClientMetadataExample.java | 102 +++++++++++--- .../postgres/ClientsRepositoryImpl.java | 63 ++++----- .../postgres/SearchRepositoryImpl.java | 1 + .../postgres/mapper/ClientMapper.java | 28 ++-- .../postgres/mapper/ClientMetadataMapper.java | 28 ++-- ...entMapper.java => CustomClientMapper.java} | 3 +- .../custom/CustomClientMetadataMapper.java | 18 +++ .../mapper/custom/MyClientMetadataMapper.java | 16 --- .../mapper/custom/xml/CustomClientMapper.xml | 103 ++++++++++++++ .../custom/xml/CustomClientMetadataMapper.xml | 83 +++++++++++ .../custom/xml/CustomStockMetadataMapper.xml | 12 +- .../mapper/custom/xml/MyClientMapper.xml | 131 ------------------ .../custom/xml/MyClientMetadataMapper.xml | 113 --------------- .../postgres/mapper/xml/ClientMapper.xml | 49 ++----- .../mapper/xml/ClientMetadataMapper.xml | 84 ++++++----- 20 files changed, 495 insertions(+), 492 deletions(-) rename opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/{MyClientMapper.java => CustomClientMapper.java} (90%) create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMetadataMapper.java delete mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMetadataMapper.java create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMapper.xml create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml delete mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMapper.xml delete mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMetadataMapper.xml diff --git a/assets/migrations/generator/generatorConfig.xml b/assets/migrations/generator/generatorConfig.xml index d9f23337f9..0bba263119 100644 --- a/assets/migrations/generator/generatorConfig.xml +++ b/assets/migrations/generator/generatorConfig.xml @@ -14,11 +14,11 @@ - +
- + + +
- - diff --git a/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql b/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql index 965af9c411..5de6db636f 100644 --- a/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql +++ b/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql @@ -21,7 +21,8 @@ CREATE TABLE core.client_metadata ( id bigserial NOT NULL, client_id bigint REFERENCES core.client (id), - base_entity_id character varying NOT NULL, + document_id character varying UNIQUE NOT NULL, + base_entity_id character varying UNIQUE NOT NULL, relational_id character varying, server_version bigint, openmrs_uuid character varying, @@ -35,8 +36,8 @@ WITH ( OIDS = FALSE ) TABLESPACE core_space; -CREATE UNIQUE INDEX client_metadata_base_entity_id_unique_index ON core.client_metadata (base_entity_id); - +CREATE INDEX client_metadata_document_id_index ON core.client_metadata (document_id); +CREATE INDEX client_metadata_base_entity_id_index ON core.client_metadata (base_entity_id); CREATE INDEX client_metadata_relational_id_index ON core.client_metadata (relational_id); CREATE INDEX client_metadata_server_version_index ON core.client_metadata (server_version); CREATE INDEX client_metadata_openmrs_uuid_index ON core.client_metadata (openmrs_uuid); diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java index 1a6142085d..2ac55446bd 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java @@ -4,19 +4,19 @@ public class Client { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client.json - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client.id * @return the value of core.client.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client.id * @param id the value for core.client.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client.json * @return the value of core.client.json - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client.json * @param json the value for core.client.json - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java index bf4deef0a5..e40db4f788 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java @@ -6,23 +6,23 @@ public class ClientExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public ClientExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public ClientExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ protected abstract static class GeneratedCriteria { @@ -320,7 +320,7 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public static class Criterion { diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java index 8592897d35..0feb087b25 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java @@ -6,59 +6,64 @@ public class ClientMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.client_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ private Long clientId; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.document_id + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + */ + private String documentId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.base_entity_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.relational_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ private String relationalId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.server_version - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.openmrs_uuid - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ private String openmrsUuid; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.unique_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ private String uniqueId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.first_name - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ private String firstName; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.last_name - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ private String lastName; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.birth_date - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ private Date birthDate; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.id * @return the value of core.client_metadata.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public Long getId() { return id; @@ -67,7 +72,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.id * @param id the value for core.client_metadata.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -76,7 +81,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.client_id * @return the value of core.client_metadata.client_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public Long getClientId() { return clientId; @@ -85,16 +90,34 @@ public Long getClientId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.client_id * @param clientId the value for core.client_metadata.client_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void setClientId(Long clientId) { this.clientId = clientId; } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.document_id + * @return the value of core.client_metadata.document_id + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + */ + public String getDocumentId() { + return documentId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.document_id + * @param documentId the value for core.client_metadata.document_id + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + */ + public void setDocumentId(String documentId) { + this.documentId = documentId; + } + /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.base_entity_id * @return the value of core.client_metadata.base_entity_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -103,7 +126,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.base_entity_id * @param baseEntityId the value for core.client_metadata.base_entity_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -112,7 +135,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.relational_id * @return the value of core.client_metadata.relational_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public String getRelationalId() { return relationalId; @@ -121,7 +144,7 @@ public String getRelationalId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.relational_id * @param relationalId the value for core.client_metadata.relational_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void setRelationalId(String relationalId) { this.relationalId = relationalId; @@ -130,7 +153,7 @@ public void setRelationalId(String relationalId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.server_version * @return the value of core.client_metadata.server_version - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -139,7 +162,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.server_version * @param serverVersion the value for core.client_metadata.server_version - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -148,7 +171,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.openmrs_uuid * @return the value of core.client_metadata.openmrs_uuid - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public String getOpenmrsUuid() { return openmrsUuid; @@ -157,7 +180,7 @@ public String getOpenmrsUuid() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.openmrs_uuid * @param openmrsUuid the value for core.client_metadata.openmrs_uuid - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void setOpenmrsUuid(String openmrsUuid) { this.openmrsUuid = openmrsUuid; @@ -166,7 +189,7 @@ public void setOpenmrsUuid(String openmrsUuid) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.unique_id * @return the value of core.client_metadata.unique_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public String getUniqueId() { return uniqueId; @@ -175,7 +198,7 @@ public String getUniqueId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.unique_id * @param uniqueId the value for core.client_metadata.unique_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; @@ -184,7 +207,7 @@ public void setUniqueId(String uniqueId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.first_name * @return the value of core.client_metadata.first_name - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public String getFirstName() { return firstName; @@ -193,7 +216,7 @@ public String getFirstName() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.first_name * @param firstName the value for core.client_metadata.first_name - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void setFirstName(String firstName) { this.firstName = firstName; @@ -202,7 +225,7 @@ public void setFirstName(String firstName) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.last_name * @return the value of core.client_metadata.last_name - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public String getLastName() { return lastName; @@ -211,7 +234,7 @@ public String getLastName() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.last_name * @param lastName the value for core.client_metadata.last_name - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void setLastName(String lastName) { this.lastName = lastName; @@ -220,7 +243,7 @@ public void setLastName(String lastName) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.birth_date * @return the value of core.client_metadata.birth_date - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public Date getBirthDate() { return birthDate; @@ -229,7 +252,7 @@ public Date getBirthDate() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.birth_date * @param birthDate the value for core.client_metadata.birth_date - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void setBirthDate(Date birthDate) { this.birthDate = birthDate; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java index a187c3598a..35a2b8a0c5 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java @@ -8,23 +8,23 @@ public class ClientMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public ClientMetadataExample() { oredCriteria = new ArrayList(); @@ -32,7 +32,7 @@ public ClientMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -40,7 +40,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -48,7 +48,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -56,7 +56,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -64,7 +64,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -72,7 +72,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -80,7 +80,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -90,7 +90,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -102,7 +102,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -111,7 +111,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -121,7 +121,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ protected abstract static class GeneratedCriteria { @@ -311,6 +311,76 @@ public Criteria andClientIdNotBetween(Long value1, Long value2) { return (Criteria) this; } + public Criteria andDocumentIdIsNull() { + addCriterion("document_id is null"); + return (Criteria) this; + } + + public Criteria andDocumentIdIsNotNull() { + addCriterion("document_id is not null"); + return (Criteria) this; + } + + public Criteria andDocumentIdEqualTo(String value) { + addCriterion("document_id =", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotEqualTo(String value) { + addCriterion("document_id <>", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdGreaterThan(String value) { + addCriterion("document_id >", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdGreaterThanOrEqualTo(String value) { + addCriterion("document_id >=", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLessThan(String value) { + addCriterion("document_id <", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLessThanOrEqualTo(String value) { + addCriterion("document_id <=", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLike(String value) { + addCriterion("document_id like", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotLike(String value) { + addCriterion("document_id not like", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdIn(List values) { + addCriterion("document_id in", values, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotIn(List values) { + addCriterion("document_id not in", values, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdBetween(String value1, String value2) { + addCriterion("document_id between", value1, value2, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotBetween(String value1, String value2) { + addCriterion("document_id not between", value1, value2, "documentId"); + return (Criteria) this; + } + public Criteria andBaseEntityIdIsNull() { addCriterion("base_entity_id is null"); return (Criteria) this; @@ -854,7 +924,7 @@ public Criteria andBirthDateNotBetween(Date value1, Date value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ public static class Criterion { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java index 08dbac5d18..74eae0abc5 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java @@ -8,17 +8,14 @@ import java.util.Map; import org.apache.commons.lang3.StringUtils; -import org.apache.ibatis.session.RowBounds; import org.joda.time.DateTime; import org.opensrp.common.AllConstants; import org.opensrp.domain.Client; import org.opensrp.domain.postgres.ClientMetadata; import org.opensrp.domain.postgres.ClientMetadataExample; import org.opensrp.repository.ClientsRepository; -import org.opensrp.repository.postgres.mapper.ClientMapper; -import org.opensrp.repository.postgres.mapper.ClientMetadataMapper; -import org.opensrp.repository.postgres.mapper.custom.MyClientMapper; -import org.opensrp.repository.postgres.mapper.custom.MyClientMetadataMapper; +import org.opensrp.repository.postgres.mapper.custom.CustomClientMapper; +import org.opensrp.repository.postgres.mapper.custom.CustomClientMetadataMapper; import org.opensrp.search.AddressSearchBean; import org.opensrp.search.ClientSearchBean; import org.slf4j.Logger; @@ -32,16 +29,10 @@ public class ClientsRepositoryImpl extends BaseRepositoryImpl implements private static Logger logger = LoggerFactory.getLogger(ClientsRepository.class.toString()); @Autowired - private MyClientMetadataMapper myClientMetadataMapper; + private CustomClientMetadataMapper clientMetadataMapper; @Autowired - private ClientMetadataMapper clientMetadataMapper; - - @Autowired - private MyClientMapper myClientMapper; - - @Autowired - private ClientMapper clientMapper; + private CustomClientMapper clientMapper; @Override public Client get(String id) { @@ -49,7 +40,7 @@ public Client get(String id) { return null; } - org.opensrp.domain.postgres.Client pgClient = myClientMapper.selectByDocumentId(id); + org.opensrp.domain.postgres.Client pgClient = clientMetadataMapper.selectByDocumentId(id); if (pgClient == null) { return null; } @@ -71,7 +62,7 @@ public void add(Client entity) { return; } - int rowsAffected = myClientMapper.insertSelectiveAndSetId(pgClient); + int rowsAffected = clientMapper.insertSelectiveAndSetId(pgClient); if (rowsAffected < 1 || pgClient.getId() == null) { return; } @@ -115,7 +106,8 @@ public void update(Client entity) { @Override public List getAll() { - List clients = myClientMetadataMapper.selectMany(new ClientMetadataExample()); + List clients = clientMetadataMapper.selectMany(new ClientMetadataExample(), 0, + DEFAULT_FETCH_SIZE); return convert(clients); } @@ -145,7 +137,7 @@ public Client findByBaseEntityId(String baseEntityId) { if (StringUtils.isBlank(baseEntityId)) { return null; } - org.opensrp.domain.postgres.Client pgClient = myClientMetadataMapper.selectOne(baseEntityId); + org.opensrp.domain.postgres.Client pgClient = clientMetadataMapper.selectOne(baseEntityId); return convert(pgClient); } @@ -156,20 +148,20 @@ public List findAllClients() { @Override public List findAllByIdentifier(String identifier) { - List clients = myClientMapper.selectByIdentifier(identifier); + List clients = clientMapper.selectByIdentifier(identifier); return convert(clients); } @Override public List findAllByIdentifier(String identifierType, String identifier) { - List clients = myClientMapper.selectByIdentifierOfType(identifierType, + List clients = clientMapper.selectByIdentifierOfType(identifierType, identifier); return convert(clients); } @Override public List findAllByAttribute(String attributeType, String attribute) { - List clients = myClientMapper.selectByAttributeOfType(attributeType, attribute); + List clients = clientMapper.selectByAttributeOfType(attributeType, attribute); return convert(clients); } @@ -178,19 +170,20 @@ public List findAllByMatchingName(String nameMatches) { ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); clientMetadataExample.createCriteria().andFirstNameLike(nameMatches); clientMetadataExample.or(clientMetadataExample.createCriteria().andLastNameLike(nameMatches)); - List clients = myClientMetadataMapper.selectMany(clientMetadataExample); + List clients = clientMetadataMapper.selectMany(clientMetadataExample, 0, + DEFAULT_FETCH_SIZE); return convert(clients); } @Override public List findByRelationshipIdAndDateCreated(String relationalId, String dateFrom, String dateTo) { - List clients = myClientMapper.selectByRelationshipIdAndDateCreated(relationalId, + List clients = clientMapper.selectByRelationshipIdAndDateCreated(relationalId, dateFrom, dateTo); return convert(clients); } public List findByRelationshipId(String relationshipType, String entityId) { - List clients = myClientMapper.selectByRelationshipIdOfType(relationshipType, + List clients = clientMapper.selectByRelationshipIdOfType(relationshipType, entityId); return convert(clients); } @@ -198,13 +191,15 @@ public List findByRelationshipId(String relationshipType, String entityI @Override public List findByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean, DateTime lastEditFrom, DateTime lastEditTo) { + searchBean.setLastEditFrom(lastEditFrom); + searchBean.setLastEditTo(lastEditTo); // TODO Auto-generated method stub return new ArrayList<>(); } @Override public List findByDynamicQuery(String query) { - List clients = myClientMapper.selectByDynamicQuery(query); + List clients = clientMapper.selectByDynamicQuery(query); return convert(clients); } @@ -222,7 +217,7 @@ public List findByCriteria(AddressSearchBean addressSearchBean, DateTime @Override public List findByRelationShip(String relationIndentier) { - List clients = myClientMapper.selectByRelationShip(relationIndentier); + List clients = clientMapper.selectByRelationShip(relationIndentier); return convert(clients); } @@ -232,8 +227,8 @@ public List findByEmptyServerVersion() { clientMetadataExample.createCriteria().andServerVersionIsNull(); clientMetadataExample.setOrderByClause("client_id ASC"); - List clients = myClientMetadataMapper - .selectManyWithRowBounds(clientMetadataExample, new RowBounds(0, 200)); + List clients = clientMetadataMapper.selectMany(clientMetadataExample, 0, + DEFAULT_FETCH_SIZE); return convert(clients); } @@ -243,8 +238,8 @@ public List findByServerVersion(long serverVersion) { clientMetadataExample.createCriteria().andServerVersionEqualTo(serverVersion); clientMetadataExample.setOrderByClause("server_version ASC"); - List clients = myClientMetadataMapper - .selectManyWithRowBounds(clientMetadataExample, new RowBounds(0, 1000)); + List clients = clientMetadataMapper.selectMany(clientMetadataExample, 0, + DEFAULT_FETCH_SIZE); return convert(clients); } @@ -253,8 +248,8 @@ public List findByFieldValue(String field, List ids) { if (field.equals(BASE_ENTITY_ID) && ids != null && !ids.isEmpty()) { ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); clientMetadataExample.createCriteria().andBaseEntityIdIn(ids); - - List clients = myClientMetadataMapper.selectMany(clientMetadataExample); + List clients = clientMetadataMapper.selectMany(clientMetadataExample, 0, + DEFAULT_FETCH_SIZE); return convert(clients); } return new ArrayList<>(); @@ -269,8 +264,8 @@ public List notInOpenMRSByServerVersion(long serverVersion, Calendar cal clientMetadataExample.createCriteria().andOpenmrsUuidIsNull().andServerVersionBetween(serverStartKey, serverEndKey); - List clients = myClientMetadataMapper - .selectManyWithRowBounds(clientMetadataExample, new RowBounds(0, 1000)); + List clients = clientMetadataMapper.selectMany(clientMetadataExample, 0, + DEFAULT_FETCH_SIZE); return convert(clients); } return new ArrayList<>(); @@ -376,7 +371,7 @@ protected Long retrievePrimaryKey(Client t) { ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); clientMetadataExample.createCriteria().andBaseEntityIdEqualTo(baseEntityId); - org.opensrp.domain.postgres.Client pgClient = myClientMetadataMapper.selectOne(baseEntityId); + org.opensrp.domain.postgres.Client pgClient = clientMetadataMapper.selectOne(baseEntityId); if (pgClient == null) { return null; } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/SearchRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/SearchRepositoryImpl.java index 5266757807..d44d0e45e7 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/SearchRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/SearchRepositoryImpl.java @@ -10,6 +10,7 @@ @Repository public class SearchRepositoryImpl implements SearchRepository { + @Override public List findByCriteria(ClientSearchBean clientSearchBean, String firstName, String middleName, String lastName, Integer limit) { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java index 77a14e625e..408e9c1a9f 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java @@ -10,73 +10,67 @@ public interface ClientMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ long countByExample(ClientExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ int deleteByExample(ClientExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ int insert(Client record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ int insertSelective(Client record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 - */ - List selectByExampleWithRowbounds(ClientExample example, RowBounds rowBounds); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ List selectByExample(ClientExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ Client selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ int updateByExampleSelective(@Param("record") Client record, @Param("example") ClientExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ int updateByExample(@Param("record") Client record, @Param("example") ClientExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ int updateByPrimaryKeySelective(Client record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ int updateByPrimaryKey(Client record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java index a80313d042..bb03f48c80 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java @@ -10,73 +10,67 @@ public interface ClientMetadataMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ long countByExample(ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ int deleteByExample(ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ int insert(ClientMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ int insertSelective(ClientMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 - */ - List selectByExampleWithRowbounds(ClientMetadataExample example, RowBounds rowBounds); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ List selectByExample(ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ ClientMetadata selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ int updateByExampleSelective(@Param("record") ClientMetadata record, @Param("example") ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ int updateByExample(@Param("record") ClientMetadata record, @Param("example") ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ int updateByPrimaryKeySelective(ClientMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 */ int updateByPrimaryKey(ClientMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMapper.java similarity index 90% rename from opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMapper.java rename to opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMapper.java index f7a605d586..6e378c9386 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMapper.java @@ -4,8 +4,9 @@ import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.Client; +import org.opensrp.repository.postgres.mapper.ClientMapper; -public interface MyClientMapper { +public interface CustomClientMapper extends ClientMapper{ int insertSelectiveAndSetId(Client record); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMetadataMapper.java new file mode 100644 index 0000000000..0b9d1ec771 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMetadataMapper.java @@ -0,0 +1,18 @@ +package org.opensrp.repository.postgres.mapper.custom; + +import java.util.List; + +import org.apache.ibatis.annotations.Param; +import org.opensrp.domain.postgres.Client; +import org.opensrp.domain.postgres.ClientMetadataExample; +import org.opensrp.repository.postgres.mapper.ClientMetadataMapper; + +public interface CustomClientMetadataMapper extends ClientMetadataMapper { + + List selectMany(@Param("example") ClientMetadataExample example, @Param("offset") int offset, + @Param("limit") int limit); + + Client selectOne(String baseEntityId); + + Client selectByDocumentId(String documentId); +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMetadataMapper.java deleted file mode 100644 index f4b43e2b96..0000000000 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/MyClientMetadataMapper.java +++ /dev/null @@ -1,16 +0,0 @@ -package org.opensrp.repository.postgres.mapper.custom; - -import java.util.List; - -import org.apache.ibatis.session.RowBounds; -import org.opensrp.domain.postgres.Client; -import org.opensrp.domain.postgres.ClientMetadataExample; - -public interface MyClientMetadataMapper { - - List selectMany(ClientMetadataExample example); - - List selectManyWithRowBounds(ClientMetadataExample example, RowBounds rowBounds); - - Client selectOne(String baseEntityId); -} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMapper.xml new file mode 100644 index 0000000000..086e593d20 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMapper.xml @@ -0,0 +1,103 @@ + + + + + + insert into core.client + + + id, + + + json, + + + + + #{id,jdbcType=BIGINT}, + + + #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler}, + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml new file mode 100644 index 0000000000..90133e1969 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml @@ -0,0 +1,83 @@ + + + + + + c.id, c.json + + + + from core.client_metadata cm + join core.client c on cm.client_id = c.id + + + + + + + + + + + and cm.${criterion.condition} + + + and cm.${criterion.condition} #{criterion.value} + + + and cm.${criterion.condition} #{criterion.value} + and + #{criterion.secondValue} + + + and cm.${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMetadataMapper.xml index 4c089f86cf..d2e8327ca1 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMetadataMapper.xml @@ -52,6 +52,12 @@ Where 1=1 + + and sm.provider_id = #{searchBean.providerId,jdbcType=VARCHAR} + + + and sm.server_version >= #{searchBean.serverVersion,jdbcType=BIGINT} + and json->>'identifier' = #{searchBean.identifier,jdbcType=VARCHAR} @@ -61,9 +67,6 @@ and json->>'transaction_type' = #{searchBean.transactionType,jdbcType=VARCHAR} - - and sm.provider_id = #{searchBean.providerId,jdbcType=VARCHAR} - and json->>'value' = #{searchBean.value,jdbcType=VARCHAR} @@ -76,9 +79,6 @@ and json->>'date_updated' = #{searchBean.dateUpdated,jdbcType=VARCHAR} - - and sm.server_version >= #{searchBean.serverVersion,jdbcType=BIGINT} - order by sm.${orderByClause} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMapper.xml deleted file mode 100644 index f50ebba727..0000000000 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMapper.xml +++ /dev/null @@ -1,131 +0,0 @@ - - - - - - - - - - - - - id, json - - - - - insert into core.client - - - id, - - - json, - - - - - #{id,jdbcType=BIGINT}, - - - #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler}, - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMetadataMapper.xml deleted file mode 100644 index 62968bded6..0000000000 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/MyClientMetadataMapper.xml +++ /dev/null @@ -1,113 +0,0 @@ - - - - - - - - - - - - - c.id, c.json - - - - - - - - - - - - - and cm.${criterion.condition} - - - and cm.${criterion.condition} #{criterion.value} - - - and cm.${criterion.condition} #{criterion.value} - and - #{criterion.secondValue} - - - and cm.${criterion.condition} - - #{listItem} - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml index bb06ea494d..069937487f 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -67,7 +67,7 @@ @@ -120,7 +120,7 @@ id, json @@ -128,7 +128,7 @@ select @@ -147,7 +147,7 @@ select @@ -158,7 +158,7 @@ delete from core.client where id = #{id,jdbcType=BIGINT} @@ -167,7 +167,7 @@ delete from core.client @@ -178,7 +178,7 @@ insert into core.client (id, json ) @@ -189,7 +189,7 @@ insert into core.client @@ -213,7 +213,7 @@ select count(*) from core.client @@ -224,7 +224,7 @@ update core.client @@ -243,7 +243,7 @@ update core.client set id = #{record.id,jdbcType=BIGINT}, @@ -256,7 +256,7 @@ update core.client @@ -270,29 +270,10 @@ update core.client set json = #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler} where id = #{id,jdbcType=BIGINT} - \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml index 4689a03313..0aa9ad4e17 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml @@ -5,10 +5,11 @@ + @@ -22,7 +23,7 @@ @@ -56,7 +57,7 @@ @@ -90,16 +91,16 @@ - id, client_id, base_entity_id, relational_id, server_version, openmrs_uuid, unique_id, - first_name, last_name, birth_date + id, client_id, document_id, base_entity_id, relational_id, server_version, openmrs_uuid, + unique_id, first_name, last_name, birth_date - - select - - distinct - - - from core.client_metadata - - - - - order by ${orderByClause} - - \ No newline at end of file From aa3e5ac3a93da08ed9d10ea5eff9577dd47e1f10 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 26 Mar 2018 11:36:28 +0300 Subject: [PATCH 072/133] Refactor Client Service, repository --- .../opensrp/repository/ClientsRepository.java | 3 +-- .../opensrp/repository/couch/AllClients.java | 14 +++++------ .../lucene/LuceneClientRepository.java | 24 ++++++++++--------- .../postgres/ClientsRepositoryImpl.java | 5 +--- .../mapper/custom/xml/CustomClientMapper.xml | 16 ++++++------- .../org/opensrp/service/ClientService.java | 7 +++--- 6 files changed, 34 insertions(+), 35 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/ClientsRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/ClientsRepository.java index 2bc3b4dfb9..337a5632e4 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/ClientsRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/ClientsRepository.java @@ -35,8 +35,7 @@ public interface ClientsRepository extends BaseRepository { List findByRelationshipId(String relationshipType, String entityId); - List findByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean, DateTime lastEditFrom, - DateTime lastEditTo); + List findByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean); List findByDynamicQuery(String query); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java index 8098692c80..0dad501d64 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllClients.java @@ -126,10 +126,9 @@ public List findByRelationshipId(String relationshipType, String entityI // public List findByRelationshipId(String identifier) { // return db.queryView(createQuery("clients_by_relationship").key(identifier).includeDocs(true), Client.class); // } - - public List findByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean, - DateTime lastEditFrom, DateTime lastEditTo) { - return lcr.getByCriteria(searchBean, addressSearchBean, lastEditFrom, lastEditTo, null);//db.queryView(q.includeDocs(true), Client.class); + + public List findByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean) { + return lcr.getByCriteria(searchBean, addressSearchBean, null);//db.queryView(q.includeDocs(true), Client.class); } public List findByDynamicQuery(String query) { @@ -137,12 +136,13 @@ public List findByDynamicQuery(String query) { } public List findByCriteria(ClientSearchBean searchBean) { - return lcr.getByCriteria(searchBean, new AddressSearchBean(), searchBean.getLastEditFrom(), - searchBean.getLastEditTo(), null); + return lcr.getByCriteria(searchBean, new AddressSearchBean(), null); } public List findByCriteria(AddressSearchBean addressSearchBean, DateTime lastEditFrom, DateTime lastEditTo) { - return lcr.getByCriteria(new ClientSearchBean(), addressSearchBean, lastEditFrom, lastEditTo, null); + ClientSearchBean clientSearchBean=new ClientSearchBean(); + clientSearchBean.setLastEditFrom(lastEditFrom); + return lcr.getByCriteria(clientSearchBean, addressSearchBean, null); } public List findByRelationShip(String motherIndentier) { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java index 692dd08ff6..491b12a3c3 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java @@ -51,18 +51,20 @@ protected LuceneClientRepository(LuceneDbConnector db) { initStandardDesignDocument(); } - public List getByCriteria(ClientSearchBean searchBean, - String motherIdentifier) { - return getByCriteria(searchBean, new AddressSearchBean(), searchBean.getLastEditFrom(), searchBean.getLastEditTo(), motherIdentifier); + public List getByCriteria(ClientSearchBean searchBean, String motherIdentifier) { + return getByCriteria(searchBean, new AddressSearchBean(), motherIdentifier); } - public List getByCriteria(AddressSearchBean addressSearchBean, - DateTime lastEditFrom, DateTime lastEditTo, String motherIdentifier) { - return getByCriteria(null, addressSearchBean, lastEditFrom, lastEditTo, motherIdentifier); + public List getByCriteria(AddressSearchBean addressSearchBean, DateTime lastEditFrom, DateTime lastEditTo, + String motherIdentifier) { + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setLastEditFrom(lastEditFrom); + clientSearchBean.setLastEditTo(lastEditTo); + return getByCriteria(clientSearchBean, addressSearchBean, motherIdentifier); } - - public List getByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean, - DateTime lastEditFrom, DateTime lastEditTo, String motherIdentifier) { + + public List getByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean, + String motherIdentifier) { // create a simple query against the view/search function that we've created LuceneQuery query = new LuceneQuery("Client", "by_all_criteria"); @@ -82,8 +84,8 @@ public List getByCriteria(ClientSearchBean searchBean, AddressSearchBean if (searchBean.getDeathdateFrom() != null && searchBean.getDeathdateTo() != null) { qf.between(DEATH_DATE, searchBean.getDeathdateFrom(), searchBean.getDeathdateTo()); } - if (lastEditFrom != null & lastEditTo != null) { - qf.between(LAST_UPDATE, lastEditFrom, lastEditTo); + if (searchBean.getLastEditFrom() != null & searchBean.getLastEditTo() != null) { + qf.between(LAST_UPDATE, searchBean.getLastEditFrom(), searchBean.getLastEditTo()); } if (!StringUtils.isEmptyOrWhitespaceOnly(searchBean.getAttributeValue())) { qf.eq(searchBean.getAttributeType(), searchBean.getAttributeValue()); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java index 74eae0abc5..a06f217d59 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java @@ -189,10 +189,7 @@ public List findByRelationshipId(String relationshipType, String entityI } @Override - public List findByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean, - DateTime lastEditFrom, DateTime lastEditTo) { - searchBean.setLastEditFrom(lastEditFrom); - searchBean.setLastEditTo(lastEditTo); + public List findByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean) { // TODO Auto-generated method stub return new ArrayList<>(); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMapper.xml index 086e593d20..f257a9ce5b 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMapper.xml @@ -27,7 +27,7 @@ @@ -36,7 +36,7 @@ select - + from core.client where json -> 'identifiers' ->> #{identifierType,jdbcType=VARCHAR} = #{identifier,jdbcType=VARCHAR} @@ -55,7 +55,7 @@ @@ -64,7 +64,7 @@ select - + from core.client where json -> 'relationships'->#{relationshipType,jdbcType=VARCHAR}->> 0 = #{relationshipId,jdbcType=VARCHAR} @@ -84,7 +84,7 @@ select - + from core.client where json @> #{query,jdbcType=VARCHAR} diff --git a/opensrp-core/src/main/java/org/opensrp/service/ClientService.java b/opensrp-core/src/main/java/org/opensrp/service/ClientService.java index 867f8d5ff4..dbcd1bcfce 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/ClientService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/ClientService.java @@ -59,12 +59,13 @@ public List findAllByMatchingName(String nameMatches) { public List findByCriteria(ClientSearchBean clientSearchBean, AddressSearchBean addressSearchBean, DateTime lastEditFrom, DateTime lastEditTo) { - return allClients.findByCriteria(clientSearchBean, addressSearchBean, lastEditFrom, lastEditTo);//db.queryView(q.includeDocs(true), Client.class); + clientSearchBean.setLastEditFrom(lastEditFrom); + clientSearchBean.setLastEditTo(lastEditTo); + return allClients.findByCriteria(clientSearchBean, addressSearchBean);//db.queryView(q.includeDocs(true), Client.class); } public List findByCriteria(ClientSearchBean clientSearchBean, Long serverVersion) { - return allClients.findByCriteria(clientSearchBean, new AddressSearchBean(), clientSearchBean.getLastEditFrom(), - clientSearchBean.getLastEditTo()); + return allClients.findByCriteria(clientSearchBean, new AddressSearchBean()); } /* public List findByCriteria(String addressType, String country, String stateProvince, String cityVillage, String countyDistrict, From d420c8b92772d3c4e7c534b8571aee323b9fc9d2 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 26 Mar 2018 17:22:04 +0300 Subject: [PATCH 073/133] Implement client search on ClientRepository --- ...307115355_create_client_metadata_table.sql | 2 + .../org/opensrp/domain/postgres/Client.java | 12 +-- .../domain/postgres/ClientExample.java | 32 +++--- .../domain/postgres/ClientMetadata.java | 89 +++++++++------ .../postgres/ClientMetadataExample.java | 102 +++++++++++++++--- .../postgres/ClientsRepositoryImpl.java | 21 ++-- .../postgres/handler/DateTimeTypeHandler.java | 54 ++++++++++ .../postgres/mapper/ClientMapper.java | 22 ++-- .../postgres/mapper/ClientMetadataMapper.java | 22 ++-- .../custom/CustomClientMetadataMapper.java | 8 +- .../mapper/custom/xml/CustomClientMapper.xml | 8 +- .../custom/xml/CustomClientMetadataMapper.xml | 68 +++++++++++- .../postgres/mapper/xml/ClientMapper.xml | 30 +++--- .../mapper/xml/ClientMetadataMapper.xml | 53 +++++---- .../org/opensrp/search/AddressSearchBean.java | 7 ++ .../org/opensrp/web/rest/ClientResource.java | 3 +- 16 files changed, 390 insertions(+), 143 deletions(-) create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/DateTimeTypeHandler.java diff --git a/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql b/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql index 5de6db636f..1708c026cb 100644 --- a/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql +++ b/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql @@ -28,6 +28,7 @@ CREATE TABLE core.client_metadata openmrs_uuid character varying, unique_id character varying, first_name character varying, + middle_name character varying, last_name character varying, birth_date date, PRIMARY KEY (id) @@ -43,6 +44,7 @@ CREATE INDEX client_metadata_server_version_index ON core.client_metadata (serve CREATE INDEX client_metadata_openmrs_uuid_index ON core.client_metadata (openmrs_uuid); CREATE INDEX client_metadata_unique_id_index ON core.client_metadata (unique_id); CREATE INDEX client_metadata_first_name_index ON core.client_metadata (first_name NULLS LAST); +CREATE INDEX client_metadata_middle_name_index ON core.client_metadata (middle_name NULLS LAST); CREATE INDEX client_metadata_last_name_index ON core.client_metadata (last_name NULLS LAST); CREATE INDEX client_metadata_birth_date_index ON core.client_metadata (birth_date); diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java index 2ac55446bd..8b87f2df87 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/Client.java @@ -4,19 +4,19 @@ public class Client { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client.id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client.json - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ private Object json; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client.id * @return the value of core.client.id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public Long getId() { return id; @@ -25,7 +25,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client.id * @param id the value for core.client.id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -34,7 +34,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client.json * @return the value of core.client.json - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public Object getJson() { return json; @@ -43,7 +43,7 @@ public Object getJson() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client.json * @param json the value for core.client.json - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void setJson(Object json) { this.json = json; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java index e40db4f788..995a0ee5a1 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientExample.java @@ -6,23 +6,23 @@ public class ClientExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public ClientExample() { oredCriteria = new ArrayList(); @@ -30,7 +30,7 @@ public ClientExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -38,7 +38,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -46,7 +46,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -54,7 +54,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -62,7 +62,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -70,7 +70,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -78,7 +78,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -88,7 +88,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -100,7 +100,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -109,7 +109,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -119,7 +119,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ protected abstract static class GeneratedCriteria { @@ -320,7 +320,7 @@ public Criteria andJsonNotBetween(Object value1, Object value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public static class Criterion { diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java index 0feb087b25..620d6cf7ce 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadata.java @@ -6,64 +6,69 @@ public class ClientMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.client_id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ private Long clientId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.document_id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ private String documentId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.base_entity_id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.relational_id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ private String relationalId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.server_version - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.openmrs_uuid - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ private String openmrsUuid; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.unique_id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ private String uniqueId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.first_name - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ private String firstName; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.middle_name + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 + */ + private String middleName; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.last_name - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ private String lastName; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.client_metadata.birth_date - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ private Date birthDate; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.id * @return the value of core.client_metadata.id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public Long getId() { return id; @@ -72,7 +77,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.id * @param id the value for core.client_metadata.id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -81,7 +86,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.client_id * @return the value of core.client_metadata.client_id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public Long getClientId() { return clientId; @@ -90,7 +95,7 @@ public Long getClientId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.client_id * @param clientId the value for core.client_metadata.client_id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void setClientId(Long clientId) { this.clientId = clientId; @@ -99,7 +104,7 @@ public void setClientId(Long clientId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.document_id * @return the value of core.client_metadata.document_id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public String getDocumentId() { return documentId; @@ -108,7 +113,7 @@ public String getDocumentId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.document_id * @param documentId the value for core.client_metadata.document_id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void setDocumentId(String documentId) { this.documentId = documentId; @@ -117,7 +122,7 @@ public void setDocumentId(String documentId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.base_entity_id * @return the value of core.client_metadata.base_entity_id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -126,7 +131,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.base_entity_id * @param baseEntityId the value for core.client_metadata.base_entity_id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -135,7 +140,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.relational_id * @return the value of core.client_metadata.relational_id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public String getRelationalId() { return relationalId; @@ -144,7 +149,7 @@ public String getRelationalId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.relational_id * @param relationalId the value for core.client_metadata.relational_id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void setRelationalId(String relationalId) { this.relationalId = relationalId; @@ -153,7 +158,7 @@ public void setRelationalId(String relationalId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.server_version * @return the value of core.client_metadata.server_version - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -162,7 +167,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.server_version * @param serverVersion the value for core.client_metadata.server_version - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -171,7 +176,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.openmrs_uuid * @return the value of core.client_metadata.openmrs_uuid - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public String getOpenmrsUuid() { return openmrsUuid; @@ -180,7 +185,7 @@ public String getOpenmrsUuid() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.openmrs_uuid * @param openmrsUuid the value for core.client_metadata.openmrs_uuid - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void setOpenmrsUuid(String openmrsUuid) { this.openmrsUuid = openmrsUuid; @@ -189,7 +194,7 @@ public void setOpenmrsUuid(String openmrsUuid) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.unique_id * @return the value of core.client_metadata.unique_id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public String getUniqueId() { return uniqueId; @@ -198,7 +203,7 @@ public String getUniqueId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.unique_id * @param uniqueId the value for core.client_metadata.unique_id - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void setUniqueId(String uniqueId) { this.uniqueId = uniqueId; @@ -207,7 +212,7 @@ public void setUniqueId(String uniqueId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.first_name * @return the value of core.client_metadata.first_name - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public String getFirstName() { return firstName; @@ -216,16 +221,34 @@ public String getFirstName() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.first_name * @param firstName the value for core.client_metadata.first_name - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void setFirstName(String firstName) { this.firstName = firstName; } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.middle_name + * @return the value of core.client_metadata.middle_name + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 + */ + public String getMiddleName() { + return middleName; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.middle_name + * @param middleName the value for core.client_metadata.middle_name + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 + */ + public void setMiddleName(String middleName) { + this.middleName = middleName; + } + /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.last_name * @return the value of core.client_metadata.last_name - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public String getLastName() { return lastName; @@ -234,7 +257,7 @@ public String getLastName() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.last_name * @param lastName the value for core.client_metadata.last_name - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void setLastName(String lastName) { this.lastName = lastName; @@ -243,7 +266,7 @@ public void setLastName(String lastName) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.client_metadata.birth_date * @return the value of core.client_metadata.birth_date - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public Date getBirthDate() { return birthDate; @@ -252,7 +275,7 @@ public Date getBirthDate() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.client_metadata.birth_date * @param birthDate the value for core.client_metadata.birth_date - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void setBirthDate(Date birthDate) { this.birthDate = birthDate; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java index 35a2b8a0c5..f5ea6574f5 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ClientMetadataExample.java @@ -8,23 +8,23 @@ public class ClientMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public ClientMetadataExample() { oredCriteria = new ArrayList(); @@ -32,7 +32,7 @@ public ClientMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -40,7 +40,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -48,7 +48,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -56,7 +56,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -64,7 +64,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -72,7 +72,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -80,7 +80,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -90,7 +90,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -102,7 +102,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -111,7 +111,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -121,7 +121,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ protected abstract static class GeneratedCriteria { @@ -791,6 +791,76 @@ public Criteria andFirstNameNotBetween(String value1, String value2) { return (Criteria) this; } + public Criteria andMiddleNameIsNull() { + addCriterion("middle_name is null"); + return (Criteria) this; + } + + public Criteria andMiddleNameIsNotNull() { + addCriterion("middle_name is not null"); + return (Criteria) this; + } + + public Criteria andMiddleNameEqualTo(String value) { + addCriterion("middle_name =", value, "middleName"); + return (Criteria) this; + } + + public Criteria andMiddleNameNotEqualTo(String value) { + addCriterion("middle_name <>", value, "middleName"); + return (Criteria) this; + } + + public Criteria andMiddleNameGreaterThan(String value) { + addCriterion("middle_name >", value, "middleName"); + return (Criteria) this; + } + + public Criteria andMiddleNameGreaterThanOrEqualTo(String value) { + addCriterion("middle_name >=", value, "middleName"); + return (Criteria) this; + } + + public Criteria andMiddleNameLessThan(String value) { + addCriterion("middle_name <", value, "middleName"); + return (Criteria) this; + } + + public Criteria andMiddleNameLessThanOrEqualTo(String value) { + addCriterion("middle_name <=", value, "middleName"); + return (Criteria) this; + } + + public Criteria andMiddleNameLike(String value) { + addCriterion("middle_name like", value, "middleName"); + return (Criteria) this; + } + + public Criteria andMiddleNameNotLike(String value) { + addCriterion("middle_name not like", value, "middleName"); + return (Criteria) this; + } + + public Criteria andMiddleNameIn(List values) { + addCriterion("middle_name in", values, "middleName"); + return (Criteria) this; + } + + public Criteria andMiddleNameNotIn(List values) { + addCriterion("middle_name not in", values, "middleName"); + return (Criteria) this; + } + + public Criteria andMiddleNameBetween(String value1, String value2) { + addCriterion("middle_name between", value1, value2, "middleName"); + return (Criteria) this; + } + + public Criteria andMiddleNameNotBetween(String value1, String value2) { + addCriterion("middle_name not between", value1, value2, "middleName"); + return (Criteria) this; + } + public Criteria andLastNameIsNull() { addCriterion("last_name is null"); return (Criteria) this; @@ -924,7 +994,7 @@ public Criteria andBirthDateNotBetween(Date value1, Date value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ public static class Criterion { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java index a06f217d59..635971b20c 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java @@ -6,6 +6,7 @@ import java.util.Calendar; import java.util.List; import java.util.Map; +import java.util.UUID; import org.apache.commons.lang3.StringUtils; import org.joda.time.DateTime; @@ -57,6 +58,9 @@ public void add(Client entity) { return; } + if (entity.getId() == null) + entity.setId(UUID.randomUUID().toString()); + org.opensrp.domain.postgres.Client pgClient = convert(entity, null); if (pgClient == null) { return; @@ -154,8 +158,7 @@ public List findAllByIdentifier(String identifier) { @Override public List findAllByIdentifier(String identifierType, String identifier) { - List clients = clientMapper.selectByIdentifierOfType(identifierType, - identifier); + List clients = clientMapper.selectByIdentifierOfType(identifierType, identifier); return convert(clients); } @@ -190,8 +193,7 @@ public List findByRelationshipId(String relationshipType, String entityI @Override public List findByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean) { - // TODO Auto-generated method stub - return new ArrayList<>(); + return convert(clientMetadataMapper.selectBySearchBean(searchBean,addressSearchBean,0,DEFAULT_FETCH_SIZE)); } @Override @@ -202,14 +204,15 @@ public List findByDynamicQuery(String query) { @Override public List findByCriteria(ClientSearchBean searchBean) { - // TODO Auto-generated method stub - return new ArrayList<>(); + return findByCriteria(searchBean, new AddressSearchBean()); } @Override public List findByCriteria(AddressSearchBean addressSearchBean, DateTime lastEditFrom, DateTime lastEditTo) { - // TODO Auto-generated method stub - return new ArrayList<>(); + ClientSearchBean clientSearchBean = new ClientSearchBean(); + clientSearchBean.setLastEditFrom(lastEditFrom); + clientSearchBean.setLastEditTo(lastEditTo); + return findByCriteria(clientSearchBean, addressSearchBean); } @Override @@ -308,12 +311,14 @@ private org.opensrp.domain.postgres.Client convert(Client client, Long primaryKe private ClientMetadata createMetadata(Client client, Long clientId) { try { ClientMetadata clientMetadata = new ClientMetadata(); + clientMetadata.setDocumentId(client.getId()); clientMetadata.setBaseEntityId(client.getBaseEntityId()); if (client.getBirthdate() != null) { clientMetadata.setBirthDate(client.getBirthdate().toDate()); } clientMetadata.setClientId(clientId); clientMetadata.setFirstName(client.getFirstName()); + clientMetadata.setMiddleName(client.getMiddleName()); clientMetadata.setLastName(client.getLastName()); String relationalId = null; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/DateTimeTypeHandler.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/DateTimeTypeHandler.java new file mode 100644 index 0000000000..7b964a5d44 --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/DateTimeTypeHandler.java @@ -0,0 +1,54 @@ +package org.opensrp.repository.postgres.handler; + +import java.sql.CallableStatement; +import java.sql.Date; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.SQLException; + +import org.apache.ibatis.type.JdbcType; +import org.apache.ibatis.type.TypeHandler; +import org.joda.time.DateTime; + +public class DateTimeTypeHandler implements TypeHandler { + + @Override + public void setParameter(PreparedStatement ps, int i, DateTime parameter, JdbcType jdbcType) throws SQLException { + if (parameter != null) { + ps.setDate(i, new Date(parameter.getMillis())); + } else { + ps.setDate(i, null); + } + } + + @Override + public DateTime getResult(ResultSet resultSet, String columnName) throws SQLException { + Date date = resultSet.getDate(columnName); + if (date != null) { + return new DateTime(date); + } else { + return null; + } + } + + @Override + public DateTime getResult(ResultSet resultSet, int columnIndex) throws SQLException { + Date date = resultSet.getDate(columnIndex); + if (date != null) { + return new DateTime(date); + } else { + return null; + } + } + + @Override + public DateTime getResult(CallableStatement cs, int columnIndex) throws SQLException { + Date date = cs.getDate(columnIndex); + if (date != null) { + return new DateTime(date); + } else { + return null; + } + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java index 408e9c1a9f..9954e42f5b 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java @@ -10,67 +10,67 @@ public interface ClientMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ long countByExample(ClientExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ int deleteByExample(ClientExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ int insert(Client record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ int insertSelective(Client record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ List selectByExample(ClientExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ Client selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ int updateByExampleSelective(@Param("record") Client record, @Param("example") ClientExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ int updateByExample(@Param("record") Client record, @Param("example") ClientExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ int updateByPrimaryKeySelective(Client record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ int updateByPrimaryKey(Client record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java index bb03f48c80..52360cfcb7 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java @@ -10,67 +10,67 @@ public interface ClientMetadataMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ long countByExample(ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ int deleteByExample(ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ int insert(ClientMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ int insertSelective(ClientMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ List selectByExample(ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ ClientMetadata selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ int updateByExampleSelective(@Param("record") ClientMetadata record, @Param("example") ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ int updateByExample(@Param("record") ClientMetadata record, @Param("example") ClientMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ int updateByPrimaryKeySelective(ClientMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.client_metadata - * @mbg.generated Mon Mar 26 10:50:48 EAT 2018 + * @mbg.generated Mon Mar 26 12:03:13 EAT 2018 */ int updateByPrimaryKey(ClientMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMetadataMapper.java index 0b9d1ec771..1445b51a4d 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMetadataMapper.java @@ -6,6 +6,8 @@ import org.opensrp.domain.postgres.Client; import org.opensrp.domain.postgres.ClientMetadataExample; import org.opensrp.repository.postgres.mapper.ClientMetadataMapper; +import org.opensrp.search.AddressSearchBean; +import org.opensrp.search.ClientSearchBean; public interface CustomClientMetadataMapper extends ClientMetadataMapper { @@ -13,6 +15,10 @@ List selectMany(@Param("example") ClientMetadataExample example, @Param( @Param("limit") int limit); Client selectOne(String baseEntityId); - + Client selectByDocumentId(String documentId); + + List selectBySearchBean(@Param("clientBean") ClientSearchBean searchBean, + @Param("addressBean") AddressSearchBean addressSearchBean, @Param("offset") int offset, + @Param("limit") int limit); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMapper.xml index f257a9ce5b..b8f04d4289 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMapper.xml @@ -57,7 +57,7 @@ select from core.client - where json -> 'identifiers' ->> #{attributeType,jdbcType=VARCHAR} = #{attribute,jdbcType=VARCHAR} + where json -> 'attributes' ->> #{attributeType,jdbcType=VARCHAR} = #{attribute,jdbcType=VARCHAR} @@ -67,7 +67,7 @@ from core.client join jsonb_each(json -> 'relationships') j on true - where j.value ->> 0 = #{relationalId,jdbcType=VARCHAR} + where j.value ? #{relationalId,jdbcType=VARCHAR} and (json #>> '{dateCreated}')::date between #{dateFrom,jdbcType=VARCHAR} and #{dateTo,jdbcType=VARCHAR} @@ -77,7 +77,7 @@ select from core.client - where json -> 'relationships'->#{relationshipType,jdbcType=VARCHAR}->> 0 = #{relationshipId,jdbcType=VARCHAR} + where json -> 'relationships'->#{relationshipType,jdbcType=VARCHAR} ? #{relationshipId,jdbcType=VARCHAR} @@ -87,7 +87,7 @@ from core.client join jsonb_each(json -> 'relationships') j on true - where j.value ->> 0 = #{relationshipId,jdbcType=VARCHAR} + where j.value ? #{relationshipId,jdbcType=VARCHAR} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml index 90133e1969..718e2a8252 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml @@ -14,8 +14,8 @@ - - + + @@ -53,7 +53,7 @@ distinct - + @@ -80,4 +80,66 @@ + + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml index 069937487f..e1d6c20350 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMapper.xml @@ -5,7 +5,7 @@ @@ -14,7 +14,7 @@ @@ -67,7 +67,7 @@ @@ -120,7 +120,7 @@ id, json @@ -128,7 +128,7 @@ select @@ -147,7 +147,7 @@ select @@ -158,7 +158,7 @@ delete from core.client where id = #{id,jdbcType=BIGINT} @@ -167,7 +167,7 @@ delete from core.client @@ -178,7 +178,7 @@ insert into core.client (id, json ) @@ -189,7 +189,7 @@ insert into core.client @@ -213,7 +213,7 @@ select count(*) from core.client @@ -224,7 +224,7 @@ update core.client @@ -243,7 +243,7 @@ update core.client set id = #{record.id,jdbcType=BIGINT}, @@ -256,7 +256,7 @@ update core.client @@ -270,7 +270,7 @@ update core.client set json = #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml index 0aa9ad4e17..ffb336d78e 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -16,6 +16,7 @@ + @@ -23,7 +24,7 @@ @@ -57,7 +58,7 @@ @@ -91,16 +92,16 @@ id, client_id, document_id, base_entity_id, relational_id, server_version, openmrs_uuid, - unique_id, first_name, last_name, birth_date + unique_id, first_name, middle_name, last_name, birth_date diff --git a/opensrp-core/src/main/java/org/opensrp/search/ClientSearchBean.java b/opensrp-core/src/main/java/org/opensrp/search/ClientSearchBean.java index 7bde0f3386..6383c6df26 100644 --- a/opensrp-core/src/main/java/org/opensrp/search/ClientSearchBean.java +++ b/opensrp-core/src/main/java/org/opensrp/search/ClientSearchBean.java @@ -30,6 +30,12 @@ public class ClientSearchBean { private Map attributes; + private String firstName; + + private String middleName; + + private String lastName; + public String getNameLike() { return nameLike; } @@ -126,4 +132,28 @@ public void setAttributes(Map attributes) { this.attributes = attributes; } + public String getFirstName() { + return firstName; + } + + public void setFirstName(String firstName) { + this.firstName = firstName; + } + + public String getMiddleName() { + return middleName; + } + + public void setMiddleName(String middleName) { + this.middleName = middleName; + } + + public String getLastName() { + return lastName; + } + + public void setLastName(String lastName) { + this.lastName = lastName; + } + } diff --git a/opensrp-web/src/main/java/org/opensrp/web/rest/SearchResource.java b/opensrp-web/src/main/java/org/opensrp/web/rest/SearchResource.java index 9a8ea9a7b0..eafd911649 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/rest/SearchResource.java +++ b/opensrp-web/src/main/java/org/opensrp/web/rest/SearchResource.java @@ -86,8 +86,19 @@ public List search(HttpServletRequest request) throws ParseException {// attributeMap = new HashMap(); attributeMap.put(attributeType, attributeValue); } - searchBean.setAttributes(attributeMap); + + Map identifierMap = null; + String identifiers = getStringFilter("identifier", request); + if (!StringUtils.isEmptyOrWhitespaceOnly(identifiers)) { + String identifierType = StringUtils.isEmptyOrWhitespaceOnly(identifiers) ? null : identifiers.split(":", -1)[0]; + String identifierValue = StringUtils.isEmptyOrWhitespaceOnly(identifiers) ? null : identifiers.split(":", -1)[1]; + + identifierMap = new HashMap(); + identifierMap.put(identifierType, identifierValue); + } + + searchBean.setIdentifiers(identifierMap); return searchService.searchClient(searchBean, firstName, middleName, lastName, null); } From 4246a1d6d81b8d2e41c507b3eb1b831417511e2e Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Tue, 27 Mar 2018 11:23:10 +0300 Subject: [PATCH 075/133] case insensitive like clauses using wildcards --- .../custom/xml/CustomClientMetadataMapper.xml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml index 1893a10900..6bd78fe430 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml @@ -90,9 +90,10 @@ where 1=1 - and ( cm.first_name like '%'||#{clientBean.nameLike,jdbcType=VARCHAR}||'%' or - cm.middle_name like '%'||#{clientBean.nameLike,jdbcType=VARCHAR}||'%' or - cm.last_name like '%'||#{clientBean.nameLike,jdbcType=VARCHAR}||'%' + + and ( lower(cm.first_name) like lower(#{name}) or + lower(cm.middle_name) like lower(#{name}) or + lower(cm.last_name) like lower(#{name}) ) @@ -141,14 +142,17 @@ and address ->> 'subTown' = #{addressBean.subTown,jdbcType=VARCHAR} - - and c.json->>'firstName' = #{clientBean.firstName,jdbcType=VARCHAR} + + + and lower(c.json->>'firstName') like lower(#{firstName}) - and c.json->>'middleName' = #{clientBean.middleName,jdbcType=VARCHAR} + + and lower(c.json->>'middleName') like lower(#{middleName}) - and c.json->>'lastName' = #{clientBean.lastName,jdbcType=VARCHAR} + + and lower(c.json->>'lastName') like lower(#{lastName}) From 231228c4089df68bc61ec09f4c60a7f9605c8771 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Tue, 27 Mar 2018 12:01:51 +0300 Subject: [PATCH 076/133] Implement ErrorTrace repository --- .../migrations/generator/generatorConfig.xml | 12 +- ...0180309140716_create_error_trace_table.sql | 2 + .../opensrp/domain/postgres/ErrorTrace.java | 83 ++++++---- .../domain/postgres/ErrorTraceExample.java | 102 ++++++++++-- .../postgres/ErrorTraceRepositoryImpl.java | 155 ++++++++++++++---- .../postgres/MultimediaRepositoryImpl.java | 1 - .../postgres/mapper/ErrorTraceMapper.java | 28 ++-- .../mapper/custom/CustomErrorTraceMapper.java | 14 ++ .../postgres/mapper/xml/ErrorTraceMapper.xml | 86 +++++----- 9 files changed, 338 insertions(+), 145 deletions(-) create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomErrorTraceMapper.java diff --git a/assets/migrations/generator/generatorConfig.xml b/assets/migrations/generator/generatorConfig.xml index 0bba263119..024c0c70a9 100644 --- a/assets/migrations/generator/generatorConfig.xml +++ b/assets/migrations/generator/generatorConfig.xml @@ -14,11 +14,11 @@ -
+ -
+
+ --> +
--> +
diff --git a/assets/migrations/scripts/20180309140716_create_error_trace_table.sql b/assets/migrations/scripts/20180309140716_create_error_trace_table.sql index db1fd6430c..75a65994fc 100644 --- a/assets/migrations/scripts/20180309140716_create_error_trace_table.sql +++ b/assets/migrations/scripts/20180309140716_create_error_trace_table.sql @@ -20,6 +20,7 @@ CREATE TABLE error.error_trace ( id bigserial NOT NULL, + document_id character varying UNIQUE NOT NULL, date_occurred date, error_type character varying, occurred_at character varying, @@ -35,6 +36,7 @@ WITH ( OIDS = FALSE ) TABLESPACE error_space; +CREATE INDEX error_trace_document_id_index ON error.error_trace (document_id); CREATE INDEX error_trace_status_index ON error.error_trace (status); -- //@UNDO diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java index a197b760be..1e1567eead 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java @@ -6,59 +6,64 @@ public class ErrorTrace { /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ private Long id; + /** + * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.document_id + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + */ + private String documentId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.date_occurred - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ private Date dateOccurred; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.error_type - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ private String errorType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.occurred_at - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ private String occurredAt; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.stack_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ private String stackTrace; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.status - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ private String status; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.record_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ private String recordId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.date_closed - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ private Date dateClosed; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.document_type - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ private String documentType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.retry_url - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ private String retryUrl; /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.id * @return the value of error.error_trace.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public Long getId() { return id; @@ -67,16 +72,34 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.id * @param id the value for error.error_trace.id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public void setId(Long id) { this.id = id; } + /** + * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.document_id + * @return the value of error.error_trace.document_id + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + */ + public String getDocumentId() { + return documentId; + } + + /** + * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.document_id + * @param documentId the value for error.error_trace.document_id + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + */ + public void setDocumentId(String documentId) { + this.documentId = documentId; + } + /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.date_occurred * @return the value of error.error_trace.date_occurred - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public Date getDateOccurred() { return dateOccurred; @@ -85,7 +108,7 @@ public Date getDateOccurred() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.date_occurred * @param dateOccurred the value for error.error_trace.date_occurred - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public void setDateOccurred(Date dateOccurred) { this.dateOccurred = dateOccurred; @@ -94,7 +117,7 @@ public void setDateOccurred(Date dateOccurred) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.error_type * @return the value of error.error_trace.error_type - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public String getErrorType() { return errorType; @@ -103,7 +126,7 @@ public String getErrorType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.error_type * @param errorType the value for error.error_trace.error_type - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public void setErrorType(String errorType) { this.errorType = errorType; @@ -112,7 +135,7 @@ public void setErrorType(String errorType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.occurred_at * @return the value of error.error_trace.occurred_at - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public String getOccurredAt() { return occurredAt; @@ -121,7 +144,7 @@ public String getOccurredAt() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.occurred_at * @param occurredAt the value for error.error_trace.occurred_at - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public void setOccurredAt(String occurredAt) { this.occurredAt = occurredAt; @@ -130,7 +153,7 @@ public void setOccurredAt(String occurredAt) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.stack_trace * @return the value of error.error_trace.stack_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public String getStackTrace() { return stackTrace; @@ -139,7 +162,7 @@ public String getStackTrace() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.stack_trace * @param stackTrace the value for error.error_trace.stack_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public void setStackTrace(String stackTrace) { this.stackTrace = stackTrace; @@ -148,7 +171,7 @@ public void setStackTrace(String stackTrace) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.status * @return the value of error.error_trace.status - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public String getStatus() { return status; @@ -157,7 +180,7 @@ public String getStatus() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.status * @param status the value for error.error_trace.status - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public void setStatus(String status) { this.status = status; @@ -166,7 +189,7 @@ public void setStatus(String status) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.record_id * @return the value of error.error_trace.record_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public String getRecordId() { return recordId; @@ -175,7 +198,7 @@ public String getRecordId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.record_id * @param recordId the value for error.error_trace.record_id - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public void setRecordId(String recordId) { this.recordId = recordId; @@ -184,7 +207,7 @@ public void setRecordId(String recordId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.date_closed * @return the value of error.error_trace.date_closed - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public Date getDateClosed() { return dateClosed; @@ -193,7 +216,7 @@ public Date getDateClosed() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.date_closed * @param dateClosed the value for error.error_trace.date_closed - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public void setDateClosed(Date dateClosed) { this.dateClosed = dateClosed; @@ -202,7 +225,7 @@ public void setDateClosed(Date dateClosed) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.document_type * @return the value of error.error_trace.document_type - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public String getDocumentType() { return documentType; @@ -211,7 +234,7 @@ public String getDocumentType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.document_type * @param documentType the value for error.error_trace.document_type - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public void setDocumentType(String documentType) { this.documentType = documentType; @@ -220,7 +243,7 @@ public void setDocumentType(String documentType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.retry_url * @return the value of error.error_trace.retry_url - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public String getRetryUrl() { return retryUrl; @@ -229,7 +252,7 @@ public String getRetryUrl() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.retry_url * @param retryUrl the value for error.error_trace.retry_url - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public void setRetryUrl(String retryUrl) { this.retryUrl = retryUrl; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java index 9947d91bb9..e590a1c953 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java @@ -8,23 +8,23 @@ public class ErrorTraceExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public ErrorTraceExample() { oredCriteria = new ArrayList(); @@ -32,7 +32,7 @@ public ErrorTraceExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -40,7 +40,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -48,7 +48,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -56,7 +56,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -64,7 +64,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -72,7 +72,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -80,7 +80,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -90,7 +90,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -102,7 +102,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -111,7 +111,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -121,7 +121,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ protected abstract static class GeneratedCriteria { @@ -251,6 +251,76 @@ public Criteria andIdNotBetween(Long value1, Long value2) { return (Criteria) this; } + public Criteria andDocumentIdIsNull() { + addCriterion("document_id is null"); + return (Criteria) this; + } + + public Criteria andDocumentIdIsNotNull() { + addCriterion("document_id is not null"); + return (Criteria) this; + } + + public Criteria andDocumentIdEqualTo(String value) { + addCriterion("document_id =", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotEqualTo(String value) { + addCriterion("document_id <>", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdGreaterThan(String value) { + addCriterion("document_id >", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdGreaterThanOrEqualTo(String value) { + addCriterion("document_id >=", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLessThan(String value) { + addCriterion("document_id <", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLessThanOrEqualTo(String value) { + addCriterion("document_id <=", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdLike(String value) { + addCriterion("document_id like", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotLike(String value) { + addCriterion("document_id not like", value, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdIn(List values) { + addCriterion("document_id in", values, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotIn(List values) { + addCriterion("document_id not in", values, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdBetween(String value1, String value2) { + addCriterion("document_id between", value1, value2, "documentId"); + return (Criteria) this; + } + + public Criteria andDocumentIdNotBetween(String value1, String value2) { + addCriterion("document_id not between", value1, value2, "documentId"); + return (Criteria) this; + } + public Criteria andDateOccurredIsNull() { addCriterion("date_occurred is null"); return (Criteria) this; @@ -864,7 +934,7 @@ public Criteria andRetryUrlNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ public static class Criterion { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ErrorTraceRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ErrorTraceRepositoryImpl.java index 25afa24bde..1d77ec3d24 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ErrorTraceRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ErrorTraceRepositoryImpl.java @@ -2,90 +2,185 @@ import java.util.ArrayList; import java.util.List; +import java.util.UUID; import org.ektorp.DocumentNotFoundException; import org.joda.time.DateTime; import org.opensrp.domain.ErrorTrace; import org.opensrp.domain.postgres.ErrorTraceExample; import org.opensrp.repository.ErrorTraceRepository; -import org.opensrp.repository.postgres.mapper.ErrorTraceMapper; +import org.opensrp.repository.postgres.mapper.custom.CustomErrorTraceMapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; @Repository -public class ErrorTraceRepositoryImpl implements ErrorTraceRepository { +public class ErrorTraceRepositoryImpl extends BaseRepositoryImpl implements ErrorTraceRepository { + + private final static String SOLVED = "solved"; + + private final static String UNSOLVED = "unsolved"; @Autowired - private ErrorTraceMapper errorTraceMapper; + private CustomErrorTraceMapper errorTraceMapper; @Override public ErrorTrace get(String id) { - // TODO Auto-generated method stub - return null; + ErrorTraceExample example = new ErrorTraceExample(); + example.createCriteria().andDocumentIdEqualTo(id); + List errors = errorTraceMapper.selectByExample(example); + if (!errors.isEmpty()) + return convert(errors.get(0)); + else + return null; } @Override public void add(ErrorTrace entity) { - // TODO Auto-generated method stub + if (entity == null || entity.getStatus() == null) { + return; + } + + if (retrievePrimaryKey(entity) != null) { //ErrorTrace already added + return; + } + + if (entity.getId() == null) + entity.setId(UUID.randomUUID().toString()); + + org.opensrp.domain.postgres.ErrorTrace pgErrorTrace = convert(entity, null); + if (pgErrorTrace == null) { + return; + } + + errorTraceMapper.insertSelective(pgErrorTrace); } @Override public void update(ErrorTrace entity) { - // TODO Auto-generated method stub + if (entity == null || entity.getId() == null || entity.getStatus() == null) { + return; + } + + Long id = retrievePrimaryKey(entity); + if (id == null) { //ErrorTrace doesn't not exist + return; + } + + org.opensrp.domain.postgres.ErrorTrace pgErrorTrace = convert(entity, id); + errorTraceMapper.updateByPrimaryKey(pgErrorTrace); } @Override public List getAll() { - // TODO Auto-generated method stub - return null; + return convert(errorTraceMapper.selectMany(new ErrorTraceExample(), 0, DEFAULT_FETCH_SIZE)); } @Override public void safeRemove(ErrorTrace entity) { - // TODO Auto-generated method stub + if (entity == null || entity.getStatus() == null) { + return; + } + + Long id = retrievePrimaryKey(entity); + if (id == null) { + return; + } + + errorTraceMapper.deleteByPrimaryKey(id); } @Override public ErrorTrace findById(String _id) throws DocumentNotFoundException { - // TODO Auto-generated method stub - return null; + return get(_id); } @Override public boolean exists(String id) { - // TODO Auto-generated method stub - return false; + return get(id) != null; } @Override public List findAllErrors() throws DocumentNotFoundException { - ErrorTraceExample example = new ErrorTraceExample(); - List errors = new ArrayList(); - for (org.opensrp.domain.postgres.ErrorTrace error : errorTraceMapper.selectByExample(example)) { - ErrorTrace err = new ErrorTrace(); - err.setDate(new DateTime(error.getDateOccurred())); - err.setErrorType(error.getErrorType()); - err.setStackTrace(error.getStackTrace()); - err.setStatus(error.getStatus()); - errors.add(err); - } - return errors; - + return getAll(); } @Override public List findAllUnSolvedErrors() throws DocumentNotFoundException { - // TODO Auto-generated method stub - return null; + ErrorTraceExample example = new ErrorTraceExample(); + example.createCriteria().andStatusEqualTo(UNSOLVED); + return convert(errorTraceMapper.selectMany(new ErrorTraceExample(), 0, DEFAULT_FETCH_SIZE)); } @Override public List findAllSolvedErrors() throws DocumentNotFoundException { - // TODO Auto-generated method stub - return null; + ErrorTraceExample example = new ErrorTraceExample(); + example.createCriteria().andStatusEqualTo(SOLVED); + return convert(errorTraceMapper.selectMany(new ErrorTraceExample(), 0, DEFAULT_FETCH_SIZE)); + } + + @Override + protected Long retrievePrimaryKey(ErrorTrace errorTrace) { + if (errorTrace == null) { + return null; + } + String documentId = errorTrace.getId(); + + ErrorTraceExample example = new ErrorTraceExample(); + example.createCriteria().andDocumentIdEqualTo(documentId); + List errors = errorTraceMapper.selectByExample(example); + return errors.isEmpty() ? null : errors.get(0).getId(); + } + + @Override + protected Object getUniqueField(ErrorTrace errorTrace) { + return errorTrace == null ? errorTrace : errorTrace.getId(); + } + + //private Methods + private ErrorTrace convert(org.opensrp.domain.postgres.ErrorTrace pgEntity) { + ErrorTrace entity = new ErrorTrace(); + entity.setId(pgEntity.getDocumentId()); + entity.setDateOccurred(new DateTime(pgEntity.getDateOccurred())); + entity.setErrorType(pgEntity.getErrorType()); + entity.setOccurredAt(pgEntity.getOccurredAt()); + entity.setStackTrace(pgEntity.getStackTrace()); + entity.setStatus(pgEntity.getStatus()); + entity.setDateClosed(pgEntity.getDateClosed()); + entity.setDocumentType(pgEntity.getDocumentType()); + entity.setRetryUrl(pgEntity.getRetryUrl()); + return entity; + } + + private org.opensrp.domain.postgres.ErrorTrace convert(ErrorTrace entity, Long id) { + org.opensrp.domain.postgres.ErrorTrace pgEntity = new org.opensrp.domain.postgres.ErrorTrace(); + pgEntity.setId(id); + pgEntity.setDocumentId(entity.getId()); + pgEntity.setDateOccurred(entity.getDateOccurred().toDate()); + pgEntity.setErrorType(entity.getErrorType()); + pgEntity.setOccurredAt(entity.getOccurredAt()); + pgEntity.setStackTrace(entity.getStackTrace()); + pgEntity.setStatus(entity.getStatus()); + pgEntity.setDateClosed(entity.getDateClosed()); + pgEntity.setDocumentType(entity.getDocumentType()); + pgEntity.setRetryUrl(entity.getRetryUrl()); + return pgEntity; } + private List convert(List pgErrors) { + if (pgErrors == null || pgErrors.isEmpty()) { + return new ArrayList<>(); + } + List errorTraces = new ArrayList<>(); + for (org.opensrp.domain.postgres.ErrorTrace pgError : pgErrors) { + ErrorTrace error = convert(pgError); + if (error != null) { + errorTraces.add(error); + } + } + + return errorTraces; + } } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java index 2c22c1212b..3db45b95f4 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java @@ -44,7 +44,6 @@ public void add(Multimedia entity) { return; } - multiMediaMapper.updateByPrimaryKey(pgMultiMedia); multiMediaMapper.insertSelective(pgMultiMedia); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java index 1cc8d9cf9f..31b16daeb9 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java @@ -10,73 +10,67 @@ public interface ErrorTraceMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ long countByExample(ErrorTraceExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ int deleteByExample(ErrorTraceExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ int insert(ErrorTrace record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ int insertSelective(ErrorTrace record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 - */ - List selectByExampleWithRowbounds(ErrorTraceExample example, RowBounds rowBounds); - - /** - * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ List selectByExample(ErrorTraceExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ ErrorTrace selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ int updateByExampleSelective(@Param("record") ErrorTrace record, @Param("example") ErrorTraceExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ int updateByExample(@Param("record") ErrorTrace record, @Param("example") ErrorTraceExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ int updateByPrimaryKeySelective(ErrorTrace record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Wed Mar 14 17:13:39 EAT 2018 + * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 */ int updateByPrimaryKey(ErrorTrace record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomErrorTraceMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomErrorTraceMapper.java new file mode 100644 index 0000000000..b9539910ca --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomErrorTraceMapper.java @@ -0,0 +1,14 @@ +package org.opensrp.repository.postgres.mapper.custom; + +import java.util.List; + +import org.opensrp.domain.postgres.ErrorTrace; +import org.opensrp.domain.postgres.ErrorTraceExample; +import org.opensrp.repository.postgres.mapper.ErrorTraceMapper; + + +public interface CustomErrorTraceMapper extends ErrorTraceMapper { + + List selectMany(ErrorTraceExample example, int i, int dEFAULT_FETCH_SIZE); + +} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ErrorTraceMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ErrorTraceMapper.xml index 232ee3b8b9..0ebd4f40b6 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ErrorTraceMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ErrorTraceMapper.xml @@ -5,9 +5,10 @@ + @@ -22,7 +23,7 @@ @@ -56,7 +57,7 @@ @@ -90,16 +91,16 @@ - id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, - document_type, retry_url + id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, + date_closed, document_type, retry_url - - select - - distinct - - - from error.error_trace - - - - - order by ${orderByClause} - - \ No newline at end of file From 51b3ef68609330ffca01aa6616cb0ae3e04d856a Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Tue, 27 Mar 2018 15:12:30 +0300 Subject: [PATCH 077/133] Code cleanup --- .../java/org/opensrp/common/AllConstants.java | 6 +- .../opensrp/repository/EventsRepository.java | 9 +- .../opensrp/repository/couch/AllEvents.java | 15 +- .../lucene/LuceneEventRepository.java | 130 ++++++++---------- .../postgres/BaseRepositoryImpl.java | 7 + .../postgres/EventsRepositoryImpl.java | 104 +++++++------- .../postgres/MultimediaRepositoryImpl.java | 2 +- .../postgres/ReportsRepositoryImpl.java | 12 +- .../postgres/StocksRepositoryImpl.java | 6 +- .../postgres/mapper/ActionMapper.java | 2 +- .../postgres/mapper/ActionMetadataMapper.java | 2 +- .../postgres/mapper/AlertMapper.java | 2 +- .../postgres/mapper/AlertMetadataMapper.java | 2 +- .../postgres/mapper/AppStateTokenMapper.java | 3 +- .../postgres/mapper/ClientMapper.java | 2 +- .../postgres/mapper/ClientMetadataMapper.java | 2 +- .../postgres/mapper/ErrorTraceMapper.java | 2 +- .../postgres/mapper/EventMapper.java | 2 +- .../postgres/mapper/EventMetadataMapper.java | 2 +- .../postgres/mapper/MultiMediaMapper.java | 2 +- .../postgres/mapper/ReportMapper.java | 2 +- .../postgres/mapper/ReportMetadataMapper.java | 2 +- .../postgres/mapper/StockMapper.java | 2 +- .../postgres/mapper/StockMetadataMapper.java | 2 +- .../org/opensrp/search/EventSearchBean.java | 128 +++++++++++++++++ .../org/opensrp/service/EventService.java | 19 +-- .../postgres/BaseRepositoryTest.java | 1 - .../postgres/EventsRepositoryTest.java | 71 ++++++---- .../org/opensrp/web/rest/EventResource.java | 64 +++++++-- 29 files changed, 378 insertions(+), 227 deletions(-) create mode 100644 opensrp-core/src/main/java/org/opensrp/search/EventSearchBean.java diff --git a/opensrp-common/src/main/java/org/opensrp/common/AllConstants.java b/opensrp-common/src/main/java/org/opensrp/common/AllConstants.java index 98fa8f2091..af740b0b5c 100644 --- a/opensrp-common/src/main/java/org/opensrp/common/AllConstants.java +++ b/opensrp-common/src/main/java/org/opensrp/common/AllConstants.java @@ -22,6 +22,8 @@ public class AllConstants { public static final String OPENSRP_ERRORTRACE_DATABASE = "opensrpErrorTraceDatabaseConnector"; + public static final int CLIENTS_FETCH_BATCH_SIZE=100; + public static class BaseEntity { public static final String BASE_ENTITY_ID = "baseEntityId"; @@ -107,10 +109,6 @@ public static class Event { public static final String OPENMRS_UUID_IDENTIFIER_TYPE = "OPENMRS_UUID"; - public static final String TEAM = "team"; - - public static final String TEAM_ID = "teamId"; - } public static class Stock { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/EventsRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/EventsRepository.java index 818f37c0b1..2e975147d4 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/EventsRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/EventsRepository.java @@ -3,8 +3,8 @@ import java.util.Calendar; import java.util.List; -import org.joda.time.DateTime; import org.opensrp.domain.Event; +import org.opensrp.search.EventSearchBean; public interface EventsRepository extends BaseRepository { @@ -22,9 +22,7 @@ public interface EventsRepository extends BaseRepository { List findByBaseEntityAndType(String baseEntityId, String eventType); - List findEvents(String baseEntityId, DateTime from, DateTime to, String eventType, String entityType, - String providerId, String locationId, DateTime lastEditFrom, DateTime lastEditTo, String team, - String teamId); + List findEvents(EventSearchBean eventSearchBean); List findEventsByDynamicQuery(String query); @@ -43,8 +41,7 @@ List findByClientAndConceptAndDate(String baseEntityId, String concept, S List findByEmptyServerVersion(); - List findEvents(String team, String teamId, String providerId, String locationId, String baseEntityId, - Long serverVersion, String sortBy, String sortOrder, int limit); + List findEvents(EventSearchBean eventSearchBean, String sortBy, String sortOrder, int limit); List findEventByEventTypeBetweenTwoDates(String eventType); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java index 8cebb445ff..caaa5a3450 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java @@ -11,12 +11,12 @@ import org.ektorp.support.View; import org.ektorp.util.Assert; import org.ektorp.util.Documents; -import org.joda.time.DateTime; import org.motechproject.dao.MotechBaseRepository; import org.opensrp.common.AllConstants; import org.opensrp.domain.Event; import org.opensrp.repository.EventsRepository; import org.opensrp.repository.lucene.LuceneEventRepository; +import org.opensrp.search.EventSearchBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.context.annotation.Primary; @@ -96,11 +96,8 @@ public List findByBaseEntityAndFormSubmissionId(CouchDbConnector targetDb Event.class); } - public List findEvents(String baseEntityId, DateTime from, DateTime to, String eventType, String entityType, - String providerId, String locationId, DateTime lastEditFrom, DateTime lastEditTo, - String team, String teamId) { - return ler.getByCriteria(baseEntityId, from, to, eventType, entityType, providerId, locationId, lastEditFrom, - lastEditTo, team, teamId); + public List findEvents(EventSearchBean eventSearchBean) { + return ler.getByCriteria(eventSearchBean); } public List findEventsByDynamicQuery(String query) { @@ -173,10 +170,8 @@ public List getAll() { return super.getAll(); } - public List findEvents(String team, String teamId, String providerId, String locationId, String baseEntityId, - Long serverVersion, String sortBy, String sortOrder, int limit) { - return ler.getByCriteria(team, teamId, providerId, locationId, baseEntityId, serverVersion, sortBy, sortOrder, - limit); + public List findEvents(EventSearchBean eventSearchBean, String sortBy, String sortOrder, int limit) { + return ler.getByCriteria(eventSearchBean, sortBy, sortOrder, limit); } @View(name = "all_events_by_event_type_and_version", map = "function(doc) { if (doc.type === 'Event'){ emit([doc.eventType, doc.version], null); } }") diff --git a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneEventRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneEventRepository.java index 2aecc5e9e6..c7a6efc531 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneEventRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneEventRepository.java @@ -1,5 +1,5 @@ package org.opensrp.repository.lucene; - + import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; import static org.opensrp.common.AllConstants.BaseEntity.LAST_UPDATE; import static org.opensrp.common.AllConstants.Event.ENTITY_TYPE; @@ -18,6 +18,7 @@ import org.joda.time.DateTime; import org.opensrp.common.AllConstants.BaseEntity; import org.opensrp.domain.Event; +import org.opensrp.search.EventSearchBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Component; @@ -29,36 +30,34 @@ import com.mysql.jdbc.StringUtils; @FullText({ - @Index(name = "by_all_criteria", analyzer = "perfield:{baseEntityId:\"keyword\",locationId:\"keyword\"}", index = "function(doc) { if(doc.type !== 'Event') return null; var arr1 = ['baseEntityId','eventType','entityType','providerId','locationId','teamId','team']; var ret = new Document(); var serverVersion = doc.serverVersion;ret.add(serverVersion, {'field': 'serverVersion'}); for (var i in arr1){ ret.add(doc[arr1[i]], {'field':arr1[i]}); } if(doc.eventDate){ var bd=doc.eventDate.substring(0,19); ret.add(bd, {'field':'eventDate','type':'date'}); } var crd = doc.dateCreated.substring(0, 19); ret.add(crd, {'field' : 'lastEdited','type' : 'date'}); if(doc.dateEdited){ var led = doc.dateEdited.substring(0, 19); ret.add(led, {'field' : 'lastEdited','type' : 'date'}); } return ret; }"), - @Index(name = "by_all_criteria_v2", analyzer = "perfield:{baseEntityId:\"keyword\",locationId:\"keyword\"}", index = "function(doc) { if(doc.type !== 'Event') return null; var arr1 = ['baseEntityId','eventType','entityType','providerId','locationId','teamId','team']; var ret = new Document(); var serverVersion = doc.serverVersion;ret.add(serverVersion, {'field': 'serverVersion'}); for (var i in arr1){ ret.add(doc[arr1[i]], {'field':arr1[i]}); } if(doc.eventDate){ var bd=doc.eventDate.substring(0,19); ret.add(bd, {'field':'eventDate','type':'date'}); } var crd = doc.dateCreated.substring(0, 19); ret.add(crd, {'field' : 'lastEdited','type' : 'date'}); if(doc.dateEdited){ var led = doc.dateEdited.substring(0, 19); ret.add(led, {'field' : 'lastEdited','type' : 'date'}); } return ret; }") }) + @Index(name = "by_all_criteria", analyzer = "perfield:{baseEntityId:\"keyword\",locationId:\"keyword\"}", index = "function(doc) { if(doc.type !== 'Event') return null; var arr1 = ['baseEntityId','eventType','entityType','providerId','locationId','teamId','team']; var ret = new Document(); var serverVersion = doc.serverVersion;ret.add(serverVersion, {'field': 'serverVersion'}); for (var i in arr1){ ret.add(doc[arr1[i]], {'field':arr1[i]}); } if(doc.eventDate){ var bd=doc.eventDate.substring(0,19); ret.add(bd, {'field':'eventDate','type':'date'}); } var crd = doc.dateCreated.substring(0, 19); ret.add(crd, {'field' : 'lastEdited','type' : 'date'}); if(doc.dateEdited){ var led = doc.dateEdited.substring(0, 19); ret.add(led, {'field' : 'lastEdited','type' : 'date'}); } return ret; }"), + @Index(name = "by_all_criteria_v2", analyzer = "perfield:{baseEntityId:\"keyword\",locationId:\"keyword\"}", index = "function(doc) { if(doc.type !== 'Event') return null; var arr1 = ['baseEntityId','eventType','entityType','providerId','locationId','teamId','team']; var ret = new Document(); var serverVersion = doc.serverVersion;ret.add(serverVersion, {'field': 'serverVersion'}); for (var i in arr1){ ret.add(doc[arr1[i]], {'field':arr1[i]}); } if(doc.eventDate){ var bd=doc.eventDate.substring(0,19); ret.add(bd, {'field':'eventDate','type':'date'}); } var crd = doc.dateCreated.substring(0, 19); ret.add(crd, {'field' : 'lastEdited','type' : 'date'}); if(doc.dateEdited){ var led = doc.dateEdited.substring(0, 19); ret.add(led, {'field' : 'lastEdited','type' : 'date'}); } return ret; }") }) @Component public class LuceneEventRepository extends CouchDbRepositorySupportWithLucene { - + private LuceneDbConnector ldb; - + @Autowired protected LuceneEventRepository(LuceneDbConnector db) { super(Event.class, db); this.ldb = db; initStandardDesignDocument(); } - - public List getByCriteria(String baseEntityId, DateTime eventDatefrom, DateTime eventDateto, String eventType, - String entityType, String providerId, String locationId, DateTime lastEditFrom, - DateTime lastEditTo,String team, String teamId) { + + public List getByCriteria(EventSearchBean eventSearchBean) { // create a simple query against the view/search function that we've created LuceneQuery query = new LuceneQuery("Event", "by_all_criteria"); - + Query qf = new Query(FilterType.AND); - addQueryParameter(qf, EVENT_DATE, eventDatefrom, eventDateto); - addQueryParameter(qf, LAST_UPDATE, lastEditFrom, lastEditTo); - addQueryParameter(qf, BASE_ENTITY_ID, baseEntityId); - addQueryParameter(qf, EVENT_TYPE, eventType); - addQueryParameter(qf, ENTITY_TYPE, entityType); - addQueryParameter(qf, PROVIDER_ID, providerId); - addQueryParameter(qf, LOCATION_ID, locationId); - addQueryParameter(qf, TEAM, team); - addQueryParameter(qf, TEAM_ID, teamId); + addQueryParameter(qf, EVENT_DATE, eventSearchBean.getEventDateFrom(), eventSearchBean.getEventDateTo()); + addQueryParameter(qf, LAST_UPDATE, eventSearchBean.getLastEditFrom(), eventSearchBean.getLastEditTo()); + addQueryParameter(qf, BASE_ENTITY_ID, eventSearchBean.getBaseEntityId()); + addQueryParameter(qf, EVENT_TYPE, eventSearchBean.getEventType()); + addQueryParameter(qf, ENTITY_TYPE, eventSearchBean.getEntityType()); + addQueryParameter(qf, PROVIDER_ID, eventSearchBean.getProviderId()); + addQueryParameter(qf, LOCATION_ID, eventSearchBean.getLocationId()); + addQueryParameter(qf, TEAM, eventSearchBean.getTeam()); + addQueryParameter(qf, TEAM_ID, eventSearchBean.getTeamId()); if (StringUtils.isEmptyOrWhitespaceOnly(qf.query())) { throw new RuntimeException("Atleast one search filter must be specified"); @@ -67,7 +66,7 @@ public List getByCriteria(String baseEntityId, DateTime eventDatefrom, Da // stale must not be ok, as we've only just loaded the docs query.setStaleOk(false); query.setIncludeDocs(true); - + try { LuceneResult result = db.queryLucene(query); return ldb.asList(result, Event.class); @@ -87,97 +86,82 @@ private void addQueryParameter(Query query, String parameter, DateTime from, Dat query.between(parameter, from, to); } } - + /** - * @param providerId- health worker id or comma separated health worker ids + * @param providerId- health worker id or comma separated health worker ids * @param locationId * @param baseEntityId * @param serverVersion - * @param sortBy Prefix with / for ascending order and \ for descending order (ascending is the - * default if not specified). - * @param sortOrder either descending or ascending + * @param sortBy Prefix with / for ascending order and \ for descending order (ascending is the + * default if not specified). + * @param sortOrder either descending or ascending * @param limit - * @param team this is a comma separated string of team names + * @param team this is a comma separated string of team names * @return */ - public List getByCriteria(String team, String teamId,String providerId, String locationId, String baseEntityId, - Long serverVersion, String sortBy, String sortOrder, int limit) { + public List getByCriteria(EventSearchBean eventSearchBean, String sortBy, String sortOrder, int limit) { // create a simple query against the view/search function that we've created LuceneQuery query = new LuceneQuery("Event", "by_all_criteria_v2"); - + Query qf = new Query(FilterType.AND); - - if (serverVersion != null) { - qf.between(BaseEntity.SERVER_VERSIOIN, serverVersion, Long.MAX_VALUE); + + if (eventSearchBean.getServerVersion() != null) { + qf.between(BaseEntity.SERVER_VERSIOIN, eventSearchBean.getServerVersion(), Long.MAX_VALUE); } - - if (team != null && !StringUtils.isEmptyOrWhitespaceOnly(team)) { - if (team.contains(",")) { - String[] teamArray = org.apache.commons.lang.StringUtils.split(team, ","); + + if (eventSearchBean.getTeam() != null && !StringUtils.isEmptyOrWhitespaceOnly(eventSearchBean.getTeam())) { + if (eventSearchBean.getTeam().contains(",")) { + String[] teamArray = org.apache.commons.lang.StringUtils.split(eventSearchBean.getTeam(), ","); List teams = new ArrayList<>(Arrays.asList(teamArray)); qf.inList(TEAM, teams); } else { - qf.eq(TEAM, team); + qf.eq(TEAM, eventSearchBean.getTeam()); } } - if (teamId != null && !StringUtils.isEmptyOrWhitespaceOnly(teamId)) { - if (teamId.contains(",")) { - String[] teamArray = org.apache.commons.lang.StringUtils.split(teamId); + if (eventSearchBean.getTeamId() != null && !StringUtils.isEmptyOrWhitespaceOnly(eventSearchBean.getTeamId())) { + if (eventSearchBean.getTeamId().contains(",")) { + String[] teamArray = org.apache.commons.lang.StringUtils.split(eventSearchBean.getTeamId()); List teams = new ArrayList<>(Arrays.asList(teamArray)); qf.inList(TEAM_ID, teams); } else { - qf.eq(TEAM_ID, teamId); + qf.eq(TEAM_ID, eventSearchBean.getTeamId()); } } - if ((providerId != null && !StringUtils.isEmptyOrWhitespaceOnly(providerId))) { - if (providerId.contains(",")) { - String[] providerArray = org.apache.commons.lang.StringUtils.split(providerId, ","); + if ((eventSearchBean.getProviderId() != null && !StringUtils.isEmptyOrWhitespaceOnly(eventSearchBean.getProviderId()))) { + if (eventSearchBean.getProviderId().contains(",")) { + String[] providerArray = org.apache.commons.lang.StringUtils.split(eventSearchBean.getProviderId(), ","); List providers = new ArrayList<>(Arrays.asList(providerArray)); qf.inList(PROVIDER_ID, providers); } else { - qf.eq(PROVIDER_ID, providerId); + qf.eq(PROVIDER_ID, eventSearchBean.getProviderId()); } } - - if (!StringUtils.isEmptyOrWhitespaceOnly(locationId)) { - qf.eq(LOCATION_ID, locationId); - } - if (locationId != null || !StringUtils.isEmptyOrWhitespaceOnly(locationId)) { - if (locationId.contains(",")) { - String[] locationArray = org.apache.commons.lang.StringUtils.split(locationId, ","); + if (eventSearchBean.getLocationId() != null || !StringUtils.isEmptyOrWhitespaceOnly(eventSearchBean.getLocationId())) { + if (eventSearchBean.getLocationId().contains(",")) { + String[] locationArray = org.apache.commons.lang.StringUtils.split(eventSearchBean.getLocationId(), ","); List locations = new ArrayList<>(Arrays.asList(locationArray)); qf.inList(LOCATION_ID, locations); } else { - qf.eq(LOCATION_ID, locationId); + qf.eq(LOCATION_ID, eventSearchBean.getLocationId()); } } - if (locationId != null || !StringUtils.isEmptyOrWhitespaceOnly(locationId)) { - if (locationId.contains(",")) { - String[] locationArray = org.apache.commons.lang.StringUtils.split(locationId, ","); - List locations = new ArrayList<>(Arrays.asList(locationArray)); - qf.inList(LOCATION_ID, locations); - } else { - qf.eq(LOCATION_ID, locationId); - } - } - - if (!StringUtils.isEmptyOrWhitespaceOnly(baseEntityId)) { - if (baseEntityId.contains(",")) { + if (!StringUtils.isEmptyOrWhitespaceOnly(eventSearchBean.getBaseEntityId())) { + if (eventSearchBean.getBaseEntityId().contains(",")) { Query q = new Query(FilterType.OR); - String[] idsArray = org.apache.commons.lang.StringUtils.split(baseEntityId, ","); + String[] idsArray = org.apache.commons.lang.StringUtils.split(eventSearchBean.getBaseEntityId(), ","); List ids = new ArrayList(Arrays.asList(idsArray)); q.inList(BASE_ENTITY_ID, ids); - + qf.addToQuery(q); } else { - qf.eq(BASE_ENTITY_ID, baseEntityId); + qf.eq(BASE_ENTITY_ID, eventSearchBean.getBaseEntityId()); } } - + if (StringUtils.isEmptyOrWhitespaceOnly(qf.query())) { throw new RuntimeException("Atleast one search filter must be specified"); } @@ -187,7 +171,7 @@ public List getByCriteria(String team, String teamId,String providerId, S query.setIncludeDocs(true); query.setLimit(limit); query.setSort((sortOrder.toLowerCase().contains("desc") ? "\\" : "/") + sortBy); - + try { LuceneResult result = db.queryLucene(query); return ldb.asList(result, Event.class); @@ -196,16 +180,16 @@ public List getByCriteria(String team, String teamId,String providerId, S throw new RuntimeException(e); } } - + public List getByCriteria(String query) { // create a simple query against the view/search function that we've created LuceneQuery q = new LuceneQuery("Event", "by_all_criteria"); - + q.setQuery(query); // stale must not be ok, as we've only just loaded the docs q.setStaleOk(false); q.setIncludeDocs(true); - + try { LuceneResult result = db.queryLucene(q); return ldb.asList(result, Event.class); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java index 7eb9c3ce6f..6f6e1f1e8b 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java @@ -1,5 +1,6 @@ package org.opensrp.repository.postgres; +import org.opensrp.common.AllConstants.BaseEntity; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -15,4 +16,10 @@ public abstract class BaseRepositoryImpl { protected abstract Object getUniqueField(T t); + protected String getOrderByClause(String sortBy, String sortOrder) { + String orderByClause = sortBy == null || sortBy == BaseEntity.SERVER_VERSIOIN ? SERVER_VERSION : sortBy; + orderByClause += " " + ((sortOrder == null || !sortOrder.toLowerCase().matches("(asc)|(desc)")) ? "asc" : sortOrder); + return orderByClause; + } + } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java index f284b5da73..0a4dd3566f 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java @@ -10,7 +10,6 @@ import org.apache.commons.lang3.StringUtils; import org.joda.time.DateTime; import org.opensrp.common.AllConstants; -import org.opensrp.common.AllConstants.BaseEntity; import org.opensrp.domain.Event; import org.opensrp.domain.postgres.EventMetadata; import org.opensrp.domain.postgres.EventMetadataExample; @@ -18,6 +17,7 @@ import org.opensrp.repository.EventsRepository; import org.opensrp.repository.postgres.mapper.custom.CustomEventMapper; import org.opensrp.repository.postgres.mapper.custom.CustomEventMetadataMapper; +import org.opensrp.search.EventSearchBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; @@ -193,37 +193,35 @@ public List findByBaseEntityAndType(String baseEntityId, String eventType } @Override - public List findEvents(String baseEntityId, DateTime from, DateTime to, String eventType, String entityType, - String providerId, String locationId, DateTime lastEditFrom, DateTime lastEditTo, - String team, String teamId) { + public List findEvents(EventSearchBean eventSearchBean) { EventMetadataExample example = new EventMetadataExample(); Criteria criteria = example.createCriteria(); - if (StringUtils.isNotEmpty(baseEntityId)) - criteria.andBaseEntityIdEqualTo(baseEntityId); - if (from != null && to != null) - criteria.andEventDateBetween(from.toDate(), to.toDate()); - if (StringUtils.isNotEmpty(eventType)) - criteria.andEventTypeEqualTo(eventType); - if (StringUtils.isNotEmpty(entityType)) - criteria.andEntityTypeEqualTo(entityType); - if (StringUtils.isNotEmpty(providerId)) - criteria.andProviderIdEqualTo(providerId); - if (StringUtils.isNotEmpty(locationId)) - criteria.andLocationIdEqualTo(locationId); - if (lastEditFrom != null && lastEditTo != null) - criteria.andDateEditedBetween(from.toDate(), to.toDate()); - if (StringUtils.isNotEmpty(team)) - criteria.andTeamEqualTo(team); - if (StringUtils.isNotEmpty(teamId)) - criteria.andTeamIdEqualTo(teamId); + if (StringUtils.isNotEmpty(eventSearchBean.getBaseEntityId())) + criteria.andBaseEntityIdEqualTo(eventSearchBean.getBaseEntityId()); + if (eventSearchBean.getEventDateFrom() != null && eventSearchBean.getEventDateTo() != null) + criteria.andEventDateBetween(eventSearchBean.getEventDateFrom().toDate(), eventSearchBean.getEventDateTo().toDate()); + if (StringUtils.isNotEmpty(eventSearchBean.getEventType())) + criteria.andEventTypeEqualTo(eventSearchBean.getEventType()); + if (StringUtils.isNotEmpty(eventSearchBean.getEntityType())) + criteria.andEntityTypeEqualTo(eventSearchBean.getEntityType()); + if (StringUtils.isNotEmpty(eventSearchBean.getProviderId())) + criteria.andProviderIdEqualTo(eventSearchBean.getProviderId()); + if (StringUtils.isNotEmpty(eventSearchBean.getLocationId())) + criteria.andLocationIdEqualTo(eventSearchBean.getLocationId()); + if (eventSearchBean.getLastEditFrom() != null && eventSearchBean.getLastEditTo() != null) + criteria.andDateEditedBetween(eventSearchBean.getLastEditFrom().toDate(), eventSearchBean.getLastEditTo().toDate()); + if (StringUtils.isNotEmpty(eventSearchBean.getTeam())) + criteria.andTeamEqualTo(eventSearchBean.getTeam()); + if (StringUtils.isNotEmpty(eventSearchBean.getTeamId())) + criteria.andTeamIdEqualTo(eventSearchBean.getTeamId()); if (!criteria.isValid()) - throw new RuntimeException("Atleast one search filter must be specified"); + throw new IllegalArgumentException("Atleast one search filter must be specified"); return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, DEFAULT_FETCH_SIZE)); } @Override public List findEventsByDynamicQuery(String query) { - throw new RuntimeException("Dynamic query feature not supported"); + throw new IllegalArgumentException("Dynamic query feature not supported"); } @Override @@ -250,7 +248,8 @@ public List findByClientAndConceptAndDate(String baseEntityId, String con String dateFrom, String dateTo) { if (StringUtils.isBlank(baseEntityId) && StringUtils.isBlank(concept) && StringUtils.isBlank(conceptValue)) return new ArrayList(); - Date from = null, to = null; + Date from = null; + Date to = null; if (StringUtils.isNotEmpty(dateFrom)) from = new DateTime(dateFrom).toDate(); if (StringUtils.isNotEmpty(dateTo)) @@ -281,61 +280,58 @@ public List findByEmptyServerVersion() { } @Override - public List findEvents(String team, String teamId, String providerId, String locationId, String baseEntityId, - Long serverVersion, String sortBy, String sortOrder, int limit) { + public List findEvents(EventSearchBean eventSearchBean, String sortBy, String sortOrder, int limit) { EventMetadataExample example = new EventMetadataExample(); Criteria criteria = example.createCriteria(); - if (StringUtils.isNotEmpty(team)) { - if (team.contains(",")) { - String[] teamsArray = org.apache.commons.lang.StringUtils.split(team, ","); + if (StringUtils.isNotEmpty(eventSearchBean.getTeam())) { + if (eventSearchBean.getTeam().contains(",")) { + String[] teamsArray = org.apache.commons.lang.StringUtils.split(eventSearchBean.getTeam(), ","); criteria.andTeamIn(Arrays.asList(teamsArray)); } else { - criteria.andTeamEqualTo(team); + criteria.andTeamEqualTo(eventSearchBean.getTeam()); } } - if (StringUtils.isNotEmpty(teamId)) { - if (teamId.contains(",")) { - String[] teamsArray = org.apache.commons.lang.StringUtils.split(teamId, ","); + if (StringUtils.isNotEmpty(eventSearchBean.getTeamId())) { + if (eventSearchBean.getTeamId().contains(",")) { + String[] teamsArray = org.apache.commons.lang.StringUtils.split(eventSearchBean.getTeamId(), ","); criteria.andTeamIdIn(Arrays.asList(teamsArray)); } else { - criteria.andTeamIdEqualTo(teamId); + criteria.andTeamIdEqualTo(eventSearchBean.getTeamId()); } } - if (StringUtils.isNotEmpty(providerId)) { - if (providerId.contains(",")) { - String[] providersArray = org.apache.commons.lang.StringUtils.split(providerId, ","); + if (StringUtils.isNotEmpty(eventSearchBean.getProviderId())) { + if (eventSearchBean.getProviderId().contains(",")) { + String[] providersArray = org.apache.commons.lang.StringUtils.split(eventSearchBean.getProviderId(), ","); criteria.andProviderIdIn(Arrays.asList(providersArray)); } else { - criteria.andProviderIdEqualTo(providerId); + criteria.andProviderIdEqualTo(eventSearchBean.getProviderId()); } } - if (StringUtils.isNotEmpty(locationId)) { - if (locationId.contains(",")) { - String[] locationArray = org.apache.commons.lang.StringUtils.split(locationId, ","); + if (StringUtils.isNotEmpty(eventSearchBean.getLocationId())) { + if (eventSearchBean.getLocationId().contains(",")) { + String[] locationArray = org.apache.commons.lang.StringUtils.split(eventSearchBean.getLocationId(), ","); criteria.andLocationIdIn(Arrays.asList(locationArray)); } else { - criteria.andLocationIdEqualTo(locationId); + criteria.andLocationIdEqualTo(eventSearchBean.getLocationId()); } } - if (StringUtils.isNotEmpty(baseEntityId)) { - if (baseEntityId.contains(",")) { - String[] idsArray = org.apache.commons.lang.StringUtils.split(baseEntityId, ","); + if (StringUtils.isNotEmpty(eventSearchBean.getBaseEntityId())) { + if (eventSearchBean.getBaseEntityId().contains(",")) { + String[] idsArray = org.apache.commons.lang.StringUtils.split(eventSearchBean.getBaseEntityId(), ","); criteria.andBaseEntityIdIn(Arrays.asList(idsArray)); } else { - criteria.andBaseEntityIdEqualTo(baseEntityId); + criteria.andBaseEntityIdEqualTo(eventSearchBean.getBaseEntityId()); } } - if (serverVersion != null) - criteria.andServerVersionGreaterThanOrEqualTo(serverVersion); + if (eventSearchBean.getServerVersion() != null) + criteria.andServerVersionGreaterThanOrEqualTo(eventSearchBean.getServerVersion()); if (!criteria.isValid()) - throw new RuntimeException("Atleast one search filter must be specified"); - sortBy = sortBy == null || sortBy == BaseEntity.SERVER_VERSIOIN ? SERVER_VERSION : sortBy; - if (sortOrder == null || !sortOrder.toLowerCase().matches("(asc)|(desc)")) - sortOrder = "asc"; - example.setOrderByClause(sortBy + " " + sortOrder); + throw new IllegalArgumentException("Atleast one search filter must be specified"); + + example.setOrderByClause(getOrderByClause(sortBy, sortOrder)); return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, limit)); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java index 3db45b95f4..0d97685144 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java @@ -39,7 +39,7 @@ public void add(Multimedia entity) { if (entity.getId() == null) entity.setId(UUID.randomUUID().toString()); - org.opensrp.domain.postgres.MultiMedia pgMultiMedia = convert(entity, null); + MultiMedia pgMultiMedia = convert(entity, null); if (pgMultiMedia == null) { return; } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java index 4f77beb80f..6d7a0d4031 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java @@ -194,12 +194,10 @@ public List findReports(String team, String providerId, String locationI if (StringUtils.isNotBlank(baseEntityId)) criteria.andBaseEntityIdEqualTo(baseEntityId); if (serverVersion != null) - criteria.andServerVersionGreaterThanOrEqualTo(serverVersion); - if (sortOrder == null || !sortOrder.toLowerCase().matches("(asc)|(desc)")) - sortOrder = "asc"; - reportMetadataExample.setOrderByClause(sortBy + " " + sortOrder); + criteria.andServerVersionGreaterThanOrEqualTo(serverVersion); + reportMetadataExample.setOrderByClause(getOrderByClause(sortBy, sortOrder)); if (reportMetadataExample.getOredCriteria().isEmpty()) { - throw new RuntimeException("Atleast one search filter must be specified"); + throw new IllegalArgumentException("Atleast one search filter must be specified"); } else return convert(reportMetadataMapper.selectMany(reportMetadataExample, 0, limit)); } @@ -222,14 +220,14 @@ public List findReports(String baseEntityId, DateTime from, DateTime to, if (from != null || to != null) criteria.andDateEditedBetween(lastEditFrom.toDate(), lastEditTo.toDate()); if (!criteria.isValid()) - throw new RuntimeException("Atleast one search filter must be specified"); + throw new IllegalArgumentException("Atleast one search filter must be specified"); else return convert(reportMetadataMapper.selectMany(reportMetadataExample, 0, DEFAULT_FETCH_SIZE)); } @Override public List findReportsByDynamicQuery(String query) { - throw new RuntimeException("Method not supported"); + throw new IllegalArgumentException("Method not supported"); } @Override diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java index 896148e6b4..845a7dadf9 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java @@ -5,7 +5,6 @@ import java.util.UUID; import org.apache.commons.lang3.StringUtils; -import org.opensrp.common.AllConstants.BaseEntity; import org.opensrp.domain.Stock; import org.opensrp.domain.postgres.StockMetadata; import org.opensrp.domain.postgres.StockMetadataExample; @@ -146,10 +145,7 @@ public Stock findById(String id) { @Override public List findStocks(StockSearchBean searchBean, String sortBy, String sortOrder, int limit) { - String orderByClause = sortBy == BaseEntity.SERVER_VERSIOIN ? SERVER_VERSION : sortBy;; - - if (orderByClause != null && (sortOrder == null || !sortOrder.toLowerCase().matches("(asc)|(desc)"))) - orderByClause = orderByClause + " " + "asc"; + String orderByClause = getOrderByClause(sortBy, sortOrder); return convert(stockMetadataMapper.selectManyBySearchBean(searchBean, orderByClause, 0, limit)); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java index 6490c68155..f825b16961 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMapper.java @@ -1,10 +1,10 @@ package org.opensrp.repository.postgres.mapper; import java.util.List; + import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.Action; import org.opensrp.domain.postgres.ActionExample; -import org.apache.ibatis.session.RowBounds; public interface ActionMapper { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java index 9a8e02f086..a16645599c 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ActionMetadataMapper.java @@ -1,10 +1,10 @@ package org.opensrp.repository.postgres.mapper; import java.util.List; + import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.ActionMetadata; import org.opensrp.domain.postgres.ActionMetadataExample; -import org.apache.ibatis.session.RowBounds; public interface ActionMetadataMapper { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java index eb47c6c3b8..5dc3c39e13 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMapper.java @@ -1,10 +1,10 @@ package org.opensrp.repository.postgres.mapper; import java.util.List; + import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.Alert; import org.opensrp.domain.postgres.AlertExample; -import org.apache.ibatis.session.RowBounds; public interface AlertMapper { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java index f47a3d3f86..2353a91526 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AlertMetadataMapper.java @@ -1,10 +1,10 @@ package org.opensrp.repository.postgres.mapper; import java.util.List; + import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.AlertMetadata; import org.opensrp.domain.postgres.AlertMetadataExample; -import org.apache.ibatis.session.RowBounds; public interface AlertMetadataMapper { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AppStateTokenMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AppStateTokenMapper.java index fa89ab8f9f..22bdde9b8e 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AppStateTokenMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/AppStateTokenMapper.java @@ -1,10 +1,11 @@ package org.opensrp.repository.postgres.mapper; import java.util.List; + import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.session.RowBounds; import org.opensrp.domain.postgres.AppStateToken; import org.opensrp.domain.postgres.AppStateTokenExample; -import org.apache.ibatis.session.RowBounds; public interface AppStateTokenMapper { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java index 9954e42f5b..d03c3cbdd2 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMapper.java @@ -1,10 +1,10 @@ package org.opensrp.repository.postgres.mapper; import java.util.List; + import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.Client; import org.opensrp.domain.postgres.ClientExample; -import org.apache.ibatis.session.RowBounds; public interface ClientMapper { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java index 52360cfcb7..305843172f 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ClientMetadataMapper.java @@ -1,10 +1,10 @@ package org.opensrp.repository.postgres.mapper; import java.util.List; + import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.ClientMetadata; import org.opensrp.domain.postgres.ClientMetadataExample; -import org.apache.ibatis.session.RowBounds; public interface ClientMetadataMapper { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java index 31b16daeb9..a4c43f0b91 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java @@ -1,10 +1,10 @@ package org.opensrp.repository.postgres.mapper; import java.util.List; + import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.ErrorTrace; import org.opensrp.domain.postgres.ErrorTraceExample; -import org.apache.ibatis.session.RowBounds; public interface ErrorTraceMapper { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java index 4123f2486f..02fc0bf541 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMapper.java @@ -1,10 +1,10 @@ package org.opensrp.repository.postgres.mapper; import java.util.List; + import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.Event; import org.opensrp.domain.postgres.EventExample; -import org.apache.ibatis.session.RowBounds; public interface EventMapper { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java index 256db74d23..e9d74fc2de 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java @@ -1,10 +1,10 @@ package org.opensrp.repository.postgres.mapper; import java.util.List; + import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.EventMetadata; import org.opensrp.domain.postgres.EventMetadataExample; -import org.apache.ibatis.session.RowBounds; public interface EventMetadataMapper { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java index 249f905cd3..9d3594234f 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/MultiMediaMapper.java @@ -1,10 +1,10 @@ package org.opensrp.repository.postgres.mapper; import java.util.List; + import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.MultiMedia; import org.opensrp.domain.postgres.MultiMediaExample; -import org.apache.ibatis.session.RowBounds; public interface MultiMediaMapper { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java index 59718f82b4..5ad5b117d3 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMapper.java @@ -1,10 +1,10 @@ package org.opensrp.repository.postgres.mapper; import java.util.List; + import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.Report; import org.opensrp.domain.postgres.ReportExample; -import org.apache.ibatis.session.RowBounds; public interface ReportMapper { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java index dc1c407c44..d63f1c9eb6 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ReportMetadataMapper.java @@ -1,10 +1,10 @@ package org.opensrp.repository.postgres.mapper; import java.util.List; + import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.ReportMetadata; import org.opensrp.domain.postgres.ReportMetadataExample; -import org.apache.ibatis.session.RowBounds; public interface ReportMetadataMapper { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java index 70e6c4c68f..9a4211ff88 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMapper.java @@ -1,10 +1,10 @@ package org.opensrp.repository.postgres.mapper; import java.util.List; + import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.Stock; import org.opensrp.domain.postgres.StockExample; -import org.apache.ibatis.session.RowBounds; public interface StockMapper { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java index 3faa1509cb..b4857e4aae 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/StockMetadataMapper.java @@ -1,10 +1,10 @@ package org.opensrp.repository.postgres.mapper; import java.util.List; + import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.StockMetadata; import org.opensrp.domain.postgres.StockMetadataExample; -import org.apache.ibatis.session.RowBounds; public interface StockMetadataMapper { diff --git a/opensrp-core/src/main/java/org/opensrp/search/EventSearchBean.java b/opensrp-core/src/main/java/org/opensrp/search/EventSearchBean.java new file mode 100644 index 0000000000..17f875a0fa --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/search/EventSearchBean.java @@ -0,0 +1,128 @@ + +package org.opensrp.search; + +import org.joda.time.DateTime; + +public class EventSearchBean { + + private String baseEntityId; + + private DateTime eventDateFrom; + + private DateTime eventDateTo; + + private String eventType; + + private String entityType; + + private String providerId; + + private String locationId; + + private DateTime lastEditFrom; + + private DateTime lastEditTo; + + private String team; + + private String teamId; + + private Long serverVersion; + + public String getBaseEntityId() { + return baseEntityId; + } + + public void setBaseEntityId(String baseEntityId) { + this.baseEntityId = baseEntityId; + } + + public DateTime getEventDateFrom() { + return eventDateFrom; + } + + public void setEventDateFrom(DateTime eventDateFrom) { + this.eventDateFrom = eventDateFrom; + } + + public DateTime getEventDateTo() { + return eventDateTo; + } + + public void setEventDateTo(DateTime eventDateTo) { + this.eventDateTo = eventDateTo; + } + + public String getEventType() { + return eventType; + } + + public void setEventType(String eventType) { + this.eventType = eventType; + } + + public String getEntityType() { + return entityType; + } + + public void setEntityType(String entityType) { + this.entityType = entityType; + } + + public String getProviderId() { + return providerId; + } + + public void setProviderId(String providerId) { + this.providerId = providerId; + } + + public String getLocationId() { + return locationId; + } + + public void setLocationId(String locationId) { + this.locationId = locationId; + } + + public DateTime getLastEditFrom() { + return lastEditFrom; + } + + public void setLastEditFrom(DateTime lastEditFrom) { + this.lastEditFrom = lastEditFrom; + } + + public DateTime getLastEditTo() { + return lastEditTo; + } + + public void setLastEditTo(DateTime lastEditTo) { + this.lastEditTo = lastEditTo; + } + + public String getTeam() { + return team; + } + + public void setTeam(String team) { + this.team = team; + } + + public String getTeamId() { + return teamId; + } + + public void setTeamId(String teamId) { + this.teamId = teamId; + } + + public Long getServerVersion() { + return serverVersion; + } + + public void setServerVersion(Long serverVersion) { + this.serverVersion = serverVersion; + } + +} diff --git a/opensrp-core/src/main/java/org/opensrp/service/EventService.java b/opensrp-core/src/main/java/org/opensrp/service/EventService.java index 8182e96c19..4547fad4de 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/EventService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/EventService.java @@ -16,6 +16,7 @@ import org.opensrp.domain.Event; import org.opensrp.domain.Obs; import org.opensrp.repository.EventsRepository; +import org.opensrp.search.EventSearchBean; import org.opensrp.util.DateTimeTypeConverter; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -62,11 +63,8 @@ public Event findByFormSubmissionId(String formSubmissionId) { return allEvents.findByFormSubmissionId(formSubmissionId); } - public List findEventsBy(String baseEntityId, DateTime from, DateTime to, String eventType, String entityType, - String providerId, String locationId, DateTime lastEditFrom, DateTime lastEditTo, - String team, String teamId) { - return allEvents.findEvents(baseEntityId, from, to, eventType, entityType, providerId, locationId, lastEditFrom, - lastEditTo, team, teamId); + public List findEventsBy(EventSearchBean eventSearchBean) { + return allEvents.findEvents(eventSearchBean); } public List findEventsByDynamicQuery(String query) { @@ -274,15 +272,12 @@ public List getAll() { return allEvents.getAll(); } - public List findEvents(String team, String teamId, String providerId, String locationId, Long serverVersion, - String sortBy, String sortOrder, int limit) { - return allEvents.findEvents(team, teamId, providerId, locationId, null, serverVersion, sortBy, sortOrder, limit); + public List findEvents(EventSearchBean eventSearchBean, String sortBy, String sortOrder, int limit) { + return allEvents.findEvents(eventSearchBean, sortBy, sortOrder, limit); } - public List findEvents(String team, String teamId, String providerId, String locationId, String baseEntityId, - Long serverVersion, String sortBy, String sortOrder, int limit) { - return allEvents.findEvents(team, teamId, providerId, locationId, baseEntityId, serverVersion, sortBy, sortOrder, - limit); + public List findEvents(EventSearchBean eventSearchBean) { + return allEvents.findEvents(eventSearchBean); } public List findEventsByConceptAndValue(String concept, String conceptValue) { diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java index e1d708e743..b8d0ce3558 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/BaseRepositoryTest.java @@ -7,7 +7,6 @@ import javax.sql.DataSource; import org.junit.Before; -import org.junit.BeforeClass; import org.junit.runner.RunWith; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.core.io.ClassPathResource; diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java index 0bbdc6378c..294e5798d9 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java @@ -15,6 +15,7 @@ import org.opensrp.domain.Event; import org.opensrp.domain.Obs; import org.opensrp.repository.EventsRepository; +import org.opensrp.search.EventSearchBean; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; @@ -135,35 +136,38 @@ public void testFindByBaseEntityAndType() { @Test public void testFindEvents() { - List events = eventsRepository.findEvents("58b33379-dab2-4f5c-8f09-6d2bd63023d8", null, null, null, null, - null, null, null, null, null, null); + + EventSearchBean eventSearchBean = new EventSearchBean(); + eventSearchBean.setBaseEntityId("58b33379-dab2-4f5c-8f09-6d2bd63023d8"); + List events = eventsRepository.findEvents(eventSearchBean); assertEquals(7, events.size()); - events = eventsRepository.findEvents("58b33379-dab2-4f5c-8f09-6d2bd63023d8", new DateTime("2018-01-10"), - new DateTime("2018-02-21"), null, null, null, null, null, null, null, null); + eventSearchBean.setEventDateFrom(new DateTime("2018-01-10")); + eventSearchBean.setEventDateTo(new DateTime("2018-02-21")); + events = eventsRepository.findEvents(eventSearchBean); assertEquals(6, events.size()); - events = eventsRepository.findEvents("58b33379-dab2-4f5c-8f09-6d2bd63023d8", new DateTime("2018-01-10"), - new DateTime(), "Vaccination", null, null, null, null, null, null, null); + eventSearchBean.setEventType("Vaccination"); + events = eventsRepository.findEvents(eventSearchBean); assertEquals(6, events.size()); - events = eventsRepository.findEvents("58b33379-dab2-4f5c-8f09-6d2bd63023d8", new DateTime("2018-01-10"), - new DateTime(), "Vaccination", "vaccination", null, null, null, null, null, null); + eventSearchBean.setEntityType("vaccination"); + events = eventsRepository.findEvents(eventSearchBean); assertEquals(6, events.size()); - events = eventsRepository.findEvents("58b33379-dab2-4f5c-8f09-6d2bd63023d8", new DateTime("2018-01-10"), - new DateTime(), "Vaccination", "vaccination", "biddemo", "42abc582-6658-488b-922e-7be500c070f3", null, null, - null, null); + eventSearchBean.setProviderId("biddemo"); + eventSearchBean.setLocationId("42abc582-6658-488b-922e-7be500c070f3"); + events = eventsRepository.findEvents(eventSearchBean); assertEquals(6, events.size()); - events = eventsRepository.findEvents("58b33379-dab2-4f5c-8f09-6d2bd63023d8", new DateTime("2018-01-10"), - new DateTime(), "Vaccination", "vaccination", "biddemo", "42abc582-6658-488b-922e-7be500c070f3", null, null, - "ATeam", "3453hgb454-4j345n-llk345"); + eventSearchBean.setTeam("ATeam"); + eventSearchBean.setTeamId("3453hgb454-4j345n-llk345"); + events = eventsRepository.findEvents(eventSearchBean); assertEquals(2, events.size()); - events = eventsRepository.findEvents("58b33379-dab2-4f5c-8f09-6d2bd63023d8", new DateTime("2018-01-10"), - new DateTime(), "Vaccination", "vaccination", "biddemo", "42abc582-6658-488b-922e-7be500c070f3", new DateTime(), - new DateTime(), "ATeam", "3453hgb454-4j345n-llk345"); + eventSearchBean.setLastEditFrom(new DateTime()); + eventSearchBean.setLastEditTo(new DateTime()); + events = eventsRepository.findEvents(eventSearchBean); assertTrue(events.isEmpty()); } @@ -260,29 +264,36 @@ public void testFindByConceptAndValue() { @Test public void testFindEvents2() { - List events = eventsRepository.findEvents("ATeam", "3453hgb454-4j345n-llk345", null, null, null, null, null, - null, 20); + EventSearchBean eventSearchBean = new EventSearchBean(); + eventSearchBean.setTeam("ATeam"); + eventSearchBean.setTeamId("3453hgb454-4j345n-llk345"); + List events = eventsRepository.findEvents(eventSearchBean, null, null, 20); assertEquals(2, events.size()); - events = eventsRepository.findEvents("ATeam,BTeam", null, null, null, null, null, null, null, 20); + eventSearchBean = new EventSearchBean(); + eventSearchBean.setTeam("ATeam,BTeam"); + events = eventsRepository.findEvents(eventSearchBean, null, null, 20); assertEquals(3, events.size()); - events = eventsRepository.findEvents(null, null, "biddemo,biddemo2", - "42b88545-7ebb-4e11-8d1a-3d3a924c8af4,42b88545-7ebb-4e11-8d1a-3d3a924c8af5", null, null, null, null, 20); + eventSearchBean = new EventSearchBean(); + eventSearchBean.setProviderId("biddemo,biddemo2"); + eventSearchBean.setLocationId("42b88545-7ebb-4e11-8d1a-3d3a924c8af4,42b88545-7ebb-4e11-8d1a-3d3a924c8af5"); + events = eventsRepository.findEvents(eventSearchBean, null, null, 20); assertEquals(7, events.size()); - events = eventsRepository.findEvents(null, null, "biddemo,biddemo2", - "42b88545-7ebb-4e11-8d1a-3d3a924c8af4,42b88545-7ebb-4e11-8d1a-3d3a924c8af5", - "58b33379-dab2-4f5c-8f09-6d2bd63023d8", null, null, null, 20); + eventSearchBean.setBaseEntityId("58b33379-dab2-4f5c-8f09-6d2bd63023d8"); + events = eventsRepository.findEvents(eventSearchBean, null, null, 20); assertEquals(0, events.size()); - events = eventsRepository.findEvents(null, null, "biddemo,biddemo2", "42abc582-6658-488b-922e-7be500c070f3", - "58b33379-dab2-4f5c-8f09-6d2bd63023d8", null, null, null, 20); + eventSearchBean.setLocationId("42abc582-6658-488b-922e-7be500c070f3"); + events = eventsRepository.findEvents(eventSearchBean, null, null, 20); assertEquals(7, events.size()); - events = eventsRepository.findEvents("ATeam,BTeam", "3453hgb454-4j345n-llk345,3453hgb454-4j345n-llk348", "biddemo", - "42abc582-6658-488b-922e-7be500c070f3", "58b33379-dab2-4f5c-8f09-6d2bd63023d8", 0l, BaseEntity.SERVER_VERSIOIN, - "asc", 20); + eventSearchBean.setTeam("ATeam,BTeam"); + eventSearchBean.setTeamId("3453hgb454-4j345n-llk345,3453hgb454-4j345n-llk348"); + eventSearchBean.setProviderId("biddemo"); + eventSearchBean.setServerVersion(0l); + events = eventsRepository.findEvents(eventSearchBean, BaseEntity.SERVER_VERSIOIN, "asc", 20); assertEquals(3, events.size()); } diff --git a/opensrp-web/src/main/java/org/opensrp/web/rest/EventResource.java b/opensrp-web/src/main/java/org/opensrp/web/rest/EventResource.java index 7d73846a31..9bab0a1b29 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/rest/EventResource.java +++ b/opensrp-web/src/main/java/org/opensrp/web/rest/EventResource.java @@ -1,6 +1,7 @@ package org.opensrp.web.rest; import static java.text.MessageFormat.format; +import static org.opensrp.common.AllConstants.CLIENTS_FETCH_BATCH_SIZE; import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; import static org.opensrp.common.AllConstants.BaseEntity.LAST_UPDATE; import static org.opensrp.common.AllConstants.Event.ENTITY_TYPE; @@ -31,6 +32,7 @@ import org.opensrp.common.AllConstants.BaseEntity; import org.opensrp.domain.Client; import org.opensrp.domain.Event; +import org.opensrp.search.EventSearchBean; import org.opensrp.service.ClientService; import org.opensrp.service.EventService; import org.opensrp.util.DateTimeTypeConverter; @@ -113,8 +115,16 @@ protected ResponseEntity sync(HttpServletRequest request) { List clientIds = new ArrayList(); List clients = new ArrayList(); if (team != null || providerId != null || locationId != null || baseEntityId != null) { - events = eventService.findEvents(team, teamId, providerId, locationId, baseEntityId, lastSyncedServerVersion, - BaseEntity.SERVER_VERSIOIN, "asc", limit); + long startTime = System.currentTimeMillis(); + EventSearchBean eventSearchBean = new EventSearchBean(); + eventSearchBean.setTeam(team); + eventSearchBean.setTeamId(teamId); + eventSearchBean.setProviderId(providerId); + eventSearchBean.setLocationId(locationId); + eventSearchBean.setBaseEntityId(baseEntityId); + eventSearchBean.setServerVersion(lastSyncedServerVersion); + events = eventService.findEvents(eventSearchBean, BaseEntity.SERVER_VERSIOIN, "asc", limit); + logger.info("fetching events took: " + (System.currentTimeMillis() - startTime) / 1000); if (!events.isEmpty()) { for (Event event : events) { if (event.getBaseEntityId() != null && !event.getBaseEntityId().isEmpty() @@ -122,7 +132,28 @@ protected ResponseEntity sync(HttpServletRequest request) { clientIds.add(event.getBaseEntityId()); } } - clients = clientService.findByFieldValue(BaseEntity.BASE_ENTITY_ID, clientIds); + for (int i = 0; i < clientIds.size(); i = i + CLIENTS_FETCH_BATCH_SIZE) { + int end = i + CLIENTS_FETCH_BATCH_SIZE < clientIds.size() ? i + CLIENTS_FETCH_BATCH_SIZE + : clientIds.size(); + clients.addAll(clientService.findByFieldValue(BASE_ENTITY_ID, clientIds.subList(i, end))); + } + logger.info("fetching clients took: " + (System.currentTimeMillis() - startTime) / 1000); + + List foundClientIds = new ArrayList<>(); + for (Client client : clients) { + foundClientIds.add(client.getBaseEntityId()); + } + + boolean removed = clientIds.removeAll(foundClientIds); + if (removed) { + for (String clientId : clientIds) { + Client client = clientService.getByBaseEntityId(clientId); + if (client != null) { + clients.add(client); + } + } + } + logger.info("fetching missing clients took: " + (System.currentTimeMillis() - startTime) / 1000); } } @@ -159,10 +190,12 @@ public ResponseEntity save(@RequestBody String data) { new TypeToken>() {}.getType()); for (Client client : clients) { try { - clientService.addorUpdate(client); + clientService.addorUpdate(client); } catch (Exception e) { - logger.error("Client" + client.getBaseEntityId()==null?"":client.getBaseEntityId()+" failed to sync", e); + logger.error( + "Client" + client.getBaseEntityId() == null ? "" : client.getBaseEntityId() + " failed to sync", + e); } } @@ -176,7 +209,10 @@ public ResponseEntity save(@RequestBody String data) { eventService.addorUpdateEvent(event); } catch (Exception e) { - logger.error("Event of type "+event.getEventType()+" for client " + event.getBaseEntityId()==null?"":event.getBaseEntityId()+" failed to sync", e); + logger.error( + "Event of type " + event.getEventType() + " for client " + event.getBaseEntityId() == null ? "" + : event.getBaseEntityId() + " failed to sync", + e); } } } @@ -242,10 +278,20 @@ public List search(HttpServletRequest request) throws ParseException { clientId = c.getBaseEntityId(); } + EventSearchBean eventSearchBean = new EventSearchBean(); + eventSearchBean.setBaseEntityId(clientId); + eventSearchBean.setEventDateFrom(eventDate == null ? null : eventDate[0]); + eventSearchBean.setEventDateTo(eventDate == null ? null : eventDate[1]); + eventSearchBean.setEventType(eventType); + eventSearchBean.setEntityType(entityType); + eventSearchBean.setProviderId(provider); + eventSearchBean.setLocationId(location); + eventSearchBean.setLastEditFrom(lastEdit == null ? null : lastEdit[0]); + eventSearchBean.setLastEditTo(lastEdit == null ? null : lastEdit[1]); + eventSearchBean.setTeam(team); + eventSearchBean.setTeamId(teamId); - return eventService.findEventsBy(clientId, eventDate == null ? null : eventDate[0], - eventDate == null ? null : eventDate[1], eventType, entityType, provider, location, - lastEdit == null ? null : lastEdit[0], lastEdit == null ? null : lastEdit[1], team, teamId); + return eventService.findEventsBy(eventSearchBean); } @Override From 73edfc121b2364171c04034edc2a0d432f338e62 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Tue, 27 Mar 2018 15:28:25 +0300 Subject: [PATCH 078/133] Code cleanup --- .../opensrp/repository/postgres/ActionRepositoryImpl.java | 8 +++----- .../postgres/mapper/custom/CustomEventMapper.java | 2 +- 2 files changed, 4 insertions(+), 6 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java index 0b966bcf50..c915e91d21 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java @@ -146,7 +146,7 @@ public List findAlertByANMIdEntityIdScheduleName(String providerId, Stri public List findByCaseIdScheduleAndTimeStamp(String baseEntityId, String schedule, DateTime start, DateTime end) { if (start == null || end == null) - throw new RuntimeException("start and/or end date is null"); + throw new IllegalArgumentException("start and/or end date is null"); ActionMetadataExample example = new ActionMetadataExample(); example.createCriteria().andBaseEntityIdEqualTo(baseEntityId).andServerVersionBetween(start.getMillis(), end.getMillis() + 1); @@ -227,12 +227,10 @@ public List findByCriteria(String team, String providerId, long timeStam } else if ((providerId != null && !StringUtils.isNotEmpty(providerId))) { criteria.andProviderIdEqualTo(providerId); } - if (sortOrder == null || !sortOrder.toLowerCase().matches("(asc)|(desc)")) - sortOrder = "asc"; - metadataExample.setOrderByClause(sortBy + " " + sortOrder); + metadataExample.setOrderByClause(getOrderByClause(sortBy, sortOrder)); if (!criteria.isValid()) { - throw new RuntimeException("Atleast one search filter must be specified"); + throw new IllegalArgumentException("Atleast one search filter must be specified"); } else return convert(actionMetadataMapper.selectMany(metadataExample, 0, limit)); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java index b0fcf82bbd..db9dfc6913 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomEventMapper.java @@ -5,7 +5,7 @@ import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.Event; -import org.opensrp.repository.postgres.mapper.EventMapper;; +import org.opensrp.repository.postgres.mapper.EventMapper; public interface CustomEventMapper extends EventMapper { From fcb34f0f2fd5c3b02c302e64270eba489df32d5d Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Wed, 28 Mar 2018 13:09:39 +0300 Subject: [PATCH 079/133] Update all metadata fields, was not updating fields set to null --- .../postgres/ActionRepositoryImpl.java | 5 +++-- .../postgres/AlertsRepositoryImpl.java | 9 ++++---- .../postgres/ClientsRepositoryImpl.java | 21 ++++++++----------- .../postgres/EventsRepositoryImpl.java | 5 +++-- .../postgres/ReportsRepositoryImpl.java | 5 +++-- .../postgres/StocksRepositoryImpl.java | 9 ++++---- 6 files changed, 28 insertions(+), 26 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java index c915e91d21..57cf896eef 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java @@ -88,14 +88,15 @@ public void update(Action entity) { return; } - int rowsAffected = actionMapper.updateByPrimaryKeySelective(pgAction); + int rowsAffected = actionMapper.updateByPrimaryKey(pgAction); if (rowsAffected < 1) { return; } ActionMetadataExample actionMetadataExample = new ActionMetadataExample(); actionMetadataExample.createCriteria().andActionIdEqualTo(id); - actionMetadataMapper.updateByExampleSelective(actionMetadata, actionMetadataExample); + actionMetadata.setId(actionMetadataMapper.selectByExample(actionMetadataExample).get(0).getId()); + actionMetadataMapper.updateByPrimaryKey(actionMetadata); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java index 5e652758f8..1e5be23d92 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java @@ -81,19 +81,20 @@ public void update(Alert entity) { return; } - AlertMetadata actionMetadata = createMetadata(entity, id); - if (actionMetadata == null) { + AlertMetadata alertMetadata = createMetadata(entity, id); + if (alertMetadata == null) { return; } - int rowsAffected = alertMapper.updateByPrimaryKeySelective(pgAlert); + int rowsAffected = alertMapper.updateByPrimaryKey(pgAlert); if (rowsAffected < 1) { return; } AlertMetadataExample alertMetadataExample = new AlertMetadataExample(); alertMetadataExample.createCriteria().andAlertIdEqualTo(id); - alertMetadataMapper.updateByExampleSelective(actionMetadata, alertMetadataExample); + alertMetadata.setId(alertMetadataMapper.selectByExample(alertMetadataExample).get(0).getId()); + alertMetadataMapper.updateByPrimaryKey(alertMetadata); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java index 689abfe230..e718d037b3 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java @@ -24,7 +24,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; -@Repository +@Repository("clientsRepositoryPostgres") public class ClientsRepositoryImpl extends BaseRepositoryImpl implements ClientsRepository { private static Logger logger = LoggerFactory.getLogger(ClientsRepository.class.toString()); @@ -98,14 +98,15 @@ public void update(Client entity) { return; } - int rowsAffected = clientMapper.updateByPrimaryKeySelective(pgClient); + int rowsAffected = clientMapper.updateByPrimaryKey(pgClient); if (rowsAffected < 1) { return; } ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); clientMetadataExample.createCriteria().andClientIdEqualTo(id); - clientMetadataMapper.updateByExampleSelective(clientMetadata, clientMetadataExample); + clientMetadata.setId(clientMetadataMapper.selectByExample(clientMetadataExample).get(0).getId()); + clientMetadataMapper.updateByPrimaryKey(clientMetadata); } @Override @@ -170,10 +171,7 @@ public List findAllByAttribute(String attributeType, String attribute) { @Override public List findAllByMatchingName(String nameMatches) { - ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); - clientMetadataExample.createCriteria().andFirstNameLike(nameMatches); - clientMetadataExample.or(clientMetadataExample.createCriteria().andLastNameLike(nameMatches)); - List clients = clientMetadataMapper.selectMany(clientMetadataExample, 0, + List clients = clientMetadataMapper.selectByName(nameMatches, 0, DEFAULT_FETCH_SIZE); return convert(clients); } @@ -181,7 +179,7 @@ public List findAllByMatchingName(String nameMatches) { @Override public List findByRelationshipIdAndDateCreated(String relationalId, String dateFrom, String dateTo) { List clients = clientMapper.selectByRelationshipIdAndDateCreated(relationalId, - dateFrom, dateTo); + new DateTime(dateFrom).toDate(), new DateTime(dateTo).toDate()); return convert(clients); } @@ -193,13 +191,12 @@ public List findByRelationshipId(String relationshipType, String entityI @Override public List findByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean) { - return convert(clientMetadataMapper.selectBySearchBean(searchBean,addressSearchBean,0,DEFAULT_FETCH_SIZE)); + return convert(clientMetadataMapper.selectBySearchBean(searchBean, addressSearchBean, 0, DEFAULT_FETCH_SIZE)); } @Override public List findByDynamicQuery(String query) { - List clients = clientMapper.selectByDynamicQuery(query); - return convert(clients); + throw new IllegalArgumentException("Method not supported"); } @Override @@ -235,7 +232,7 @@ public List findByEmptyServerVersion() { @Override public List findByServerVersion(long serverVersion) { ClientMetadataExample clientMetadataExample = new ClientMetadataExample(); - clientMetadataExample.createCriteria().andServerVersionEqualTo(serverVersion); + clientMetadataExample.createCriteria().andServerVersionGreaterThanOrEqualTo(serverVersion + 1); clientMetadataExample.setOrderByClause("server_version ASC"); List clients = clientMetadataMapper.selectMany(clientMetadataExample, 0, diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java index 0a4dd3566f..d8a3e0fdd1 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java @@ -91,14 +91,15 @@ public void update(Event entity) { return; } - int rowsAffected = eventMapper.updateByPrimaryKeySelective(pgEvent); + int rowsAffected = eventMapper.updateByPrimaryKey(pgEvent); if (rowsAffected < 1) { return; } EventMetadataExample eventMetadataExample = new EventMetadataExample(); eventMetadataExample.createCriteria().andEventIdEqualTo(id); - eventMetadataMapper.updateByExampleSelective(eventMetadata, eventMetadataExample); + eventMetadata.setId(eventMetadataMapper.selectByExample(eventMetadataExample).get(0).getId()); + eventMetadataMapper.updateByPrimaryKey(eventMetadata); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java index 6d7a0d4031..0f462e69bb 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java @@ -87,14 +87,15 @@ public void update(Report entity) { return; } - int rowsAffected = reportMapper.updateByPrimaryKeySelective(pgReport); + int rowsAffected = reportMapper.updateByPrimaryKey(pgReport); if (rowsAffected < 1) { return; } ReportMetadataExample reportMetadataExample = new ReportMetadataExample(); reportMetadataExample.createCriteria().andReportIdEqualTo(id); - reportMetadataMapper.updateByExampleSelective(reportMetadata, reportMetadataExample); + reportMetadata.setId(reportMetadataMapper.selectByExample(reportMetadataExample).get(0).getId()); + reportMetadataMapper.updateByPrimaryKey(reportMetadata); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java index 845a7dadf9..37f18270f5 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java @@ -81,19 +81,20 @@ public void update(Stock entity) { return; } - StockMetadata reportMetadata = createMetadata(entity, id); - if (reportMetadata == null) { + StockMetadata stockMetadata = createMetadata(entity, id); + if (stockMetadata == null) { return; } - int rowsAffected = stockMapper.updateByPrimaryKeySelective(pgStock); + int rowsAffected = stockMapper.updateByPrimaryKey(pgStock); if (rowsAffected < 1) { return; } StockMetadataExample stockMetadataExample = new StockMetadataExample(); stockMetadataExample.createCriteria().andStockIdEqualTo(id); - stockMetadataMapper.updateByExampleSelective(reportMetadata, stockMetadataExample); + stockMetadata.setId(stockMetadataMapper.selectByExample(stockMetadataExample).get(0).getId()); + stockMetadataMapper.updateByPrimaryKey(stockMetadata); } From 95a57189f064619c60cca26fc11a3f6b3f0308a9 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Wed, 28 Mar 2018 15:04:29 +0300 Subject: [PATCH 080/133] ClientRepository unit test --- .../mapper/custom/CustomClientMapper.java | 5 +- .../custom/CustomClientMetadataMapper.java | 3 + .../mapper/custom/xml/CustomClientMapper.xml | 20 +- .../custom/xml/CustomClientMetadataMapper.xml | 175 +++++---- .../custom/xml/CustomStockMetadataMapper.xml | 63 ++-- .../postgres/ClientsRepositoryTest.java | 356 ++++++++++++++++++ .../test/resources/test-scripts/client.sql | 40 ++ 7 files changed, 531 insertions(+), 131 deletions(-) create mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java create mode 100644 opensrp-core/src/test/resources/test-scripts/client.sql diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMapper.java index 6e378c9386..8723fc59e2 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMapper.java @@ -1,5 +1,6 @@ package org.opensrp.repository.postgres.mapper.custom; +import java.util.Date; import java.util.List; import org.apache.ibatis.annotations.Param; @@ -20,12 +21,10 @@ List selectByIdentifierOfType(@Param("identifierType") String identifier List selectByAttributeOfType(@Param("attributeType") String attributeType, @Param("attribute") String attribute); List selectByRelationshipIdAndDateCreated(@Param("relationalId") String relationalId, - @Param("dateFrom") String dateFrom, @Param("dateTo") String dateTo); + @Param("dateFrom") Date date, @Param("dateTo") Date date2); List selectByRelationshipIdOfType(@Param("relationshipType") String relationshipType, @Param("relationshipId") String relationshipId); List selectByRelationShip(String relationshipId); - - List selectByDynamicQuery(String query); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMetadataMapper.java index 1445b51a4d..4ef3414d5a 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMetadataMapper.java @@ -21,4 +21,7 @@ List selectMany(@Param("example") ClientMetadataExample example, @Param( List selectBySearchBean(@Param("clientBean") ClientSearchBean searchBean, @Param("addressBean") AddressSearchBean addressSearchBean, @Param("offset") int offset, @Param("limit") int limit); + + List selectByName(@Param("name") String nameMatches, @Param("offset") int offset, + @Param("limit") int limit); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMapper.xml index b8f04d4289..2173bdd006 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMapper.xml @@ -67,8 +67,8 @@ from core.client join jsonb_each(json -> 'relationships') j on true - where j.value ? #{relationalId,jdbcType=VARCHAR} - and (json #>> '{dateCreated}')::date between #{dateFrom,jdbcType=VARCHAR} and #{dateTo,jdbcType=VARCHAR} + where j.value ?? #{relationalId,jdbcType=VARCHAR} + and (json ->> 'dateCreated')::date between #{dateFrom,jdbcType=DATE} and #{dateTo,jdbcType=DATE} @@ -77,7 +77,7 @@ select from core.client - where json -> 'relationships'->#{relationshipType,jdbcType=VARCHAR} ? #{relationshipId,jdbcType=VARCHAR} + where json -> 'relationships'->#{relationshipType,jdbcType=VARCHAR} ?? #{relationshipId,jdbcType=VARCHAR} @@ -87,17 +87,7 @@ from core.client join jsonb_each(json -> 'relationships') j on true - where j.value ? #{relationshipId,jdbcType=VARCHAR} + where j.value ?? #{relationshipId,jdbcType=VARCHAR} - - - - - + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml index 6bd78fe430..6149d24059 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml @@ -58,11 +58,21 @@ - order by cm.${orderByClause} + order by cm.${example.orderByClause} LIMIT #{limit} OFFSET #{offset} + + diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMetadataMapper.xml index d2e8327ca1..d8d605217c 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMetadataMapper.xml @@ -51,37 +51,38 @@ select - Where 1=1 - - and sm.provider_id = #{searchBean.providerId,jdbcType=VARCHAR} - - - and sm.server_version >= #{searchBean.serverVersion,jdbcType=BIGINT} - - - and json->>'identifier' = #{searchBean.identifier,jdbcType=VARCHAR} - - - and json->>'vaccine_type_id' = #{searchBean.stockTypeId,jdbcType=VARCHAR} - - - and json->>'transaction_type' = #{searchBean.transactionType,jdbcType=VARCHAR} - - - and json->>'value' = #{searchBean.value,jdbcType=VARCHAR} - - - and json->>'date_created' = #{searchBean.dateCreated,jdbcType=VARCHAR} - - - and json->>'to_from' = #{searchBean.toFrom,jdbcType=VARCHAR} - - - and json->>'date_updated' = #{searchBean.dateUpdated,jdbcType=VARCHAR} - - - order by sm.${orderByClause} - + + + and sm.provider_id = #{searchBean.providerId,jdbcType=VARCHAR} + + + and sm.server_version >= #{searchBean.serverVersion,jdbcType=BIGINT} + + + and json->>'identifier' = #{searchBean.identifier,jdbcType=VARCHAR} + + + and json->>'vaccine_type_id' = #{searchBean.stockTypeId,jdbcType=VARCHAR} + + + and json->>'transaction_type' = #{searchBean.transactionType,jdbcType=VARCHAR} + + + and json->>'value' = #{searchBean.value,jdbcType=VARCHAR} + + + and json->>'date_created' = #{searchBean.dateCreated,jdbcType=VARCHAR} + + + and json->>'to_from' = #{searchBean.toFrom,jdbcType=VARCHAR} + + + and json->>'date_updated' = #{searchBean.dateUpdated,jdbcType=VARCHAR} + + + order by sm.${orderByClause} + + LIMIT #{limit} OFFSET #{offset} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java new file mode 100644 index 0000000000..2648dc0e39 --- /dev/null +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java @@ -0,0 +1,356 @@ +package org.opensrp.repository.postgres; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.opensrp.common.AllConstants.Client.OPENMRS_UUID_IDENTIFIER_TYPE; +import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; + +import java.util.Arrays; +import java.util.Calendar; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.joda.time.DateTime; +import org.junit.Test; +import org.opensrp.domain.Client; +import org.opensrp.repository.ClientsRepository; +import org.opensrp.search.AddressSearchBean; +import org.opensrp.search.ClientSearchBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; + +public class ClientsRepositoryTest extends BaseRepositoryTest { + + @Autowired + @Qualifier("clientsRepositoryPostgres") + private ClientsRepository clientsRepository; + + @Override + protected Set getDatabaseScripts() { + Set scripts = new HashSet(); + scripts.add("client.sql"); + return scripts; + } + + @Test + public void testGet() { + Client client = clientsRepository.get("05934ae338431f28bf6793b2416946b7"); + assertEquals("469597f0-eefe-4171-afef-f7234cbb2859", client.getBaseEntityId()); + assertEquals("eb4b258c-7558-436c-a1fe-e91d9e12f849", client.getIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE)); + assertEquals("January", client.getFirstName().trim()); + assertEquals("Babysix", client.getLastName()); + //missing client + assertNull(clientsRepository.get("05934ae338bf6793b2416946b7")); + } + + @Test + public void testAdd() { + Client client = new Client("f67823b0-378e-4a35-93fc-bb00def74e2f").withBirthdate(new DateTime("2017-03-31"), true) + .withGender("Male").withFirstName("xobili").withLastName("mbangwa"); + client.withIdentifier("ZEIR_ID", "233864-8").withAttribute("Home_Facility", "Linda"); + clientsRepository.add(client); + assertEquals(16, clientsRepository.getAll().size()); + + Client savedClient = clientsRepository.findByBaseEntityId("f67823b0-378e-4a35-93fc-bb00def74e2f"); + assertNotNull(savedClient.getId()); + assertEquals(new DateTime("2017-03-31"), client.getBirthdate()); + assertEquals("xobili", client.getFirstName()); + assertEquals("mbangwa", client.getLastName()); + assertEquals("233864-8", client.getIdentifier("ZEIR_ID")); + + } + + @Test + public void testUpdate() { + Client client = clientsRepository.get("05934ae338431f28bf6793b2416946b7"); + client.setFirstName("Hummel"); + client.setLastName("Basialis"); + client.withIdentifier("ZEIR_ID", "09876-98"); + clientsRepository.update(client); + + Client updatedClient = clientsRepository.get(client.getId()); + assertEquals("Hummel", updatedClient.getFirstName()); + assertEquals("Basialis", updatedClient.getLastName()); + assertEquals("09876-98", client.getIdentifier("ZEIR_ID")); + } + + @Test + public void testGetAll() { + assertEquals(15, clientsRepository.getAll().size()); + } + + @Test + public void testSafeRemove() { + Client client = clientsRepository.get("05934ae338431f28bf6793b2416946b7"); + clientsRepository.safeRemove(client); + assertEquals(14, clientsRepository.getAll().size()); + assertNull(clientsRepository.get("05934ae338431f28bf6793b2416946b7")); + } + + @Test + public void testFindByBaseEntityId() { + Client client = clientsRepository.findByBaseEntityId("86c039a2-0b68-4166-849e-f49897e3a510"); + assertEquals("05934ae338431f28bf6793b24164cbd9", client.getId()); + assertEquals("ab91df5d-e433-40f3-b44f-427b73c9ae2a", client.getIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE)); + assertEquals("Sally", client.getFirstName()); + assertEquals("Mtini", client.getLastName().trim()); + + assertNull(clientsRepository.findByBaseEntityId("f67823b0-378e-4a35-93fc-bb00def74e2f")); + } + + @Test + public void testFindAllClients() { + assertEquals(15, clientsRepository.getAll().size()); + } + + @Test + public void testFindAllByIdentifier() { + List clients = clientsRepository.findAllByIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, + "ab91df5d-e433-40f3-b44f-427b73c9ae2a"); + + assertEquals(1, clients.size()); + assertEquals("05934ae338431f28bf6793b24164cbd9", clients.get(0).getId()); + assertEquals("Sally", clients.get(0).getFirstName()); + assertEquals("Mtini", clients.get(0).getLastName().trim()); + + assertTrue(clientsRepository.findAllByIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "ab91df5d-e433-40f3-b44f-427b73ca") + .isEmpty()); + } + + @Test + public void testAllByAttribute() { + List clients = clientsRepository.findAllByAttribute("Home_Facility", "Happy Kids Clinic"); + + assertEquals(9, clients.size()); + + clients = clientsRepository.findAllByAttribute("CHW_Phone_Number", "0964357951"); + assertEquals(1, clients.size()); + assertEquals("05934ae338431f28bf6793b24164cbd9", clients.get(0).getId()); + assertEquals("Sally", clients.get(0).getFirstName()); + assertEquals("Mtini", clients.get(0).getLastName().trim()); + + assertTrue(clientsRepository.findAllByAttribute("CHW_Phone_Number", "+0964357951").isEmpty()); + } + + @Test + public void testFindAllByMatchingName() { + assertEquals(5, clientsRepository.findAllByMatchingName("b").size()); + + assertEquals(1, clientsRepository.findAllByMatchingName("babytwo").size()); + + assertEquals(6, clientsRepository.findAllByMatchingName("a").size()); + + assertEquals(5, clientsRepository.findAllByMatchingName("Ja").size()); + + assertEquals(4, clientsRepository.findAllByMatchingName("Janu").size()); + + assertEquals(2, clientsRepository.findAllByMatchingName("January").size()); + + assertTrue(clientsRepository.findAllByMatchingName("Kimbley").isEmpty()); + } + + @Test + public void testFindByRelationshipIdAndDateCreated() { + assertEquals(2, clientsRepository.findByRelationshipIdAndDateCreated("0154839f-8766-4eda-b729-89067c7a8c5d", + new DateTime("2018-03-13").toString(), new DateTime().toString()).size()); + + assertTrue(clientsRepository.findByRelationshipIdAndDateCreated("0154839f-8766-4eda-89067c7a8c5d", + new DateTime("2018-03-14").toString(), new DateTime().toString()).isEmpty()); + + assertTrue(clientsRepository.findByRelationshipIdAndDateCreated("0154839f-8766-4eda-b729-89067c7a8c5d", + new DateTime("2018-03-14").toString(), new DateTime().toString()).isEmpty()); + + Client client = clientsRepository.findByRelationshipIdAndDateCreated("3abdb25a-f151-4a95-9311-bd30bf935085", + new DateTime("2018-03-13").toString(), new DateTime().toString()).get(0); + assertEquals("05934ae338431f28bf6793b2415a0374", client.getId()); + assertEquals("94f3e8fb-2f05-4fca-8119-2b593d1962eb", client.getBaseEntityId()); + assertEquals("2018-03-01", client.getBirthdate().toLocalDate().toString()); + } + + @Test + public void testFindByRelationshipId() { + assertEquals(2, clientsRepository.findByRelationshipId("mother", "0154839f-8766-4eda-b729-89067c7a8c5d").size()); + + Client client = clientsRepository.findByRelationshipId("mother", "3abdb25a-f151-4a95-9311-bd30bf935085").get(0); + assertEquals("05934ae338431f28bf6793b2415a0374", client.getId()); + assertEquals("94f3e8fb-2f05-4fca-8119-2b593d1962eb", client.getBaseEntityId()); + assertEquals("cf58894b-71c6-41e0-a977-7283f2411cd5", client.getIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE)); + assertEquals("2018-03-01", client.getBirthdate().toLocalDate().toString()); + + assertTrue(clientsRepository.findByRelationshipId("father", "0154839f-8766-4eda-b729-89067c7a8c5d").isEmpty()); + + assertTrue(clientsRepository.findByRelationshipId("mother", "0154839f-4eda-b729-89067c7a8c5d").isEmpty()); + } + + public void testFindByCriteria() { + ClientSearchBean searchBean = new ClientSearchBean(); + AddressSearchBean addressSearchBean = new AddressSearchBean(); + assertEquals(15, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); + + searchBean.setNameLike("Janu"); + assertEquals(4, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); + + searchBean.setNameLike("Baby"); + searchBean.setGender("Male"); + assertEquals(3, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); + + searchBean.setBirthdateFrom(new DateTime()); + searchBean.setBirthdateTo(new DateTime()); + assertEquals(0, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); + + searchBean.setDeathdateFrom(new DateTime("2000-01-01")); + searchBean.setDeathdateTo(new DateTime()); + assertEquals(0, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); + + searchBean = new ClientSearchBean(); + searchBean.setAttributeType("Home_Facility"); + searchBean.setAttributeValue("Happy Kids Clinic"); + assertEquals(9, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); + + searchBean.setAttributeType("CHW_Name"); + searchBean.setAttributeValue("Hellen"); + List clients = clientsRepository.findByCriteria(searchBean, addressSearchBean); + assertEquals(1, clients.size()); + assertEquals("05934ae338431f28bf6793b2415a0374", clients.get(0).getId()); + + searchBean = new ClientSearchBean(); + searchBean.setLastEditFrom(new DateTime("2018-03-13T12:57:05.652+03:00")); + searchBean.setLastEditTo(new DateTime()); + assertEquals(6, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); + + addressSearchBean.setAddressType("usual_residence"); + assertEquals(6, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); + + addressSearchBean.setAddressType("usual_residence"); + assertEquals(6, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); + + } + + public void testFindByCriteriaWithoutAddressBean() { + ClientSearchBean searchBean = new ClientSearchBean(); + assertEquals(15, clientsRepository.findByCriteria(searchBean).size()); + + searchBean.setNameLike("Janu"); + assertEquals(4, clientsRepository.findByCriteria(searchBean).size()); + + searchBean.setNameLike("Baby"); + searchBean.setGender("Male"); + assertEquals(3, clientsRepository.findByCriteria(searchBean).size()); + + searchBean.setBirthdateFrom(new DateTime()); + searchBean.setBirthdateTo(new DateTime()); + assertEquals(0, clientsRepository.findByCriteria(searchBean).size()); + + searchBean.setDeathdateFrom(new DateTime("2000-01-01")); + searchBean.setDeathdateTo(new DateTime()); + assertEquals(0, clientsRepository.findByCriteria(searchBean).size()); + + searchBean = new ClientSearchBean(); + searchBean.setAttributeType("Home_Facility"); + searchBean.setAttributeValue("Happy Kids Clinic"); + assertEquals(9, clientsRepository.findByCriteria(searchBean).size()); + + searchBean.setAttributeType("CHW_Name"); + searchBean.setAttributeValue("Hellen"); + List clients = clientsRepository.findByCriteria(searchBean); + assertEquals(1, clients.size()); + assertEquals("05934ae338431f28bf6793b2415a0374", clients.get(0).getId()); + + searchBean = new ClientSearchBean(); + searchBean.setLastEditFrom(new DateTime("2018-03-13T12:57:05.652+03:00")); + searchBean.setLastEditTo(new DateTime()); + assertEquals(6, clientsRepository.findByCriteria(searchBean).size()); + + } + + public void testFindByCriteriaWithEditDateParams() { + assertEquals(6, + clientsRepository + .findByCriteria(new AddressSearchBean(), new DateTime("2018-03-13T12:57:05.652+03:00"), new DateTime()) + .size()); + + assertEquals(15, + clientsRepository.findByCriteria(new AddressSearchBean(), new DateTime("2018-01-01"), new DateTime()).size()); + AddressSearchBean addressSearchBean = new AddressSearchBean(); + addressSearchBean.setCityVillage("hui"); + assertEquals(0, + clientsRepository.findByCriteria(addressSearchBean, new DateTime("2018-01-01"), new DateTime()).size()); + } + + @Test + public void testFindByRelationShip() { + assertEquals(2, clientsRepository.findByRelationShip("0154839f-8766-4eda-b729-89067c7a8c5d").size()); + + Client client = clientsRepository.findByRelationShip("3abdb25a-f151-4a95-9311-bd30bf935085").get(0); + assertEquals("05934ae338431f28bf6793b2415a0374", client.getId()); + assertEquals("94f3e8fb-2f05-4fca-8119-2b593d1962eb", client.getBaseEntityId()); + assertEquals("Fith", client.getFirstName()); + assertEquals("2018-03-01", client.getBirthdate().toLocalDate().toString()); + + assertTrue(clientsRepository.findByRelationShip("0154839f-4eda-b729-89067c7a8c5d").isEmpty()); + } + + @Test + public void testFindByEmptyServerVersion() { + assertTrue(clientsRepository.findByEmptyServerVersion().isEmpty()); + + Client client = clientsRepository.get("05934ae338431f28bf6793b2415a0374"); + client.setServerVersion(null); + clientsRepository.update(client); + + client = clientsRepository.findByEmptyServerVersion().get(0); + assertEquals("94f3e8fb-2f05-4fca-8119-2b593d1962eb", client.getBaseEntityId()); + assertEquals("Fith", client.getFirstName()); + assertEquals("2018-03-01", client.getBirthdate().toLocalDate().toString()); + assertEquals("218224-4", client.getIdentifier("ZEIR_ID")); + + } + + @Test + public void testFindByServerVersion() { + assertEquals(5, clientsRepository.findByServerVersion(1520935878136l).size()); + + assertEquals(2, clientsRepository.findByServerVersion(1521003136406l).size()); + } + + @Test + public void testFindByFieldValue() { + assertEquals(3, + clientsRepository + .findByFieldValue(BASE_ENTITY_ID, Arrays.asList(new String[] { "86c039a2-0b68-4166-849e-f49897e3a510", + "f33c71c7-a9a4-495d-8028-b6d59e4034b3", "fe7b6350-16d2-41d0-8574-c194088705df" })) + .size()); + + assertTrue(clientsRepository.findByFieldValue("Firstname", Arrays.asList(new String[] { "Baby", "Jan" })).isEmpty()); + + assertTrue( + clientsRepository.findByFieldValue(BASE_ENTITY_ID, Arrays.asList(new String[] { "Baby", "Jan" })).isEmpty()); + + Client client = clientsRepository + .findByFieldValue(BASE_ENTITY_ID, Arrays.asList(new String[] { "f33c71c7-a9a4-495d-8028-b6d59e4034b3" })) + .get(0); + + assertEquals("05934ae338431f28bf6793b241679500", client.getId()); + assertEquals("Jan", client.getFirstName()); + assertEquals("2018-01-01", client.getBirthdate().toLocalDate().toString()); + assertEquals("218226-9", client.getIdentifier("ZEIR_ID")); + } + + @Test + public void testNotInOpenMRSByServerVersion() { + assertTrue(clientsRepository.notInOpenMRSByServerVersion(0l, Calendar.getInstance()).isEmpty()); + + Client client = clientsRepository.get("05934ae338431f28bf6793b2415a0374"); + client.removeIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE); + clientsRepository.update(client); + + client = clientsRepository.notInOpenMRSByServerVersion(0l, Calendar.getInstance()).get(0); + assertEquals("94f3e8fb-2f05-4fca-8119-2b593d1962eb", client.getBaseEntityId()); + assertEquals("Fith", client.getFirstName()); + assertEquals("2018-03-01", client.getBirthdate().toLocalDate().toString()); + assertEquals("218224-4", client.getIdentifier("ZEIR_ID")); + } +} diff --git a/opensrp-core/src/test/resources/test-scripts/client.sql b/opensrp-core/src/test/resources/test-scripts/client.sql new file mode 100644 index 0000000000..807939e1aa --- /dev/null +++ b/opensrp-core/src/test/resources/test-scripts/client.sql @@ -0,0 +1,40 @@ +--clear data +TRUNCATE TABLE core.client CASCADE; + +ALTER SEQUENCE core.client_id_seq RESTART WITH 16; + +ALTER SEQUENCE core.client_metadata_id_seq RESTART WITH 16; + +INSERT INTO core.client (id, json) VALUES +(1, '{"id": "05934ae338431f28bf6793b24159ce5d", "type": "Client", "gender": "Male", "lastName": "Child", "revision": "2-0b2b71f8189f101a5c4c69e44d4886f5", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Dre0", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000+03:00", "firstName": "Second", "attributes": {}, "dateEdited": "2018-03-13T00:52:58.942+03:00", "dateCreated": "2018-03-13T00:48:59.829+03:00", "identifiers": {"ZEIR_ID": "218221-0", "OPENMRS_UUID": "8796f967-2f7a-40f7-8586-d63dbc81b709"}, "baseEntityId": "287be17c-30a7-4482-8816-e2382ec502f1", "relationships": {"mother": ["22b8570a-3207-4af7-8da7-8a1c5b84d3ff"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(2, '{"id": "05934ae338431f28bf6793b24159dea7", "type": "Client", "gender": "Male", "lastName": " Child", "revision": "2-6ccd1e9150e9055193267acc3fd311e8", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rwre", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000+03:00", "firstName": "Third", "attributes": {}, "dateEdited": "2018-03-13T00:52:59.675+03:00", "dateCreated": "2018-03-13T00:52:01.121+03:00", "identifiers": {"ZEIR_ID": "218222-8", "OPENMRS_UUID": "99621619-688a-4f0f-b93e-68ab1b8cf49e"}, "baseEntityId": "9289b401-fbc6-4231-a59c-127dac40df74", "relationships": {"mother": ["0154839f-8766-4eda-b729-89067c7a8c5d"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(3, '{"id": "05934ae338431f28bf6793b24159ebc2", "type": "Client", "gender": "Female", "lastName": "Child", "revision": "2-0ea77a08483ea9a0c5849cb4fd3da368", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gjg", "address3": "c19431f1-566c-44ac-ad9e-dfd33eac8daa"}}], "birthdate": "2018-03-01T03:00:00.000+03:00", "firstName": "Fourth", "attributes": {}, "dateEdited": "2018-03-13T00:58:00.873+03:00", "dateCreated": "2018-03-13T00:54:42.889+03:00", "identifiers": {"ZEIR_ID": "218223-6", "OPENMRS_UUID": "07880fcb-0061-43b0-8ae8-6b52372b1a6b"}, "baseEntityId": "219655bb-a733-4d7a-8b1f-ecc5ff3af6cc", "relationships": {"mother": ["0154839f-8766-4eda-b729-89067c7a8c5d"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(4, '{"id": "05934ae338431f28bf6793b2415a0374", "type": "Client", "gender": "Female", "lastName": "Child", "revision": "2-5ec561cece5508f14bb0381b59e40baa", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Er", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000+03:00", "firstName": "Fith", "attributes": {}, "dateEdited": "2018-03-13T02:23:03.971+03:00", "dateCreated": "2018-03-13T02:20:08.984+03:00", "identifiers": {"ZEIR_ID": "218224-4", "OPENMRS_UUID": "cf58894b-71c6-41e0-a977-7283f2411cd5"}, "baseEntityId": "94f3e8fb-2f05-4fca-8119-2b593d1962eb", "relationships": {"mother": ["3abdb25a-f151-4a95-9311-bd30bf935085"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(5, '{"id": "05934ae338431f28bf6793b24159c647", "type": "Client", "gender": "Male", "lastName": "Child", "revision": "2-3867cacbf2a4b3736524552816381927", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rewe", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000+03:00", "firstName": "First", "attributes": {}, "dateEdited": "2018-03-13T00:47:57.879+03:00", "dateCreated": "2018-03-13T00:42:58.436+03:00", "identifiers": {"ZEIR_ID": "218220-2", "OPENMRS_UUID": "9c4260f2-d296-4af1-b771-debda1b6cfd1"}, "baseEntityId": "33d9a17f-d729-4276-9891-b43e8b60fd12", "relationships": {"mother": ["d0ecee83-6ccd-4096-9188-f63a40fa2f63"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(6, '{"id": "05934ae338431f28bf6793b24164cbd9", "type": "Client", "gender": "Female", "lastName": "Mtini ", "revision": "2-70add9f425fe26094fe4542bdf9a9acf", "addresses": [{"addressType": "usual_residence", "addressFields": {"address1": "Church", "address2": "Tulia Gardens ", "address3": "f940e2a3-b553-496a-80b3-091891bb5194"}}], "birthdate": "2016-04-13T03:00:00.000+03:00", "firstName": "Sally", "attributes": {"CHW_Name": "Hellen", "Home_Facility": "Happy Kids Clinic", "CHW_Phone_Number": "0964357951", "Father_NRC_Number": "721345/67/8"}, "dateEdited": "2018-03-13T12:26:53.223+03:00", "dateCreated": "2018-03-13T12:26:43.857+03:00", "identifiers": {"ZEIR_ID": "218923-1", "OPENMRS_UUID": "ab91df5d-e433-40f3-b44f-427b73c9ae2a"}, "baseEntityId": "86c039a2-0b68-4166-849e-f49897e3a510", "relationships": {"mother": ["758dab58-7629-4da9-882f-ae5110bcd240"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(7, '{"id": "05934ae338431f28bf6793b241692648", "type": "Client", "gender": "Female", "lastName": "Babbyfour", "revision": "2-2fa38eef6330ee8753e1ea18a94512aa", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gcfd", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000+03:00", "firstName": "Januar", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:09.837+03:00", "dateCreated": "2018-03-13T13:11:18.453+03:00", "identifiers": {"ZEIR_ID": "218229-3", "OPENMRS_UUID": "825b4d23-a3ea-4c58-a95b-d0df2f9c1690"}, "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "relationships": {"mother": ["9ac3fac4-a74c-45d5-bedb-da357cec3779"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(8, '{"id": "05934ae338431f28bf6793b241693a2f", "type": "Client", "gender": "Female", "lastName": "Babyfive", "revision": "2-8a753553c0e0ae4ed0257bb6d686d2ea", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Home", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000+03:00", "firstName": "January", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:11.027+03:00", "dateCreated": "2018-03-13T13:11:18.725+03:00", "identifiers": {"ZEIR_ID": "218230-1", "OPENMRS_UUID": "11a1ecf6-7d6d-4e12-8e6f-bb3cf5a3ebb8"}, "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "relationships": {"mother": ["41d1841b-4d6c-4f06-b5e8-b55907892ee6"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(9, '{"id": "05934ae338431f28bf6793b2416946b7", "type": "Client", "gender": "Female", "lastName": "Babysix", "revision": "2-0684ed7a15c29c8bf479a36d8c5986c5", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gu", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000+03:00", "firstName": "January ", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:12.257+03:00", "dateCreated": "2018-03-13T13:11:19.005+03:00", "identifiers": {"ZEIR_ID": "218231-9", "OPENMRS_UUID": "eb4b258c-7558-436c-a1fe-e91d9e12f849"}, "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "relationships": {"mother": ["7bce6b9a-e575-4cc6-b987-a12284912e84"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(10, '{"id": "05934ae338431f28bf6793b24167817d", "type": "Client", "gender": "Male", "lastName": "Child", "revision": "2-9de838d2e671a8d5011cedf66143b023", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Guy", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000+03:00", "firstName": "Sixth", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:03.225+03:00", "dateCreated": "2018-03-13T12:53:04.188+03:00", "identifiers": {"ZEIR_ID": "218225-1", "OPENMRS_UUID": "43397e39-0a11-4bb7-ba2d-3820436bef85"}, "baseEntityId": "28caef27-d1b3-497b-8a55-954f2f0f6e24", "relationships": {"mother": ["ab1eda08-2185-4d5f-9301-abb17d376ded"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(11, '{"id": "05934ae338431f28bf6793b241679500", "type": "Client", "gender": "Male", "lastName": "Baby", "revision": "2-f7de9e0a0e63129a1e4a3016539a2194", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rer", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000+03:00", "firstName": "Jan", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:04.417+03:00", "dateCreated": "2018-03-13T12:53:04.453+03:00", "identifiers": {"ZEIR_ID": "218226-9", "OPENMRS_UUID": "7a8926a9-f35a-41ba-adbf-87712333d5c2"}, "baseEntityId": "f33c71c7-a9a4-495d-8028-b6d59e4034b3", "relationships": {"mother": ["7289296d-9ec9-450e-9389-88b5b0d329a0"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(12, '{"id": "05934ae338431f28bf6793b24167b6d1", "type": "Client", "gender": "Male", "lastName": "Babytwo", "revision": "2-ce3c6a238b86298059c0dd792f0c0dcc", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Ty", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000+03:00", "firstName": "Janu", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:05.652+03:00", "dateCreated": "2018-03-13T12:54:42.456+03:00", "identifiers": {"ZEIR_ID": "218227-7", "OPENMRS_UUID": "ba5d3927-414f-4796-ae1e-9b73b50a5573"}, "baseEntityId": "fe7b6350-16d2-41d0-8574-c194088705df", "relationships": {"mother": ["14715b97-f0d5-4515-813b-5698934dbf1d"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(13, '{"id": "05934ae338431f28bf6793b24162ca7e", "type": "Client", "gender": "Male", "lastName": "Owino", "revision": "2-5d274d303daa8ff1cd5eb5604b8e60f7", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Kilimani", "address3": "6c814e69-ed6f-4fcc-ac2c-8406508603f2"}}], "birthdate": "2017-02-13T03:00:00.000+03:00", "firstName": "George", "attributes": {"Home_Facility": "Happy Kids Clinic", "Child_Birth_Certificate": "7865", "Child_Register_Card_Number": "4567"}, "dateEdited": "2018-03-13T11:46:46.277+03:00", "dateCreated": "2018-03-13T11:42:01.573+03:00", "identifiers": {"ZEIR_ID": "218922-3", "OPENMRS_UUID": "c5780597-3d54-4298-b39f-9d38dfd14970"}, "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "relationships": {"mother": ["14f94928-ef60-4d1c-a6be-f46b3b844268"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(14, '{"id": "05934ae338431f28bf6793b2418380ce", "type": "Client", "gender": "Female", "lastName": "Gchf", "revision": "2-2d194250dc94b0ed20fbb2dac28a9020", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Chf", "address3": "144cea61-2322-4a2c-8963-d99b52aa1406"}}], "birthdate": "1960-01-01T03:00:00.000+03:00", "firstName": "Gg", "attributes": {}, "dateEdited": "2018-03-14T07:53:06.606+03:00", "dateCreated": "2018-03-14T07:52:16.620+03:00", "identifiers": {"M_ZEIR_ID": "218232-7_mother", "OPENMRS_UUID": "2ca99239-ba6e-42d6-92a5-a889d2de50c0"}, "baseEntityId": "cc127350-c1cd-4c3a-99d4-4d632882f522", "birthdateApprox": false, "deathdateApprox": false}'), +(15, '{"id": "05934ae338431f28bf6793b241839005", "type": "Client", "gender": "Female", "lastName": "Immunisedtwo", "revision": "2-db28bfef08ea6a88fc4d387bbb83b369", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Home", "address3": "144cea61-2322-4a2c-8963-d99b52aa1406"}}], "birthdate": "2017-06-13T03:00:00.000+03:00", "firstName": "Fully", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-14T07:53:07.496+03:00", "dateCreated": "2018-03-14T07:52:16.757+03:00", "identifiers": {"ZEIR_ID": "218233-5", "OPENMRS_UUID": "02d89e05-64ad-4fa3-86d9-93b669ec02c5"}, "baseEntityId": "d4eda055-60c6-44a4-ba48-61dfe6485bea", "relationships": {"mother": ["17a1f5ed-a4cd-4427-ad9f-6471f4fc963d"]}, "birthdateApprox": false, "deathdateApprox": false}'); + +INSERT INTO core.client_metadata (id, client_id, document_id, base_entity_id, relational_id, server_version, openmrs_uuid, unique_id, first_name, middle_name, last_name, birth_date) VALUES +(1, 1, '05934ae338431f28bf6793b24159ce5d', '287be17c-30a7-4482-8816-e2382ec502f1', '22b8570a-3207-4af7-8da7-8a1c5b84d3ff', 1520891339766, '8796f967-2f7a-40f7-8586-d63dbc81b709', '218221-0', 'Second', null, 'Child', '2018-03-01'), +(2, 2, '05934ae338431f28bf6793b24159dea7', '9289b401-fbc6-4231-a59c-127dac40df74', '0154839f-8766-4eda-b729-89067c7a8c5d', 1520891521078, '99621619-688a-4f0f-b93e-68ab1b8cf49e', '218222-8', 'Third', null, ' Child', '2018-03-01'), +(3, 3, '05934ae338431f28bf6793b24159ebc2', '219655bb-a733-4d7a-8b1f-ecc5ff3af6cc', '0154839f-8766-4eda-b729-89067c7a8c5d', 1520891682846, '07880fcb-0061-43b0-8ae8-6b52372b1a6b', '218223-6', 'Fourth', null, 'Child', '2018-03-01'), +(4, 4, '05934ae338431f28bf6793b2415a0374', '94f3e8fb-2f05-4fca-8119-2b593d1962eb', '3abdb25a-f151-4a95-9311-bd30bf935085', 1520896808942, 'cf58894b-71c6-41e0-a977-7283f2411cd5', '218224-4', 'Fith', null, 'Child', '2018-03-01'), +(5, 5, '05934ae338431f28bf6793b24159c647', '33d9a17f-d729-4276-9891-b43e8b60fd12', 'd0ecee83-6ccd-4096-9188-f63a40fa2f63', 1520890978382, '9c4260f2-d296-4af1-b771-debda1b6cfd1', '218220-2', 'First', null, 'Child', '2018-03-01'), +(6, 6, '05934ae338431f28bf6793b24164cbd9', '86c039a2-0b68-4166-849e-f49897e3a510', '758dab58-7629-4da9-882f-ae5110bcd240', 1520933203799, 'ab91df5d-e433-40f3-b44f-427b73c9ae2a', '218923-1', 'Sally', null, 'Mtini ', '2016-04-13'), +(7, 7, '05934ae338431f28bf6793b241692648', '4a2a4ad9-cd29-47cb-bdb9-5b617a73b898', '9ac3fac4-a74c-45d5-bedb-da357cec3779', 1520935878137, '825b4d23-a3ea-4c58-a95b-d0df2f9c1690', '218229-3', 'Januar', null, 'Babbyfour', '2018-01-01'), +(8, 8, '05934ae338431f28bf6793b241693a2f', 'aabcd2cc-c111-41c6-85e6-cb5d9e350d08', '41d1841b-4d6c-4f06-b5e8-b55907892ee6', 1520935878137, '11a1ecf6-7d6d-4e12-8e6f-bb3cf5a3ebb8', '218230-1', 'January', null, 'Babyfive', '2018-01-01'), +(9, 9, '05934ae338431f28bf6793b2416946b7', '469597f0-eefe-4171-afef-f7234cbb2859', '7bce6b9a-e575-4cc6-b987-a12284912e84', 1520935878137, 'eb4b258c-7558-436c-a1fe-e91d9e12f849', '218231-9', 'January ', null, 'Babysix', '2018-01-01'), +(10, 10, '05934ae338431f28bf6793b24167817d', '28caef27-d1b3-497b-8a55-954f2f0f6e24', 'ab1eda08-2185-4d5f-9301-abb17d376ded', 1520934784144, '43397e39-0a11-4bb7-ba2d-3820436bef85', '218225-1', 'Sixth', null, 'Child', '2018-03-01'), +(11, 11, '05934ae338431f28bf6793b241679500', 'f33c71c7-a9a4-495d-8028-b6d59e4034b3', '7289296d-9ec9-450e-9389-88b5b0d329a0', 1520934784145, '7a8926a9-f35a-41ba-adbf-87712333d5c2', '218226-9', 'Jan', null, 'Baby', '2018-01-01'), +(12, 12, '05934ae338431f28bf6793b24167b6d1', 'fe7b6350-16d2-41d0-8574-c194088705df', '14715b97-f0d5-4515-813b-5698934dbf1d', 1520934882395, 'ba5d3927-414f-4796-ae1e-9b73b50a5573', '218227-7', 'Janu', null, 'Babytwo', '2018-01-01'), +(13, 13, '05934ae338431f28bf6793b24162ca7e', '67007c17-97bb-4732-a1b8-3a0c292b5432', '14f94928-ef60-4d1c-a6be-f46b3b844268', 1520930521516, 'c5780597-3d54-4298-b39f-9d38dfd14970', '218922-3', 'George', null, 'Owino', '2017-02-13'), +(14, 14, '05934ae338431f28bf6793b2418380ce', 'cc127350-c1cd-4c3a-99d4-4d632882f522', null, 1521003136407, '2ca99239-ba6e-42d6-92a5-a889d2de50c0', '218232-7_mother', 'Gg', null, 'Gchf', '1960-01-01'), +(15, 15, '05934ae338431f28bf6793b241839005', 'd4eda055-60c6-44a4-ba48-61dfe6485bea', '17a1f5ed-a4cd-4427-ad9f-6471f4fc963d', 1521003136407, '02d89e05-64ad-4fa3-86d9-93b669ec02c5', '218233-5', 'Fully', null, 'Immunisedtwo', '2017-06-13'); \ No newline at end of file From 8240e2eb0535f16482b75f29331a32d61da236cd Mon Sep 17 00:00:00 2001 From: "Ephraim (Keyman) Muhia" Date: Thu, 29 Mar 2018 10:51:22 +0300 Subject: [PATCH 081/133] Merge pull request #421 from OpenSRP/issue400 Implement Postgres Repositories --- .../opensrp/repository/couch/AllEvents.java | 1 + .../lucene/LuceneClientRepository.java | 3 +- .../lucene/LuceneEventRepository.java | 2 +- .../postgres/ActionRepositoryImpl.java | 6 + .../postgres/EventsRepositoryImpl.java | 7 + .../mapper/custom/CustomClientMapper.java | 3 +- .../custom/xml/CustomClientMetadataMapper.xml | 2 + .../custom/xml/CustomStockMetadataMapper.xml | 2 + .../org/opensrp/service/EventService.java | 7 +- .../lucene/it/LuceneClientRepositoryTest.java | 21 ++- .../lucene/it/LuceneEventRepositoryTest.java | 127 ++++++++++-------- .../opensrp/service/it/EventServiceTest.java | 10 +- .../org/opensrp/web/rest/ClientResource.java | 3 +- .../org/opensrp/web/rest/EventResource.java | 2 + 14 files changed, 114 insertions(+), 82 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java index caaa5a3450..8537db2bd4 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/couch/AllEvents.java @@ -11,6 +11,7 @@ import org.ektorp.support.View; import org.ektorp.util.Assert; import org.ektorp.util.Documents; +import org.joda.time.DateTime; import org.motechproject.dao.MotechBaseRepository; import org.opensrp.common.AllConstants; import org.opensrp.domain.Event; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java index 491b12a3c3..846ba5614d 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneClientRepository.java @@ -31,6 +31,7 @@ import com.github.ldriscoll.ektorplucene.LuceneResult; import com.github.ldriscoll.ektorplucene.designdocument.annotation.FullText; import com.github.ldriscoll.ektorplucene.designdocument.annotation.Index; + import com.mysql.jdbc.StringUtils; @FullText({ @@ -63,7 +64,7 @@ public List getByCriteria(AddressSearchBean addressSearchBean, DateTime return getByCriteria(clientSearchBean, addressSearchBean, motherIdentifier); } - public List getByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean, + public List getByCriteria(ClientSearchBean searchBean, AddressSearchBean addressSearchBean, String motherIdentifier) { // create a simple query against the view/search function that we've created LuceneQuery query = new LuceneQuery("Client", "by_all_criteria"); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneEventRepository.java b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneEventRepository.java index c7a6efc531..bd149e9491 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneEventRepository.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/lucene/LuceneEventRepository.java @@ -135,7 +135,7 @@ public List getByCriteria(EventSearchBean eventSearchBean, String sortBy, List providers = new ArrayList<>(Arrays.asList(providerArray)); qf.inList(PROVIDER_ID, providers); } else { - qf.eq(PROVIDER_ID, eventSearchBean.getProviderId()); + qf.eq(PROVIDER_ID, eventSearchBean.getProviderId()); } } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java index 57cf896eef..f64044d3b1 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java @@ -236,6 +236,12 @@ public List findByCriteria(String team, String providerId, long timeStam return convert(actionMetadataMapper.selectMany(metadataExample, 0, limit)); } + @Override + public List findAllActionNotExpired() { + // TODO Auto-generated method stub + return null; + } + //private methods private Action convert(org.opensrp.domain.postgres.Action action) { if (action == null || action.getJson() == null || !(action.getJson() instanceof Action)) { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java index d8a3e0fdd1..978020075e 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java @@ -98,6 +98,7 @@ public void update(Event entity) { EventMetadataExample eventMetadataExample = new EventMetadataExample(); eventMetadataExample.createCriteria().andEventIdEqualTo(id); + eventMetadata.setId(eventMetadataMapper.selectByExample(eventMetadataExample).get(0).getId()); eventMetadataMapper.updateByPrimaryKey(eventMetadata); @@ -383,6 +384,12 @@ protected Object getUniqueField(Event t) { return t.getId(); } + @Override + public List findByProvider(String provider) { + // TODO Auto-generated method stub + return null; + } + // Private Methods private Event convert(org.opensrp.domain.postgres.Event event) { if (event == null || event.getJson() == null || !(event.getJson() instanceof Event)) { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMapper.java index 8723fc59e2..b2eccfabf7 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMapper.java @@ -7,7 +7,7 @@ import org.opensrp.domain.postgres.Client; import org.opensrp.repository.postgres.mapper.ClientMapper; -public interface CustomClientMapper extends ClientMapper{ +public interface CustomClientMapper extends ClientMapper { int insertSelectiveAndSetId(Client record); @@ -27,4 +27,5 @@ List selectByRelationshipIdOfType(@Param("relationshipType") String rela @Param("relationshipId") String relationshipId); List selectByRelationShip(String relationshipId); + } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml index 6149d24059..cf4e613b6f 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml @@ -98,6 +98,7 @@ join jsonb_array_elements(json->'addresses') as address on true + @@ -180,6 +181,7 @@ + LIMIT #{limit} OFFSET #{offset} diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMetadataMapper.xml index d8d605217c..f596145185 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMetadataMapper.xml @@ -51,6 +51,7 @@ select + and sm.provider_id = #{searchBean.providerId,jdbcType=VARCHAR} @@ -83,6 +84,7 @@ order by sm.${orderByClause} + LIMIT #{limit} OFFSET #{offset} diff --git a/opensrp-core/src/main/java/org/opensrp/service/EventService.java b/opensrp-core/src/main/java/org/opensrp/service/EventService.java index 4547fad4de..c59ecfcab7 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/EventService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/EventService.java @@ -1,7 +1,5 @@ package org.opensrp.service; - - import java.lang.reflect.Field; import java.util.Arrays; import java.util.Calendar; @@ -234,8 +232,8 @@ public Event mergeEvent(Event updatedEvent) { } else { original.getObs(null, o.getFieldCode()).setComments(o.getComments()); original.getObs(null, o.getFieldCode()).setEffectiveDatetime(o.getEffectiveDatetime()); - original.getObs(null, o.getFieldCode()).setValue( - o.getValues().size() < 2 ? o.getValue() : o.getValues()); + original.getObs(null, o.getFieldCode()) + .setValue(o.getValues().size() < 2 ? o.getValue() : o.getValues()); } } for (String k : updatedEvent.getIdentifiers().keySet()) { @@ -259,7 +257,6 @@ public List findByServerVersion(long serverVersion) { return allEvents.findByServerVersion(serverVersion); } - public List notInOpenMRSByServerVersion(long serverVersion, Calendar calendar) { return allEvents.notInOpenMRSByServerVersion(serverVersion, calendar); } diff --git a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java index 0516b3a1e3..d4d15680e4 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java @@ -6,7 +6,6 @@ import static org.opensrp.common.AllConstants.BaseEntity.BASE_ENTITY_ID; import static org.opensrp.common.AllConstants.BaseEntity.MOTHERS_INDENTIFIER; import static org.opensrp.util.SampleFullDomainObject.ATTRIBUTES_TYPE; -import static org.opensrp.util.SampleFullDomainObject.ATTRIBUTES_VALUE; import static org.opensrp.util.SampleFullDomainObject.DIFFERENT_BASE_ENTITY_ID; import static org.opensrp.util.SampleFullDomainObject.EPOCH_DATE_TIME; import static org.opensrp.util.SampleFullDomainObject.FEMALE; @@ -153,8 +152,7 @@ public void shouldNotFindWithOutClientAddressField() { ClientSearchBean clientSearchBean = new ClientSearchBean(); clientSearchBean.setNameLike(expectedClient.getFirstName()); - List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, new AddressSearchBean(), null, - null, null); + List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, new AddressSearchBean(), null); assertTrue(actualClients.isEmpty()); } @@ -169,8 +167,7 @@ public void shouldNotFindWithClientNullAddressField() { ClientSearchBean clientSearchBean = new ClientSearchBean(); clientSearchBean.setNameLike(expectedClient.getFirstName()); - List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, new AddressSearchBean(), null, - null, null); + List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, new AddressSearchBean(), null); assertTrue(actualClients.isEmpty()); } @@ -185,8 +182,7 @@ public void shouldNotFindWithClientEmptyAddressField() { ClientSearchBean clientSearchBean = new ClientSearchBean(); clientSearchBean.setNameLike(expectedClient.getFirstName()); - List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, new AddressSearchBean(), null, - null, null); + List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, new AddressSearchBean(), null); assertTrue(actualClients.isEmpty()); } @@ -206,8 +202,7 @@ public void canNotSearchWithDeathDate() { clientSearchBean.setNameLike(expectedClient.getFirstName()); clientSearchBean.setDeathdateFrom(EPOCH_DATE_TIME); clientSearchBean.setDeathdateTo(new DateTime(DateTimeZone.UTC)); - List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, new AddressSearchBean(), null, - null, null); + List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, new AddressSearchBean(), null); assertEquals(0, actualClients.size()); } @@ -232,6 +227,8 @@ public void shouldFindBasedOnAll() { clientSearchBean.setBirthdateTo(new DateTime()); clientSearchBean.setAttributeType(ATTRIBUTES_TYPE); clientSearchBean.setAttributeValue(IDENTIFIER_VALUE); + clientSearchBean.setLastEditFrom(EPOCH_DATE_TIME); + clientSearchBean.setLastEditTo(new DateTime(DateTimeZone.UTC)); AddressSearchBean addressSearchBean = new AddressSearchBean(); addressSearchBean.setAddressType(getAddress().getAddressType()); @@ -242,8 +239,7 @@ public void shouldFindBasedOnAll() { addressSearchBean.setSubDistrict(getAddress().getSubDistrict()); addressSearchBean.setTown(getAddress().getTown()); addressSearchBean.setSubTown(getAddress().getSubTown()); - List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, addressSearchBean, - EPOCH_DATE_TIME, new DateTime(DateTimeZone.UTC), null); + List actualClients = luceneClientRepository.getByCriteria(clientSearchBean, addressSearchBean, null); assertEquals(1, actualClients.size()); assertEquals(expectedClient, actualClients.get(0)); @@ -301,7 +297,8 @@ public void shouldFindByWithOutNameAndGenderAndBirthDateAndDeathDateAndAttribute addressSearchBean.setTown(getAddress().getTown()); addressSearchBean.setSubTown(getAddress().getSubTown()); - List actualClients = luceneClientRepository.getByCriteria(addressSearchBean, EPOCH_DATE_TIME, new DateTime(DateTimeZone.UTC), null); + List actualClients = luceneClientRepository.getByCriteria(addressSearchBean, EPOCH_DATE_TIME, + new DateTime(DateTimeZone.UTC), null); assertEquals(1, actualClients.size()); assertEquals(expectedClient, actualClients.get(0)); } diff --git a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneEventRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneEventRepositoryTest.java index 55b3d3f0bc..6b8cd05148 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneEventRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneEventRepositoryTest.java @@ -24,52 +24,56 @@ import org.opensrp.domain.Event; import org.opensrp.repository.couch.AllEvents; import org.opensrp.repository.lucene.LuceneEventRepository; +import org.opensrp.search.EventSearchBean; import org.springframework.beans.factory.annotation.Autowired; public class LuceneEventRepositoryTest extends BaseIntegrationTest { - + @Autowired private AllEvents allEvents; - + @Autowired private LuceneEventRepository luceneEventRepository; - + @Before public void setUp() { allEvents.removeAll(); } - + @After public void cleanUp() { //allEvents.removeAll(); } - + @Test public void shouldFindByBaseEntityId() { Event expectedEvent = new Event(); expectedEvent.setBaseEntityId(BASE_ENTITY_ID); expectedEvent.setDateCreated(EPOCH_DATE_TIME); - + addObjectToRepository(asList(expectedEvent), allEvents); - - List actualEvents = luceneEventRepository - .getByCriteria(BASE_ENTITY_ID, null, null, null, null, null, null, null, null,null,null); - + + EventSearchBean eventSearchBean = new EventSearchBean(); + eventSearchBean.setBaseEntityId(BASE_ENTITY_ID); + List actualEvents = luceneEventRepository.getByCriteria(eventSearchBean); + assertEquals(1, actualEvents.size()); assertEquals(expectedEvent, actualEvents.get(0)); } - + @Test(expected = DbAccessException.class) public void shouldThrowExceptionIfEventDateCreatedFieldFound() { Event expectedEvent = new Event(); expectedEvent.setBaseEntityId(BASE_ENTITY_ID); - + addObjectToRepository(asList(expectedEvent), allEvents); - - luceneEventRepository.getByCriteria(BASE_ENTITY_ID, null, null, null, null, null, null, null, null,null,null); - + + EventSearchBean eventSearchBean = new EventSearchBean(); + eventSearchBean.setBaseEntityId(BASE_ENTITY_ID); + luceneEventRepository.getByCriteria(eventSearchBean); + } - + @Test public void shouldFindByAllCriteria() { addRandomInvalidEvents(); @@ -82,18 +86,26 @@ public void shouldFindByAllCriteria() { expectedEvent.setProviderId(PROVIDER_ID); expectedEvent.setLocationId(LOCATION_ID); expectedEvent.setDateEdited(new DateTime(DateTimeZone.UTC)); - + addObjectToRepository(asList(expectedEvent), allEvents); - - List actualEvents = luceneEventRepository - .getByCriteria(BASE_ENTITY_ID, EPOCH_DATE_TIME, new DateTime(DateTimeZone.UTC), expectedEvent.getEventType(), - expectedEvent.getEntityType(), expectedEvent.getProviderId(), expectedEvent.getLocationId(), - EPOCH_DATE_TIME, new DateTime(DateTimeZone.UTC),null,null); - + + EventSearchBean eventSearchBean = new EventSearchBean(); + eventSearchBean.setBaseEntityId(BASE_ENTITY_ID); + eventSearchBean.setEventDateFrom(EPOCH_DATE_TIME); + eventSearchBean.setEventDateTo(new DateTime(DateTimeZone.UTC)); + eventSearchBean.setEntityType(expectedEvent.getEventType()); + eventSearchBean.setEntityType(expectedEvent.getEntityType()); + eventSearchBean.setProviderId(expectedEvent.getProviderId()); + eventSearchBean.setLocationId(expectedEvent.getLocationId()); + eventSearchBean.setLastEditFrom(EPOCH_DATE_TIME); + eventSearchBean.setLastEditTo(new DateTime(DateTimeZone.UTC)); + + List actualEvents = luceneEventRepository.getByCriteria(eventSearchBean); + assertEquals(1, actualEvents.size()); assertEquals(expectedEvent, actualEvents.get(0)); } - + @Test(expected = RuntimeException.class) public void shouldThrowExceptionWithNoCriteriaWithTeamIds() { addRandomInvalidEvents(); @@ -106,12 +118,12 @@ public void shouldThrowExceptionWithNoCriteriaWithTeamIds() { expectedEvent.setProviderId(PROVIDER_ID); expectedEvent.setLocationId(LOCATION_ID); expectedEvent.setDateEdited(new DateTime(DateTimeZone.UTC)); - + addObjectToRepository(asList(expectedEvent), allEvents); - - luceneEventRepository.getByCriteria(null, null, null, null, null, null, null, null, null,null,null); + + luceneEventRepository.getByCriteria(new EventSearchBean()); } - + @Test public void shouldFindByAllCriteriaWithTeamId() { addRandomInvalidEvents(); @@ -124,7 +136,7 @@ public void shouldFindByAllCriteriaWithTeamId() { expectedEvent.setProviderId(PROVIDER_ID); expectedEvent.setLocationId(LOCATION_ID); expectedEvent.setDateEdited(new DateTime(DateTimeZone.UTC)); - + Event expectedEvent2 = new Event(); expectedEvent2.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); expectedEvent2.setDateCreated(EPOCH_DATE_TIME); @@ -134,18 +146,22 @@ public void shouldFindByAllCriteriaWithTeamId() { expectedEvent2.setProviderId(DIFFERENT_BASE_ENTITY_ID); expectedEvent2.setLocationId(LOCATION_ID); expectedEvent2.setDateEdited(new DateTime(DateTimeZone.UTC)); - + addObjectToRepository(asList(expectedEvent, expectedEvent2), allEvents); - + String teamIds = PROVIDER_ID + "," + DIFFERENT_BASE_ENTITY_ID; String baseEntityIds = BASE_ENTITY_ID + "," + DIFFERENT_BASE_ENTITY_ID; - List actualEvents = luceneEventRepository - .getByCriteria(null,null, teamIds, LOCATION_ID, baseEntityIds, EPOCH_DATE_TIME.getMillis(), null, "desc", - 100); - + + EventSearchBean eventSearchBean = new EventSearchBean(); + eventSearchBean.setBaseEntityId(baseEntityIds); + eventSearchBean.setProviderId(teamIds); + eventSearchBean.setLocationId(LOCATION_ID); + eventSearchBean.setServerVersion(EPOCH_DATE_TIME.getMillis()); + List actualEvents = luceneEventRepository.getByCriteria(eventSearchBean, null, "desc", 100); + assertTwoListAreSameIgnoringOrder(asList(expectedEvent, expectedEvent2), actualEvents); } - + //TODO: fix source @Test(expected = NullPointerException.class) public void shouldThrowExceptionFindByCriteriaWithTeamIdWithOutSortOrder() { @@ -159,7 +175,7 @@ public void shouldThrowExceptionFindByCriteriaWithTeamIdWithOutSortOrder() { expectedEvent.setProviderId(PROVIDER_ID); expectedEvent.setLocationId(LOCATION_ID); expectedEvent.setDateEdited(new DateTime(DateTimeZone.UTC)); - + Event expectedEvent2 = new Event(); expectedEvent2.setBaseEntityId(DIFFERENT_BASE_ENTITY_ID); expectedEvent2.setDateCreated(EPOCH_DATE_TIME); @@ -169,18 +185,23 @@ public void shouldThrowExceptionFindByCriteriaWithTeamIdWithOutSortOrder() { expectedEvent2.setProviderId(DIFFERENT_BASE_ENTITY_ID); expectedEvent2.setLocationId(LOCATION_ID); expectedEvent2.setDateEdited(new DateTime(DateTimeZone.UTC)); - + addObjectToRepository(asList(expectedEvent, expectedEvent2), allEvents); - + String teamIds = PROVIDER_ID + "," + DIFFERENT_BASE_ENTITY_ID; String baseEntityIds = BASE_ENTITY_ID + "," + DIFFERENT_BASE_ENTITY_ID; - List actualEvents = luceneEventRepository - .getByCriteria(null,null, PROVIDER_ID, teamIds, baseEntityIds, EPOCH_DATE_TIME.getMillis(), null, null, - 100); - + + EventSearchBean eventSearchBean = new EventSearchBean(); + eventSearchBean.setBaseEntityId(baseEntityIds); + eventSearchBean.setProviderId(teamIds); + eventSearchBean.setLocationId(LOCATION_ID); + eventSearchBean.setServerVersion(EPOCH_DATE_TIME.getMillis()); + + List actualEvents = luceneEventRepository.getByCriteria(eventSearchBean, null, null, 100); + assertTwoListAreSameIgnoringOrder(asList(expectedEvent, expectedEvent2), actualEvents); } - + @Test(expected = RuntimeException.class) public void shouldThrowExceptionWithNoCriteria() { addRandomInvalidEvents(); @@ -193,12 +214,12 @@ public void shouldThrowExceptionWithNoCriteria() { expectedEvent.setProviderId(PROVIDER_ID); expectedEvent.setLocationId(LOCATION_ID); expectedEvent.setDateEdited(new DateTime(DateTimeZone.UTC)); - + addObjectToRepository(asList(expectedEvent), allEvents); - - luceneEventRepository.getByCriteria(null, null,null, null, null, null, null, null, 0); + + luceneEventRepository.getByCriteria(new EventSearchBean(), null, null, 0); } - + @Test public void shouldFindByStringQuery() { String query = "eventDate:[1970-01-01T00:00:00 TO 3017-08-30T08:12:38] AND lastEdited:[1970-01-01T00:00:00 TO 3017-08-30T08:12:38] AND baseEntityId:baseEntityId AND eventType:eventType AND entityType:entityType AND providerId:providerId AND locationId:locationId"; @@ -212,15 +233,15 @@ public void shouldFindByStringQuery() { expectedEvent.setProviderId(PROVIDER_ID); expectedEvent.setLocationId(LOCATION_ID); expectedEvent.setDateEdited(EPOCH_DATE_TIME); - + addObjectToRepository(asList(expectedEvent), allEvents); - + List actualEvents = luceneEventRepository.getByCriteria(query); assertEquals(1, actualEvents.size()); assertEquals(expectedEvent, actualEvents.get(0)); - + } - + private void addRandomInvalidEvents() { for (int i = 0; i < 100; i++) { Event event = new Event(); @@ -235,5 +256,5 @@ private void addRandomInvalidEvents() { allEvents.add(event); } } - + } diff --git a/opensrp-core/src/test/java/org/opensrp/service/it/EventServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/it/EventServiceTest.java index da9aba6ca4..caa2b8164b 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/it/EventServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/it/EventServiceTest.java @@ -168,16 +168,12 @@ public void shouldFindByBaseEntityId() { @Test public void shouldFindByFormSubmissionId() { Event expectedEvent = getEvent(); - Event expectedEvent2 = getEvent(); - Event invalidEvent = getEvent(); - invalidEvent.setFormSubmissionId(DIFFERENT_BASE_ENTITY_ID); - List expectedEvents = asList(expectedEvent, expectedEvent2); - addObjectToRepository(asList(expectedEvent, expectedEvent2, invalidEvent), allEvents); + addObjectToRepository(asList(expectedEvent), allEvents); - List actualEvents = eventService.findByFormSubmissionId(FORM_SUBMISSION_ID); + Event actualEvent = eventService.findByFormSubmissionId(FORM_SUBMISSION_ID); - assertTwoListAreSameIgnoringOrder(expectedEvents, actualEvents); + assertEquals(expectedEvent, actualEvent); } @Test diff --git a/opensrp-web/src/main/java/org/opensrp/web/rest/ClientResource.java b/opensrp-web/src/main/java/org/opensrp/web/rest/ClientResource.java index e2aece9e5c..2851048af6 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/rest/ClientResource.java +++ b/opensrp-web/src/main/java/org/opensrp/web/rest/ClientResource.java @@ -91,8 +91,7 @@ public List search(HttpServletRequest request) throws ParseException {// String attributes = getStringFilter("attribute", request); searchBean.setAttributeType(StringUtils.isEmptyOrWhitespaceOnly(attributes) ? null : attributes.split(":", -1)[0]); searchBean.setAttributeValue(StringUtils.isEmptyOrWhitespaceOnly(attributes) ? null : attributes.split(":", -1)[1]); - - + return clientService.findByCriteria(searchBean, addressSearchBean, lastEdit == null ? null : lastEdit[0], lastEdit == null ? null : lastEdit[1]); } diff --git a/opensrp-web/src/main/java/org/opensrp/web/rest/EventResource.java b/opensrp-web/src/main/java/org/opensrp/web/rest/EventResource.java index 9bab0a1b29..14dd5253a8 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/rest/EventResource.java +++ b/opensrp-web/src/main/java/org/opensrp/web/rest/EventResource.java @@ -115,6 +115,7 @@ protected ResponseEntity sync(HttpServletRequest request) { List clientIds = new ArrayList(); List clients = new ArrayList(); if (team != null || providerId != null || locationId != null || baseEntityId != null) { + long startTime = System.currentTimeMillis(); EventSearchBean eventSearchBean = new EventSearchBean(); eventSearchBean.setTeam(team); @@ -152,6 +153,7 @@ protected ResponseEntity sync(HttpServletRequest request) { clients.add(client); } } + } logger.info("fetching missing clients took: " + (System.currentTimeMillis() - startTime) / 1000); } From 8c38f060414b4483ef47e074c86dcb4e099190f4 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 29 Mar 2018 11:59:04 +0300 Subject: [PATCH 082/133] Datetime conversion to either timestamp or date, test all client methods --- .../postgres/handler/DateTimeTypeHandler.java | 24 +-- .../custom/xml/CustomClientMetadataMapper.xml | 163 +++++++++--------- .../postgres/ClientsRepositoryTest.java | 11 +- 3 files changed, 102 insertions(+), 96 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/DateTimeTypeHandler.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/DateTimeTypeHandler.java index 7b964a5d44..8dd579bf20 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/DateTimeTypeHandler.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/DateTimeTypeHandler.java @@ -5,6 +5,7 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; +import java.sql.Timestamp; import org.apache.ibatis.type.JdbcType; import org.apache.ibatis.type.TypeHandler; @@ -15,7 +16,10 @@ public class DateTimeTypeHandler implements TypeHandler { @Override public void setParameter(PreparedStatement ps, int i, DateTime parameter, JdbcType jdbcType) throws SQLException { if (parameter != null) { - ps.setDate(i, new Date(parameter.getMillis())); + if (parameter.toLocalTime().toString().equals("00:00:00.000")) + ps.setDate(i, new Date(parameter.getMillis())); + else + ps.setTimestamp(i, new Timestamp(parameter.getMillis())); } else { ps.setDate(i, null); } @@ -23,9 +27,9 @@ public void setParameter(PreparedStatement ps, int i, DateTime parameter, JdbcTy @Override public DateTime getResult(ResultSet resultSet, String columnName) throws SQLException { - Date date = resultSet.getDate(columnName); - if (date != null) { - return new DateTime(date); + Timestamp timestamp = resultSet.getTimestamp(columnName); + if (timestamp != null) { + return new DateTime(timestamp.getTime()); } else { return null; } @@ -33,9 +37,9 @@ public DateTime getResult(ResultSet resultSet, String columnName) throws SQLExce @Override public DateTime getResult(ResultSet resultSet, int columnIndex) throws SQLException { - Date date = resultSet.getDate(columnIndex); - if (date != null) { - return new DateTime(date); + Timestamp timestamp = resultSet.getTimestamp(columnIndex); + if (timestamp != null) { + return new DateTime(timestamp.getTime()); } else { return null; } @@ -43,9 +47,9 @@ public DateTime getResult(ResultSet resultSet, int columnIndex) throws SQLExcept @Override public DateTime getResult(CallableStatement cs, int columnIndex) throws SQLException { - Date date = cs.getDate(columnIndex); - if (date != null) { - return new DateTime(date); + Timestamp timestamp = cs.getTimestamp(columnIndex); + if (timestamp != null) { + return new DateTime(timestamp.getTime()); } else { return null; } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml index cf4e613b6f..f2d8e88dac 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml @@ -99,88 +99,87 @@ join jsonb_array_elements(json->'addresses') as address on true - - - - and ( cm.first_name ilike #{name} or - cm.middle_name ilike #{name} or - cm.last_name ilike #{name} - ) - - - and c.json->>'gender' = #{clientBean.gender,jdbcType=VARCHAR} - - - and cm.birth_date - between #{clientBean.birthdateFrom,typeHandler=org.opensrp.repository.postgres.handler.DateTimeTypeHandler} - and #{clientBean.birthdateTo,typeHandler=org.opensrp.repository.postgres.handler.DateTimeTypeHandler} - - - and (json->>'deathdate')::date - between #{clientBean.deathdateFrom,typeHandler=org.opensrp.repository.postgres.handler.DateTimeTypeHandler} - and #{clientBean.deathdateTo,typeHandler=org.opensrp.repository.postgres.handler.DateTimeTypeHandler} - - - and json -> 'identifiers' ->> #{clientBean.attributeType,jdbcType=VARCHAR} = #{clientBean.attributeValue,jdbcType=VARCHAR} - - - and (json->>'dateEdited')::date - between #{clientBean.lastEditFrom,typeHandler=org.opensrp.repository.postgres.handler.DateTimeTypeHandler} - and #{clientBean.lastEditTo,typeHandler=org.opensrp.repository.postgres.handler.DateTimeTypeHandler} - - - and address ->> 'addressType' = #{addressBean.addressType,jdbcType=VARCHAR} - - - and address ->> 'country' = #{addressBean.country,jdbcType=VARCHAR} - - - and address ->> 'stateProvince' = #{addressBean.stateProvince,jdbcType=VARCHAR} - - - and address ->> 'cityVillage' = #{addressBean.cityVillage,jdbcType=VARCHAR} - - - and address ->> 'countyDistrict' = #{addressBean.countyDistrict,jdbcType=VARCHAR} - - - and address ->> 'town' = #{addressBean.town,jdbcType=VARCHAR} - - - and address ->> 'subTown' = #{addressBean.subTown,jdbcType=VARCHAR} - - - and address ->> 'subTown' = #{addressBean.subTown,jdbcType=VARCHAR} - - - - - and c.json->>'firstName' ilike #{firstName} - - - - and c.json->>'middleName' ilike #{middleName} - - - - and c.json->>'lastName' ilike #{lastName} - - - - and - - json -> 'identifiers' ->> #{key,jdbcType=VARCHAR} = #{value,jdbcType=VARCHAR} - - - - - - - json -> 'attributes' ->> #{key,jdbcType=VARCHAR} = #{value,jdbcType=VARCHAR} - - - - + + + + and ( cm.first_name ilike #{name} or + cm.middle_name ilike #{name} or + cm.last_name ilike #{name} + ) + + + and c.json->>'gender' = #{clientBean.gender,jdbcType=VARCHAR} + + + and cm.birth_date + between #{clientBean.birthdateFrom,typeHandler=org.opensrp.repository.postgres.handler.DateTimeTypeHandler} + and #{clientBean.birthdateTo,typeHandler=org.opensrp.repository.postgres.handler.DateTimeTypeHandler} + + + and (json->>'deathdate')::date + between #{clientBean.deathdateFrom,typeHandler=org.opensrp.repository.postgres.handler.DateTimeTypeHandler} + and #{clientBean.deathdateTo,typeHandler=org.opensrp.repository.postgres.handler.DateTimeTypeHandler} + + + and json -> 'attributes' ->> #{clientBean.attributeType,jdbcType=VARCHAR} = #{clientBean.attributeValue,jdbcType=VARCHAR} + + + and (json->>'dateEdited')::timestamp + between #{clientBean.lastEditFrom,typeHandler=org.opensrp.repository.postgres.handler.DateTimeTypeHandler} + and #{clientBean.lastEditTo,typeHandler=org.opensrp.repository.postgres.handler.DateTimeTypeHandler} + + + and address ->> 'addressType' = #{addressBean.addressType,jdbcType=VARCHAR} + + + and address ->> 'country' = #{addressBean.country,jdbcType=VARCHAR} + + + and address ->> 'stateProvince' = #{addressBean.stateProvince,jdbcType=VARCHAR} + + + and address ->> 'cityVillage' = #{addressBean.cityVillage,jdbcType=VARCHAR} + + + and address ->> 'countyDistrict' = #{addressBean.countyDistrict,jdbcType=VARCHAR} + + + and address ->> 'town' = #{addressBean.town,jdbcType=VARCHAR} + + + and address ->> 'subTown' = #{addressBean.subTown,jdbcType=VARCHAR} + + + and address ->> 'subTown' = #{addressBean.subTown,jdbcType=VARCHAR} + + + + + and c.json->>'firstName' ilike #{firstName} + + + + and c.json->>'middleName' ilike #{middleName} + + + + and c.json->>'lastName' ilike #{lastName} + + + + + json -> 'identifiers' ->> #{key,jdbcType=VARCHAR} = #{value,jdbcType=VARCHAR} + + + + + + + json -> 'attributes' ->> #{key,jdbcType=VARCHAR} = #{value,jdbcType=VARCHAR} + + + + LIMIT #{limit} OFFSET #{offset} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java index 2648dc0e39..d9009b8229 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java @@ -185,6 +185,7 @@ public void testFindByRelationshipId() { assertTrue(clientsRepository.findByRelationshipId("mother", "0154839f-4eda-b729-89067c7a8c5d").isEmpty()); } + @Test public void testFindByCriteria() { ClientSearchBean searchBean = new ClientSearchBean(); AddressSearchBean addressSearchBean = new AddressSearchBean(); @@ -195,7 +196,7 @@ public void testFindByCriteria() { searchBean.setNameLike("Baby"); searchBean.setGender("Male"); - assertEquals(3, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); + assertEquals(2, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); searchBean.setBirthdateFrom(new DateTime()); searchBean.setBirthdateTo(new DateTime()); @@ -214,7 +215,7 @@ public void testFindByCriteria() { searchBean.setAttributeValue("Hellen"); List clients = clientsRepository.findByCriteria(searchBean, addressSearchBean); assertEquals(1, clients.size()); - assertEquals("05934ae338431f28bf6793b2415a0374", clients.get(0).getId()); + assertEquals("05934ae338431f28bf6793b24164cbd9", clients.get(0).getId()); searchBean = new ClientSearchBean(); searchBean.setLastEditFrom(new DateTime("2018-03-13T12:57:05.652+03:00")); @@ -229,6 +230,7 @@ public void testFindByCriteria() { } + @Test public void testFindByCriteriaWithoutAddressBean() { ClientSearchBean searchBean = new ClientSearchBean(); assertEquals(15, clientsRepository.findByCriteria(searchBean).size()); @@ -238,7 +240,7 @@ public void testFindByCriteriaWithoutAddressBean() { searchBean.setNameLike("Baby"); searchBean.setGender("Male"); - assertEquals(3, clientsRepository.findByCriteria(searchBean).size()); + assertEquals(2, clientsRepository.findByCriteria(searchBean).size()); searchBean.setBirthdateFrom(new DateTime()); searchBean.setBirthdateTo(new DateTime()); @@ -257,7 +259,7 @@ public void testFindByCriteriaWithoutAddressBean() { searchBean.setAttributeValue("Hellen"); List clients = clientsRepository.findByCriteria(searchBean); assertEquals(1, clients.size()); - assertEquals("05934ae338431f28bf6793b2415a0374", clients.get(0).getId()); + assertEquals("05934ae338431f28bf6793b24164cbd9", clients.get(0).getId()); searchBean = new ClientSearchBean(); searchBean.setLastEditFrom(new DateTime("2018-03-13T12:57:05.652+03:00")); @@ -266,6 +268,7 @@ public void testFindByCriteriaWithoutAddressBean() { } + @Test public void testFindByCriteriaWithEditDateParams() { assertEquals(6, clientsRepository From bfc948f47fcf83ced355c92814418bc8a336e55d Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 29 Mar 2018 13:04:21 +0300 Subject: [PATCH 083/133] ActionsRepository unit test --- .../postgres/ActionRepositoryImpl.java | 12 +- .../mapper/custom/xml/CustomActionMapper.xml | 34 +-- .../custom/xml/CustomActionMetadataMapper.xml | 11 +- .../postgres/ActionsRepositoryTest.java | 211 ++++++++++++++++++ .../test/resources/test-scripts/action.sql | 78 +++++++ 5 files changed, 318 insertions(+), 28 deletions(-) create mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/ActionsRepositoryTest.java create mode 100644 opensrp-core/src/test/resources/test-scripts/action.sql diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java index f64044d3b1..0a3b294485 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java @@ -60,9 +60,9 @@ public void add(Action entity) { return; } - ActionMetadata eventMetadata = createMetadata(entity, pgAction.getId()); - if (eventMetadata != null) { - actionMetadataMapper.insertSelective(eventMetadata); + ActionMetadata actionMetadata = createMetadata(entity, pgAction.getId()); + if (actionMetadata != null) { + actionMetadataMapper.insertSelective(actionMetadata); } } @@ -225,7 +225,7 @@ public List findByCriteria(String team, String providerId, long timeStam ids.add(providerId); } criteria.andProviderIdIn(ids); - } else if ((providerId != null && !StringUtils.isNotEmpty(providerId))) { + } else if (StringUtils.isNotEmpty(providerId)) { criteria.andProviderIdEqualTo(providerId); } metadataExample.setOrderByClause(getOrderByClause(sortBy, sortOrder)); @@ -279,7 +279,7 @@ private List convert(List actions) { } protected Long retrievePrimaryKey(Action entity) { - if (entity == null) { + if (entity == null || entity.getId() == null) { return null; } String documentId = entity.getId(); @@ -297,9 +297,11 @@ protected Long retrievePrimaryKey(Action entity) { private ActionMetadata createMetadata(Action entity, Long primaryKey) { ActionMetadata actionMetadata = new ActionMetadata(); actionMetadata.setActionId(primaryKey); + actionMetadata.setDocumentId(entity.getId()); actionMetadata.setBaseEntityId(entity.baseEntityId()); actionMetadata.setServerVersion(entity.getTimeStamp()); actionMetadata.setProviderId(entity.providerId()); + //TODO implement review if in future to support Location, Team and TeamId return actionMetadata; } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMapper.xml index 47efaa5744..42a2897db9 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMapper.xml @@ -14,26 +14,26 @@ insert into core.action - - - id, - - - json, - - - - - #{id,jdbcType=BIGINT}, - - - #{json,jdbcType=OTHER}, - - + + + id, + + + json, + + + + + #{id,jdbcType=BIGINT}, + + + #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ActionTypeHandler}, + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMetadataMapper.xml index cee69e3e70..4d9251a61f 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMetadataMapper.xml @@ -19,8 +19,8 @@ - - + + @@ -31,8 +31,7 @@ and am.${criterion.condition} #{criterion.value} - and am.${criterion.condition} #{criterion.value} and - am.#{criterion.secondValue} + and am.${criterion.condition} #{criterion.value} and #{criterion.secondValue} and am.${criterion.condition} @@ -79,10 +78,10 @@ - and am.json->'data'->>'scheduleName' #{scheduleName,jdbcType=VARCHAR} + and a.json->'data'->>'scheduleName' = #{scheduleName,jdbcType=VARCHAR} - where am.json->'data'->>'scheduleName' #{scheduleName,jdbcType=VARCHAR} + where a.json->'data'->>'scheduleName' = #{scheduleName,jdbcType=VARCHAR} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ActionsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ActionsRepositoryTest.java new file mode 100644 index 0000000000..9a1c85ef7d --- /dev/null +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ActionsRepositoryTest.java @@ -0,0 +1,211 @@ +package org.opensrp.repository.postgres; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.joda.time.DateTime; +import org.joda.time.LocalDate; +import org.junit.Test; +import org.opensrp.dto.ActionData; +import org.opensrp.scheduler.Action; +import org.opensrp.scheduler.repository.ActionsRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; + +public class ActionsRepositoryTest extends BaseRepositoryTest { + + @Autowired + @Qualifier("actionsRepositoryPostgres") + private ActionsRepository actionsRepository; + + @Override + protected Set getDatabaseScripts() { + Set scripts = new HashSet(); + scripts.add("action.sql"); + return scripts; + } + + @Test + public void testGet() { + Action action = actionsRepository.get("05934ae338431f28bf6793b2417c98f9"); + assertEquals(6, action.data().size()); + assertEquals("PENTA 1", action.data().get("scheduleName")); + assertEquals("2018-02-22", action.data().get("startDate")); + assertEquals("aabcd2cc-c111-41c6-85e6-cb5d9e350d08", action.baseEntityId()); + + //missing action + assertNull(actionsRepository.get("05934ae338431f28bf6793b241")); + } + + @Test + public void testAdd() { + Action action = new Action("bshjfsdf-sdfsd9-4243-ssf", "tester", ActionData.markAlertAsClosed("BCG", "2018-02-23")); + actionsRepository.add(action); + assertEquals(35, actionsRepository.getAll().size()); + + action = actionsRepository.findByCaseIdAndTimeStamp("bshjfsdf-sdfsd9-4243-ssf", 0l).get(0); + assertEquals("BCG", action.data().get("visitCode")); + assertEquals("2018-02-23", action.data().get("completionDate")); + assertEquals("closeAlert", action.getActionType()); + + } + + @Test + public void testUpdate() { + Action action = actionsRepository.get("05934ae338431f28bf6793b2417c98f9"); + action.getDetails().put("Key11", "Baby123"); + String today = new LocalDate().toString(); + action.data().put("expiryDate", today); + + actionsRepository.update(action); + + Action updatedAction = actionsRepository.get("05934ae338431f28bf6793b2417c98f9"); + assertEquals("Baby123", updatedAction.getDetails().get("Key11")); + assertEquals(today, updatedAction.data().get("expiryDate")); + + } + + @Test + public void testGetAll() { + assertEquals(34, actionsRepository.getAll().size()); + } + + @Test + public void testSafeRemove() { + + Action action = actionsRepository.get("05934ae338431f28bf6793b2417c7d94"); + actionsRepository.safeRemove(action); + + assertEquals(33, actionsRepository.getAll().size()); + + assertNull(actionsRepository.get("05934ae338431f28bf6793b2417c7d94")); + } + + @Test + public void testFindByProviderIdAndTimeStamp() { + assertEquals(34, actionsRepository.findByProviderIdAndTimeStamp("biddemo", 0l).size()); + + assertEquals(24, actionsRepository.findByProviderIdAndTimeStamp("biddemo", 1520932703825l).size()); + + assertTrue(actionsRepository.findByProviderIdAndTimeStamp("biddeo", 0l).isEmpty()); + + assertTrue(actionsRepository.findByProviderIdAndTimeStamp("biddemo", System.currentTimeMillis()).isEmpty()); + } + + @Test + public void findAlertByANMIdEntityIdScheduleName() { + List actions = actionsRepository.findAlertByANMIdEntityIdScheduleName("biddemo", + "b06e0847-0d68-4f5c-9288-58bc394fe052", "BCG"); + assertEquals(1, actions.size()); + assertEquals("05934ae338431f28bf6793b2417db6ca", actions.get(0).getId()); + assertEquals("2018-01-11", actions.get(0).data().get("startDate")); + assertEquals("05934ae338431f28bf6793b2417db6ca", actions.get(0).getId()); + + assertTrue(actionsRepository + .findAlertByANMIdEntityIdScheduleName("biddemo", "b06e0847-0d68-4f5c-9288-58bc394fe052", "OPV 2").isEmpty()); + } + + @Test + public void testFindByCaseIdScheduleAndTimeStamp() { + List actions = actionsRepository.findByCaseIdScheduleAndTimeStamp("b06e0847-0d68-4f5c-9288-58bc394fe052", + "BCG", new DateTime("2018-03-13"), new DateTime()); + assertEquals(1, actions.size()); + assertEquals("05934ae338431f28bf6793b2417db6ca", actions.get(0).getId()); + assertEquals("2018-01-11", actions.get(0).data().get("startDate")); + assertEquals("05934ae338431f28bf6793b2417db6ca", actions.get(0).getId()); + + assertTrue(actionsRepository.findByCaseIdScheduleAndTimeStamp("b06e0847-0d68-4f5c-9288-58bc394fe052", "BCG", + new DateTime("2018-03-20"), new DateTime()).isEmpty()); + } + + @Test + public void testFindByCaseIdAndTimeStamp() { + List actions = actionsRepository.findByCaseIdAndTimeStamp("b06e0847-0d68-4f5c-9288-58bc394fe052", + new DateTime("2018-03-13").getMillis()); + assertEquals(5, actions.size()); + + actions = actionsRepository.findByCaseIdAndTimeStamp("b06e0847-0d68-4f5c-9288-58bc394fe052", 1520978414514l); + assertEquals("05934ae338431f28bf6793b2417da475", actions.get(0).getId()); + assertEquals("2018-02-22", actions.get(0).data().get("startDate")); + assertEquals("pcv1", actions.get(0).data().get("visitCode")); + + assertTrue(actionsRepository.findByCaseIdScheduleAndTimeStamp("b06e0847-0d68-4f5c-9288-58bc394fe052", "BCG", + new DateTime("2018-03-20"), new DateTime()).isEmpty()); + } + + @Test + public void testDeleteAllByTarget() { + actionsRepository.deleteAllByTarget("alert"); + assertTrue(actionsRepository.getAll().isEmpty()); + } + + @Test + public void testMarkAllAsInActiveFor() { + actionsRepository.markAllAsInActiveFor("b06e0847-0d68-4f5c-9288-58bc394fe052"); + List actions = actionsRepository.findByCaseIdAndTimeStamp("b06e0847-0d68-4f5c-9288-58bc394fe052", 0l); + for (Action action : actions) + assertFalse(action.getIsActionActive()); + } + + @Test + public void testAddOrUpdateAlert() { + Action action = new Action("bshjfsdf-sdfsd9-42642-ssf", "tester1", + ActionData.markAlertAsClosed("OPV 1", "2018-03-23")); + actionsRepository.addOrUpdateAlert(action); + assertEquals(35, actionsRepository.getAll().size()); + + action = actionsRepository.findByCaseIdAndTimeStamp("bshjfsdf-sdfsd9-42642-ssf", 0l).get(0); + assertEquals("OPV 1", action.data().get("visitCode")); + assertEquals("2018-03-23", action.data().get("completionDate")); + assertEquals("closeAlert", action.getActionType()); + + action.getDetails().put("tag", "1234"); + String today = new LocalDate().toString(); + action.data().put("expiryDate", today); + + actionsRepository.addOrUpdateAlert(action); + + assertEquals(35, actionsRepository.getAll().size()); + Action updatedAction = actionsRepository.findByCaseIdAndTimeStamp("bshjfsdf-sdfsd9-42642-ssf", 0l).get(0); + assertEquals("1234", updatedAction.getDetails().get("tag")); + assertEquals(today, updatedAction.data().get("expiryDate")); + + } + + @Test + public void testMarkAlertAsInactiveFor() { + String provider = "biddemo"; + String entityId = "b06e0847-0d68-4f5c-9288-58bc394fe052"; + String schedule = "BCG"; + actionsRepository.markAlertAsInactiveFor(provider, entityId, schedule); + List actions = actionsRepository.findAlertByANMIdEntityIdScheduleName(provider, entityId, schedule); + for (Action action : actions) + assertFalse(action.getIsActionActive()); + } + + @Test + public void testFindByCriteria() { + + long now = System.currentTimeMillis(); + Action action = new Action("bshdsf989-32hjh-d9-42642-ssf", "tester1", + ActionData.markAlertAsClosed("OPV 2", "2018-04-23")); + actionsRepository.addOrUpdateAlert(action); + + assertEquals(34, actionsRepository.findByCriteria(null, "biddemo", 0, null, null, 50).size()); + + assertEquals(35, actionsRepository.findByCriteria("biddemo,tester1", "biddemo", 0, null, null, 50).size()); + + assertEquals(35, actionsRepository.findByCriteria("biddemo,tester1", null, 0, null, null, 50).size()); + + assertEquals(5, actionsRepository.findByCriteria("biddemo,tester1", null, 0, "server_version", "desc", 5).size()); + + assertEquals(1, actionsRepository.findByCriteria("biddemo,tester1", null, now, null, null, 50).size()); + } + +} diff --git a/opensrp-core/src/test/resources/test-scripts/action.sql b/opensrp-core/src/test/resources/test-scripts/action.sql new file mode 100644 index 0000000000..5af96fc350 --- /dev/null +++ b/opensrp-core/src/test/resources/test-scripts/action.sql @@ -0,0 +1,78 @@ +--clear data +TRUNCATE TABLE core.action CASCADE; + +ALTER SEQUENCE core.action_id_seq RESTART WITH 35; + +ALTER SEQUENCE core.action_metadata_id_seq RESTART WITH 35; + +INSERT INTO core.action (id, json) VALUES +(1, '{"id": "05934ae338431f28bf6793b241642462", "data": {"visitCode": "OPV 0", "completionDate": "2017-02-13"}, "type": "Action", "details": {}, "version": 0, "revision": "1-2879a3a80caa0ab8c599b766496b8234", "timeStamp": 1520932697689, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(2, '{"id": "05934ae338431f28bf6793b2416433c9", "data": {"visitCode": "BCG", "completionDate": "2017-02-13"}, "type": "Action", "details": {}, "version": 0, "revision": "1-6136b587025c608f3d4f41731eefb157", "timeStamp": 1520932698005, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(3, '{"id": "05934ae338431f28bf6793b241643a7e", "data": {"visitCode": "PENTA 1", "completionDate": "2017-03-27"}, "type": "Action", "details": {}, "version": 0, "revision": "1-2f64b198e90652c816a01b59b15d10c9", "timeStamp": 1520932698821, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(4, '{"id": "05934ae338431f28bf6793b241644dd7", "data": {"visitCode": "OPV 1", "completionDate": "2017-03-27"}, "type": "Action", "details": {}, "version": 0, "revision": "1-6fda14ca820ed569269b81cc28832619", "timeStamp": 1520932699621, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(5, '{"id": "05934ae338431f28bf6793b241645535", "data": {"visitCode": "ROTA 1", "completionDate": "2017-03-27"}, "type": "Action", "details": {}, "version": 0, "revision": "1-f00737fd2a6354d243c161c161a886fd", "timeStamp": 1520932700149, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(6, '{"id": "05934ae338431f28bf6793b241645f1f", "data": {"visitCode": "PCV 1", "completionDate": "2017-03-27"}, "type": "Action", "details": {}, "version": 0, "revision": "1-c66dfedbaf6582dc04c209c467f8a057", "timeStamp": 1520932700973, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(7, '{"id": "05934ae338431f28bf6793b2416473e0", "data": {"visitCode": "PENTA 2", "completionDate": "2017-04-24"}, "type": "Action", "details": {}, "version": 0, "revision": "1-02c3a00f308e4ce385ce558cf0d944d8", "timeStamp": 1520932701845, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(8, '{"id": "05934ae338431f28bf6793b2416481aa", "data": {"visitCode": "OPV 2", "completionDate": "2017-04-24"}, "type": "Action", "details": {}, "version": 0, "revision": "1-8c95d366cfe85f1b2dbfb3ca8c80fa60", "timeStamp": 1520932702653, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(9, '{"id": "05934ae338431f28bf6793b241648e9d", "data": {"visitCode": "ROTA 2", "completionDate": "2017-04-24"}, "type": "Action", "details": {}, "version": 0, "revision": "1-9ad54ee7aea405a883c41203f42b7102", "timeStamp": 1520932703185, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(10, '{"id": "05934ae338431f28bf6793b241649473", "data": {"visitCode": "PCV 2", "completionDate": "2017-04-24"}, "type": "Action", "details": {}, "version": 0, "revision": "1-660bbaae08f13bd1901bf0916c85d7f1", "timeStamp": 1520932703825, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(11, '{"id": "05934ae338431f28bf6793b24164a5d7", "data": {"visitCode": "PENTA 3", "completionDate": "2017-05-22"}, "type": "Action", "details": {}, "version": 0, "revision": "1-6a87e5caa57732fd5c3fef5dc5a4ba71", "timeStamp": 1520932704673, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(12, '{"id": "05934ae338431f28bf6793b24164b4ce", "data": {"visitCode": "OPV 3", "completionDate": "2017-05-22"}, "type": "Action", "details": {}, "version": 0, "revision": "1-9a13ae05df3839ea97d54d42150cf294", "timeStamp": 1520932705277, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(13, '{"id": "05934ae338431f28bf6793b24164c069", "data": {"visitCode": "PCV 3", "completionDate": "2017-05-22"}, "type": "Action", "details": {}, "version": 0, "revision": "1-2cab2feb95c70dcaabecb6f9eed6ddf2", "timeStamp": 1520932705889, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(14, '{"id": "05934ae338431f28bf6793b241651160", "data": {"visitCode": "MEASLES 1", "completionDate": "2017-11-14"}, "type": "Action", "details": {}, "version": 0, "revision": "1-8a96e017d3f3772d1fceeda32360af03", "timeStamp": 1520933247737, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(15, '{"id": "05934ae338431f28bf6793b241663fcd", "data": {"visitCode": "BCG", "completionDate": "2016-04-13"}, "type": "Action", "details": {}, "version": 0, "revision": "1-14792d0f46a0883ad712b1579229e327", "timeStamp": 1520933431893, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "86c039a2-0b68-4166-849e-f49897e3a510", "isActionActive": true}'), +(16, '{"id": "05934ae338431f28bf6793b2417bfe8f", "data": {"startDate": "2018-02-22", "visitCode": "penta1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PENTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-6356c0c4202703c768764a3475d7ce3b", "timeStamp": 1520978413525, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), +(17, '{"id": "05934ae338431f28bf6793b2417bf883", "data": {"startDate": "2018-02-22", "visitCode": "pcv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PCV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-076a5315cb585348af4335f3392f3f3d", "timeStamp": 1520978413537, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), +(18, '{"id": "05934ae338431f28bf6793b2417bf3c3", "data": {"startDate": "2018-02-22", "visitCode": "rota1", "expiryDate": "2018-08-01", "alertStatus": "urgent", "scheduleName": "ROTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-5d69b3061e54074f4e280ed3b0b06181", "timeStamp": 1520978413541, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), +(19, '{"id": "05934ae338431f28bf6793b2417c671b", "data": {"startDate": "2018-02-22", "visitCode": "rota1", "expiryDate": "2018-08-01", "alertStatus": "urgent", "scheduleName": "ROTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-35d72bbd1769bd66675997ac9e79164e", "timeStamp": 1520978413737, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), +(20, '{"id": "05934ae338431f28bf6793b2417c4bae", "data": {"startDate": "2018-01-11", "visitCode": "bcg", "expiryDate": "2019-01-01", "alertStatus": "urgent", "scheduleName": "BCG", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-232d50fcd2a7a7801633b5a0546cb753", "timeStamp": 1520978413764, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), +(21, '{"id": "05934ae338431f28bf6793b2417c4d6c", "data": {"startDate": "2018-02-22", "visitCode": "pcv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PCV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-2871da12dbce3cb16e0746f30cbc26fa", "timeStamp": 1520978413764, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), +(22, '{"id": "05934ae338431f28bf6793b2417c5aae", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-9c72f8f01fd21ae36e84a2def4db8732", "timeStamp": 1520978413765, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), +(23, '{"id": "05934ae338431f28bf6793b2417c705e", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-f72851fdbaac0f4f091054bbf60b8ed3", "timeStamp": 1520978413880, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), +(24, '{"id": "05934ae338431f28bf6793b2417c98f9", "data": {"startDate": "2018-02-22", "visitCode": "penta1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PENTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-fc9c73741eee67f6b71c84333ad6eb25", "timeStamp": 1520978413884, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), +(25, '{"id": "05934ae338431f28bf6793b2417c7d94", "data": {"startDate": "2018-01-11", "visitCode": "bcg", "expiryDate": "2019-01-01", "alertStatus": "urgent", "scheduleName": "BCG", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-ea88434f62397611c8e794eedbca74e4", "timeStamp": 1520978413894, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), +(26, '{"id": "05934ae338431f28bf6793b2417ca6cd", "data": {"startDate": "2018-02-22", "visitCode": "pcv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PCV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-6db5f0e05e5e69aa5f33429f6cdc75a7", "timeStamp": 1520978413945, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActionActive": true}'), +(27, '{"id": "05934ae338431f28bf6793b2417d0103", "data": {"startDate": "2018-02-22", "visitCode": "rota1", "expiryDate": "2018-08-01", "alertStatus": "urgent", "scheduleName": "ROTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-a28be37e4572a5e77a92461c76d0885e", "timeStamp": 1520978414164, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActionActive": true}'), +(28, '{"id": "05934ae338431f28bf6793b2417d1390", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-8da27b44f49e08574f5b8a7ad746a88c", "timeStamp": 1520978414184, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActionActive": true}'), +(29, '{"id": "05934ae338431f28bf6793b2417d0b1c", "data": {"startDate": "2018-02-22", "visitCode": "penta1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PENTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-87165e743ef46e7bfbdfea5d9e81d049", "timeStamp": 1520978414186, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActionActive": true}'), +(30, '{"id": "05934ae338431f28bf6793b2417d2ec2", "data": {"startDate": "2018-02-22", "visitCode": "penta1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PENTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-8506e63790993901b69708e013df5a8e", "timeStamp": 1520978414292, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), +(31, '{"id": "05934ae338431f28bf6793b2417d3aa0", "data": {"startDate": "2018-02-22", "visitCode": "rota1", "expiryDate": "2018-08-01", "alertStatus": "urgent", "scheduleName": "ROTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-636eec945c3c237fd8e90fe854dce081", "timeStamp": 1520978414313, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), +(32, '{"id": "05934ae338431f28bf6793b2417db6ca", "data": {"startDate": "2018-01-11", "visitCode": "bcg", "expiryDate": "2019-01-01", "alertStatus": "urgent", "scheduleName": "BCG", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-a8177920ff1fbef63a63f03851a343ee", "timeStamp": 1520978414508, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), +(33, '{"id": "05934ae338431f28bf6793b2417dba2d", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-51466c72f83907a175263b5750fe9b6c", "timeStamp": 1520978414513, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), +(34, '{"id": "05934ae338431f28bf6793b2417da475", "data": {"startDate": "2018-02-22", "visitCode": "pcv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PCV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-f18f7d27909a2cc3e3e27c5b4c116075", "timeStamp": 1520978414514, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'); + +INSERT INTO core.action_metadata (id, action_id, document_id, base_entity_id, server_version, provider_id, location_id, team, team_id) VALUES +(1, 1, '05934ae338431f28bf6793b241642462', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932697689, 'biddemo', null, null, null), +(2, 2, '05934ae338431f28bf6793b2416433c9', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932698005, 'biddemo', null, null, null), +(3, 3, '05934ae338431f28bf6793b241643a7e', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932698821, 'biddemo', null, null, null), +(4, 4, '05934ae338431f28bf6793b241644dd7', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932699621, 'biddemo', null, null, null), +(5, 5, '05934ae338431f28bf6793b241645535', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932700149, 'biddemo', null, null, null), +(6, 6, '05934ae338431f28bf6793b241645f1f', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932700973, 'biddemo', null, null, null), +(7, 7, '05934ae338431f28bf6793b2416473e0', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932701845, 'biddemo', null, null, null), +(8, 8, '05934ae338431f28bf6793b2416481aa', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932702653, 'biddemo', null, null, null), +(9, 9, '05934ae338431f28bf6793b241648e9d', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932703185, 'biddemo', null, null, null), +(10, 10, '05934ae338431f28bf6793b241649473', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932703825, 'biddemo', null, null, null), +(11, 11, '05934ae338431f28bf6793b24164a5d7', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932704673, 'biddemo', null, null, null), +(12, 12, '05934ae338431f28bf6793b24164b4ce', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932705277, 'biddemo', null, null, null), +(13, 13, '05934ae338431f28bf6793b24164c069', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932705889, 'biddemo', null, null, null), +(14, 14, '05934ae338431f28bf6793b241651160', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520933247737, 'biddemo', null, null, null), +(15, 15, '05934ae338431f28bf6793b241663fcd', '86c039a2-0b68-4166-849e-f49897e3a510', 1520933431893, 'biddemo', null, null, null), +(16, 16, '05934ae338431f28bf6793b2417bfe8f', '469597f0-eefe-4171-afef-f7234cbb2859', 1520978413525, 'biddemo', null, null, null), +(17, 17, '05934ae338431f28bf6793b2417bf883', '469597f0-eefe-4171-afef-f7234cbb2859', 1520978413537, 'biddemo', null, null, null), +(18, 18, '05934ae338431f28bf6793b2417bf3c3', '469597f0-eefe-4171-afef-f7234cbb2859', 1520978413541, 'biddemo', null, null, null), +(19, 19, '05934ae338431f28bf6793b2417c671b', 'aabcd2cc-c111-41c6-85e6-cb5d9e350d08', 1520978413737, 'biddemo', null, null, null), +(20, 20, '05934ae338431f28bf6793b2417c4bae', '469597f0-eefe-4171-afef-f7234cbb2859', 1520978413764, 'biddemo', null, null, null), +(21, 21, '05934ae338431f28bf6793b2417c4d6c', 'aabcd2cc-c111-41c6-85e6-cb5d9e350d08', 1520978413764, 'biddemo', null, null, null), +(22, 22, '05934ae338431f28bf6793b2417c5aae', '469597f0-eefe-4171-afef-f7234cbb2859', 1520978413765, 'biddemo', null, null, null), +(23, 23, '05934ae338431f28bf6793b2417c705e', 'aabcd2cc-c111-41c6-85e6-cb5d9e350d08', 1520978413880, 'biddemo', null, null, null), +(24, 24, '05934ae338431f28bf6793b2417c98f9', 'aabcd2cc-c111-41c6-85e6-cb5d9e350d08', 1520978413884, 'biddemo', null, null, null), +(25, 25, '05934ae338431f28bf6793b2417c7d94', 'aabcd2cc-c111-41c6-85e6-cb5d9e350d08', 1520978413894, 'biddemo', null, null, null), +(26, 26, '05934ae338431f28bf6793b2417ca6cd', '4a2a4ad9-cd29-47cb-bdb9-5b617a73b898', 1520978413945, 'biddemo', null, null, null), +(27, 27, '05934ae338431f28bf6793b2417d0103', '4a2a4ad9-cd29-47cb-bdb9-5b617a73b898', 1520978414164, 'biddemo', null, null, null), +(28, 28, '05934ae338431f28bf6793b2417d1390', '4a2a4ad9-cd29-47cb-bdb9-5b617a73b898', 1520978414184, 'biddemo', null, null, null), +(29, 29, '05934ae338431f28bf6793b2417d0b1c', '4a2a4ad9-cd29-47cb-bdb9-5b617a73b898', 1520978414186, 'biddemo', null, null, null), +(30, 30, '05934ae338431f28bf6793b2417d2ec2', 'b06e0847-0d68-4f5c-9288-58bc394fe052', 1520978414292, 'biddemo', null, null, null), +(31, 31, '05934ae338431f28bf6793b2417d3aa0', 'b06e0847-0d68-4f5c-9288-58bc394fe052', 1520978414313, 'biddemo', null, null, null), +(32, 32, '05934ae338431f28bf6793b2417db6ca', 'b06e0847-0d68-4f5c-9288-58bc394fe052', 1520978414508, 'biddemo', null, null, null), +(33, 33, '05934ae338431f28bf6793b2417dba2d', 'b06e0847-0d68-4f5c-9288-58bc394fe052', 1520978414513, 'biddemo', null, null, null), +(34, 34, '05934ae338431f28bf6793b2417da475', 'b06e0847-0d68-4f5c-9288-58bc394fe052', 1520978414514, 'biddemo', null, null, null); \ No newline at end of file From 32f3833ecd58abded12add61f68c17d86dd2785d Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 29 Mar 2018 17:16:50 +0300 Subject: [PATCH 084/133] Alert Repository unit tests --- .../postgres/AlertsRepositoryImpl.java | 23 +- .../mapper/custom/xml/CustomAlertMapper.xml | 4 +- .../custom/xml/CustomAlertMetadataMapper.xml | 9 +- .../postgres/AlertsRepositoryTest.java | 290 ++++++++++++++++++ .../src/test/resources/test-scripts/alert.sql | 41 +++ 5 files changed, 350 insertions(+), 17 deletions(-) create mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/AlertsRepositoryTest.java create mode 100644 opensrp-core/src/test/resources/test-scripts/alert.sql diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java index 1e5be23d92..2f5c6f0528 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java @@ -15,13 +15,16 @@ import org.opensrp.scheduler.Alert.AlertType; import org.opensrp.scheduler.Alert.TriggerType; import org.opensrp.scheduler.repository.AlertsRepository; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; @Repository("alertsRepositoryPostgres") public class AlertsRepositoryImpl extends BaseRepositoryImpl implements AlertsRepository { + @Autowired private CustomAlertMapper alertMapper; + @Autowired private CustomAlertMetadataMapper alertMetadataMapper; @Override @@ -210,6 +213,15 @@ public void markAlertAsCompleteFor(String providerId, String entityId, String tr } + @Override + public void markAlertAsCompleteFor(String entityId, String triggerName, String completionDate) { + List alerts = findActiveAlertByEntityIdTriggerName(entityId, triggerName); + for (Alert alert : alerts) { + alert.markAlertAsComplete(completionDate); + update(alert); + } + } + @Override public void addOrUpdateScheduleNotificationAlert(String beneficiaryType, String entityId, String providerId, String triggerName, String triggerCode, AlertStatus alertStatus, @@ -238,18 +250,9 @@ public void addOrUpdateScheduleNotificationAlert(String beneficiaryType, String } - @Override - public void markAlertAsCompleteFor(String entityId, String triggerName, String completionDate) { - List alerts = findActiveAlertByEntityIdTriggerName(entityId, triggerName); - for (Alert alert : alerts) { - alert.markAlertAsComplete(completionDate); - update(alert); - } - } - @Override protected Long retrievePrimaryKey(Alert alert) { - if (alert == null) { + if (alert == null || alert.getId() == null) { return null; } String documentId = alert.getId(); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomAlertMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomAlertMapper.xml index 755b7eb574..eeba8c44ea 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomAlertMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomAlertMapper.xml @@ -4,7 +4,7 @@ namespace="org.opensrp.repository.postgres.mapper.custom.CustomAlertMapper"> - insert into core.action + insert into core.alert id, @@ -18,7 +18,7 @@ #{id,jdbcType=BIGINT}, - #{json,jdbcType=OTHER}, + #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.AlertTypeHandler}, diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomAlertMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomAlertMetadataMapper.xml index 7daa931a59..7bb6bbcd6a 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomAlertMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomAlertMetadataMapper.xml @@ -1,7 +1,7 @@ + namespace="org.opensrp.repository.postgres.mapper.custom.CustomAlertMetadataMapper"> a.id, a.json @@ -19,8 +19,8 @@ - - + + @@ -31,8 +31,7 @@ and am.${criterion.condition} #{criterion.value} - and am.${criterion.condition} #{criterion.value} and - am.#{criterion.secondValue} + and am.${criterion.condition} #{criterion.value} and #{criterion.secondValue} and am.${criterion.condition} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/AlertsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/AlertsRepositoryTest.java new file mode 100644 index 0000000000..0f8421b177 --- /dev/null +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/AlertsRepositoryTest.java @@ -0,0 +1,290 @@ +package org.opensrp.repository.postgres; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.joda.time.DateTime; +import org.junit.Test; +import org.opensrp.dto.AlertStatus; +import org.opensrp.scheduler.Alert; +import org.opensrp.scheduler.Alert.AlertType; +import org.opensrp.scheduler.Alert.TriggerType; +import org.opensrp.scheduler.repository.AlertsRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; + +public class AlertsRepositoryTest extends BaseRepositoryTest { + + @Autowired + @Qualifier("alertsRepositoryPostgres") + private AlertsRepository alertsRepository; + + @Override + protected Set getDatabaseScripts() { + Set scripts = new HashSet(); + scripts.add("alert.sql"); + return scripts; + } + + @Test + public void testGet() { + Alert alert = alertsRepository.get("170c64f5-a187-4c90-b76d-09ff14d5e280"); + assertEquals("06e4d8c0-f3ff-458c-8141-53d199355c7a", alert.entityId()); + assertEquals("PCV 3", alert.getTriggerName()); + assertEquals(1521756016156l, alert.timestamp()); + + assertNull(alertsRepository.get("170c64f5-nbnsd8-sdfds-234-09ff14d5e280")); + } + + @Test + public void testAdd() { + Alert alert = new Alert("tester1", "ssdf-mn878-jsdjsd-kn", "child", AlertType.notification, TriggerType.schedule, + "BCG 2", "b2g2", new DateTime("2017-08-22"), new DateTime("2018-02-22"), AlertStatus.normal, null); + alertsRepository.add(alert); + assertEquals(16, alertsRepository.getAll().size()); + Alert savedAlert = alertsRepository.findActiveAlertByEntityId("ssdf-mn878-jsdjsd-kn").get(0); + assertEquals("2017-08-22", savedAlert.startDate()); + assertEquals("2018-02-22", savedAlert.expiryDate()); + } + + @Test + public void testUpdate() { + Alert alert = alertsRepository.findActiveAlertByEntityId("4a2a4ad9-cd29-47cb-bdb9-5b617a73b898").get(0); + alert.setClosingPeriod("closingPresiod"); + alert.setDateClosed("2017-09-18"); + alert.setReasonClosed("Test closing"); + long timeStamp = System.currentTimeMillis(); + alert.setTimeStamp(timeStamp); + + alertsRepository.update(alert); + + Alert updatedAlert = alertsRepository.findActiveAlertByEntityId("4a2a4ad9-cd29-47cb-bdb9-5b617a73b898").get(0); + assertEquals("closingPresiod", updatedAlert.closingPeriod()); + assertEquals("2017-09-18", updatedAlert.getDateClosed()); + assertEquals("Test closing", updatedAlert.getReasonClosed()); + assertEquals(timeStamp, updatedAlert.timestamp()); + } + + @Test + public void testGetAll() { + assertEquals(15, alertsRepository.getAll().size()); + } + + @Test + public void testSafeRemove() { + Alert alert = alertsRepository.findActiveAlertByEntityId("4a2a4ad9-cd29-47cb-bdb9-5b617a73b898").get(0); + alertsRepository.safeRemove(alert); + assertEquals(14, alertsRepository.getAll().size()); + + assertTrue(alertsRepository.findActiveAlertByEntityId("4a2a4ad9-cd29-47cb-bdb9-5b617a73b898").isEmpty()); + } + + @Test + public void testFindByProviderAndTimestamp() { + assertEquals(8, alertsRepository.findActiveByProviderAndTimestamp("biddemo", 0l).size()); + + assertEquals(4, alertsRepository.findActiveByProviderAndTimestamp("biddemo", 1521842403899l).size()); + + assertTrue(alertsRepository.findActiveByProviderAndTimestamp("biddemo1", 0l).isEmpty()); + + assertTrue(alertsRepository.findActiveByProviderAndTimestamp("biddemo", System.currentTimeMillis()).isEmpty()); + } + + @Test + public void testFindActiveByProviderAndTimestamp() { + assertEquals(8, alertsRepository.findActiveByProviderAndTimestamp("biddemo", 0l).size()); + + alertsRepository.markAllAsClosedFor("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "testing"); + + assertEquals(3, alertsRepository.findActiveByProviderAndTimestamp("biddemo", 0l).size()); + + assertTrue(alertsRepository.findActiveByProviderAndTimestamp("biddemo1", 0l).isEmpty()); + + assertTrue(alertsRepository.findActiveByProviderAndTimestamp("biddemo", System.currentTimeMillis()).isEmpty()); + + } + + @Test + public void testFindAlertByProviderEntityIdTriggerName() { + + List alerts = alertsRepository.findAlertByProviderEntityIdTriggerName("biddemo", + "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PCV 1"); + assertEquals(1, alerts.size()); + assertEquals("f210392d-2905-458a-8301-5a7fb844c448", alerts.get(0).getId()); + + alerts = alertsRepository.findAlertByProviderEntityIdTriggerName("biddemo", "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", + "PENTA 2"); + assertEquals(1, alerts.size()); + assertEquals("52e33167-4b64-4189-bf0c-e7a916815bc9", alerts.get(0).getId()); + + assertTrue(alertsRepository + .findAlertByProviderEntityIdTriggerName("biddemo1", "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2") + .isEmpty()); + + assertTrue(alertsRepository + .findAlertByProviderEntityIdTriggerName("biddemo", "01a12dba-d25e-451-cfa8cf5ebf40", "PENTA 2").isEmpty()); + assertTrue(alertsRepository + .findAlertByProviderEntityIdTriggerName("biddemo", "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "BCG").isEmpty()); + } + + @Test + public void testFindActiveAlertByProviderEntityIdTriggerName() { + List alerts = alertsRepository.findActiveAlertByProviderEntityIdTriggerName("biddemo", + "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PCV 1"); + assertEquals(1, alerts.size()); + assertEquals("f210392d-2905-458a-8301-5a7fb844c448", alerts.get(0).getId()); + + alerts = alertsRepository.findActiveAlertByProviderEntityIdTriggerName("biddemo", + "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2"); + assertEquals(1, alerts.size()); + assertEquals("52e33167-4b64-4189-bf0c-e7a916815bc9", alerts.get(0).getId()); + + alertsRepository.markAlertAsCompleteFor("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2", "2018-03-31"); + + assertTrue(alertsRepository + .findActiveAlertByProviderEntityIdTriggerName("biddemo", "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2") + .isEmpty()); + + assertTrue(alertsRepository + .findActiveAlertByProviderEntityIdTriggerName("biddemo1", "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2") + .isEmpty()); + + assertTrue(alertsRepository + .findActiveAlertByProviderEntityIdTriggerName("biddemo", "01a12dba-d25e-451-cfa8cf5ebf40", "PENTA 2") + .isEmpty()); + assertTrue(alertsRepository + .findActiveAlertByProviderEntityIdTriggerName("biddemo", "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "BCG") + .isEmpty()); + } + + @Test + public void testFindActiveAlertByEntityIdTriggerName() { + List alerts = alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", + "PCV 1"); + assertEquals(1, alerts.size()); + assertEquals("f210392d-2905-458a-8301-5a7fb844c448", alerts.get(0).getId()); + + alerts = alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2"); + assertEquals(1, alerts.size()); + assertEquals("52e33167-4b64-4189-bf0c-e7a916815bc9", alerts.get(0).getId()); + + alertsRepository.markAlertAsCompleteFor("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2", "2018-03-31"); + + assertTrue(alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2") + .isEmpty()); + + assertTrue( + alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-451-cfa8cf5ebf40", "PENTA 2").isEmpty()); + assertTrue( + alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "BCG").isEmpty()); + } + + @Test + public void testFindActiveAlertByEntityId() { + assertEquals(3, alertsRepository.findActiveAlertByEntityId("06e4d8c0-f3ff-458c-8141-53d199355c7a").size()); + + alertsRepository.markAllAsClosedFor("06e4d8c0-f3ff-458c-8141-53d199355c7a", "testing"); + + assertTrue(alertsRepository.findActiveAlertByEntityId("06e4d8c0-f3ff-458c-8141-53d199355c7a").isEmpty()); + + assertTrue(alertsRepository.findActiveAlertByEntityId("06e4d8c0-f3ff-453kk-kjj1-53d199355c7a").isEmpty()); + } + + @Test + public void testFindByEntityIdTriggerAndTimeStamp() { + List alerts = alertsRepository.findByEntityIdTriggerAndTimeStamp("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", + "PCV 1", new DateTime(0), new DateTime()); + assertEquals(1, alerts.size()); + assertEquals("f210392d-2905-458a-8301-5a7fb844c448", alerts.get(0).getId()); + + alertsRepository.markAlertAsCompleteFor("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PCV 1", "2018-03-31"); + + assertTrue(alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PCV 1") + .isEmpty()); + + assertTrue(alertsRepository.findByEntityIdTriggerAndTimeStamp("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PCV 1", + new DateTime(1521842403913l), new DateTime()).isEmpty()); + assertTrue(alertsRepository.findByEntityIdTriggerAndTimeStamp("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "BCG", + new DateTime(1521842403913l), new DateTime()).isEmpty()); + + } + + @Test + public void testMarkAllAsClosedFor() { + alertsRepository.markAllAsClosedFor("06e4d8c0-f3ff-458c-8141-53d199355c7a", "testing"); + + assertTrue(alertsRepository.findActiveAlertByEntityId("06e4d8c0-f3ff-458c-8141-53d199355c7a").isEmpty()); + } + + @Test + public void testMarkAlertAsClosedFor() { + alertsRepository.markAlertAsClosedFor("biddemo", "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2", + "Testing Close!!"); + + assertTrue(alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2") + .isEmpty()); + + Alert alert = alertsRepository.get("52e33167-4b64-4189-bf0c-e7a916815bc9"); + assertEquals(false, alert.isActive()); + assertEquals("Testing Close!!", alert.getReasonClosed()); + assertEquals(AlertStatus.closed.name(), alert.getAlertStatus()); + } + + @Test + public void testMarkAlertAsCompleteFor() { + alertsRepository.markAlertAsCompleteFor("biddemo", "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2", "2018-03-27"); + + assertTrue(alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2") + .isEmpty()); + + Alert alert = alertsRepository.get("52e33167-4b64-4189-bf0c-e7a916815bc9"); + assertEquals(false, alert.isActive()); + assertEquals("2018-03-27", alert.getDateComplete()); + assertEquals(AlertStatus.complete.name(), alert.getAlertStatus()); + } + + @Test + public void testMarkAlertAsCompleteForWithoutProvider() { + alertsRepository.markAlertAsCompleteFor("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2", "2018-03-27"); + + assertTrue(alertsRepository.findActiveAlertByEntityIdTriggerName("01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "PENTA 2") + .isEmpty()); + + Alert alert = alertsRepository.get("52e33167-4b64-4189-bf0c-e7a916815bc9"); + assertEquals(false, alert.isActive()); + assertEquals("2018-03-27", alert.getDateComplete()); + assertEquals(AlertStatus.complete.name(), alert.getAlertStatus()); + } + + @Test + public void testAddOrUpdateScheduleNotificationAlert() { + //test update + alertsRepository.addOrUpdateScheduleNotificationAlert("vaccination", "06e4d8c0-f3ff-458c-8141-53d199355c7a", "DYuyi", + "OPV 3", "opv3", AlertStatus.upcoming, new DateTime("2018-04-28"), new DateTime("2021-02-19")); + + Alert alert = alertsRepository.findActiveAlertByEntityIdTriggerName("06e4d8c0-f3ff-458c-8141-53d199355c7a", "OPV 3") + .get(0); + assertEquals(new DateTime("2018-04-28").toString(), alert.getStartDate()); + assertEquals(new DateTime("2021-02-19").toString(), alert.getExpiryDate()); + assertEquals(AlertStatus.upcoming.name(), alert.getAlertStatus()); + + assertEquals(15, alertsRepository.getAll().size()); + + //test add + alertsRepository.addOrUpdateScheduleNotificationAlert("vaccination", "06e4d8c0-f3ff-458c-8141-53d199355c7a", "DYuyi", + "OPV 4", "opv4", AlertStatus.urgent, new DateTime("2017-01-21"), new DateTime("2020-05-09")); + + alert = alertsRepository.findActiveAlertByEntityIdTriggerName("06e4d8c0-f3ff-458c-8141-53d199355c7a", "OPV 4") + .get(0); + assertEquals("2017-01-21", alert.getStartDate()); + assertEquals("2020-05-09", alert.getExpiryDate()); + assertEquals(AlertStatus.urgent.name(), alert.getAlertStatus()); + + assertEquals(16, alertsRepository.getAll().size()); + } +} diff --git a/opensrp-core/src/test/resources/test-scripts/alert.sql b/opensrp-core/src/test/resources/test-scripts/alert.sql new file mode 100644 index 0000000000..e2228a51d2 --- /dev/null +++ b/opensrp-core/src/test/resources/test-scripts/alert.sql @@ -0,0 +1,41 @@ +--clear data +TRUNCATE TABLE core.alert CASCADE; + +ALTER SEQUENCE core.alert_id_seq RESTART WITH 16; + +ALTER SEQUENCE core.alert_metadata_id_seq RESTART WITH 16; + +INSERT INTO core.alert (id, json) VALUES +(1, '{"id": "a6159ce3-c93c-4339-9766-d814a10ca2db", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403899, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "pcv2", "triggerName": "PCV 2", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), +(2, '{"id": "758aaf63-324e-4ccc-95f2-894be012dc25", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403900, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "opv2", "triggerName": "OPV 2", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), +(3, '{"id": "f210392d-2905-458a-8301-5a7fb844c448", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403899, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "pcv1", "triggerName": "PCV 1", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), +(4, '{"id": "52e33167-4b64-4189-bf0c-e7a916815bc9", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403837, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "penta2", "triggerName": "PENTA 2", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), +(5, '{"id": "07a17c79-1e96-478b-ab23-a56a748df09e", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403913, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "rota2", "triggerName": "ROTA 2", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), +(6, '{"id": "89bcc696-9491-4b03-8064-d7752b0cb12a", "type": "Alert", "details": {"urgent:end": "2022-04-20T00:00:00.000+02:00", "urgent:start": "2017-05-28T00:00:00.000+02:00"}, "entityId": "06e4d8c0-f3ff-458c-8141-53d199355c7a", "isActive": true, "alertType": "notification", "startDate": "2017-05-28T00:00:00.000+02:00", "timeStamp": 1521064813469, "expiryDate": "2022-04-20T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "urgent", "triggerCode": "opv3", "triggerName": "OPV 3", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), +(7, '{"id": "3aa476f0-50e3-489e-9778-5ae3dcea8640", "type": "Alert", "details": {"urgent:end": "2022-04-20T00:00:00.000+02:00", "urgent:start": "2017-05-28T00:00:00.000+02:00"}, "entityId": "06e4d8c0-f3ff-458c-8141-53d199355c7a", "isActive": true, "alertType": "notification", "startDate": "2017-05-28T00:00:00.000+02:00", "timeStamp": 1521064813617, "expiryDate": "2022-04-20T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "urgent", "triggerCode": "penta3", "triggerName": "PENTA 3", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), +(8, '{"id": "170c64f5-a187-4c90-b76d-09ff14d5e280", "type": "Alert", "details": {"urgent:end": "2022-04-20T00:00:00.000+02:00", "urgent:start": "2017-05-28T00:00:00.000+02:00"}, "entityId": "06e4d8c0-f3ff-458c-8141-53d199355c7a", "isActive": false, "alertType": "notification", "startDate": "2017-05-28T00:00:00.000+02:00", "timeStamp": 1521756016156, "dateClosed": "2018-03-27", "expiryDate": "2022-04-20T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "complete", "triggerCode": "pcv3", "triggerName": "PCV 3", "triggerType": "schedule", "dateComplete": "2018-03-27", "closingPeriod": "urgent", "beneficiaryType": "vaccination"}'), +(9, '{"id": "80242dd1-01ca-47ea-ae3c-dc0c24dd3f5f", "type": "Alert", "details": {"urgent:end": "2022-04-20T00:00:00.000+02:00", "urgent:start": "2017-05-28T00:00:00.000+02:00"}, "entityId": "06e4d8c0-f3ff-458c-8141-53d199355c7a", "isActive": true, "alertType": "notification", "startDate": "2017-05-28T00:00:00.000+02:00", "timeStamp": 1521064813385, "expiryDate": "2022-04-20T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "urgent", "triggerCode": "pcv3", "triggerName": "PCV 3", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), +(10, '{"id": "1b7ed001-201b-4503-a098-4b1cd509470d", "type": "Alert", "details": {"normal:end": "2018-03-23T00:00:00.000+02:00", "normal:start": "2018-03-13T00:00:00.000+02:00"}, "entityId": "7583329e-340e-4f64-8d6e-a7cbcf334455", "isActive": true, "alertType": "notification", "startDate": "2018-03-13T00:00:00.000+02:00", "timeStamp": 1520978413376, "expiryDate": "2018-03-23T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "normal", "triggerCode": "itn1", "triggerName": "ITN 1", "triggerType": "schedule", "beneficiaryType": "child"}'), +(11, '{"id": "32e7d8cd-28e6-4361-9a39-bee732e61d93", "type": "Alert", "details": {"normal:end": "2018-03-23T00:00:00.000+02:00", "normal:start": "2018-03-13T00:00:00.000+02:00"}, "entityId": "7583329e-340e-4f64-8d6e-a7cbcf334455", "isActive": true, "alertType": "notification", "startDate": "2018-03-13T00:00:00.000+02:00", "timeStamp": 1520978413593, "expiryDate": "2018-03-23T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "normal", "triggerCode": "bcg", "triggerName": "BCG", "triggerType": "schedule", "beneficiaryType": "child"}'), +(12, '{"id": "01741058-588c-4105-b2e4-6e5ae47f4880", "type": "Alert", "details": {"urgent:end": "2021-03-27T00:00:00.000+02:00", "urgent:start": "2017-04-06T00:00:00.000+02:00"}, "entityId": "980d55f5-60d8-4488-b75b-f511c3c839f7", "isActive": true, "alertType": "notification", "startDate": "2017-04-06T00:00:00.000+02:00", "timeStamp": 1522188003909, "expiryDate": "2021-03-27T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "urgent", "triggerCode": "deworming1", "triggerName": "DEWORMING 1", "triggerType": "schedule", "beneficiaryType": "child"}'), +(13, '{"id": "4ba278a4-7d91-4cae-a54d-8353c63e2940", "type": "Alert", "details": {"urgent:end": "2021-03-27T00:00:00.000+02:00", "urgent:start": "2016-10-07T00:00:00.000+02:00"}, "entityId": "980d55f5-60d8-4488-b75b-f511c3c839f7", "isActive": true, "alertType": "notification", "startDate": "2016-10-07T00:00:00.000+02:00", "timeStamp": 1522188003905, "expiryDate": "2021-03-27T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "urgent", "triggerCode": "vita1", "triggerName": "VIT A 1", "triggerType": "schedule", "beneficiaryType": "child"}'), +(14, '{"id": "950d34d1-a374-47aa-91ac-09a62373e624", "type": "Alert", "details": {"normal:end": "2018-07-01T00:00:00.000+02:00", "normal:start": "2018-01-01T00:00:00.000+02:00"}, "entityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActive": true, "alertType": "notification", "startDate": "2018-01-01T00:00:00.000+02:00", "timeStamp": 1520978414377, "expiryDate": "2018-07-01T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "normal", "triggerCode": "vitaifc2", "triggerName": "VIT A IFC 2", "triggerType": "schedule", "beneficiaryType": "child"}'), +(15, '{"id": "59bf074a-0415-40bb-9b15-d681613673d9", "type": "Alert", "entityId": "fe7b6350-16d2-41d0-8574-c194088705df", "isActive": false, "alertType": "notification", "startDate": "2018-02-22", "timeStamp": 1520978414781, "dateClosed": "2018-03-14", "expiryDate": "2022-11-01", "providerId": "biddemo", "alertStatus": "complete", "triggerCode": "pcv1", "triggerName": "PCV 1", "triggerType": "schedule", "dateComplete": "2018-02-12", "closingPeriod": "urgent", "beneficiaryType": "child"}'); + + +INSERT INTO core.alert_metadata (id, alert_id, document_id, base_entity_id, server_version, provider_id, location_id, team, team_id, is_active, trigger_name) VALUES +(1, 1, 'a6159ce3-c93c-4339-9766-d814a10ca2db', '01a12dba-d25e-4518-8da3-cfa8cf5ebf40', 1521842403899, 'biddemo', null, null, null, true, 'PCV 2'), +(2, 2, '758aaf63-324e-4ccc-95f2-894be012dc25', '01a12dba-d25e-4518-8da3-cfa8cf5ebf40', 1521842403900, 'biddemo', null, null, null, true, 'OPV 2'), +(3, 3, 'f210392d-2905-458a-8301-5a7fb844c448', '01a12dba-d25e-4518-8da3-cfa8cf5ebf40', 1521842403899, 'biddemo', null, null, null, true, 'PCV 1'), +(4, 4, '52e33167-4b64-4189-bf0c-e7a916815bc9', '01a12dba-d25e-4518-8da3-cfa8cf5ebf40', 1521842403837, 'biddemo', null, null, null, true, 'PENTA 2'), +(5, 5, '07a17c79-1e96-478b-ab23-a56a748df09e', '01a12dba-d25e-4518-8da3-cfa8cf5ebf40', 1521842403913, 'biddemo', null, null, null, true, 'ROTA 2'), +(6, 6, '89bcc696-9491-4b03-8064-d7752b0cb12a', '06e4d8c0-f3ff-458c-8141-53d199355c7a', 1521064813469, 'DYuyi', null, null, null, true, 'OPV 3'), +(7, 7, '3aa476f0-50e3-489e-9778-5ae3dcea8640', '06e4d8c0-f3ff-458c-8141-53d199355c7a', 1521064813617, 'DYuyi', null, null, null, true, 'PENTA 3'), +(8, 8, '170c64f5-a187-4c90-b76d-09ff14d5e280', '06e4d8c0-f3ff-458c-8141-53d199355c7a', 1521756016156, 'biddemo', null, null, null, false, 'PCV 3'), +(9, 9, '80242dd1-01ca-47ea-ae3c-dc0c24dd3f5f', '06e4d8c0-f3ff-458c-8141-53d199355c7a', 1521064813385, 'DYuyi', null, null, null, true, 'PCV 3'), +(10, 10, '1b7ed001-201b-4503-a098-4b1cd509470d', '7583329e-340e-4f64-8d6e-a7cbcf334455', 1520978413376, 'DYuyi', null, null, null, true, 'ITN 1'), +(11, 11, '32e7d8cd-28e6-4361-9a39-bee732e61d93', '7583329e-340e-4f64-8d6e-a7cbcf334455', 1520978413593, 'DYuyi', null, null, null, true, 'BCG'), +(12, 12, '01741058-588c-4105-b2e4-6e5ae47f4880', '980d55f5-60d8-4488-b75b-f511c3c839f7', 1522188003909, 'biddemo', null, null, null, true, 'DEWORMING 1'), +(13, 13, '4ba278a4-7d91-4cae-a54d-8353c63e2940', '980d55f5-60d8-4488-b75b-f511c3c839f7', 1522188003905, 'biddemo', null, null, null, true, 'VIT A 1'), +(14, 14, '950d34d1-a374-47aa-91ac-09a62373e624', '4a2a4ad9-cd29-47cb-bdb9-5b617a73b898', 1520978414377, 'biddemo', null, null, null, true, 'VIT A IFC 2'), +(15, 15, '59bf074a-0415-40bb-9b15-d681613673d9', 'fe7b6350-16d2-41d0-8574-c194088705df', 1520978414781, 'biddemo', null, null, null, false, 'PCV 1'); From c95b912ea589a093a1791ff92e92dece48242fda Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 29 Mar 2018 17:18:37 +0300 Subject: [PATCH 085/133] Merge branch 'couchdb-to-postgres' into issue402 From ea56a85b0cfa94f5035a38ba24578e77537c9092 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 29 Mar 2018 18:18:15 +0300 Subject: [PATCH 086/133] Multimedia repository unit test --- .../postgres/MultimediaRepositoryImpl.java | 4 +- .../custom/xml/CustomMultiMediaMapper.xml | 4 +- .../postgres/MultimediaRepositoryTest.java | 109 ++++++++++++++++++ .../resources/test-scripts/multimedia.sql | 11 ++ 4 files changed, 124 insertions(+), 4 deletions(-) create mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/MultimediaRepositoryTest.java create mode 100644 opensrp-core/src/test/resources/test-scripts/multimedia.sql diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java index 0d97685144..1878ae6516 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java @@ -12,7 +12,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; -@Repository +@Repository("multimediaRepositoryPostgres") public class MultimediaRepositoryImpl extends BaseRepositoryImpl implements MultimediaRepository { @Autowired @@ -103,7 +103,7 @@ public List all(String providerId) { @Override protected Long retrievePrimaryKey(Multimedia multimedia) { - if (multimedia == null) { + if (multimedia == null || multimedia.getId() == null) { return null; } String documentId = multimedia.getId(); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomMultiMediaMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomMultiMediaMapper.xml index 1c4a7332dd..ed9ac78ade 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomMultiMediaMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomMultiMediaMapper.xml @@ -5,8 +5,8 @@ - - + + diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/MultimediaRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/MultimediaRepositoryTest.java new file mode 100644 index 0000000000..a04af0a868 --- /dev/null +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/MultimediaRepositoryTest.java @@ -0,0 +1,109 @@ +package org.opensrp.repository.postgres; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.junit.Test; +import org.opensrp.domain.Multimedia; +import org.opensrp.repository.MultimediaRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; + +public class MultimediaRepositoryTest extends BaseRepositoryTest { + + @Autowired + @Qualifier("multimediaRepositoryPostgres") + private MultimediaRepository multimediaRepository; + + @Override + protected Set getDatabaseScripts() { + Set scripts = new HashSet(); + scripts.add("multimedia.sql"); + return scripts; + } + + @Test + public void testGet() { + Multimedia multimedia = multimediaRepository.get("05934ae338431f28bf6793b241f0c5ca"); + assertEquals("040d4f18-8140-479c-aa21-725612073490", multimedia.getCaseId()); + assertEquals("/opt/patient_images/040d4f18-8140-479c-aa21-725612073490.jpg", multimedia.getFilePath()); + assertEquals("profilepic", multimedia.getFileCategory()); + + assertNull(multimediaRepository.get("05934ae338431f28bf6793b241fa")); + } + + @Test + public void testAdd() { + Multimedia multimedia = new Multimedia("2332kkj-jhjmmn-23423423", "tester1", "image/jpeg", "/tmp/123.jpg", + "thumbnail"); + multimediaRepository.add(multimedia); + + assertEquals(6, multimediaRepository.getAll().size()); + + Multimedia savedEntity = multimediaRepository.findByCaseId("2332kkj-jhjmmn-23423423"); + assertEquals("/tmp/123.jpg", savedEntity.getFilePath()); + assertEquals("thumbnail", savedEntity.getFileCategory()); + assertEquals("image/jpeg", savedEntity.getContentType()); + } + + @Test + public void testUpdate() { + Multimedia multimedia = multimediaRepository.get("3157f9339bf0c948dd5d12aff82111e1"); + multimedia.setContentType("image/png"); + multimedia.setFilePath("/opt/images/783434-34534.png"); + multimediaRepository.update(multimedia); + + Multimedia updatedEntity = multimediaRepository.get("3157f9339bf0c948dd5d12aff82111e1"); + assertEquals("/opt/images/783434-34534.png", updatedEntity.getFilePath()); + assertEquals("image/png", updatedEntity.getContentType()); + } + + @Test + public void testGetAll() { + assertEquals(5, multimediaRepository.getAll().size()); + + Multimedia multimedia = new Multimedia("2332kkj-76385430sdfsd-23423423", "tester23", "image/jpeg", + "/tmp/b7jhkh23.jpg", "thumbnail"); + multimediaRepository.add(multimedia); + + assertEquals(6, multimediaRepository.getAll().size()); + } + + @Test + public void testSafeRemove() { + + Multimedia multimedia = multimediaRepository.get("3157f9339bf0c948dd5d12aff82111e1"); + multimediaRepository.safeRemove(multimedia); + + assertEquals(4, multimediaRepository.getAll().size()); + + assertNull(multimediaRepository.get("3157f9339bf0c948dd5d12aff82111e1")); + + } + + @Test + public void testFindByCaseId() { + Multimedia multimedia = multimediaRepository.findByCaseId("87dc3230-84f7-4088-b257-e8b3130ab86b"); + assertEquals("091488163b6ecd589a915372a0ad3b0d", multimedia.getId()); + assertEquals("/opt/patient_images/87dc3230-84f7-4088-b257-e8b3130ab86b.jpg", multimedia.getFilePath()); + assertEquals("profilepic", multimedia.getFileCategory()); + + assertNull(multimediaRepository.findByCaseId("05934ae338431f28bf6793b241fa")); + } + + @Test + public void testAll() { + assertEquals(4, multimediaRepository.all("biddemo").size()); + + List multimedia = multimediaRepository.all("tester11"); + assertEquals(1, multimedia.size()); + + assertEquals("317f8db1bb6cc4b15ecc9993a2922f47", multimedia.get(0).getId()); + assertEquals("24eec0d8-e0ee-4f22-9d6b-3cca84bdefcf", multimedia.get(0).getCaseId()); + } + +} diff --git a/opensrp-core/src/test/resources/test-scripts/multimedia.sql b/opensrp-core/src/test/resources/test-scripts/multimedia.sql new file mode 100644 index 0000000000..c598af60e5 --- /dev/null +++ b/opensrp-core/src/test/resources/test-scripts/multimedia.sql @@ -0,0 +1,11 @@ +--clear data +TRUNCATE TABLE core.multi_media; + +ALTER SEQUENCE core.multi_media_id_seq RESTART WITH 6; + +INSERT INTO core.multi_media (id, document_id, case_id, provider_id, content_type, file_path, file_category) VALUES +(1, '05934ae338431f28bf6793b241f0c5ca', '040d4f18-8140-479c-aa21-725612073490', 'biddemo', 'image/jpeg', '/opt/patient_images/040d4f18-8140-479c-aa21-725612073490.jpg', 'profilepic'), +(2, '317f8db1bb6cc4b15ecc9993a282bc2f', '3c07c42c-6aee-4eb9-8db3-0aae3eac8f6d', 'biddemo', 'image/jpeg', '/opt/patient_images/3c07c42c-6aee-4eb9-8db3-0aae3eac8f6d.jpg', 'profilepic'), +(3, '091488163b6ecd589a915372a0ad3b0d', '87dc3230-84f7-4088-b257-e8b3130ab86b', 'biddemo', 'image/jpeg', '/opt/patient_images/87dc3230-84f7-4088-b257-e8b3130ab86b.jpg', 'profilepic'), +(4, '3157f9339bf0c948dd5d12aff82111e1', '01503901-5acb-45fb-affe-839ac39d200d', 'biddemo', 'image/jpeg', '/opt/patient_images/01503901-5acb-45fb-affe-839ac39d200d.jpg', 'profilepic'), +(5, '317f8db1bb6cc4b15ecc9993a2922f47', '24eec0d8-e0ee-4f22-9d6b-3cca84bdefcf', 'tester11', 'image/jpeg', '/opt/patient_images/24eec0d8-e0ee-4f22-9d6b-3cca84bdefcf.jpg', 'profilepic'); From 61731744684a143c140c3f4d953c524cb7c2c747 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Wed, 4 Apr 2018 12:55:37 +0300 Subject: [PATCH 087/133] Reports repository unit tests --- ...307150448_create_report_metadata_table.sql | 2 +- .../postgres/ReportsRepositoryImpl.java | 23 +- .../custom/xml/CustomReportMetadataMapper.xml | 6 +- .../postgres/ReportsRepositoryTest.java | 228 ++++++++++++++++++ .../test/resources/test-scripts/report.sql | 22 ++ 5 files changed, 268 insertions(+), 13 deletions(-) create mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/ReportsRepositoryTest.java create mode 100644 opensrp-core/src/test/resources/test-scripts/report.sql diff --git a/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql b/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql index 6d1c2f6a7f..8014a513f3 100644 --- a/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql +++ b/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql @@ -23,7 +23,7 @@ CREATE TABLE core.report_metadata report_id bigint REFERENCES core.report (id), document_id character varying UNIQUE NOT NULL, form_submission_id character varying UNIQUE NOT NULL, - base_entity_id character varying NOT NULL, + base_entity_id character varying, server_version bigint, report_type character varying, report_date date, diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java index 0f462e69bb..5fa37fb43c 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java @@ -17,7 +17,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; -@Repository +@Repository("reportsRepositoryPostgres") public class ReportsRepositoryImpl extends BaseRepositoryImpl implements ReportsRepository { @Autowired @@ -55,6 +55,7 @@ public void add(Report entity) { } int rowsAffected = reportMapper.insertSelectiveAndSetId(pgReport); + logger.info("rowsAffected, pgReport.getId():" + rowsAffected + "," + pgReport.getId()); if (rowsAffected < 1 || pgReport.getId() == null) { return; } @@ -156,7 +157,7 @@ public List findByBaseEntityAndType(String baseEntityId, String reportTy public List findByEmptyServerVersion() { ReportMetadataExample reportMetadataExample = new ReportMetadataExample(); reportMetadataExample.createCriteria().andServerVersionIsNull(); - reportMetadataExample.or(reportMetadataExample.createCriteria().andServerVersionNotEqualTo(0l)); + reportMetadataExample.or(reportMetadataExample.createCriteria().andServerVersionEqualTo(0l)); return convert(reportMetadataMapper.selectMany(reportMetadataExample, 0, DEFAULT_FETCH_SIZE)); } @@ -187,7 +188,7 @@ public List findReports(String team, String providerId, String locationI ids.add(providerId); } criteria.andProviderIdIn(ids); - } else if ((providerId != null && !StringUtils.isNotEmpty(providerId))) { + } else if ((providerId != null && StringUtils.isNotEmpty(providerId))) { criteria.andProviderIdEqualTo(providerId); } if (StringUtils.isNotBlank(locationId)) @@ -195,9 +196,9 @@ public List findReports(String team, String providerId, String locationI if (StringUtils.isNotBlank(baseEntityId)) criteria.andBaseEntityIdEqualTo(baseEntityId); if (serverVersion != null) - criteria.andServerVersionGreaterThanOrEqualTo(serverVersion); + criteria.andServerVersionGreaterThanOrEqualTo(serverVersion); reportMetadataExample.setOrderByClause(getOrderByClause(sortBy, sortOrder)); - if (reportMetadataExample.getOredCriteria().isEmpty()) { + if (!criteria.isValid()) { throw new IllegalArgumentException("Atleast one search filter must be specified"); } else return convert(reportMetadataMapper.selectMany(reportMetadataExample, 0, limit)); @@ -218,7 +219,7 @@ public List findReports(String baseEntityId, DateTime from, DateTime to, criteria.andLocationIdEqualTo(locationId); if (from != null || to != null) criteria.andReportDateBetween(from.toDate(), to.toDate()); - if (from != null || to != null) + if (lastEditFrom != null || lastEditTo != null) criteria.andDateEditedBetween(lastEditFrom.toDate(), lastEditTo.toDate()); if (!criteria.isValid()) throw new IllegalArgumentException("Atleast one search filter must be specified"); @@ -233,7 +234,7 @@ public List findReportsByDynamicQuery(String query) { @Override protected Long retrievePrimaryKey(Report entity) { - if (entity == null) { + if (entity == null || entity.getId() == null) { return null; } String documentId = entity.getId(); @@ -295,11 +296,15 @@ private ReportMetadata createMetadata(Report entity, Long id) { reportMetadata.setBaseEntityId(entity.getBaseEntityId()); reportMetadata.setFormSubmissionId(entity.getFormSubmissionId()); reportMetadata.setReportType(entity.getReportType()); - reportMetadata.setReportDate(entity.getReportDate().toDate()); + if (entity.getReportDate() != null) { + reportMetadata.setReportDate(entity.getReportDate().toDate()); + } reportMetadata.setServerVersion(entity.getServerVersion()); reportMetadata.setProviderId(entity.getProviderId()); reportMetadata.setLocationId(entity.getLocationId()); - reportMetadata.setDateEdited(entity.getDateEdited().toDate()); + if (entity.getDateEdited() != null) { + reportMetadata.setDateEdited(entity.getDateEdited().toDate()); + } return reportMetadata; } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomReportMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomReportMetadataMapper.xml index be10cfb2da..a25aa82062 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomReportMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomReportMetadataMapper.xml @@ -23,8 +23,8 @@ - - + + @@ -35,7 +35,7 @@ and rm.${criterion.condition} #{criterion.value} - and rm.${criterion.condition} #{criterion.value} and rm.#{criterion.secondValue} + and rm.${criterion.condition} #{criterion.value} and #{criterion.secondValue} and rm.${criterion.condition} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ReportsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ReportsRepositoryTest.java new file mode 100644 index 0000000000..297d0dc5a3 --- /dev/null +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ReportsRepositoryTest.java @@ -0,0 +1,228 @@ +package org.opensrp.repository.postgres; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.joda.time.DateTime; +import org.junit.Test; +import org.opensrp.domain.Report; +import org.opensrp.repository.ReportsRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; + +public class ReportsRepositoryTest extends BaseRepositoryTest { + + @Autowired + @Qualifier("reportsRepositoryPostgres") + private ReportsRepository reportsRepository; + + @Override + protected Set getDatabaseScripts() { + Set scripts = new HashSet(); + scripts.add("report.sql"); + return scripts; + } + + @Test + public void testGet() { + Report report = reportsRepository.get("07271855-4018-497a-b180-6af01f0fa62b"); + assertEquals("7073cef4-b974-4910-afa7-dd2ccadba089", report.getFormSubmissionId()); + assertEquals("b0781dd2-e1b1-4878-8e6c-fba488eb9fa3", report.getLocationId()); + assertNull(reportsRepository.get("07271855-4018-497a-b180-6af")); + } + + @Test + public void testAdd() { + Report report = new Report("ghsjf-s723-sj97s", "3453535sdfs", new DateTime(), "MONTHLY", "435-njhjh-jjh", "tester11", + "3", 1522829702064l, 0, null); + reportsRepository.add(report); + assertEquals(6, reportsRepository.getAll().size()); + List reports = reportsRepository.findByBaseEntityAndFormSubmissionId("ghsjf-s723-sj97s", "435-njhjh-jjh"); + assertEquals("3453535sdfs", reports.get(0).getLocationId()); + assertEquals("MONTHLY", report.getReportType()); + assertNull(report.getHia2Indicators()); + + } + + @Test + public void testUpdate() { + Report report = reportsRepository.get("cd09a3d4-01d9-485c-a1c5-a2eb078a61be"); + report.setBaseEntityId("asads-asdas7676-ggas"); + report.setServerVersion(1522827820l); + report.setDuration(6); + + reportsRepository.update(report); + + Report updateReport = reportsRepository.get("cd09a3d4-01d9-485c-a1c5-a2eb078a61be"); + assertEquals("asads-asdas7676-ggas", updateReport.getBaseEntityId()); + assertEquals(1522827820l, updateReport.getServerVersion().longValue()); + assertEquals(6, updateReport.getDuration()); + + } + + @Test + public void testGetAll() { + assertEquals(5, reportsRepository.getAll().size()); + reportsRepository.safeRemove(reportsRepository.get("cd09a3d4-01d9-485c-a1c5-a2eb078a61be")); + assertEquals(4, reportsRepository.getAll().size()); + } + + @Test + public void testSafeRemove() { + reportsRepository.safeRemove(reportsRepository.get("c57ba49f-34b9-4986-9b87-69f48b1830c5")); + assertEquals(4, reportsRepository.getAll().size()); + assertNull(reportsRepository.get("c57ba49f-34b9-4986-9b87-69f48b1830c5")); + } + + @Test + public void testFindById() { + Report report = reportsRepository.findById("c57ba49f-34b9-4986-9b87-69f48b1830c5"); + assertEquals("88f9fe90-1e45-46b3-8056-e932574dcbd9", report.getFormSubmissionId()); + assertEquals(64, report.getHia2Indicators().size()); + } + + @Test + public void testFindByBaseEntityId() { + + assertEquals(2, reportsRepository.findByBaseEntityId("6654kk-mnj45-mmnfgd-l45645").size()); + + List reports = reportsRepository.findByBaseEntityId("678343544-nhj7-jghdfgfd-mkjdkfg"); + assertEquals(1, reports.size()); + assertEquals("ecafd20f-c95b-4046-9355-9512e1908da4", reports.get(0).getId()); + assertEquals("1aea74ac-b737-477a-99d3-728011fbae3f", reports.get(0).getFormSubmissionId()); + + assertTrue(reportsRepository.findByBaseEntityId("sfsdfd").isEmpty()); + + } + + @Test + public void testFindAllByIdentifier() { + assertEquals(2, reportsRepository.findAllByIdentifier("56757L").size()); + + List reports = reportsRepository.findAllByIdentifier("1121K"); + assertEquals(1, reports.size()); + assertEquals("07271855-4018-497a-b180-6af01f0fa62b", reports.get(0).getId()); + + assertTrue(reportsRepository.findAllByIdentifier("7234M").isEmpty()); + } + + @Test + public void testFindByBaseEntityAndType() { + assertEquals(2, reportsRepository.findByBaseEntityAndType("6654kk-mnj45-mmnfgd-l45645", "HIA2").size()); + + List reports = reportsRepository.findByBaseEntityAndType("678343544-nhj7-jghdfgfd-mkjdkfg", "HIA2"); + assertEquals(1, reports.size()); + assertEquals("ecafd20f-c95b-4046-9355-9512e1908da4", reports.get(0).getId()); + assertEquals("1aea74ac-b737-477a-99d3-728011fbae3f", reports.get(0).getFormSubmissionId()); + + assertTrue(reportsRepository.findByBaseEntityAndType("678343544-nhj7-jghdfgfd-mkjdkfg", "HIA4").isEmpty()); + } + + @Test + public void testFindByEmptyServerVersion() { + List reports = reportsRepository.findByEmptyServerVersion(); + assertEquals(1, reports.size()); + assertEquals("60ab7d5c-a051-4633-b0b3-f52b701cb261", reports.get(0).getId()); + assertEquals("03b5d0b8-4f72-4415-9909-ce03b5802c75", reports.get(0).getFormSubmissionId()); + + reports.get(0).setServerVersion(System.currentTimeMillis()); + reportsRepository.update(reports.get(0)); + + assertTrue(reportsRepository.findByEmptyServerVersion().isEmpty()); + } + + @Test + public void testFindByServerVersion() { + assertEquals(1, reportsRepository.findByServerVersion(1503312366264l).size()); + + assertEquals(3, reportsRepository.findByServerVersion(1500307579515l).size()); + + assertTrue(reportsRepository.findByServerVersion(System.currentTimeMillis()).isEmpty()); + } + + @Test + public void testFindByBaseEntityAndFormSubmissionId() { + List reports = reportsRepository.findByBaseEntityAndFormSubmissionId("6654kk-mnj45-mmnfgd-l45645", + "03b5d0b8-4f72-4415-9909-ce03b5802c75"); + assertEquals(1, reports.size()); + assertEquals("60ab7d5c-a051-4633-b0b3-f52b701cb261", reports.get(0).getId()); + + assertTrue(reportsRepository + .findByBaseEntityAndFormSubmissionId("6654kk-mnj45-mmnfgd-l45645", "d78a8105-f808-488a-b67a-0c4c46845194") + .isEmpty()); + } + + @Test + public void testFindReports() { + assertEquals(2, + reportsRepository.findReports(null, "biddemo", "", "6654kk-mnj45-mmnfgd-l45645", null, null, null, 20).size()); + + List reports = reportsRepository.findReports(null, "biddemo", "", "6654kk-mnj45-mmnfgd-l45645", 0l, null, + null, 20); + assertEquals(1, reports.size()); + + assertEquals("07271855-4018-497a-b180-6af01f0fa62b", reports.get(0).getId()); + + assertEquals(1, reportsRepository.findReports(null, "biddemo", "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", + "6654kk-mnj45-mmnfgd-l45645", null, null, null, 20).size()); + + assertEquals(4, reportsRepository.findReports("", "biddemo", null, null, 0l, null, null, 20).size()); + + assertEquals(5, reportsRepository.findReports("", "biddemo", null, null, null, null, null, 20).size()); + + assertEquals(3, reportsRepository.findReports("", "biddemo", null, null, 1500307579515l, null, null, 20).size()); + + assertEquals(2, reportsRepository.findReports("", "biddemo", null, null, 0l, null, null, 2).size()); + + assertTrue(reportsRepository.findReports("ATeam", "biddemo", "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", + "6654kk-mnj45-mmnfgd-l45645", System.currentTimeMillis(), null, null, 20).isEmpty()); + } + + @Test(expected = IllegalArgumentException.class) + public void testFindReportsNoParams() { + reportsRepository.findReports("", null, null, null, null, null, null, 2); + } + + @Test + public void testFindReportsV2() { + assertEquals(2, reportsRepository.findReports("6654kk-mnj45-mmnfgd-l45645", new DateTime("2017-05-01"), + new DateTime(), "HIA2", "biddemo", null, null, null).size()); + + assertEquals(5, reportsRepository + .findReports(null, new DateTime("2017-05-01"), new DateTime(), "HIA2", "biddemo", null, null, null).size()); + + assertEquals(4, reportsRepository.findReports(null, new DateTime("2017-05-01"), new DateTime(), "HIA2", "biddemo", + "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", new DateTime("2017-07-17"), new DateTime()).size()); + + assertEquals(2, reportsRepository.findReports(null, new DateTime("2017-05-01"), new DateTime(), "HIA2", "biddemo", + "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", new DateTime("2017-07-18"), new DateTime()).size()); + + List reports = reportsRepository.findReports("678343544-nhj7-jghdfgfd-mkjdkfg", new DateTime("2017-05-01"), + new DateTime(), "HIA2", "biddemo", "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", new DateTime("2017-07-17"), + new DateTime()); + + assertEquals(1, reports.size()); + + assertEquals("ecafd20f-c95b-4046-9355-9512e1908da4", reports.get(0).getId()); + + assertTrue( + reportsRepository.findReports("6654kk-mnj45-mmnfgd-l45645", new DateTime("2017-05-01"), new DateTime(), "HIA2", + "biddemo", "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", new DateTime("2017-07-31"), new DateTime()).isEmpty()); + } + + @Test(expected = IllegalArgumentException.class) + public void testFindReportsV2NoParams() { + reportsRepository.findReports(null, null, null, null, null, null, null, null); + } + + @Test(expected = IllegalArgumentException.class) + public void testFindReportsByDynamicQuery() { + reportsRepository.findReportsByDynamicQuery("reportType:HIA2"); + } + +} diff --git a/opensrp-core/src/test/resources/test-scripts/report.sql b/opensrp-core/src/test/resources/test-scripts/report.sql new file mode 100644 index 0000000000..b577bc975f --- /dev/null +++ b/opensrp-core/src/test/resources/test-scripts/report.sql @@ -0,0 +1,22 @@ +--clear data +TRUNCATE TABLE core.report CASCADE; + +ALTER SEQUENCE core.report_id_seq RESTART WITH 6; + +ALTER SEQUENCE core.report_metadata_id_seq RESTART WITH 6; + +--insert data + +INSERT INTO core.report (id, json) VALUES +(1, '{"id": "07271855-4018-497a-b180-6af01f0fa62b", "baseEntityId": "6654kk-mnj45-mmnfgd-l45645" , "type": "Report", "status": "ERROR", "version": 1503312366265, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-08-21T13:46:32.331+03:00", "locationId": "b0781dd2-e1b1-4878-8e6c-fba488eb9fa3", "providerId": "biddemo", "reportDate": "2017-06-28T01:00:00.000+03:00", "reportType": "HIA2", "identifiers": {"HIN":"1121K"}, "serverVersion": 1503312366265, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "2", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "0", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "0", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "2", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "0", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "0", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "10", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "0", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Weight below -3Z scores 24-59 months", "value": "0", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "Attendance child health 12-59 months (total)", "value": "0", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "0", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "1", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health (total)", "value": "43", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Attendance child health 12-59 months (male)", "value": "0", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Total weight below -3Z scores < five years", "value": "0", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "0", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "0", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "22", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "2", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "0", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "0", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "0", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "14", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "0", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "2", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "0", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "0", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "1", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Weight below -3Z scores 0-23 months", "value": "0", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "Total not gaining weight age < five years", "value": "0", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "21", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "0", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "0", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "10", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "0", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "0", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "1", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "Attendance child health < 12 months (total)", "value": "43", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "2", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "1", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "0", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "0", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "0", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "0", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "0", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "0", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "2", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "7073cef4-b974-4910-afa7-dd2ccadba089"}'), +(2, '{"id": "ecafd20f-c95b-4046-9355-9512e1908da4", "baseEntityId": "678343544-nhj7-jghdfgfd-mkjdkfg" ,"type": "Report", "status": "WARNING", "version": 1500056613263, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-07-17T18:38:43.492+03:00", "locationId": "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", "providerId": "biddemo", "reportDate": "2017-07-14T21:23:52.478+03:00", "reportType": "HIA2", "identifiers": {"WHO_R":"5934343"}, "serverVersion": 1500056613263, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "0", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "0", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "0", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "0", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "0", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "0", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "0", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "0", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Weight below -3Z scores 24-59 months", "value": "0", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "Attendance child health 12-59 months (total)", "value": "0", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "0", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "0", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health (total)", "value": "88", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Attendance child health 12-59 months (male)", "value": "0", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Total weight below -3Z scores < five years", "value": "0", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "0", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "0", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "54", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "0", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "0", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "0", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "0", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "0", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "0", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "0", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "0", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "0", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "0", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Weight below -3Z scores 0-23 months", "value": "0", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "Total not gaining weight age < five years", "value": "0", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "34", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "0", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "0", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "0", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "0", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "0", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "0", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "Attendance child health < 12 months (total)", "value": "88", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "0", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "0", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "0", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "0", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "0", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "0", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "0", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "0", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "0", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "1aea74ac-b737-477a-99d3-728011fbae3f"}'), +(3, '{"id": "c57ba49f-34b9-4986-9b87-69f48b1830c5", "type": "Report", "status": "WARNING", "version": 1500307579516, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-07-17T19:06:42.787+03:00", "locationId": "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", "providerId": "biddemo", "reportDate": "2017-05-01T01:00:00.000+03:00", "reportType": "HIA2", "identifiers": {"HIN":"56757L"}, "serverVersion": 1500307579516, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "0", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "0", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "0", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "0", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "0", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "0", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "0", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "0", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Weight below -3Z scores 24-59 months", "value": "0", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "Attendance child health 12-59 months (total)", "value": "0", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "0", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "0", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health (total)", "value": "4", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Attendance child health 12-59 months (male)", "value": "0", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Total weight below -3Z scores < five years", "value": "0", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "0", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "0", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "4", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "0", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "0", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "0", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "0", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "0", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "0", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "0", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "0", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "0", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "0", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Weight below -3Z scores 0-23 months", "value": "0", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "Total not gaining weight age < five years", "value": "0", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "0", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "0", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "0", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "0", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "0", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "0", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "0", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "Attendance child health < 12 months (total)", "value": "4", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "0", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "0", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "0", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "0", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "0", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "0", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "0", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "0", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "0", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "88f9fe90-1e45-46b3-8056-e932574dcbd9"}'), +(4, '{"id": "cd09a3d4-01d9-485c-a1c5-a2eb078a61be", "type": "Report", "status": "SUCCESS", "version": 1500394719661, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-07-18T19:18:41.822+03:00", "locationId": "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", "providerId": "biddemo", "reportDate": "2017-06-01T01:00:00.000+03:00", "reportType": "HIA2", "identifiers": {}, "serverVersion": 1500394719661, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "100", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "100", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "100", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "100", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "100", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "100", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "100", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "Weight below -3Z scores 24-59 months", "value": "100", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "100", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Attendance child health 12-59 months (total)", "value": "200", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "100", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "100", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health 12-59 months (male)", "value": "100", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Attendance child health (total)", "value": "400", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Total weight below -3Z scores < five years", "value": "200", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "200", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "100", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "100", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "100", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "100", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "100", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "100", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "100", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "200", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "100", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "100", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "100", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "Weight below -3Z scores 0-23 months", "value": "100", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "100", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Total not gaining weight age < five years", "value": "200", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "100", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "100", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "100", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "100", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "100", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "100", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "Attendance child health < 12 months (total)", "value": "200", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "100", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "100", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "100", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "100", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "100", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "100", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "200", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "100", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "100", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "100", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "d78a8105-f808-488a-b67a-0c4c46845194"}'), +(5, '{"id": "60ab7d5c-a051-4633-b0b3-f52b701cb261", "baseEntityId": "6654kk-mnj45-mmnfgd-l45645", "type": "Report", "status": "WARNING", "version": 1500445930478, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-07-19T09:32:41.737+03:00", "locationId": "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", "providerId": "biddemo", "reportDate": "2017-05-01T01:00:00.000+03:00", "reportType": "HIA2", "identifiers": {"HIN":"56757L"}, "serverVersion": null, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "0", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "0", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "0", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "0", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "0", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "0", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "0", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "0", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Weight below -3Z scores 24-59 months", "value": "0", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "Attendance child health 12-59 months (total)", "value": "0", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "0", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "0", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health (total)", "value": "1000000", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Attendance child health 12-59 months (male)", "value": "0", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Total weight below -3Z scores < five years", "value": "0", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "0", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "0", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "100000", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "0", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "0", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "0", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "0", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "0", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "0", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "0", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "0", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "0", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "0", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Weight below -3Z scores 0-23 months", "value": "0", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "Total not gaining weight age < five years", "value": "0", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "0", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "0", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "0", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "0", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "0", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "0", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "0", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "Attendance child health < 12 months (total)", "value": "10000", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "0", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "0", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "0", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "0", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "0", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "0", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "0", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "0", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "0", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "03b5d0b8-4f72-4415-9909-ce03b5802c75"}'); + +INSERT INTO core.report_metadata (id, report_id, document_id, form_submission_id, base_entity_id, server_version, report_type, report_date, provider_id, location_id, team, team_id, date_edited) VALUES +(1, 1, '07271855-4018-497a-b180-6af01f0fa62b', '7073cef4-b974-4910-afa7-dd2ccadba089', '6654kk-mnj45-mmnfgd-l45645', 1503312366265, 'HIA2', '2017-06-28', 'biddemo', 'b0781dd2-e1b1-4878-8e6c-fba488eb9fa3', null, null, '2017-08-21'), +(2, 2, 'ecafd20f-c95b-4046-9355-9512e1908da4', '1aea74ac-b737-477a-99d3-728011fbae3f', '678343544-nhj7-jghdfgfd-mkjdkfg', 1500056613263, 'HIA2', '2017-07-14', 'biddemo', '9e4fc064-d8e7-4fcb-942e-cbcf6524fb24', null, null, '2017-07-17'), +(3, 3, 'c57ba49f-34b9-4986-9b87-69f48b1830c5', '88f9fe90-1e45-46b3-8056-e932574dcbd9', null, 1500307579516, 'HIA2', '2017-05-01', 'biddemo', '9e4fc064-d8e7-4fcb-942e-cbcf6524fb24', null, null, '2017-07-17'), +(4, 4, 'cd09a3d4-01d9-485c-a1c5-a2eb078a61be', 'd78a8105-f808-488a-b67a-0c4c46845194', null, 1500394719661, 'HIA2', '2017-06-01', 'biddemo', '9e4fc064-d8e7-4fcb-942e-cbcf6524fb24', null, null, '2017-07-18'), +(5, 5, '60ab7d5c-a051-4633-b0b3-f52b701cb261', '03b5d0b8-4f72-4415-9909-ce03b5802c75', '6654kk-mnj45-mmnfgd-l45645', null, 'HIA2', '2017-05-01', 'biddemo', '9e4fc064-d8e7-4fcb-942e-cbcf6524fb24', null, null, '2017-07-19'); \ No newline at end of file From b08079ea7a978e252eb37c028244c25348fc3f84 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Wed, 4 Apr 2018 18:02:49 +0300 Subject: [PATCH 088/133] Stock repository unit tests --- .../postgres/StocksRepositoryImpl.java | 4 +- .../custom/xml/CustomStockMetadataMapper.xml | 63 +++++-- .../postgres/StocksRepositoryTest.java | 178 ++++++++++++++++++ .../src/test/resources/test-scripts/stock.sql | 42 +++++ 4 files changed, 272 insertions(+), 15 deletions(-) create mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/StocksRepositoryTest.java create mode 100644 opensrp-core/src/test/resources/test-scripts/stock.sql diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java index 37f18270f5..b0a8325744 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java @@ -15,7 +15,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; -@Repository +@Repository("stocksRepositoryPostgres") public class StocksRepositoryImpl extends BaseRepositoryImpl implements StocksRepository { @Autowired @@ -163,7 +163,7 @@ public List findAllStocks() { @Override protected Long retrievePrimaryKey(Stock entity) { - if (entity == null) { + if (entity == null || entity.getId() == null) { return null; } String documentId = entity.getId(); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMetadataMapper.xml index f596145185..9753e84de2 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomStockMetadataMapper.xml @@ -3,15 +3,16 @@ - + s.id, s.json - + from core.stock_metadata sm - join core.stock s on sm.stock_id = s.id + join core.stock s on sm.stock_id + = s.id - + - + + + + + + + + + + and sm.${criterion.condition} + + + and sm.${criterion.condition} #{criterion.value} + + + and sm.${criterion.condition} #{criterion.value} and + #{criterion.secondValue} + + + and sm.${criterion.condition} + + #{listItem} + + + + + + + + + + - + - + - + \ No newline at end of file diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/StocksRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/StocksRepositoryTest.java new file mode 100644 index 0000000000..0c13ca4516 --- /dev/null +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/StocksRepositoryTest.java @@ -0,0 +1,178 @@ +package org.opensrp.repository.postgres; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.junit.Test; +import org.opensrp.domain.Stock; +import org.opensrp.repository.StocksRepository; +import org.opensrp.search.StockSearchBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; + +public class StocksRepositoryTest extends BaseRepositoryTest { + + @Autowired + @Qualifier("stocksRepositoryPostgres") + private StocksRepository stocksRepository; + + @Override + protected Set getDatabaseScripts() { + Set scripts = new HashSet(); + scripts.add("stock.sql"); + return scripts; + } + + @Test + public void testGet() { + Stock stock = stocksRepository.get("05934ae338431f28bf6793b241978ad9"); + assertEquals(5l, stock.getIdentifier().longValue()); + assertEquals(20, stock.getValue()); + assertEquals("1", stock.getVaccine_type_id()); + assertEquals(1521009418783l, stock.getServerVersion().longValue()); + assertNull(stocksRepository.get("07271855-4018-497a-b180-6af")); + } + + @Test + public void testAdd() { + Stock stock = new Stock(521l, "VC1", "received", "tester1", 31, 1521499800000l, "VCC1", 1521536143239l, + 1521536179443l); + stocksRepository.add(stock); + assertEquals(16, stocksRepository.getAll().size()); + + List stocks = stocksRepository.findAllByIdentifier("vaccine_type", "VC1"); + + assertEquals(1, stocks.size()); + assertEquals("tester1", stocks.get(0).getProviderid()); + assertEquals(31, stock.getValue()); + assertEquals("VC1", stock.getVaccine_type_id()); + } + + @Test + public void testUpdate() { + Stock stock = stocksRepository.get("05934ae338431f28bf6793b241b2daa6"); + long now = System.currentTimeMillis(); + stock.setDate_updated(now); + stock.setValue(23); + stocksRepository.update(stock); + + Stock updatedStock = stocksRepository.get("05934ae338431f28bf6793b241b2daa6"); + assertEquals(now, updatedStock.getDate_updated().longValue()); + assertEquals(23, stock.getValue()); + + } + + @Test + public void testGetAll() { + assertEquals(15, stocksRepository.getAll().size()); + stocksRepository.safeRemove(stocksRepository.get("05934ae338431f28bf6793b241b2daa6")); + assertEquals(14, stocksRepository.getAll().size()); + + } + + @Test + public void testSafeRemove() { + stocksRepository.safeRemove(stocksRepository.get("05934ae338431f28bf6793b2419a606f")); + assertEquals(14, stocksRepository.getAll().size()); + assertNull(stocksRepository.get("05934ae338431f28bf6793b2419a606f")); + } + + @Test + public void testFindAllByProviderid() { + assertEquals(12, stocksRepository.findAllByProviderid("biddemo").size()); + assertEquals(3, stocksRepository.findAllByProviderid("biddemo1").size()); + assertTrue(stocksRepository.findAllByProviderid("biddemo2").isEmpty()); + } + + @Test + public void testFindAllByIdentifier() { + assertEquals(11, stocksRepository.findAllByIdentifier("vaccine_type", "1").size()); + assertEquals(4, stocksRepository.findAllByIdentifier("vaccine_type", "2").size()); + assertTrue(stocksRepository.findAllByIdentifier("vaccine_type", "19").isEmpty()); + } + + @Test + public void testFindById() { + Stock stock = stocksRepository.findById("05934ae338431f28bf6793b241b2df09"); + assertEquals(12l, stock.getIdentifier().longValue()); + assertEquals(-2, stock.getValue()); + assertEquals("1", stock.getVaccine_type_id()); + assertEquals("Physical_recount", stock.getTo_from()); + assertEquals("loss_adjustment", stock.getTransaction_type()); + assertNull(stocksRepository.findById("07271855-4018-497a-b180-6af")); + } + + @Test + public void testFindStocksWithOrder() { + + } + + @Test + public void testFindStocksStockbeanOnly() { + StockSearchBean searchBean = new StockSearchBean(); + + searchBean.setIdentifier("10"); + List stocks = stocksRepository.findStocks(searchBean); + assertEquals(1, stocks.size()); + + assertEquals(-19, stocks.get(0).getValue()); + assertEquals("2", stocks.get(0).getVaccine_type_id()); + assertEquals("C/C", stocks.get(0).getTo_from()); + assertEquals("issued", stocks.get(0).getTransaction_type()); + + searchBean = new StockSearchBean(); + searchBean.setStockTypeId("1"); + assertEquals(11, stocksRepository.findStocks(searchBean).size()); + + searchBean.setTransactionType("issued"); + searchBean.setProviderId("biddemo"); + assertEquals(3, stocksRepository.findStocks(searchBean).size()); + + searchBean = new StockSearchBean(); + searchBean.setValue("10"); + assertEquals(2, stocksRepository.findStocks(searchBean).size()); + + searchBean.setValue("2"); + stocks = stocksRepository.findStocks(searchBean); + assertEquals(1, stocks.size()); + assertEquals(14l, stocks.get(0).getIdentifier().longValue()); + assertEquals("1", stocks.get(0).getVaccine_type_id()); + assertEquals("DHO", stocks.get(0).getTo_from()); + assertEquals("received", stocks.get(0).getTransaction_type()); + + searchBean = new StockSearchBean(); + searchBean.setDateCreated("1518559200000"); + assertEquals(4, stocksRepository.findStocks(searchBean).size()); + + searchBean.setToFrom("DHO"); + assertEquals(2, stocksRepository.findStocks(searchBean).size()); + + searchBean.setDateUpdated("1521007053945"); + stocks = stocksRepository.findStocks(searchBean); + assertEquals(1, stocks.size()); + assertEquals(2l, stocks.get(0).getIdentifier().longValue()); + assertEquals("1", stocks.get(0).getVaccine_type_id()); + assertEquals("DHO", stocks.get(0).getTo_from()); + assertEquals("received", stocks.get(0).getTransaction_type()); + + searchBean = new StockSearchBean(); + searchBean.setServerVersion(1521009418783l); + assertEquals(11, stocksRepository.findStocks(searchBean).size()); + + searchBean.setServerVersion(1521023046990l); + assertEquals(8, stocksRepository.findStocks(searchBean).size()); + + } + + @Test + public void testFindAllStocks() { + assertEquals(15, stocksRepository.findAllStocks().size()); + stocksRepository.safeRemove(stocksRepository.get("05934ae338431f28bf6793b241b2df09")); + assertEquals(14, stocksRepository.findAllStocks().size()); + } +} diff --git a/opensrp-core/src/test/resources/test-scripts/stock.sql b/opensrp-core/src/test/resources/test-scripts/stock.sql new file mode 100644 index 0000000000..28c01a95a6 --- /dev/null +++ b/opensrp-core/src/test/resources/test-scripts/stock.sql @@ -0,0 +1,42 @@ +--clear data +TRUNCATE TABLE core.stock CASCADE; + +ALTER SEQUENCE core.stock_id_seq RESTART WITH 16; + +ALTER SEQUENCE core.stock_metadata_id_seq RESTART WITH 16; + +--insert data +INSERT INTO core.stock (id, json) VALUES +(1, '{"id": "05934ae338431f28bf6793b24181ea5e", "type": "Stock", "value": -3, "to_from": "C/C", "version": 1521003030510, "revision": "1-4f090916632e2ae10f1ef7f972aaf6d2", "identifier": 1, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.515+03:00", "date_created": 1520892000000, "date_updated": 1520939303991, "serverVersion": 1521003030510, "vaccine_type_id": "2", "transaction_type": "issued"}'), +(2, '{"id": "05934ae338431f28bf6793b241974356", "type": "Stock", "value": 10, "to_from": "DHO", "version": 1521007341010, "revision": "1-f24ec853ded69d25028985069960f71a", "identifier": 2, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.587+03:00", "date_created": 1518559200000, "date_updated": 1521007053945, "serverVersion": 1521007341010, "vaccine_type_id": "1", "transaction_type": "received"}'), +(3, '{"id": "05934ae338431f28bf6793b241974f0e", "type": "Stock", "value": -1, "to_from": "C/C", "version": 1521007341010, "revision": "1-6e7a4b9ee84403f5fa25c5d83269149b", "identifier": 3, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.633+03:00", "date_created": 1520892000000, "date_updated": 1521007153528, "serverVersion": 1521007341010, "vaccine_type_id": "1", "transaction_type": "issued"}'), +(4, '{"id": "05934ae338431f28bf6793b241975c6c", "type": "Stock", "value": 12, "to_from": "Physical_recount", "version": 1521007342323, "revision": "1-a57ae3bf0a9d652f00dc33c23e2c7a52", "identifier": 4, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.655+03:00", "date_created": 1518559200000, "date_updated": 1521007339163, "serverVersion": 1521007342323, "vaccine_type_id": "2", "transaction_type": "loss_adjustment"}'), +(5, '{"id": "05934ae338431f28bf6793b241978ad9", "type": "Stock", "value": 20, "to_from": "DHO", "version": 1521009418783, "revision": "1-1421e42faf02e9fe5a65279ee3b199c3", "identifier": 5, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.672+03:00", "date_created": 1521000000000, "date_updated": 1521009346585, "serverVersion": 1521009418783, "vaccine_type_id": "1", "transaction_type": "received"}'), +(6, '{"id": "05934ae338431f28bf6793b2419a4bd9", "type": "Stock", "value": 20, "to_from": "DHO", "version": 1521022620903, "revision": "1-aba3734a871fb2b88deab7bb7e7f3a60", "identifier": 6, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.683+03:00", "date_created": 1519855200000, "date_updated": 1521022504878, "serverVersion": 1521022620903, "vaccine_type_id": "1", "transaction_type": "received"}'), +(7, '{"id": "05934ae338431f28bf6793b2419a590b", "type": "Stock", "value": -27, "to_from": "C/C", "version": 1521022620903, "revision": "1-5f6fdd394f6c34143f07798dd7fe74b0", "identifier": 7, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.689+03:00", "date_created": 1520632800000, "date_updated": 1521022571660, "serverVersion": 1521022620903, "vaccine_type_id": "1", "transaction_type": "issued"}'), +(8, '{"id": "05934ae338431f28bf6793b2419a606f", "type": "Stock", "value": 1, "to_from": "Physical_recount", "version": 1521023046990, "revision": "1-872a0dd1e50ea9437786f69fad2d182a", "identifier": 8, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.693+03:00", "date_created": 1518559200000, "date_updated": 1521022962706, "serverVersion": 1521023046990, "vaccine_type_id": "1", "transaction_type": "loss_adjustment"}'), +(9, '{"id": "05934ae338431f28bf6793b2419a6dc7", "type": "Stock", "value": 10, "to_from": "DHO", "version": 1521030501655, "revision": "1-a3846a988777e252c6f9aba383300b78", "identifier": 9, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.705+03:00", "date_created": 1518559200000, "date_updated": 1521027411881, "serverVersion": 1521030501655, "vaccine_type_id": "2", "transaction_type": "received"}'), +(10, '{"id": "05934ae338431f28bf6793b2419a72da", "type": "Stock", "value": -19, "to_from": "C/C", "version": 1521030501655, "revision": "1-42168381f27525e3c9022fbc46358a4b", "identifier": 10, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.735+03:00", "date_created": 1519164000000, "date_updated": 1521027466540, "serverVersion": 1521030501655, "vaccine_type_id": "2", "transaction_type": "issued"}'), +(11, '{"id": "05934ae338431f28bf6793b241b2daa6", "type": "Stock", "value": -7, "to_from": "C/C", "version": 1521074546344, "revision": "1-65d5197a96e17a8febf61324fbe5d454", "identifier": 11, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.755+03:00", "date_created": 1521064800000, "date_updated": 1521074321594, "serverVersion": 1521074546344, "vaccine_type_id": "1", "transaction_type": "issued"}'), +(12, '{"id": "05934ae338431f28bf6793b241b2df09", "type": "Stock", "value": -2, "to_from": "Physical_recount", "version": 1521074546344, "revision": "1-4069d28441029c88717f71d622eab412", "identifier": 12, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.771+03:00", "date_created": 1521064800000, "date_updated": 1521074352741, "serverVersion": 1521074546344, "vaccine_type_id": "1", "transaction_type": "loss_adjustment"}'), +(13, '{"id": "05934ae338431f28bf6793b241b3c445", "type": "Stock", "value": -6, "to_from": "C/C", "version": 1521112141441, "revision": "1-509d0919039dc1b0f9180aa187a87b75", "identifier": 13, "providerid": "biddemo1", "dateCreated": "2018-04-04T13:55:43.787+03:00", "date_created": 1520632800000, "date_updated": 1521111867821, "serverVersion": 1521112141441, "vaccine_type_id": "1", "transaction_type": "issued"}'), +(14, '{"id": "05934ae338431f28bf6793b241b3c6f9", "type": "Stock", "value": 2, "to_from": "DHO", "version": 1521112141441, "revision": "1-7e45403108a172bd63486e35ec99ce79", "identifier": 14, "providerid": "biddemo1", "dateCreated": "2018-04-04T13:55:43.804+03:00", "date_created": 1518645600000, "date_updated": 1521111912719, "serverVersion": 1521112141441, "vaccine_type_id": "1", "transaction_type": "received"}'), +(15, '{"id": "05934ae338431f28bf6793b241b3cd6f", "type": "Stock", "value": -55, "to_from": "C/C", "version": 1521112141441, "revision": "1-83e0bc2abeda38e5aa282d1f8d75e6bc", "identifier": 15, "providerid": "biddemo1", "dateCreated": "2018-04-04T13:55:43.809+03:00", "date_created": 1520460000000, "date_updated": 1521111967331, "serverVersion": 1521112141441, "vaccine_type_id": "1", "transaction_type": "issued"}'); + + +INSERT INTO core.stock_metadata (id, stock_id, document_id, server_version, provider_id, location_id, team, team_id) VALUES +(1, 1, '05934ae338431f28bf6793b24181ea5e', 1521003030510, 'biddemo', null, null, null), +(2, 2, '05934ae338431f28bf6793b241974356', 1521007341010, 'biddemo', null, null, null), +(3, 3, '05934ae338431f28bf6793b241974f0e', 1521007341010, 'biddemo', null, null, null), +(4, 4, '05934ae338431f28bf6793b241975c6c', 1521007342323, 'biddemo', null, null, null), +(5, 5, '05934ae338431f28bf6793b241978ad9', 1521009418783, 'biddemo', null, null, null), +(6, 6, '05934ae338431f28bf6793b2419a4bd9', 1521022620903, 'biddemo', null, null, null), +(7, 7, '05934ae338431f28bf6793b2419a590b', 1521022620903, 'biddemo', null, null, null), +(8, 8, '05934ae338431f28bf6793b2419a606f', 1521023046990, 'biddemo', null, null, null), +(9, 9, '05934ae338431f28bf6793b2419a6dc7', 1521030501655, 'biddemo', null, null, null), +(10, 10, '05934ae338431f28bf6793b2419a72da', 1521030501655, 'biddemo', null, null, null), +(11, 11, '05934ae338431f28bf6793b241b2daa6', 1521074546344, 'biddemo', null, null, null), +(12, 12, '05934ae338431f28bf6793b241b2df09', 1521074546344, 'biddemo', null, null, null), +(13, 13, '05934ae338431f28bf6793b241b3c445', 1521112141441, 'biddemo1', null, null, null), +(14, 14, '05934ae338431f28bf6793b241b3c6f9', 1521112141441, 'biddemo1', null, null, null), +(15, 15, '05934ae338431f28bf6793b241b3cd6f', 1521112141441, 'biddemo1', null, null, null); \ No newline at end of file From 4702315024d0989e6486e43d958efd05d0271eb7 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Wed, 4 Apr 2018 18:21:11 +0300 Subject: [PATCH 089/133] Remove timezone from date strings --- .../opensrp/repository/postgres/ClientsRepositoryTest.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java index d9009b8229..40d63668f4 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java @@ -218,7 +218,7 @@ public void testFindByCriteria() { assertEquals("05934ae338431f28bf6793b24164cbd9", clients.get(0).getId()); searchBean = new ClientSearchBean(); - searchBean.setLastEditFrom(new DateTime("2018-03-13T12:57:05.652+03:00")); + searchBean.setLastEditFrom(new DateTime("2018-03-13T12:57:05.652")); searchBean.setLastEditTo(new DateTime()); assertEquals(6, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); @@ -262,7 +262,7 @@ public void testFindByCriteriaWithoutAddressBean() { assertEquals("05934ae338431f28bf6793b24164cbd9", clients.get(0).getId()); searchBean = new ClientSearchBean(); - searchBean.setLastEditFrom(new DateTime("2018-03-13T12:57:05.652+03:00")); + searchBean.setLastEditFrom(new DateTime("2018-03-13T12:57:05.652")); searchBean.setLastEditTo(new DateTime()); assertEquals(6, clientsRepository.findByCriteria(searchBean).size()); @@ -272,7 +272,7 @@ public void testFindByCriteriaWithoutAddressBean() { public void testFindByCriteriaWithEditDateParams() { assertEquals(6, clientsRepository - .findByCriteria(new AddressSearchBean(), new DateTime("2018-03-13T12:57:05.652+03:00"), new DateTime()) + .findByCriteria(new AddressSearchBean(), new DateTime("2018-03-13T12:57:05.652"), new DateTime()) .size()); assertEquals(15, From f267245692e1738ef1c58726be92ae2e12c52930 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 5 Apr 2018 09:34:52 +0300 Subject: [PATCH 090/133] Add missing unit test --- .../repository/postgres/StocksRepositoryTest.java | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/StocksRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/StocksRepositoryTest.java index 0c13ca4516..4c5de90f06 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/StocksRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/StocksRepositoryTest.java @@ -9,6 +9,7 @@ import java.util.Set; import org.junit.Test; +import org.opensrp.common.AllConstants.BaseEntity; import org.opensrp.domain.Stock; import org.opensrp.repository.StocksRepository; import org.opensrp.search.StockSearchBean; @@ -109,17 +110,27 @@ public void testFindById() { @Test public void testFindStocksWithOrder() { + StockSearchBean searchBean = new StockSearchBean(); + searchBean.setStockTypeId("1"); + List stocks = stocksRepository.findStocks(searchBean, BaseEntity.SERVER_VERSIOIN, "asc", 5); + assertEquals(5, stocks.size()); + long previousVersion = 0; + for (Stock stock : stocks) { + assertTrue(stock.getServerVersion() >= previousVersion); + previousVersion=stock.getServerVersion(); + } + } @Test public void testFindStocksStockbeanOnly() { StockSearchBean searchBean = new StockSearchBean(); - + searchBean.setIdentifier("10"); List stocks = stocksRepository.findStocks(searchBean); assertEquals(1, stocks.size()); - + assertEquals(-19, stocks.get(0).getValue()); assertEquals("2", stocks.get(0).getVaccine_type_id()); assertEquals("C/C", stocks.get(0).getTo_from()); From ec90f96160780f0c577750c8fbcfa4ae533ba70c Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 5 Apr 2018 16:21:38 +0300 Subject: [PATCH 091/133] Error Trace repository unit tests --- ...0180309140716_create_error_trace_table.sql | 4 +- .../opensrp/domain/postgres/ErrorTrace.java | 66 ++++---- .../domain/postgres/ErrorTraceExample.java | 98 +++++------- .../postgres/ErrorTraceRepositoryImpl.java | 30 ++-- .../postgres/mapper/ErrorTraceMapper.java | 22 +-- .../mapper/custom/CustomErrorTraceMapper.java | 7 +- .../custom/xml/CustomErrorTraceMapper.xml | 53 ++++++ .../postgres/mapper/xml/ErrorTraceMapper.xml | 58 +++---- .../postgres/ErrorTraceRepositoryTest.java | 151 ++++++++++++++++++ .../src/test/resources/test-scripts/error.sql | 84 ++++++++++ 10 files changed, 421 insertions(+), 152 deletions(-) create mode 100644 opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomErrorTraceMapper.xml create mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/ErrorTraceRepositoryTest.java create mode 100644 opensrp-core/src/test/resources/test-scripts/error.sql diff --git a/assets/migrations/scripts/20180309140716_create_error_trace_table.sql b/assets/migrations/scripts/20180309140716_create_error_trace_table.sql index 75a65994fc..a45fda8bdb 100644 --- a/assets/migrations/scripts/20180309140716_create_error_trace_table.sql +++ b/assets/migrations/scripts/20180309140716_create_error_trace_table.sql @@ -21,13 +21,13 @@ CREATE TABLE error.error_trace ( id bigserial NOT NULL, document_id character varying UNIQUE NOT NULL, - date_occurred date, + date_occurred timestamp , error_type character varying, occurred_at character varying, stack_trace character varying, status character varying, record_id character varying, - date_closed date, + date_closed timestamp, document_type character varying, retry_url character varying, PRIMARY KEY (id) diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java index 1e1567eead..54ccc18b0c 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTrace.java @@ -6,64 +6,64 @@ public class ErrorTrace { /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.id - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.document_id - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ private String documentId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.date_occurred - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ private Date dateOccurred; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.error_type - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ private String errorType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.occurred_at - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ private String occurredAt; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.stack_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ private String stackTrace; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.status - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ private String status; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.record_id - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ private String recordId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.date_closed - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ private Date dateClosed; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.document_type - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ private String documentType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column error.error_trace.retry_url - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ private String retryUrl; /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.id * @return the value of error.error_trace.id - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public Long getId() { return id; @@ -72,7 +72,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.id * @param id the value for error.error_trace.id - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -81,7 +81,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.document_id * @return the value of error.error_trace.document_id - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public String getDocumentId() { return documentId; @@ -90,7 +90,7 @@ public String getDocumentId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.document_id * @param documentId the value for error.error_trace.document_id - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public void setDocumentId(String documentId) { this.documentId = documentId; @@ -99,7 +99,7 @@ public void setDocumentId(String documentId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.date_occurred * @return the value of error.error_trace.date_occurred - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public Date getDateOccurred() { return dateOccurred; @@ -108,7 +108,7 @@ public Date getDateOccurred() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.date_occurred * @param dateOccurred the value for error.error_trace.date_occurred - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public void setDateOccurred(Date dateOccurred) { this.dateOccurred = dateOccurred; @@ -117,7 +117,7 @@ public void setDateOccurred(Date dateOccurred) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.error_type * @return the value of error.error_trace.error_type - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public String getErrorType() { return errorType; @@ -126,7 +126,7 @@ public String getErrorType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.error_type * @param errorType the value for error.error_trace.error_type - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public void setErrorType(String errorType) { this.errorType = errorType; @@ -135,7 +135,7 @@ public void setErrorType(String errorType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.occurred_at * @return the value of error.error_trace.occurred_at - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public String getOccurredAt() { return occurredAt; @@ -144,7 +144,7 @@ public String getOccurredAt() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.occurred_at * @param occurredAt the value for error.error_trace.occurred_at - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public void setOccurredAt(String occurredAt) { this.occurredAt = occurredAt; @@ -153,7 +153,7 @@ public void setOccurredAt(String occurredAt) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.stack_trace * @return the value of error.error_trace.stack_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public String getStackTrace() { return stackTrace; @@ -162,7 +162,7 @@ public String getStackTrace() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.stack_trace * @param stackTrace the value for error.error_trace.stack_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public void setStackTrace(String stackTrace) { this.stackTrace = stackTrace; @@ -171,7 +171,7 @@ public void setStackTrace(String stackTrace) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.status * @return the value of error.error_trace.status - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public String getStatus() { return status; @@ -180,7 +180,7 @@ public String getStatus() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.status * @param status the value for error.error_trace.status - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public void setStatus(String status) { this.status = status; @@ -189,7 +189,7 @@ public void setStatus(String status) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.record_id * @return the value of error.error_trace.record_id - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public String getRecordId() { return recordId; @@ -198,7 +198,7 @@ public String getRecordId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.record_id * @param recordId the value for error.error_trace.record_id - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public void setRecordId(String recordId) { this.recordId = recordId; @@ -207,7 +207,7 @@ public void setRecordId(String recordId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.date_closed * @return the value of error.error_trace.date_closed - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public Date getDateClosed() { return dateClosed; @@ -216,7 +216,7 @@ public Date getDateClosed() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.date_closed * @param dateClosed the value for error.error_trace.date_closed - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public void setDateClosed(Date dateClosed) { this.dateClosed = dateClosed; @@ -225,7 +225,7 @@ public void setDateClosed(Date dateClosed) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.document_type * @return the value of error.error_trace.document_type - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public String getDocumentType() { return documentType; @@ -234,7 +234,7 @@ public String getDocumentType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.document_type * @param documentType the value for error.error_trace.document_type - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public void setDocumentType(String documentType) { this.documentType = documentType; @@ -243,7 +243,7 @@ public void setDocumentType(String documentType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column error.error_trace.retry_url * @return the value of error.error_trace.retry_url - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public String getRetryUrl() { return retryUrl; @@ -252,7 +252,7 @@ public String getRetryUrl() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column error.error_trace.retry_url * @param retryUrl the value for error.error_trace.retry_url - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public void setRetryUrl(String retryUrl) { this.retryUrl = retryUrl; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java index e590a1c953..ed5bce76c4 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java @@ -8,23 +8,23 @@ public class ErrorTraceExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public ErrorTraceExample() { oredCriteria = new ArrayList(); @@ -32,7 +32,7 @@ public ErrorTraceExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -40,7 +40,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -48,7 +48,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -56,7 +56,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -64,7 +64,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -72,7 +72,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -80,7 +80,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -90,7 +90,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -102,7 +102,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -111,7 +111,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -121,7 +121,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ protected abstract static class GeneratedCriteria { @@ -165,32 +165,6 @@ protected void addCriterion(String condition, Object value1, Object value2, Stri criteria.add(new Criterion(condition, value1, value2)); } - protected void addCriterionForJDBCDate(String condition, Date value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - addCriterion(condition, new java.sql.Date(value.getTime()), property); - } - - protected void addCriterionForJDBCDate(String condition, List values, String property) { - if (values == null || values.size() == 0) { - throw new RuntimeException("Value list for " + property + " cannot be null or empty"); - } - List dateList = new ArrayList(); - Iterator iter = values.iterator(); - while (iter.hasNext()) { - dateList.add(new java.sql.Date(iter.next().getTime())); - } - addCriterion(condition, dateList, property); - } - - protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); - } - public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; @@ -332,52 +306,52 @@ public Criteria andDateOccurredIsNotNull() { } public Criteria andDateOccurredEqualTo(Date value) { - addCriterionForJDBCDate("date_occurred =", value, "dateOccurred"); + addCriterion("date_occurred =", value, "dateOccurred"); return (Criteria) this; } public Criteria andDateOccurredNotEqualTo(Date value) { - addCriterionForJDBCDate("date_occurred <>", value, "dateOccurred"); + addCriterion("date_occurred <>", value, "dateOccurred"); return (Criteria) this; } public Criteria andDateOccurredGreaterThan(Date value) { - addCriterionForJDBCDate("date_occurred >", value, "dateOccurred"); + addCriterion("date_occurred >", value, "dateOccurred"); return (Criteria) this; } public Criteria andDateOccurredGreaterThanOrEqualTo(Date value) { - addCriterionForJDBCDate("date_occurred >=", value, "dateOccurred"); + addCriterion("date_occurred >=", value, "dateOccurred"); return (Criteria) this; } public Criteria andDateOccurredLessThan(Date value) { - addCriterionForJDBCDate("date_occurred <", value, "dateOccurred"); + addCriterion("date_occurred <", value, "dateOccurred"); return (Criteria) this; } public Criteria andDateOccurredLessThanOrEqualTo(Date value) { - addCriterionForJDBCDate("date_occurred <=", value, "dateOccurred"); + addCriterion("date_occurred <=", value, "dateOccurred"); return (Criteria) this; } public Criteria andDateOccurredIn(List values) { - addCriterionForJDBCDate("date_occurred in", values, "dateOccurred"); + addCriterion("date_occurred in", values, "dateOccurred"); return (Criteria) this; } public Criteria andDateOccurredNotIn(List values) { - addCriterionForJDBCDate("date_occurred not in", values, "dateOccurred"); + addCriterion("date_occurred not in", values, "dateOccurred"); return (Criteria) this; } public Criteria andDateOccurredBetween(Date value1, Date value2) { - addCriterionForJDBCDate("date_occurred between", value1, value2, "dateOccurred"); + addCriterion("date_occurred between", value1, value2, "dateOccurred"); return (Criteria) this; } public Criteria andDateOccurredNotBetween(Date value1, Date value2) { - addCriterionForJDBCDate("date_occurred not between", value1, value2, "dateOccurred"); + addCriterion("date_occurred not between", value1, value2, "dateOccurred"); return (Criteria) this; } @@ -742,52 +716,52 @@ public Criteria andDateClosedIsNotNull() { } public Criteria andDateClosedEqualTo(Date value) { - addCriterionForJDBCDate("date_closed =", value, "dateClosed"); + addCriterion("date_closed =", value, "dateClosed"); return (Criteria) this; } public Criteria andDateClosedNotEqualTo(Date value) { - addCriterionForJDBCDate("date_closed <>", value, "dateClosed"); + addCriterion("date_closed <>", value, "dateClosed"); return (Criteria) this; } public Criteria andDateClosedGreaterThan(Date value) { - addCriterionForJDBCDate("date_closed >", value, "dateClosed"); + addCriterion("date_closed >", value, "dateClosed"); return (Criteria) this; } public Criteria andDateClosedGreaterThanOrEqualTo(Date value) { - addCriterionForJDBCDate("date_closed >=", value, "dateClosed"); + addCriterion("date_closed >=", value, "dateClosed"); return (Criteria) this; } public Criteria andDateClosedLessThan(Date value) { - addCriterionForJDBCDate("date_closed <", value, "dateClosed"); + addCriterion("date_closed <", value, "dateClosed"); return (Criteria) this; } public Criteria andDateClosedLessThanOrEqualTo(Date value) { - addCriterionForJDBCDate("date_closed <=", value, "dateClosed"); + addCriterion("date_closed <=", value, "dateClosed"); return (Criteria) this; } public Criteria andDateClosedIn(List values) { - addCriterionForJDBCDate("date_closed in", values, "dateClosed"); + addCriterion("date_closed in", values, "dateClosed"); return (Criteria) this; } public Criteria andDateClosedNotIn(List values) { - addCriterionForJDBCDate("date_closed not in", values, "dateClosed"); + addCriterion("date_closed not in", values, "dateClosed"); return (Criteria) this; } public Criteria andDateClosedBetween(Date value1, Date value2) { - addCriterionForJDBCDate("date_closed between", value1, value2, "dateClosed"); + addCriterion("date_closed between", value1, value2, "dateClosed"); return (Criteria) this; } public Criteria andDateClosedNotBetween(Date value1, Date value2) { - addCriterionForJDBCDate("date_closed not between", value1, value2, "dateClosed"); + addCriterion("date_closed not between", value1, value2, "dateClosed"); return (Criteria) this; } @@ -934,7 +908,7 @@ public Criteria andRetryUrlNotBetween(String value1, String value2) { /** * This class was generated by MyBatis Generator. This class corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ public static class Criterion { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ErrorTraceRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ErrorTraceRepositoryImpl.java index 1d77ec3d24..aac76b1021 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ErrorTraceRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ErrorTraceRepositoryImpl.java @@ -13,12 +13,12 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; -@Repository +@Repository("errorRepositoryPostgres") public class ErrorTraceRepositoryImpl extends BaseRepositoryImpl implements ErrorTraceRepository { - private final static String SOLVED = "solved"; + public final static String SOLVED = "solved"; - private final static String UNSOLVED = "unsolved"; + public final static String UNSOLVED = "unsolved"; @Autowired private CustomErrorTraceMapper errorTraceMapper; @@ -36,7 +36,7 @@ public ErrorTrace get(String id) { @Override public void add(ErrorTrace entity) { - if (entity == null || entity.getStatus() == null) { + if (entity == null || entity.getStackTrace() == null) { return; } @@ -58,7 +58,7 @@ public void add(ErrorTrace entity) { @Override public void update(ErrorTrace entity) { - if (entity == null || entity.getId() == null || entity.getStatus() == null) { + if (getUniqueField(entity) == null) { return; } @@ -79,7 +79,7 @@ public List getAll() { @Override public void safeRemove(ErrorTrace entity) { - if (entity == null || entity.getStatus() == null) { + if (getUniqueField(entity) == null) { return; } @@ -111,19 +111,21 @@ public List findAllErrors() throws DocumentNotFoundException { public List findAllUnSolvedErrors() throws DocumentNotFoundException { ErrorTraceExample example = new ErrorTraceExample(); example.createCriteria().andStatusEqualTo(UNSOLVED); - return convert(errorTraceMapper.selectMany(new ErrorTraceExample(), 0, DEFAULT_FETCH_SIZE)); + example.or(example.createCriteria().andStatusIsNull()); + example.or(example.createCriteria().andStatusEqualTo("")); + return convert(errorTraceMapper.selectMany(example, 0, DEFAULT_FETCH_SIZE)); } @Override public List findAllSolvedErrors() throws DocumentNotFoundException { ErrorTraceExample example = new ErrorTraceExample(); example.createCriteria().andStatusEqualTo(SOLVED); - return convert(errorTraceMapper.selectMany(new ErrorTraceExample(), 0, DEFAULT_FETCH_SIZE)); + return convert(errorTraceMapper.selectMany(example, 0, DEFAULT_FETCH_SIZE)); } @Override protected Long retrievePrimaryKey(ErrorTrace errorTrace) { - if (errorTrace == null) { + if (getUniqueField(errorTrace) == null) { return null; } String documentId = errorTrace.getId(); @@ -136,20 +138,22 @@ protected Long retrievePrimaryKey(ErrorTrace errorTrace) { @Override protected Object getUniqueField(ErrorTrace errorTrace) { - return errorTrace == null ? errorTrace : errorTrace.getId(); + return errorTrace == null || errorTrace.getId() == null ? null : errorTrace.getId(); } //private Methods private ErrorTrace convert(org.opensrp.domain.postgres.ErrorTrace pgEntity) { ErrorTrace entity = new ErrorTrace(); entity.setId(pgEntity.getDocumentId()); - entity.setDateOccurred(new DateTime(pgEntity.getDateOccurred())); + if (pgEntity.getDateOccurred() != null) + entity.setDateOccurred(new DateTime(pgEntity.getDateOccurred())); entity.setErrorType(pgEntity.getErrorType()); entity.setOccurredAt(pgEntity.getOccurredAt()); entity.setStackTrace(pgEntity.getStackTrace()); entity.setStatus(pgEntity.getStatus()); entity.setDateClosed(pgEntity.getDateClosed()); entity.setDocumentType(pgEntity.getDocumentType()); + entity.setRecordId(pgEntity.getRecordId()); entity.setRetryUrl(pgEntity.getRetryUrl()); return entity; } @@ -158,13 +162,15 @@ private org.opensrp.domain.postgres.ErrorTrace convert(ErrorTrace entity, Long i org.opensrp.domain.postgres.ErrorTrace pgEntity = new org.opensrp.domain.postgres.ErrorTrace(); pgEntity.setId(id); pgEntity.setDocumentId(entity.getId()); - pgEntity.setDateOccurred(entity.getDateOccurred().toDate()); + if (entity.getDateOccurred() != null) + pgEntity.setDateOccurred(entity.getDateOccurred().toDate()); pgEntity.setErrorType(entity.getErrorType()); pgEntity.setOccurredAt(entity.getOccurredAt()); pgEntity.setStackTrace(entity.getStackTrace()); pgEntity.setStatus(entity.getStatus()); pgEntity.setDateClosed(entity.getDateClosed()); pgEntity.setDocumentType(entity.getDocumentType()); + pgEntity.setRecordId(entity.getRecordId()); pgEntity.setRetryUrl(entity.getRetryUrl()); return pgEntity; } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java index a4c43f0b91..0aba39194d 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/ErrorTraceMapper.java @@ -10,67 +10,67 @@ public interface ErrorTraceMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ long countByExample(ErrorTraceExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ int deleteByExample(ErrorTraceExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ int insert(ErrorTrace record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ int insertSelective(ErrorTrace record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ List selectByExample(ErrorTraceExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ ErrorTrace selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ int updateByExampleSelective(@Param("record") ErrorTrace record, @Param("example") ErrorTraceExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ int updateByExample(@Param("record") ErrorTrace record, @Param("example") ErrorTraceExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ int updateByPrimaryKeySelective(ErrorTrace record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table error.error_trace - * @mbg.generated Tue Mar 27 11:36:08 EAT 2018 + * @mbg.generated Thu Apr 05 16:08:08 EAT 2018 */ int updateByPrimaryKey(ErrorTrace record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomErrorTraceMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomErrorTraceMapper.java index b9539910ca..0fdd2e0662 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomErrorTraceMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomErrorTraceMapper.java @@ -2,13 +2,14 @@ import java.util.List; +import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.ErrorTrace; import org.opensrp.domain.postgres.ErrorTraceExample; import org.opensrp.repository.postgres.mapper.ErrorTraceMapper; - public interface CustomErrorTraceMapper extends ErrorTraceMapper { - - List selectMany(ErrorTraceExample example, int i, int dEFAULT_FETCH_SIZE); + + List selectMany(@Param("example") ErrorTraceExample example, @Param("offset") int offset, + @Param("limit") int limit); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomErrorTraceMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomErrorTraceMapper.xml new file mode 100644 index 0000000000..c54e82f5cd --- /dev/null +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomErrorTraceMapper.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ErrorTraceMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ErrorTraceMapper.xml index 0ebd4f40b6..9fa1753e4e 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ErrorTraceMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ErrorTraceMapper.xml @@ -5,17 +5,17 @@ - + - + @@ -23,7 +23,7 @@ @@ -57,7 +57,7 @@ @@ -91,7 +91,7 @@ id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url @@ -100,7 +100,7 @@ select @@ -119,7 +119,7 @@ select @@ -130,7 +130,7 @@ delete from error.error_trace where id = #{id,jdbcType=BIGINT} @@ -139,7 +139,7 @@ delete from error.error_trace @@ -150,22 +150,22 @@ insert into error.error_trace (id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url) - values (#{id,jdbcType=BIGINT}, #{documentId,jdbcType=VARCHAR}, #{dateOccurred,jdbcType=DATE}, + values (#{id,jdbcType=BIGINT}, #{documentId,jdbcType=VARCHAR}, #{dateOccurred,jdbcType=TIMESTAMP}, #{errorType,jdbcType=VARCHAR}, #{occurredAt,jdbcType=VARCHAR}, #{stackTrace,jdbcType=VARCHAR}, - #{status,jdbcType=VARCHAR}, #{recordId,jdbcType=VARCHAR}, #{dateClosed,jdbcType=DATE}, + #{status,jdbcType=VARCHAR}, #{recordId,jdbcType=VARCHAR}, #{dateClosed,jdbcType=TIMESTAMP}, #{documentType,jdbcType=VARCHAR}, #{retryUrl,jdbcType=VARCHAR}) insert into error.error_trace @@ -211,7 +211,7 @@ #{documentId,jdbcType=VARCHAR}, - #{dateOccurred,jdbcType=DATE}, + #{dateOccurred,jdbcType=TIMESTAMP}, #{errorType,jdbcType=VARCHAR}, @@ -229,7 +229,7 @@ #{recordId,jdbcType=VARCHAR}, - #{dateClosed,jdbcType=DATE}, + #{dateClosed,jdbcType=TIMESTAMP}, #{documentType,jdbcType=VARCHAR}, @@ -243,7 +243,7 @@ select count(*) from error.error_trace @@ -254,7 +254,7 @@ update error.error_trace @@ -265,7 +265,7 @@ document_id = #{record.documentId,jdbcType=VARCHAR}, - date_occurred = #{record.dateOccurred,jdbcType=DATE}, + date_occurred = #{record.dateOccurred,jdbcType=TIMESTAMP}, error_type = #{record.errorType,jdbcType=VARCHAR}, @@ -283,7 +283,7 @@ record_id = #{record.recordId,jdbcType=VARCHAR}, - date_closed = #{record.dateClosed,jdbcType=DATE}, + date_closed = #{record.dateClosed,jdbcType=TIMESTAMP}, document_type = #{record.documentType,jdbcType=VARCHAR}, @@ -300,18 +300,18 @@ update error.error_trace set id = #{record.id,jdbcType=BIGINT}, document_id = #{record.documentId,jdbcType=VARCHAR}, - date_occurred = #{record.dateOccurred,jdbcType=DATE}, + date_occurred = #{record.dateOccurred,jdbcType=TIMESTAMP}, error_type = #{record.errorType,jdbcType=VARCHAR}, occurred_at = #{record.occurredAt,jdbcType=VARCHAR}, stack_trace = #{record.stackTrace,jdbcType=VARCHAR}, status = #{record.status,jdbcType=VARCHAR}, record_id = #{record.recordId,jdbcType=VARCHAR}, - date_closed = #{record.dateClosed,jdbcType=DATE}, + date_closed = #{record.dateClosed,jdbcType=TIMESTAMP}, document_type = #{record.documentType,jdbcType=VARCHAR}, retry_url = #{record.retryUrl,jdbcType=VARCHAR} @@ -322,7 +322,7 @@ update error.error_trace @@ -330,7 +330,7 @@ document_id = #{documentId,jdbcType=VARCHAR}, - date_occurred = #{dateOccurred,jdbcType=DATE}, + date_occurred = #{dateOccurred,jdbcType=TIMESTAMP}, error_type = #{errorType,jdbcType=VARCHAR}, @@ -348,7 +348,7 @@ record_id = #{recordId,jdbcType=VARCHAR}, - date_closed = #{dateClosed,jdbcType=DATE}, + date_closed = #{dateClosed,jdbcType=TIMESTAMP}, document_type = #{documentType,jdbcType=VARCHAR}, @@ -363,17 +363,17 @@ update error.error_trace set document_id = #{documentId,jdbcType=VARCHAR}, - date_occurred = #{dateOccurred,jdbcType=DATE}, + date_occurred = #{dateOccurred,jdbcType=TIMESTAMP}, error_type = #{errorType,jdbcType=VARCHAR}, occurred_at = #{occurredAt,jdbcType=VARCHAR}, stack_trace = #{stackTrace,jdbcType=VARCHAR}, status = #{status,jdbcType=VARCHAR}, record_id = #{recordId,jdbcType=VARCHAR}, - date_closed = #{dateClosed,jdbcType=DATE}, + date_closed = #{dateClosed,jdbcType=TIMESTAMP}, document_type = #{documentType,jdbcType=VARCHAR}, retry_url = #{retryUrl,jdbcType=VARCHAR} where id = #{id,jdbcType=BIGINT} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ErrorTraceRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ErrorTraceRepositoryTest.java new file mode 100644 index 0000000000..4974ac3723 --- /dev/null +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ErrorTraceRepositoryTest.java @@ -0,0 +1,151 @@ +package org.opensrp.repository.postgres; + +import static org.junit.Assert.*; + +import static org.opensrp.repository.postgres.ErrorTraceRepositoryImpl.*; + +import java.util.Date; +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.joda.time.DateTime; +import org.junit.Test; +import org.opensrp.domain.ErrorTrace; +import org.opensrp.repository.ErrorTraceRepository; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; + +public class ErrorTraceRepositoryTest extends BaseRepositoryTest { + + @Autowired + @Qualifier("errorRepositoryPostgres") + private ErrorTraceRepository errorTraceRepository; + + @Override + protected Set getDatabaseScripts() { + Set scripts = new HashSet(); + scripts.add("error.sql"); + return scripts; + } + + @Test + public void testGet() { + ErrorTrace error = errorTraceRepository.get("85ed95b2-8436-4a93-9ae7-ab104d65edd7"); + assertEquals(new DateTime("2018-03-14T07:53:11.152"), error.getDateOccurred()); + assertEquals("OPENMRS FAILED CLIENT PUSH", error.getErrorType()); + assertEquals("org.opensrp.domain.Client", error.getDocumentType()); + assertNull(errorTraceRepository.get("07271855-4018-497a-b180-6af")); + } + + @Test + public void testAdd() { + DateTime occured = new DateTime(); + ErrorTrace error = new ErrorTrace(occured, "GENERIC ERROR 123!!", occured.toString(), + "error at stocktrace.java(677)", "unsolved", "org.test.bean"); + errorTraceRepository.add(error); + List errors = errorTraceRepository.getAll(); + assertEquals(9, errors.size()); + boolean found = false; + for (ErrorTrace er : errors) { + if (er.getDateOccurred().equals(occured)) { + found = true; + assertEquals("GENERIC ERROR 123!!", error.getErrorType()); + assertEquals("error at stocktrace.java(677)", error.getStackTrace()); + break; + } + } + assertTrue(found); + + } + + @Test + public void testUpdate() { + ErrorTrace error = errorTraceRepository.get("85ed95b2-8436-4a93-9ae7-ab104d65edd7"); + error.setStatus("closed"); + Date now = new Date(); + error.setDateClosed(now); + error.setRecordId("jjhi-iiui-234423-ll"); + errorTraceRepository.update(error); + + ErrorTrace updateError = errorTraceRepository.get("85ed95b2-8436-4a93-9ae7-ab104d65edd7"); + assertEquals("closed", updateError.getStatus()); + assertEquals(now, updateError.getDateClosed()); + assertEquals("jjhi-iiui-234423-ll", updateError.getRecordId()); + errorTraceRepository.update(error); + } + + @Test + public void testGetAll() { + assertEquals(8, errorTraceRepository.getAll().size()); + errorTraceRepository.safeRemove(errorTraceRepository.get("ea96c23d-bbf1-4365-bdf5-bcf56f08ce1f")); + assertEquals(7, errorTraceRepository.getAll().size()); + } + + @Test + public void testSafeRemove() { + errorTraceRepository.safeRemove(errorTraceRepository.get("911c7520-f701-419e-b225-5e21286b585b")); + assertEquals(7, errorTraceRepository.getAll().size()); + } + + @Test + public void testFindById() { + ErrorTrace error = errorTraceRepository.get("07c32814-d7d1-48a5-8320-ed80435a4606"); + assertEquals(new DateTime("2018-01-03T17:06:11.166"), error.getDateOccurred()); + assertEquals("FormSubmissionProcessor", error.getErrorType()); + assertEquals("org.opensrp.service.formSubmission.FormSubmissionListener", error.getOccurredAt()); + assertEquals("[Ljava.lang.StackTraceElement;@50ef4583", error.getStackTrace()); + + assertNull(errorTraceRepository.get("07271855-4-b180-6af")); + } + + @Test + public void testExists() { + assertTrue(errorTraceRepository.exists("07c32814-d7d1-48a5-8320-ed80435a4606")); + + assertTrue(errorTraceRepository.exists("ea96c23d-bbf1-4365-bdf5-bcf56f08ce1f")); + + assertFalse(errorTraceRepository.exists("07c32814-d7d1-48a5-8320-ed804356")); + } + + @Test + public void testFindAllErrors() { + assertEquals(8, errorTraceRepository.findAllErrors().size()); + errorTraceRepository.safeRemove(errorTraceRepository.get("ea96c23d-bbf1-4365-bdf5-bcf56f08ce1f")); + assertEquals(7, errorTraceRepository.findAllErrors().size()); + } + + @Test + public void testFindAllUnSolvedErrors() { + assertEquals(6, errorTraceRepository.findAllUnSolvedErrors().size()); + + ErrorTrace error = errorTraceRepository.get("911c7520-f701-419e-b225-5e21286b585b"); + error.setStatus(SOLVED); + error.setDateClosed(new Date()); + errorTraceRepository.update(error); + + List errors = errorTraceRepository.findAllUnSolvedErrors(); + assertEquals(5, errors.size()); + + for (ErrorTrace err : errors) + assertTrue(err.getStatus() == null || err.getStatus().equals(UNSOLVED)); + } + + @Test + public void testFindAllSolvedErrors() { + assertEquals(2, errorTraceRepository.findAllSolvedErrors().size()); + + ErrorTrace error = errorTraceRepository.get("48106c03-8900-4156-a7bf-93226e1d3e58"); + error.setStatus(UNSOLVED); + error.setDateClosed(null); + errorTraceRepository.update(error); + + List errors = errorTraceRepository.findAllSolvedErrors(); + assertEquals(1, errors.size()); + assertEquals(new DateTime("2018-01-03T17:06:11.166"), errors.get(0).getDateOccurred()); + assertEquals("FormSubmissionProcessor", errors.get(0).getErrorType()); + assertEquals("org.opensrp.service.formSubmission.FormSubmissionListener", errors.get(0).getOccurredAt()); + assertEquals("[Ljava.lang.StackTraceElement;@50ef4583", errors.get(0).getStackTrace()); + + } +} diff --git a/opensrp-core/src/test/resources/test-scripts/error.sql b/opensrp-core/src/test/resources/test-scripts/error.sql new file mode 100644 index 0000000000..d7acf4525d --- /dev/null +++ b/opensrp-core/src/test/resources/test-scripts/error.sql @@ -0,0 +1,84 @@ +--clear data +TRUNCATE TABLE error.error_trace; + +ALTER SEQUENCE error.error_trace_id_seq RESTART WITH 9; + +--insert test data +INSERT INTO error.error_trace (id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url) VALUES (1, '85ed95b2-8436-4a93-9ae7-ab104d65edd7', '2018-03-14 07:53:11.152000', 'OPENMRS FAILED CLIENT PUSH', null, 'at sun.reflect.GeneratedMethodAccessor985.invoke(Unknown Source) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) + at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) + at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) + at java.lang.Thread.run(Thread.java:748) +', null, null, null, 'org.opensrp.domain.Client', ''); +INSERT INTO error.error_trace (id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url) VALUES (2, 'd41ba935-c8f6-4d3d-8432-8e8059ae39ca', '2018-03-14 11:24:30.643000', 'OPENMRS FAILED CLIENT PUSH', null, 'at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) + at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) + at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) + at java.lang.Thread.run(Thread.java:748) +', null, null, null, 'org.opensrp.domain.Client', ''); +INSERT INTO error.error_trace (id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url) VALUES (3, 'f4bb0d37-0f08-44e2-822f-87d81983eefb', '2018-03-15 16:16:09.571000', 'OPENMRS FAILED EVENT PUSH', null, 'at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) + at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) + at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) + at java.lang.Thread.run(Thread.java:748) +', null, null, null, 'org.opensrp.domain.Event', ''); +INSERT INTO error.error_trace (id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url) VALUES (4, '8798ae98-4f71-4bbb-8391-bfbda783b2d9', '2018-03-19 16:31:47.916000', 'OPENMRS FAILED CLIENT PUSH', null, 'at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) + at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) + at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) + at java.lang.Thread.run(Thread.java:748) +', null, null, null, 'org.opensrp.domain.Client', ''); +INSERT INTO error.error_trace (id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url) VALUES (5, 'ea96c23d-bbf1-4365-bdf5-bcf56f08ce1f', '2018-03-22 15:59:30.791000', 'OPENMRS FAILED EVENT PUSH', null, 'at sun.reflect.GeneratedMethodAccessor985.invoke(Unknown Source) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) + at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) + at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) + at java.lang.Thread.run(Thread.java:748) +', null, null, null, 'org.opensrp.domain.Event', ''); +INSERT INTO error.error_trace (id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url) VALUES (6, '911c7520-f701-419e-b225-5e21286b585b', '2018-01-11 11:14:07.655000', 'OPENMRS FAILED EVENT VALIDATION', null, 'at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) + at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) + at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) + at java.lang.reflect.Method.invoke(Method.java:498) + at org.springframework.scheduling.support.ScheduledMethodRunnable.run(ScheduledMethodRunnable.java:64) + at org.springframework.scheduling.support.DelegatingErrorHandlingRunnable.run(DelegatingErrorHandlingRunnable.java:53) + at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) + at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180) + at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294) + at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) + at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) + at java.lang.Thread.run(Thread.java:748) +', null, null, null, 'org.opensrp.domain.Event', ''); +INSERT INTO error.error_trace (id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url) VALUES (7, '48106c03-8900-4156-a7bf-93226e1d3e58', '2018-01-03 11:20:52.467000', 'FormSubmissionProcessor', 'org.opensrp.service.formSubmission.FormSubmissionListener', '[Ljava.lang.StackTraceElement;@22cdbe2', 'solved', null, null, 'org.opensrp.form.domain.FormSubmission', null); +INSERT INTO error.error_trace (id, document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, date_closed, document_type, retry_url) VALUES (8, '07c32814-d7d1-48a5-8320-ed80435a4606', '2018-01-03 17:06:11.166000', 'FormSubmissionProcessor', 'org.opensrp.service.formSubmission.FormSubmissionListener', '[Ljava.lang.StackTraceElement;@50ef4583', 'solved', null, null, 'org.opensrp.form.domain.FormSubmission', null); \ No newline at end of file From 568419f19bd163a081f3dc3962e31298b2c82dc7 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 5 Apr 2018 18:25:20 +0300 Subject: [PATCH 092/133] Enhance unit test scenarios --- .../postgres/ActionsRepositoryTest.java | 36 +++++++++++- .../postgres/AlertsRepositoryTest.java | 37 ++++++++++++- .../AppStateTokensRepositoryTest.java | 33 +++++++---- .../postgres/ClientsRepositoryTest.java | 55 +++++++++++++++---- .../test/resources/test-scripts/client.sql | 6 +- 5 files changed, 136 insertions(+), 31 deletions(-) diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ActionsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ActionsRepositoryTest.java index 9a1c85ef7d..a9dda93768 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ActionsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ActionsRepositoryTest.java @@ -2,9 +2,11 @@ import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -74,6 +76,22 @@ public void testUpdate() { @Test public void testGetAll() { assertEquals(34, actionsRepository.getAll().size()); + + actionsRepository.safeRemove(actionsRepository.get("05934ae338431f28bf6793b2417c98f9")); + + List actions = actionsRepository.getAll(); + assertEquals(33, actions.size()); + + List ids = Arrays.asList("05934ae338431f28bf6793b241645f1f", "05934ae338431f28bf6793b24164a5d7", + "05934ae338431f28bf6793b2417c5aae"); + int found = 0; + for (Action act : actions) { + assertNotEquals("05934ae338431f28bf6793b2417c98f9", act.getId()); + if (ids.contains(act.getId())) + found++; + } + assertEquals(3, found); + } @Test @@ -82,7 +100,12 @@ public void testSafeRemove() { Action action = actionsRepository.get("05934ae338431f28bf6793b2417c7d94"); actionsRepository.safeRemove(action); - assertEquals(33, actionsRepository.getAll().size()); + List actions = actionsRepository.getAll(); + assertEquals(33, actions.size()); + + for (Action act : actions) { + assertNotEquals("05934ae338431f28bf6793b2417c7d94", act.getId()); + } assertNull(actionsRepository.get("05934ae338431f28bf6793b2417c7d94")); } @@ -93,6 +116,10 @@ public void testFindByProviderIdAndTimeStamp() { assertEquals(24, actionsRepository.findByProviderIdAndTimeStamp("biddemo", 1520932703825l).size()); + List actions = actionsRepository.findByProviderIdAndTimeStamp("biddemo", 1520978414513l); + assertEquals(1, actions.size()); + assertEquals("05934ae338431f28bf6793b2417da475", actions.get(0).getId()); + assertTrue(actionsRepository.findByProviderIdAndTimeStamp("biddeo", 0l).isEmpty()); assertTrue(actionsRepository.findByProviderIdAndTimeStamp("biddemo", System.currentTimeMillis()).isEmpty()); @@ -205,7 +232,12 @@ public void testFindByCriteria() { assertEquals(5, actionsRepository.findByCriteria("biddemo,tester1", null, 0, "server_version", "desc", 5).size()); - assertEquals(1, actionsRepository.findByCriteria("biddemo,tester1", null, now, null, null, 50).size()); + List actions = actionsRepository.findByCriteria("biddemo,tester1", null, now, null, null, 50); + assertEquals(1, actions.size()); + + assertEquals("bshdsf989-32hjh-d9-42642-ssf", actions.get(0).baseEntityId()); + assertEquals("OPV 2", actions.get(0).data().get("visitCode")); + assertEquals("2018-04-23", actions.get(0).data().get("completionDate")); } } diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/AlertsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/AlertsRepositoryTest.java index 0f8421b177..d6e6bc69a2 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/AlertsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/AlertsRepositoryTest.java @@ -1,6 +1,8 @@ package org.opensrp.repository.postgres; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertFalse; +import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; @@ -73,6 +75,14 @@ public void testUpdate() { @Test public void testGetAll() { assertEquals(15, alertsRepository.getAll().size()); + + alertsRepository.safeRemove(alertsRepository.get("f210392d-2905-458a-8301-5a7fb844c448")); + + List alerts = alertsRepository.getAll(); + assertEquals(14, alerts.size()); + + for (Alert alert : alerts) + assertNotEquals("f210392d-2905-458a-8301-5a7fb844c448", alert.getId()); } @Test @@ -82,6 +92,9 @@ public void testSafeRemove() { assertEquals(14, alertsRepository.getAll().size()); assertTrue(alertsRepository.findActiveAlertByEntityId("4a2a4ad9-cd29-47cb-bdb9-5b617a73b898").isEmpty()); + + for (Alert alert_ : alertsRepository.getAll()) + assertNotEquals("4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", alert_.entityId()); } @Test @@ -90,6 +103,11 @@ public void testFindByProviderAndTimestamp() { assertEquals(4, alertsRepository.findActiveByProviderAndTimestamp("biddemo", 1521842403899l).size()); + List alerts = alertsRepository.findActiveByProviderAndTimestamp("biddemo", 1522188003908l); + + assertEquals(1, alerts.size()); + assertEquals("01741058-588c-4105-b2e4-6e5ae47f4880", alerts.get(0).getId()); + assertTrue(alertsRepository.findActiveByProviderAndTimestamp("biddemo1", 0l).isEmpty()); assertTrue(alertsRepository.findActiveByProviderAndTimestamp("biddemo", System.currentTimeMillis()).isEmpty()); @@ -103,6 +121,13 @@ public void testFindActiveByProviderAndTimestamp() { assertEquals(3, alertsRepository.findActiveByProviderAndTimestamp("biddemo", 0l).size()); + List alerts = alertsRepository.findActiveByProviderAndTimestamp("biddemo", 1520978414377l); + assertEquals(2, alerts.size()); + for (Alert alert : alerts) { + assertTrue(alert.getTimeStamp() > 1520978414377l); + assertEquals("biddemo", alert.providerId()); + } + assertTrue(alertsRepository.findActiveByProviderAndTimestamp("biddemo1", 0l).isEmpty()); assertTrue(alertsRepository.findActiveByProviderAndTimestamp("biddemo", System.currentTimeMillis()).isEmpty()); @@ -186,7 +211,13 @@ public void testFindActiveAlertByEntityIdTriggerName() { @Test public void testFindActiveAlertByEntityId() { - assertEquals(3, alertsRepository.findActiveAlertByEntityId("06e4d8c0-f3ff-458c-8141-53d199355c7a").size()); + List alerts = alertsRepository.findActiveAlertByEntityId("06e4d8c0-f3ff-458c-8141-53d199355c7a"); + assertEquals(3, alerts.size()); + + for (Alert alert : alerts) { + assertEquals("06e4d8c0-f3ff-458c-8141-53d199355c7a", alert.entityId()); + assertTrue(alert.isActive()); + } alertsRepository.markAllAsClosedFor("06e4d8c0-f3ff-458c-8141-53d199355c7a", "testing"); @@ -216,8 +247,8 @@ public void testFindByEntityIdTriggerAndTimeStamp() { @Test public void testMarkAllAsClosedFor() { - alertsRepository.markAllAsClosedFor("06e4d8c0-f3ff-458c-8141-53d199355c7a", "testing"); - + alertsRepository.markAllAsClosedFor("06e4d8c0-f3ff-458c-8141-53d199355c7a", "DYuyi"); + assertFalse(alertsRepository.get("89bcc696-9491-4b03-8064-d7752b0cb12a").isActive()); assertTrue(alertsRepository.findActiveAlertByEntityId("06e4d8c0-f3ff-458c-8141-53d199355c7a").isEmpty()); } diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/AppStateTokensRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/AppStateTokensRepositoryTest.java index 1b474674aa..ba0e862149 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/AppStateTokensRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/AppStateTokensRepositoryTest.java @@ -1,6 +1,7 @@ package org.opensrp.repository.postgres; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; @@ -14,13 +15,12 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Qualifier; -public class AppStateTokensRepositoryTest extends BaseRepositoryTest{ +public class AppStateTokensRepositoryTest extends BaseRepositoryTest { @Autowired @Qualifier("appStateTokensRepositoryPostgres") private AppStateTokensRepository appStateTokensRepository; - @Override protected Set getDatabaseScripts() { Set scripts = new HashSet(); @@ -29,7 +29,7 @@ protected Set getDatabaseScripts() { } @Test - public void test1Get() { + public void testGet() { AppStateToken token = appStateTokensRepository.get("1"); assertEquals("sync_schedule_tracker_by_last_update_enrollment", token.getName()); assertEquals("34343", token.getValue().toString()); @@ -40,13 +40,20 @@ public void test1Get() { } @Test - public void test2GetAll() { + public void testGetAll() { List tokens = appStateTokensRepository.getAll(); assertEquals(5, tokens.size()); + + appStateTokensRepository.safeRemove(appStateTokensRepository.findByName("sync_event_by_date_updated").get(0)); + + tokens = appStateTokensRepository.getAll(); + assertEquals(4, tokens.size()); + for (AppStateToken token : tokens) + assertNotEquals("sync_event_by_date_updated", token.getName()); } @Test - public void test3FindByName() { + public void testFindByName() { List tokens = appStateTokensRepository.findByName("sync_event_by_date_updated"); assertEquals(1, tokens.size()); assertEquals("343232", tokens.get(0).getValue()); @@ -56,15 +63,17 @@ public void test3FindByName() { } @Test - public void test4SafeRemove() { - int tokens = appStateTokensRepository.getAll().size(); - appStateTokensRepository.safeRemove(appStateTokensRepository.get("3")); - assertNull(appStateTokensRepository.get("3")); - assertEquals(tokens - 1, appStateTokensRepository.getAll().size()); + public void testSafeRemove() { + appStateTokensRepository.safeRemove(appStateTokensRepository.findByName("sync_event_by_date_voided").get(0)); + assertTrue(appStateTokensRepository.findByName("sync_event_by_date_voided").isEmpty()); + List tokens = appStateTokensRepository.getAll(); + assertEquals(4, tokens.size()); + for (AppStateToken token : tokens) + assertNotEquals("sync_event_by_date_voided", token.getName()); } @Test - public void test5Update() { + public void testUpdate() { AppStateToken token = new AppStateToken("sync_event_by_date_updated", "4564353453434", 1521019916); appStateTokensRepository.update(token); @@ -76,7 +85,7 @@ public void test5Update() { } @Test - public void test6Add() { + public void testAdd() { AppStateToken token = new AppStateToken("sync_apptoken_custom", "45643534MKHT", 15210234516l, "Custom Test App Token"); appStateTokensRepository.add(token); diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java index 40d63668f4..e2f25c5ed4 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java @@ -1,6 +1,7 @@ package org.opensrp.repository.postgres; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNotNull; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; @@ -80,13 +81,27 @@ public void testUpdate() { @Test public void testGetAll() { assertEquals(15, clientsRepository.getAll().size()); + + clientsRepository.safeRemove(clientsRepository.get("05934ae338431f28bf6793b24164cbd9")); + + List clients = clientsRepository.getAll(); + + assertEquals(14, clients.size()); + for (Client client : clients) + assertNotEquals("05934ae338431f28bf6793b24164cbd9", client.getId()); + } @Test public void testSafeRemove() { Client client = clientsRepository.get("05934ae338431f28bf6793b2416946b7"); clientsRepository.safeRemove(client); - assertEquals(14, clientsRepository.getAll().size()); + List clients = clientsRepository.getAll(); + assertEquals(14, clients.size()); + + for (Client cl : clients) + assertNotEquals("05934ae338431f28bf6793b2416946b7", cl.getId()); + assertNull(clientsRepository.get("05934ae338431f28bf6793b2416946b7")); } @@ -103,7 +118,15 @@ public void testFindByBaseEntityId() { @Test public void testFindAllClients() { - assertEquals(15, clientsRepository.getAll().size()); + assertEquals(15, clientsRepository.findAllClients().size()); + + clientsRepository.safeRemove(clientsRepository.get("05934ae338431f28bf6793b24164cbd9")); + + List clients = clientsRepository.findAllClients(); + + assertEquals(14, clients.size()); + for (Client client : clients) + assertNotEquals("05934ae338431f28bf6793b24164cbd9", client.getId()); } @Test @@ -118,6 +141,9 @@ public void testFindAllByIdentifier() { assertTrue(clientsRepository.findAllByIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "ab91df5d-e433-40f3-b44f-427b73ca") .isEmpty()); + + assertTrue( + clientsRepository.findAllByIdentifier("identifier_type", "ab91df5d-e433-40f3-b44f-427b73c9ae2a").isEmpty()); } @Test @@ -133,13 +159,22 @@ public void testAllByAttribute() { assertEquals("Mtini", clients.get(0).getLastName().trim()); assertTrue(clientsRepository.findAllByAttribute("CHW_Phone_Number", "+0964357951").isEmpty()); + + assertTrue(clientsRepository.findAllByAttribute("Phone_Number", "0964357951").isEmpty()); } @Test public void testFindAllByMatchingName() { assertEquals(5, clientsRepository.findAllByMatchingName("b").size()); - assertEquals(1, clientsRepository.findAllByMatchingName("babytwo").size()); + List clients = clientsRepository.findAllByMatchingName("babytwo"); + + assertEquals(1, clients.size()); + + assertEquals("05934ae338431f28bf6793b24167b6d1", clients.get(0).getId()); + assertEquals("fe7b6350-16d2-41d0-8574-c194088705df", clients.get(0).getBaseEntityId()); + assertEquals("218227-7", clients.get(0).getIdentifier("ZEIR_ID")); + assertEquals("ba5d3927-414f-4796-ae1e-9b73b50a5573", clients.get(0).getIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE)); assertEquals(6, clientsRepository.findAllByMatchingName("a").size()); @@ -198,13 +233,13 @@ public void testFindByCriteria() { searchBean.setGender("Male"); assertEquals(2, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); - searchBean.setBirthdateFrom(new DateTime()); + searchBean.setBirthdateFrom(new DateTime("2016-04-13")); searchBean.setBirthdateTo(new DateTime()); - assertEquals(0, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); + assertEquals(2, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); - searchBean.setDeathdateFrom(new DateTime("2000-01-01")); + searchBean.setDeathdateFrom(new DateTime("2018-01-01")); searchBean.setDeathdateTo(new DateTime()); - assertEquals(0, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); + assertEquals(1, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); searchBean = new ClientSearchBean(); searchBean.setAttributeType("Home_Facility"); @@ -270,10 +305,8 @@ public void testFindByCriteriaWithoutAddressBean() { @Test public void testFindByCriteriaWithEditDateParams() { - assertEquals(6, - clientsRepository - .findByCriteria(new AddressSearchBean(), new DateTime("2018-03-13T12:57:05.652"), new DateTime()) - .size()); + assertEquals(6, clientsRepository + .findByCriteria(new AddressSearchBean(), new DateTime("2018-03-13T12:57:05.652"), new DateTime()).size()); assertEquals(15, clientsRepository.findByCriteria(new AddressSearchBean(), new DateTime("2018-01-01"), new DateTime()).size()); diff --git a/opensrp-core/src/test/resources/test-scripts/client.sql b/opensrp-core/src/test/resources/test-scripts/client.sql index 807939e1aa..644b985ac6 100644 --- a/opensrp-core/src/test/resources/test-scripts/client.sql +++ b/opensrp-core/src/test/resources/test-scripts/client.sql @@ -10,13 +10,13 @@ INSERT INTO core.client (id, json) VALUES (2, '{"id": "05934ae338431f28bf6793b24159dea7", "type": "Client", "gender": "Male", "lastName": " Child", "revision": "2-6ccd1e9150e9055193267acc3fd311e8", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rwre", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000+03:00", "firstName": "Third", "attributes": {}, "dateEdited": "2018-03-13T00:52:59.675+03:00", "dateCreated": "2018-03-13T00:52:01.121+03:00", "identifiers": {"ZEIR_ID": "218222-8", "OPENMRS_UUID": "99621619-688a-4f0f-b93e-68ab1b8cf49e"}, "baseEntityId": "9289b401-fbc6-4231-a59c-127dac40df74", "relationships": {"mother": ["0154839f-8766-4eda-b729-89067c7a8c5d"]}, "birthdateApprox": false, "deathdateApprox": false}'), (3, '{"id": "05934ae338431f28bf6793b24159ebc2", "type": "Client", "gender": "Female", "lastName": "Child", "revision": "2-0ea77a08483ea9a0c5849cb4fd3da368", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gjg", "address3": "c19431f1-566c-44ac-ad9e-dfd33eac8daa"}}], "birthdate": "2018-03-01T03:00:00.000+03:00", "firstName": "Fourth", "attributes": {}, "dateEdited": "2018-03-13T00:58:00.873+03:00", "dateCreated": "2018-03-13T00:54:42.889+03:00", "identifiers": {"ZEIR_ID": "218223-6", "OPENMRS_UUID": "07880fcb-0061-43b0-8ae8-6b52372b1a6b"}, "baseEntityId": "219655bb-a733-4d7a-8b1f-ecc5ff3af6cc", "relationships": {"mother": ["0154839f-8766-4eda-b729-89067c7a8c5d"]}, "birthdateApprox": false, "deathdateApprox": false}'), (4, '{"id": "05934ae338431f28bf6793b2415a0374", "type": "Client", "gender": "Female", "lastName": "Child", "revision": "2-5ec561cece5508f14bb0381b59e40baa", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Er", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000+03:00", "firstName": "Fith", "attributes": {}, "dateEdited": "2018-03-13T02:23:03.971+03:00", "dateCreated": "2018-03-13T02:20:08.984+03:00", "identifiers": {"ZEIR_ID": "218224-4", "OPENMRS_UUID": "cf58894b-71c6-41e0-a977-7283f2411cd5"}, "baseEntityId": "94f3e8fb-2f05-4fca-8119-2b593d1962eb", "relationships": {"mother": ["3abdb25a-f151-4a95-9311-bd30bf935085"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(5, '{"id": "05934ae338431f28bf6793b24159c647", "type": "Client", "gender": "Male", "lastName": "Child", "revision": "2-3867cacbf2a4b3736524552816381927", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rewe", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000+03:00", "firstName": "First", "attributes": {}, "dateEdited": "2018-03-13T00:47:57.879+03:00", "dateCreated": "2018-03-13T00:42:58.436+03:00", "identifiers": {"ZEIR_ID": "218220-2", "OPENMRS_UUID": "9c4260f2-d296-4af1-b771-debda1b6cfd1"}, "baseEntityId": "33d9a17f-d729-4276-9891-b43e8b60fd12", "relationships": {"mother": ["d0ecee83-6ccd-4096-9188-f63a40fa2f63"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(5, '{"id": "05934ae338431f28bf6793b24159c647", "type": "Client", "gender": "Male", "lastName": "Child", "revision": "2-3867cacbf2a4b3736524552816381927", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rewe", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-01-04T03:00:00.000+03:00", "firstName": "First", "attributes": {}, "dateEdited": "2018-03-13T00:47:57.879+03:00", "dateCreated": "2018-03-13T00:42:58.436+03:00", "identifiers": {"ZEIR_ID": "218220-2", "OPENMRS_UUID": "9c4260f2-d296-4af1-b771-debda1b6cfd1"}, "baseEntityId": "33d9a17f-d729-4276-9891-b43e8b60fd12", "relationships": {"mother": ["d0ecee83-6ccd-4096-9188-f63a40fa2f63"]}, "birthdateApprox": false, "deathdateApprox": false}'), (6, '{"id": "05934ae338431f28bf6793b24164cbd9", "type": "Client", "gender": "Female", "lastName": "Mtini ", "revision": "2-70add9f425fe26094fe4542bdf9a9acf", "addresses": [{"addressType": "usual_residence", "addressFields": {"address1": "Church", "address2": "Tulia Gardens ", "address3": "f940e2a3-b553-496a-80b3-091891bb5194"}}], "birthdate": "2016-04-13T03:00:00.000+03:00", "firstName": "Sally", "attributes": {"CHW_Name": "Hellen", "Home_Facility": "Happy Kids Clinic", "CHW_Phone_Number": "0964357951", "Father_NRC_Number": "721345/67/8"}, "dateEdited": "2018-03-13T12:26:53.223+03:00", "dateCreated": "2018-03-13T12:26:43.857+03:00", "identifiers": {"ZEIR_ID": "218923-1", "OPENMRS_UUID": "ab91df5d-e433-40f3-b44f-427b73c9ae2a"}, "baseEntityId": "86c039a2-0b68-4166-849e-f49897e3a510", "relationships": {"mother": ["758dab58-7629-4da9-882f-ae5110bcd240"]}, "birthdateApprox": false, "deathdateApprox": false}'), (7, '{"id": "05934ae338431f28bf6793b241692648", "type": "Client", "gender": "Female", "lastName": "Babbyfour", "revision": "2-2fa38eef6330ee8753e1ea18a94512aa", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gcfd", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000+03:00", "firstName": "Januar", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:09.837+03:00", "dateCreated": "2018-03-13T13:11:18.453+03:00", "identifiers": {"ZEIR_ID": "218229-3", "OPENMRS_UUID": "825b4d23-a3ea-4c58-a95b-d0df2f9c1690"}, "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "relationships": {"mother": ["9ac3fac4-a74c-45d5-bedb-da357cec3779"]}, "birthdateApprox": false, "deathdateApprox": false}'), (8, '{"id": "05934ae338431f28bf6793b241693a2f", "type": "Client", "gender": "Female", "lastName": "Babyfive", "revision": "2-8a753553c0e0ae4ed0257bb6d686d2ea", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Home", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000+03:00", "firstName": "January", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:11.027+03:00", "dateCreated": "2018-03-13T13:11:18.725+03:00", "identifiers": {"ZEIR_ID": "218230-1", "OPENMRS_UUID": "11a1ecf6-7d6d-4e12-8e6f-bb3cf5a3ebb8"}, "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "relationships": {"mother": ["41d1841b-4d6c-4f06-b5e8-b55907892ee6"]}, "birthdateApprox": false, "deathdateApprox": false}'), (9, '{"id": "05934ae338431f28bf6793b2416946b7", "type": "Client", "gender": "Female", "lastName": "Babysix", "revision": "2-0684ed7a15c29c8bf479a36d8c5986c5", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gu", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000+03:00", "firstName": "January ", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:12.257+03:00", "dateCreated": "2018-03-13T13:11:19.005+03:00", "identifiers": {"ZEIR_ID": "218231-9", "OPENMRS_UUID": "eb4b258c-7558-436c-a1fe-e91d9e12f849"}, "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "relationships": {"mother": ["7bce6b9a-e575-4cc6-b987-a12284912e84"]}, "birthdateApprox": false, "deathdateApprox": false}'), (10, '{"id": "05934ae338431f28bf6793b24167817d", "type": "Client", "gender": "Male", "lastName": "Child", "revision": "2-9de838d2e671a8d5011cedf66143b023", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Guy", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000+03:00", "firstName": "Sixth", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:03.225+03:00", "dateCreated": "2018-03-13T12:53:04.188+03:00", "identifiers": {"ZEIR_ID": "218225-1", "OPENMRS_UUID": "43397e39-0a11-4bb7-ba2d-3820436bef85"}, "baseEntityId": "28caef27-d1b3-497b-8a55-954f2f0f6e24", "relationships": {"mother": ["ab1eda08-2185-4d5f-9301-abb17d376ded"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(11, '{"id": "05934ae338431f28bf6793b241679500", "type": "Client", "gender": "Male", "lastName": "Baby", "revision": "2-f7de9e0a0e63129a1e4a3016539a2194", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rer", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000+03:00", "firstName": "Jan", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:04.417+03:00", "dateCreated": "2018-03-13T12:53:04.453+03:00", "identifiers": {"ZEIR_ID": "218226-9", "OPENMRS_UUID": "7a8926a9-f35a-41ba-adbf-87712333d5c2"}, "baseEntityId": "f33c71c7-a9a4-495d-8028-b6d59e4034b3", "relationships": {"mother": ["7289296d-9ec9-450e-9389-88b5b0d329a0"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(11, '{"id": "05934ae338431f28bf6793b241679500", "type": "Client", "gender": "Male", "lastName": "Baby", "revision": "2-f7de9e0a0e63129a1e4a3016539a2194", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rer", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000+03:00", "deathdate": "2018-02-13T03:00:00.000+03:00", "firstName": "Jan", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:04.417+03:00", "dateCreated": "2018-03-13T12:53:04.453+03:00", "identifiers": {"ZEIR_ID": "218226-9", "OPENMRS_UUID": "7a8926a9-f35a-41ba-adbf-87712333d5c2"}, "baseEntityId": "f33c71c7-a9a4-495d-8028-b6d59e4034b3", "relationships": {"mother": ["7289296d-9ec9-450e-9389-88b5b0d329a0"]}, "birthdateApprox": false, "deathdateApprox": false}'), (12, '{"id": "05934ae338431f28bf6793b24167b6d1", "type": "Client", "gender": "Male", "lastName": "Babytwo", "revision": "2-ce3c6a238b86298059c0dd792f0c0dcc", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Ty", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000+03:00", "firstName": "Janu", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:05.652+03:00", "dateCreated": "2018-03-13T12:54:42.456+03:00", "identifiers": {"ZEIR_ID": "218227-7", "OPENMRS_UUID": "ba5d3927-414f-4796-ae1e-9b73b50a5573"}, "baseEntityId": "fe7b6350-16d2-41d0-8574-c194088705df", "relationships": {"mother": ["14715b97-f0d5-4515-813b-5698934dbf1d"]}, "birthdateApprox": false, "deathdateApprox": false}'), (13, '{"id": "05934ae338431f28bf6793b24162ca7e", "type": "Client", "gender": "Male", "lastName": "Owino", "revision": "2-5d274d303daa8ff1cd5eb5604b8e60f7", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Kilimani", "address3": "6c814e69-ed6f-4fcc-ac2c-8406508603f2"}}], "birthdate": "2017-02-13T03:00:00.000+03:00", "firstName": "George", "attributes": {"Home_Facility": "Happy Kids Clinic", "Child_Birth_Certificate": "7865", "Child_Register_Card_Number": "4567"}, "dateEdited": "2018-03-13T11:46:46.277+03:00", "dateCreated": "2018-03-13T11:42:01.573+03:00", "identifiers": {"ZEIR_ID": "218922-3", "OPENMRS_UUID": "c5780597-3d54-4298-b39f-9d38dfd14970"}, "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "relationships": {"mother": ["14f94928-ef60-4d1c-a6be-f46b3b844268"]}, "birthdateApprox": false, "deathdateApprox": false}'), (14, '{"id": "05934ae338431f28bf6793b2418380ce", "type": "Client", "gender": "Female", "lastName": "Gchf", "revision": "2-2d194250dc94b0ed20fbb2dac28a9020", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Chf", "address3": "144cea61-2322-4a2c-8963-d99b52aa1406"}}], "birthdate": "1960-01-01T03:00:00.000+03:00", "firstName": "Gg", "attributes": {}, "dateEdited": "2018-03-14T07:53:06.606+03:00", "dateCreated": "2018-03-14T07:52:16.620+03:00", "identifiers": {"M_ZEIR_ID": "218232-7_mother", "OPENMRS_UUID": "2ca99239-ba6e-42d6-92a5-a889d2de50c0"}, "baseEntityId": "cc127350-c1cd-4c3a-99d4-4d632882f522", "birthdateApprox": false, "deathdateApprox": false}'), @@ -27,7 +27,7 @@ INSERT INTO core.client_metadata (id, client_id, document_id, base_entity_id, re (2, 2, '05934ae338431f28bf6793b24159dea7', '9289b401-fbc6-4231-a59c-127dac40df74', '0154839f-8766-4eda-b729-89067c7a8c5d', 1520891521078, '99621619-688a-4f0f-b93e-68ab1b8cf49e', '218222-8', 'Third', null, ' Child', '2018-03-01'), (3, 3, '05934ae338431f28bf6793b24159ebc2', '219655bb-a733-4d7a-8b1f-ecc5ff3af6cc', '0154839f-8766-4eda-b729-89067c7a8c5d', 1520891682846, '07880fcb-0061-43b0-8ae8-6b52372b1a6b', '218223-6', 'Fourth', null, 'Child', '2018-03-01'), (4, 4, '05934ae338431f28bf6793b2415a0374', '94f3e8fb-2f05-4fca-8119-2b593d1962eb', '3abdb25a-f151-4a95-9311-bd30bf935085', 1520896808942, 'cf58894b-71c6-41e0-a977-7283f2411cd5', '218224-4', 'Fith', null, 'Child', '2018-03-01'), -(5, 5, '05934ae338431f28bf6793b24159c647', '33d9a17f-d729-4276-9891-b43e8b60fd12', 'd0ecee83-6ccd-4096-9188-f63a40fa2f63', 1520890978382, '9c4260f2-d296-4af1-b771-debda1b6cfd1', '218220-2', 'First', null, 'Child', '2018-03-01'), +(5, 5, '05934ae338431f28bf6793b24159c647', '33d9a17f-d729-4276-9891-b43e8b60fd12', 'd0ecee83-6ccd-4096-9188-f63a40fa2f63', 1520890978382, '9c4260f2-d296-4af1-b771-debda1b6cfd1', '218220-2', 'First', null, 'Child', '2018-01-04'), (6, 6, '05934ae338431f28bf6793b24164cbd9', '86c039a2-0b68-4166-849e-f49897e3a510', '758dab58-7629-4da9-882f-ae5110bcd240', 1520933203799, 'ab91df5d-e433-40f3-b44f-427b73c9ae2a', '218923-1', 'Sally', null, 'Mtini ', '2016-04-13'), (7, 7, '05934ae338431f28bf6793b241692648', '4a2a4ad9-cd29-47cb-bdb9-5b617a73b898', '9ac3fac4-a74c-45d5-bedb-da357cec3779', 1520935878137, '825b4d23-a3ea-4c58-a95b-d0df2f9c1690', '218229-3', 'Januar', null, 'Babbyfour', '2018-01-01'), (8, 8, '05934ae338431f28bf6793b241693a2f', 'aabcd2cc-c111-41c6-85e6-cb5d9e350d08', '41d1841b-4d6c-4f06-b5e8-b55907892ee6', 1520935878137, '11a1ecf6-7d6d-4e12-8e6f-bb3cf5a3ebb8', '218230-1', 'January', null, 'Babyfive', '2018-01-01'), From f2625f30d75c05636a8a1b34ae745544bf75ebfa Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 6 Apr 2018 14:44:49 +0300 Subject: [PATCH 093/133] Search repository unit tests --- .../postgres/SearchRepositoryTest.java | 106 ++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 opensrp-core/src/test/java/org/opensrp/repository/postgres/SearchRepositoryTest.java diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/SearchRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/SearchRepositoryTest.java new file mode 100644 index 0000000000..2121551fa2 --- /dev/null +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/SearchRepositoryTest.java @@ -0,0 +1,106 @@ +package org.opensrp.repository.postgres; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.util.HashSet; +import java.util.List; +import java.util.Set; + +import org.joda.time.DateTime; +import org.junit.Test; +import org.opensrp.domain.Client; +import org.opensrp.repository.SearchRepository; +import org.opensrp.search.ClientSearchBean; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; + +public class SearchRepositoryTest extends BaseRepositoryTest { + + @Autowired + @Qualifier("searchRepositoryPostgres") + private SearchRepository searchRepository; + + @Override + protected Set getDatabaseScripts() { + Set scripts = new HashSet(); + scripts.add("client.sql"); + return scripts; + } + + @Test + public void testFindByCriteria() { + ClientSearchBean clientSearchBean = new ClientSearchBean(); + List clients = searchRepository.findByCriteria(clientSearchBean, "Jan", null, null, 20); + + assertEquals(5, clients.size()); + + clients = searchRepository.findByCriteria(clientSearchBean, "Jan", null, "Bab", 20); + + assertEquals(5, clients.size()); + + clients = searchRepository.findByCriteria(clientSearchBean, "Jan", null, "Baby", 20); + + assertEquals(4, clients.size()); + + clients = searchRepository.findByCriteria(clientSearchBean, "Janu", null, "Baby", 3); + + assertEquals(3, clients.size()); + + for (Client client : clients) { + assertTrue(client.getFirstName().contains("Janu")); + assertTrue(client.getLastName().contains("Baby")); + } + + clients = searchRepository.findByCriteria(clientSearchBean, "JAnu", null, "BABY", 3); + + assertEquals(3, clients.size()); + + for (Client client : clients) { + assertTrue(client.getFirstName().contains("Janu")); + assertTrue(client.getLastName().contains("Baby")); + } + + clients = searchRepository.findByCriteria(clientSearchBean, "Janu", null, "Babyfive", 3); + + assertEquals(1, clients.size()); + assertEquals("05934ae338431f28bf6793b241693a2f", clients.get(0).getId()); + assertEquals("aabcd2cc-c111-41c6-85e6-cb5d9e350d08", clients.get(0).getBaseEntityId()); + + ClientSearchBean searchBean = new ClientSearchBean(); + assertEquals(15, searchRepository.findByCriteria(searchBean, null, null, null, 20).size()); + + searchBean.setNameLike("Jan"); + assertEquals(4, searchRepository.findByCriteria(searchBean, "Janu", null, null, 20).size()); + + searchBean.setNameLike("Baby"); + searchBean.setGender("Male"); + assertEquals(2, searchRepository.findByCriteria(searchBean, "Jan", null, "Baby", 20).size()); + + searchBean.setBirthdateFrom(new DateTime("2016-04-13")); + searchBean.setBirthdateTo(new DateTime()); + assertEquals(2, searchRepository.findByCriteria(searchBean, "Jan", null, "Baby", 20).size()); + + searchBean.setDeathdateFrom(new DateTime("2018-01-01")); + searchBean.setDeathdateTo(new DateTime()); + assertEquals(1, searchRepository.findByCriteria(searchBean, "Jan", null, "Baby", 20).size()); + + searchBean = new ClientSearchBean(); + searchBean.setAttributeType("Home_Facility"); + searchBean.setAttributeValue("Happy Kids Clinic"); + assertEquals(9, searchRepository.findByCriteria(searchBean, null, null, null, 20).size()); + + searchBean.setAttributeType("CHW_Name"); + searchBean.setAttributeValue("Hellen"); + clients = searchRepository.findByCriteria(searchBean, null, null, null, 20); + assertEquals(1, clients.size()); + assertEquals("05934ae338431f28bf6793b24164cbd9", clients.get(0).getId()); + + searchBean = new ClientSearchBean(); + searchBean.setLastEditFrom(new DateTime("2018-03-13T12:57:05.652")); + searchBean.setLastEditTo(new DateTime()); + assertEquals(6, searchRepository.findByCriteria(searchBean, null, null, null, 20).size()); + + } + +} From 7f35283ba8f19e3213008e6c50836ffc057fa3b1 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 6 Apr 2018 14:46:58 +0300 Subject: [PATCH 094/133] Change event metadata dates to postgres timestamp data type --- ...0307131558_create_event_metadata_table.sql | 8 +- .../domain/postgres/EventMetadata.java | 102 ++++++------- .../domain/postgres/EventMetadataExample.java | 138 +++++++----------- .../postgres/EventsRepositoryImpl.java | 10 +- .../postgres/mapper/EventMetadataMapper.java | 22 +-- .../mapper/xml/EventMetadataMapper.xml | 84 +++++------ .../postgres/EventsRepositoryTest.java | 124 ++++++++++++++-- .../src/test/resources/test-scripts/event.sql | 30 ++-- 8 files changed, 301 insertions(+), 217 deletions(-) diff --git a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql index f38bc2f5e1..fb7984b4d6 100644 --- a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql +++ b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql @@ -27,15 +27,15 @@ CREATE TABLE core.event_metadata server_version bigint, openmrs_uuid character varying, event_type character varying, - event_date date, + event_date timestamp, entity_type character varying, provider_id character varying, location_id character varying, team character varying, team_id character varying, - date_created date DEFAULT CURRENT_TIMESTAMP, - date_edited date, - date_deleted date, + date_created timestamp DEFAULT CURRENT_TIMESTAMP, + date_edited timestamp, + date_deleted timestamp, PRIMARY KEY (id) ) WITH ( diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java index c2d579e641..90dfa7769e 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadata.java @@ -6,94 +6,94 @@ public class EventMetadata { /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ private Long id; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ private Long eventId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.document_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ private String documentId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.base_entity_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ private String baseEntityId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.form_submission_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ private String formSubmissionId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.server_version - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ private Long serverVersion; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.openmrs_uuid - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ private String openmrsUuid; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_type - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ private String eventType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.event_date - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ private Date eventDate; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.entity_type - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ private String entityType; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.provider_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ private String providerId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.location_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ private String locationId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.team - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ private String team; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.team_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ private String teamId; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.date_created - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ private Date dateCreated; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.date_edited - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ private Date dateEdited; /** * This field was generated by MyBatis Generator. This field corresponds to the database column core.event_metadata.date_deleted - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ private Date dateDeleted; /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.id * @return the value of core.event_metadata.id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public Long getId() { return id; @@ -102,7 +102,7 @@ public Long getId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.id * @param id the value for core.event_metadata.id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setId(Long id) { this.id = id; @@ -111,7 +111,7 @@ public void setId(Long id) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_id * @return the value of core.event_metadata.event_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public Long getEventId() { return eventId; @@ -120,7 +120,7 @@ public Long getEventId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_id * @param eventId the value for core.event_metadata.event_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setEventId(Long eventId) { this.eventId = eventId; @@ -129,7 +129,7 @@ public void setEventId(Long eventId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.document_id * @return the value of core.event_metadata.document_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public String getDocumentId() { return documentId; @@ -138,7 +138,7 @@ public String getDocumentId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.document_id * @param documentId the value for core.event_metadata.document_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setDocumentId(String documentId) { this.documentId = documentId; @@ -147,7 +147,7 @@ public void setDocumentId(String documentId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.base_entity_id * @return the value of core.event_metadata.base_entity_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public String getBaseEntityId() { return baseEntityId; @@ -156,7 +156,7 @@ public String getBaseEntityId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.base_entity_id * @param baseEntityId the value for core.event_metadata.base_entity_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setBaseEntityId(String baseEntityId) { this.baseEntityId = baseEntityId; @@ -165,7 +165,7 @@ public void setBaseEntityId(String baseEntityId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.form_submission_id * @return the value of core.event_metadata.form_submission_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public String getFormSubmissionId() { return formSubmissionId; @@ -174,7 +174,7 @@ public String getFormSubmissionId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.form_submission_id * @param formSubmissionId the value for core.event_metadata.form_submission_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setFormSubmissionId(String formSubmissionId) { this.formSubmissionId = formSubmissionId; @@ -183,7 +183,7 @@ public void setFormSubmissionId(String formSubmissionId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.server_version * @return the value of core.event_metadata.server_version - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public Long getServerVersion() { return serverVersion; @@ -192,7 +192,7 @@ public Long getServerVersion() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.server_version * @param serverVersion the value for core.event_metadata.server_version - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setServerVersion(Long serverVersion) { this.serverVersion = serverVersion; @@ -201,7 +201,7 @@ public void setServerVersion(Long serverVersion) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.openmrs_uuid * @return the value of core.event_metadata.openmrs_uuid - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public String getOpenmrsUuid() { return openmrsUuid; @@ -210,7 +210,7 @@ public String getOpenmrsUuid() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.openmrs_uuid * @param openmrsUuid the value for core.event_metadata.openmrs_uuid - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setOpenmrsUuid(String openmrsUuid) { this.openmrsUuid = openmrsUuid; @@ -219,7 +219,7 @@ public void setOpenmrsUuid(String openmrsUuid) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_type * @return the value of core.event_metadata.event_type - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public String getEventType() { return eventType; @@ -228,7 +228,7 @@ public String getEventType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_type * @param eventType the value for core.event_metadata.event_type - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setEventType(String eventType) { this.eventType = eventType; @@ -237,7 +237,7 @@ public void setEventType(String eventType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.event_date * @return the value of core.event_metadata.event_date - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public Date getEventDate() { return eventDate; @@ -246,7 +246,7 @@ public Date getEventDate() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.event_date * @param eventDate the value for core.event_metadata.event_date - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setEventDate(Date eventDate) { this.eventDate = eventDate; @@ -255,7 +255,7 @@ public void setEventDate(Date eventDate) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.entity_type * @return the value of core.event_metadata.entity_type - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public String getEntityType() { return entityType; @@ -264,7 +264,7 @@ public String getEntityType() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.entity_type * @param entityType the value for core.event_metadata.entity_type - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setEntityType(String entityType) { this.entityType = entityType; @@ -273,7 +273,7 @@ public void setEntityType(String entityType) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.provider_id * @return the value of core.event_metadata.provider_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public String getProviderId() { return providerId; @@ -282,7 +282,7 @@ public String getProviderId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.provider_id * @param providerId the value for core.event_metadata.provider_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setProviderId(String providerId) { this.providerId = providerId; @@ -291,7 +291,7 @@ public void setProviderId(String providerId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.location_id * @return the value of core.event_metadata.location_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public String getLocationId() { return locationId; @@ -300,7 +300,7 @@ public String getLocationId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.location_id * @param locationId the value for core.event_metadata.location_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setLocationId(String locationId) { this.locationId = locationId; @@ -309,7 +309,7 @@ public void setLocationId(String locationId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.team * @return the value of core.event_metadata.team - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public String getTeam() { return team; @@ -318,7 +318,7 @@ public String getTeam() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.team * @param team the value for core.event_metadata.team - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setTeam(String team) { this.team = team; @@ -327,7 +327,7 @@ public void setTeam(String team) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.team_id * @return the value of core.event_metadata.team_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public String getTeamId() { return teamId; @@ -336,7 +336,7 @@ public String getTeamId() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.team_id * @param teamId the value for core.event_metadata.team_id - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setTeamId(String teamId) { this.teamId = teamId; @@ -345,7 +345,7 @@ public void setTeamId(String teamId) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.date_created * @return the value of core.event_metadata.date_created - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public Date getDateCreated() { return dateCreated; @@ -354,7 +354,7 @@ public Date getDateCreated() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.date_created * @param dateCreated the value for core.event_metadata.date_created - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setDateCreated(Date dateCreated) { this.dateCreated = dateCreated; @@ -363,7 +363,7 @@ public void setDateCreated(Date dateCreated) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.date_edited * @return the value of core.event_metadata.date_edited - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public Date getDateEdited() { return dateEdited; @@ -372,7 +372,7 @@ public Date getDateEdited() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.date_edited * @param dateEdited the value for core.event_metadata.date_edited - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setDateEdited(Date dateEdited) { this.dateEdited = dateEdited; @@ -381,7 +381,7 @@ public void setDateEdited(Date dateEdited) { /** * This method was generated by MyBatis Generator. This method returns the value of the database column core.event_metadata.date_deleted * @return the value of core.event_metadata.date_deleted - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public Date getDateDeleted() { return dateDeleted; @@ -390,7 +390,7 @@ public Date getDateDeleted() { /** * This method was generated by MyBatis Generator. This method sets the value of the database column core.event_metadata.date_deleted * @param dateDeleted the value for core.event_metadata.date_deleted - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setDateDeleted(Date dateDeleted) { this.dateDeleted = dateDeleted; diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java index 89636747b9..594c4dab5d 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java @@ -8,23 +8,23 @@ public class EventMetadataExample { /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ protected String orderByClause; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ protected boolean distinct; /** * This field was generated by MyBatis Generator. This field corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ protected List oredCriteria; /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public EventMetadataExample() { oredCriteria = new ArrayList(); @@ -32,7 +32,7 @@ public EventMetadataExample() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setOrderByClause(String orderByClause) { this.orderByClause = orderByClause; @@ -40,7 +40,7 @@ public void setOrderByClause(String orderByClause) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public String getOrderByClause() { return orderByClause; @@ -48,7 +48,7 @@ public String getOrderByClause() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void setDistinct(boolean distinct) { this.distinct = distinct; @@ -56,7 +56,7 @@ public void setDistinct(boolean distinct) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public boolean isDistinct() { return distinct; @@ -64,7 +64,7 @@ public boolean isDistinct() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public List getOredCriteria() { return oredCriteria; @@ -72,7 +72,7 @@ public List getOredCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void or(Criteria criteria) { oredCriteria.add(criteria); @@ -80,7 +80,7 @@ public void or(Criteria criteria) { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public Criteria or() { Criteria criteria = createCriteriaInternal(); @@ -90,7 +90,7 @@ public Criteria or() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public Criteria createCriteria() { Criteria criteria = createCriteriaInternal(); @@ -102,7 +102,7 @@ public Criteria createCriteria() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ protected Criteria createCriteriaInternal() { Criteria criteria = new Criteria(); @@ -111,7 +111,7 @@ protected Criteria createCriteriaInternal() { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public void clear() { oredCriteria.clear(); @@ -121,7 +121,7 @@ public void clear() { /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ protected abstract static class GeneratedCriteria { @@ -165,32 +165,6 @@ protected void addCriterion(String condition, Object value1, Object value2, Stri criteria.add(new Criterion(condition, value1, value2)); } - protected void addCriterionForJDBCDate(String condition, Date value, String property) { - if (value == null) { - throw new RuntimeException("Value for " + property + " cannot be null"); - } - addCriterion(condition, new java.sql.Date(value.getTime()), property); - } - - protected void addCriterionForJDBCDate(String condition, List values, String property) { - if (values == null || values.size() == 0) { - throw new RuntimeException("Value list for " + property + " cannot be null or empty"); - } - List dateList = new ArrayList(); - Iterator iter = values.iterator(); - while (iter.hasNext()) { - dateList.add(new java.sql.Date(iter.next().getTime())); - } - addCriterion(condition, dateList, property); - } - - protected void addCriterionForJDBCDate(String condition, Date value1, Date value2, String property) { - if (value1 == null || value2 == null) { - throw new RuntimeException("Between values for " + property + " cannot be null"); - } - addCriterion(condition, new java.sql.Date(value1.getTime()), new java.sql.Date(value2.getTime()), property); - } - public Criteria andIdIsNull() { addCriterion("id is null"); return (Criteria) this; @@ -732,52 +706,52 @@ public Criteria andEventDateIsNotNull() { } public Criteria andEventDateEqualTo(Date value) { - addCriterionForJDBCDate("event_date =", value, "eventDate"); + addCriterion("event_date =", value, "eventDate"); return (Criteria) this; } public Criteria andEventDateNotEqualTo(Date value) { - addCriterionForJDBCDate("event_date <>", value, "eventDate"); + addCriterion("event_date <>", value, "eventDate"); return (Criteria) this; } public Criteria andEventDateGreaterThan(Date value) { - addCriterionForJDBCDate("event_date >", value, "eventDate"); + addCriterion("event_date >", value, "eventDate"); return (Criteria) this; } public Criteria andEventDateGreaterThanOrEqualTo(Date value) { - addCriterionForJDBCDate("event_date >=", value, "eventDate"); + addCriterion("event_date >=", value, "eventDate"); return (Criteria) this; } public Criteria andEventDateLessThan(Date value) { - addCriterionForJDBCDate("event_date <", value, "eventDate"); + addCriterion("event_date <", value, "eventDate"); return (Criteria) this; } public Criteria andEventDateLessThanOrEqualTo(Date value) { - addCriterionForJDBCDate("event_date <=", value, "eventDate"); + addCriterion("event_date <=", value, "eventDate"); return (Criteria) this; } public Criteria andEventDateIn(List values) { - addCriterionForJDBCDate("event_date in", values, "eventDate"); + addCriterion("event_date in", values, "eventDate"); return (Criteria) this; } public Criteria andEventDateNotIn(List values) { - addCriterionForJDBCDate("event_date not in", values, "eventDate"); + addCriterion("event_date not in", values, "eventDate"); return (Criteria) this; } public Criteria andEventDateBetween(Date value1, Date value2) { - addCriterionForJDBCDate("event_date between", value1, value2, "eventDate"); + addCriterion("event_date between", value1, value2, "eventDate"); return (Criteria) this; } public Criteria andEventDateNotBetween(Date value1, Date value2) { - addCriterionForJDBCDate("event_date not between", value1, value2, "eventDate"); + addCriterion("event_date not between", value1, value2, "eventDate"); return (Criteria) this; } @@ -1142,52 +1116,52 @@ public Criteria andDateCreatedIsNotNull() { } public Criteria andDateCreatedEqualTo(Date value) { - addCriterionForJDBCDate("date_created =", value, "dateCreated"); + addCriterion("date_created =", value, "dateCreated"); return (Criteria) this; } public Criteria andDateCreatedNotEqualTo(Date value) { - addCriterionForJDBCDate("date_created <>", value, "dateCreated"); + addCriterion("date_created <>", value, "dateCreated"); return (Criteria) this; } public Criteria andDateCreatedGreaterThan(Date value) { - addCriterionForJDBCDate("date_created >", value, "dateCreated"); + addCriterion("date_created >", value, "dateCreated"); return (Criteria) this; } public Criteria andDateCreatedGreaterThanOrEqualTo(Date value) { - addCriterionForJDBCDate("date_created >=", value, "dateCreated"); + addCriterion("date_created >=", value, "dateCreated"); return (Criteria) this; } public Criteria andDateCreatedLessThan(Date value) { - addCriterionForJDBCDate("date_created <", value, "dateCreated"); + addCriterion("date_created <", value, "dateCreated"); return (Criteria) this; } public Criteria andDateCreatedLessThanOrEqualTo(Date value) { - addCriterionForJDBCDate("date_created <=", value, "dateCreated"); + addCriterion("date_created <=", value, "dateCreated"); return (Criteria) this; } public Criteria andDateCreatedIn(List values) { - addCriterionForJDBCDate("date_created in", values, "dateCreated"); + addCriterion("date_created in", values, "dateCreated"); return (Criteria) this; } public Criteria andDateCreatedNotIn(List values) { - addCriterionForJDBCDate("date_created not in", values, "dateCreated"); + addCriterion("date_created not in", values, "dateCreated"); return (Criteria) this; } public Criteria andDateCreatedBetween(Date value1, Date value2) { - addCriterionForJDBCDate("date_created between", value1, value2, "dateCreated"); + addCriterion("date_created between", value1, value2, "dateCreated"); return (Criteria) this; } public Criteria andDateCreatedNotBetween(Date value1, Date value2) { - addCriterionForJDBCDate("date_created not between", value1, value2, "dateCreated"); + addCriterion("date_created not between", value1, value2, "dateCreated"); return (Criteria) this; } @@ -1202,52 +1176,52 @@ public Criteria andDateEditedIsNotNull() { } public Criteria andDateEditedEqualTo(Date value) { - addCriterionForJDBCDate("date_edited =", value, "dateEdited"); + addCriterion("date_edited =", value, "dateEdited"); return (Criteria) this; } public Criteria andDateEditedNotEqualTo(Date value) { - addCriterionForJDBCDate("date_edited <>", value, "dateEdited"); + addCriterion("date_edited <>", value, "dateEdited"); return (Criteria) this; } public Criteria andDateEditedGreaterThan(Date value) { - addCriterionForJDBCDate("date_edited >", value, "dateEdited"); + addCriterion("date_edited >", value, "dateEdited"); return (Criteria) this; } public Criteria andDateEditedGreaterThanOrEqualTo(Date value) { - addCriterionForJDBCDate("date_edited >=", value, "dateEdited"); + addCriterion("date_edited >=", value, "dateEdited"); return (Criteria) this; } public Criteria andDateEditedLessThan(Date value) { - addCriterionForJDBCDate("date_edited <", value, "dateEdited"); + addCriterion("date_edited <", value, "dateEdited"); return (Criteria) this; } public Criteria andDateEditedLessThanOrEqualTo(Date value) { - addCriterionForJDBCDate("date_edited <=", value, "dateEdited"); + addCriterion("date_edited <=", value, "dateEdited"); return (Criteria) this; } public Criteria andDateEditedIn(List values) { - addCriterionForJDBCDate("date_edited in", values, "dateEdited"); + addCriterion("date_edited in", values, "dateEdited"); return (Criteria) this; } public Criteria andDateEditedNotIn(List values) { - addCriterionForJDBCDate("date_edited not in", values, "dateEdited"); + addCriterion("date_edited not in", values, "dateEdited"); return (Criteria) this; } public Criteria andDateEditedBetween(Date value1, Date value2) { - addCriterionForJDBCDate("date_edited between", value1, value2, "dateEdited"); + addCriterion("date_edited between", value1, value2, "dateEdited"); return (Criteria) this; } public Criteria andDateEditedNotBetween(Date value1, Date value2) { - addCriterionForJDBCDate("date_edited not between", value1, value2, "dateEdited"); + addCriterion("date_edited not between", value1, value2, "dateEdited"); return (Criteria) this; } @@ -1262,59 +1236,59 @@ public Criteria andDateDeletedIsNotNull() { } public Criteria andDateDeletedEqualTo(Date value) { - addCriterionForJDBCDate("date_deleted =", value, "dateDeleted"); + addCriterion("date_deleted =", value, "dateDeleted"); return (Criteria) this; } public Criteria andDateDeletedNotEqualTo(Date value) { - addCriterionForJDBCDate("date_deleted <>", value, "dateDeleted"); + addCriterion("date_deleted <>", value, "dateDeleted"); return (Criteria) this; } public Criteria andDateDeletedGreaterThan(Date value) { - addCriterionForJDBCDate("date_deleted >", value, "dateDeleted"); + addCriterion("date_deleted >", value, "dateDeleted"); return (Criteria) this; } public Criteria andDateDeletedGreaterThanOrEqualTo(Date value) { - addCriterionForJDBCDate("date_deleted >=", value, "dateDeleted"); + addCriterion("date_deleted >=", value, "dateDeleted"); return (Criteria) this; } public Criteria andDateDeletedLessThan(Date value) { - addCriterionForJDBCDate("date_deleted <", value, "dateDeleted"); + addCriterion("date_deleted <", value, "dateDeleted"); return (Criteria) this; } public Criteria andDateDeletedLessThanOrEqualTo(Date value) { - addCriterionForJDBCDate("date_deleted <=", value, "dateDeleted"); + addCriterion("date_deleted <=", value, "dateDeleted"); return (Criteria) this; } public Criteria andDateDeletedIn(List values) { - addCriterionForJDBCDate("date_deleted in", values, "dateDeleted"); + addCriterion("date_deleted in", values, "dateDeleted"); return (Criteria) this; } public Criteria andDateDeletedNotIn(List values) { - addCriterionForJDBCDate("date_deleted not in", values, "dateDeleted"); + addCriterion("date_deleted not in", values, "dateDeleted"); return (Criteria) this; } public Criteria andDateDeletedBetween(Date value1, Date value2) { - addCriterionForJDBCDate("date_deleted between", value1, value2, "dateDeleted"); + addCriterion("date_deleted between", value1, value2, "dateDeleted"); return (Criteria) this; } public Criteria andDateDeletedNotBetween(Date value1, Date value2) { - addCriterionForJDBCDate("date_deleted not between", value1, value2, "dateDeleted"); + addCriterion("date_deleted not between", value1, value2, "dateDeleted"); return (Criteria) this; } } /** * This class was generated by MyBatis Generator. This class corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ public static class Criterion { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java index 978020075e..00b9bfb9a8 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java @@ -201,7 +201,8 @@ public List findEvents(EventSearchBean eventSearchBean) { if (StringUtils.isNotEmpty(eventSearchBean.getBaseEntityId())) criteria.andBaseEntityIdEqualTo(eventSearchBean.getBaseEntityId()); if (eventSearchBean.getEventDateFrom() != null && eventSearchBean.getEventDateTo() != null) - criteria.andEventDateBetween(eventSearchBean.getEventDateFrom().toDate(), eventSearchBean.getEventDateTo().toDate()); + criteria.andEventDateBetween(eventSearchBean.getEventDateFrom().toDate(), + eventSearchBean.getEventDateTo().toDate()); if (StringUtils.isNotEmpty(eventSearchBean.getEventType())) criteria.andEventTypeEqualTo(eventSearchBean.getEventType()); if (StringUtils.isNotEmpty(eventSearchBean.getEntityType())) @@ -211,7 +212,8 @@ public List findEvents(EventSearchBean eventSearchBean) { if (StringUtils.isNotEmpty(eventSearchBean.getLocationId())) criteria.andLocationIdEqualTo(eventSearchBean.getLocationId()); if (eventSearchBean.getLastEditFrom() != null && eventSearchBean.getLastEditTo() != null) - criteria.andDateEditedBetween(eventSearchBean.getLastEditFrom().toDate(), eventSearchBean.getLastEditTo().toDate()); + criteria.andDateEditedBetween(eventSearchBean.getLastEditFrom().toDate(), + eventSearchBean.getLastEditTo().toDate()); if (StringUtils.isNotEmpty(eventSearchBean.getTeam())) criteria.andTeamEqualTo(eventSearchBean.getTeam()); if (StringUtils.isNotEmpty(eventSearchBean.getTeamId())) @@ -445,6 +447,10 @@ private EventMetadata createMetadata(Event event, Long eventId) { eventMetadata.setServerVersion(event.getServerVersion()); if (event.getDateCreated() != null) eventMetadata.setDateCreated(event.getDateCreated().toDate()); + if (event.getDateEdited() != null) + eventMetadata.setDateEdited(event.getDateEdited().toDate()); + if (event.getDateVoided() != null) + eventMetadata.setDateDeleted(event.getDateVoided().toDate()); return eventMetadata; } catch (Exception e) { diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java index e9d74fc2de..46ed3e226b 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/EventMetadataMapper.java @@ -10,67 +10,67 @@ public interface EventMetadataMapper { /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ long countByExample(EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ int deleteByExample(EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ int deleteByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ int insert(EventMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ int insertSelective(EventMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ List selectByExample(EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ EventMetadata selectByPrimaryKey(Long id); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ int updateByExampleSelective(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ int updateByExample(@Param("record") EventMetadata record, @Param("example") EventMetadataExample example); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ int updateByPrimaryKeySelective(EventMetadata record); /** * This method was generated by MyBatis Generator. This method corresponds to the database table core.event_metadata - * @mbg.generated Tue Mar 20 11:10:04 EAT 2018 + * @mbg.generated Fri Apr 06 12:20:41 EAT 2018 */ int updateByPrimaryKey(EventMetadata record); } \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml index 2870e74f4b..937ddcaf96 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -15,21 +15,21 @@ - + - - - + + + @@ -63,7 +63,7 @@ @@ -97,7 +97,7 @@ id, event_id, document_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, event_type, event_date, entity_type, provider_id, location_id, team, team_id, date_created, @@ -107,7 +107,7 @@ select @@ -126,7 +126,7 @@ select @@ -137,7 +137,7 @@ delete from core.event_metadata where id = #{id,jdbcType=BIGINT} @@ -146,7 +146,7 @@ delete from core.event_metadata @@ -157,7 +157,7 @@ insert into core.event_metadata (id, event_id, document_id, base_entity_id, form_submission_id, server_version, @@ -167,16 +167,16 @@ date_edited, date_deleted) values (#{id,jdbcType=BIGINT}, #{eventId,jdbcType=BIGINT}, #{documentId,jdbcType=VARCHAR}, #{baseEntityId,jdbcType=VARCHAR}, #{formSubmissionId,jdbcType=VARCHAR}, #{serverVersion,jdbcType=BIGINT}, - #{openmrsUuid,jdbcType=VARCHAR}, #{eventType,jdbcType=VARCHAR}, #{eventDate,jdbcType=DATE}, + #{openmrsUuid,jdbcType=VARCHAR}, #{eventType,jdbcType=VARCHAR}, #{eventDate,jdbcType=TIMESTAMP}, #{entityType,jdbcType=VARCHAR}, #{providerId,jdbcType=VARCHAR}, #{locationId,jdbcType=VARCHAR}, - #{team,jdbcType=VARCHAR}, #{teamId,jdbcType=VARCHAR}, #{dateCreated,jdbcType=DATE}, - #{dateEdited,jdbcType=DATE}, #{dateDeleted,jdbcType=DATE}) + #{team,jdbcType=VARCHAR}, #{teamId,jdbcType=VARCHAR}, #{dateCreated,jdbcType=TIMESTAMP}, + #{dateEdited,jdbcType=TIMESTAMP}, #{dateDeleted,jdbcType=TIMESTAMP}) insert into core.event_metadata @@ -258,7 +258,7 @@ #{eventType,jdbcType=VARCHAR}, - #{eventDate,jdbcType=DATE}, + #{eventDate,jdbcType=TIMESTAMP}, #{entityType,jdbcType=VARCHAR}, @@ -276,13 +276,13 @@ #{teamId,jdbcType=VARCHAR}, - #{dateCreated,jdbcType=DATE}, + #{dateCreated,jdbcType=TIMESTAMP}, - #{dateEdited,jdbcType=DATE}, + #{dateEdited,jdbcType=TIMESTAMP}, - #{dateDeleted,jdbcType=DATE}, + #{dateDeleted,jdbcType=TIMESTAMP}, @@ -290,7 +290,7 @@ select count(*) from core.event_metadata @@ -301,7 +301,7 @@ update core.event_metadata @@ -330,7 +330,7 @@ event_type = #{record.eventType,jdbcType=VARCHAR}, - event_date = #{record.eventDate,jdbcType=DATE}, + event_date = #{record.eventDate,jdbcType=TIMESTAMP}, entity_type = #{record.entityType,jdbcType=VARCHAR}, @@ -348,13 +348,13 @@ team_id = #{record.teamId,jdbcType=VARCHAR}, - date_created = #{record.dateCreated,jdbcType=DATE}, + date_created = #{record.dateCreated,jdbcType=TIMESTAMP}, - date_edited = #{record.dateEdited,jdbcType=DATE}, + date_edited = #{record.dateEdited,jdbcType=TIMESTAMP}, - date_deleted = #{record.dateDeleted,jdbcType=DATE}, + date_deleted = #{record.dateDeleted,jdbcType=TIMESTAMP}, @@ -365,7 +365,7 @@ update core.event_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -376,15 +376,15 @@ server_version = #{record.serverVersion,jdbcType=BIGINT}, openmrs_uuid = #{record.openmrsUuid,jdbcType=VARCHAR}, event_type = #{record.eventType,jdbcType=VARCHAR}, - event_date = #{record.eventDate,jdbcType=DATE}, + event_date = #{record.eventDate,jdbcType=TIMESTAMP}, entity_type = #{record.entityType,jdbcType=VARCHAR}, provider_id = #{record.providerId,jdbcType=VARCHAR}, location_id = #{record.locationId,jdbcType=VARCHAR}, team = #{record.team,jdbcType=VARCHAR}, team_id = #{record.teamId,jdbcType=VARCHAR}, - date_created = #{record.dateCreated,jdbcType=DATE}, - date_edited = #{record.dateEdited,jdbcType=DATE}, - date_deleted = #{record.dateDeleted,jdbcType=DATE} + date_created = #{record.dateCreated,jdbcType=TIMESTAMP}, + date_edited = #{record.dateEdited,jdbcType=TIMESTAMP}, + date_deleted = #{record.dateDeleted,jdbcType=TIMESTAMP} @@ -393,7 +393,7 @@ update core.event_metadata @@ -419,7 +419,7 @@ event_type = #{eventType,jdbcType=VARCHAR}, - event_date = #{eventDate,jdbcType=DATE}, + event_date = #{eventDate,jdbcType=TIMESTAMP}, entity_type = #{entityType,jdbcType=VARCHAR}, @@ -437,13 +437,13 @@ team_id = #{teamId,jdbcType=VARCHAR}, - date_created = #{dateCreated,jdbcType=DATE}, + date_created = #{dateCreated,jdbcType=TIMESTAMP}, - date_edited = #{dateEdited,jdbcType=DATE}, + date_edited = #{dateEdited,jdbcType=TIMESTAMP}, - date_deleted = #{dateDeleted,jdbcType=DATE}, + date_deleted = #{dateDeleted,jdbcType=TIMESTAMP}, where id = #{id,jdbcType=BIGINT} @@ -452,7 +452,7 @@ update core.event_metadata set event_id = #{eventId,jdbcType=BIGINT}, @@ -462,15 +462,15 @@ server_version = #{serverVersion,jdbcType=BIGINT}, openmrs_uuid = #{openmrsUuid,jdbcType=VARCHAR}, event_type = #{eventType,jdbcType=VARCHAR}, - event_date = #{eventDate,jdbcType=DATE}, + event_date = #{eventDate,jdbcType=TIMESTAMP}, entity_type = #{entityType,jdbcType=VARCHAR}, provider_id = #{providerId,jdbcType=VARCHAR}, location_id = #{locationId,jdbcType=VARCHAR}, team = #{team,jdbcType=VARCHAR}, team_id = #{teamId,jdbcType=VARCHAR}, - date_created = #{dateCreated,jdbcType=DATE}, - date_edited = #{dateEdited,jdbcType=DATE}, - date_deleted = #{dateDeleted,jdbcType=DATE} + date_created = #{dateCreated,jdbcType=TIMESTAMP}, + date_edited = #{dateEdited,jdbcType=TIMESTAMP}, + date_deleted = #{dateDeleted,jdbcType=TIMESTAMP} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java index 294e5798d9..b7fa04c0bc 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java @@ -1,9 +1,11 @@ package org.opensrp.repository.postgres; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; +import java.util.Arrays; import java.util.Calendar; import java.util.HashSet; import java.util.List; @@ -47,12 +49,19 @@ public void testGet() { public void testGetAll() { List events = eventsRepository.getAll(); assertEquals(15, events.size()); + + eventsRepository.safeRemove(eventsRepository.findById("05934ae338431f28bf6793b2419c319a")); + events = eventsRepository.getAll(); + assertEquals(14, events.size()); + for (Event event : events) + assertNotEquals("05934ae338431f28bf6793b2419c319a", event.getId()); } @Test public void testFindAllByIdentifier() { assertTrue(eventsRepository.findAllByIdentifier(null).isEmpty()); List events = eventsRepository.findAllByIdentifier("06c8644b-b560-45fd-9af5-b6b1484e3504"); + assertEquals(1, events.size()); assertEquals("d59504cc-09ef-4d09-9dc3-8f7eb65882fd", events.get(0).getFormSubmissionId()); assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); } @@ -61,6 +70,7 @@ public void testFindAllByIdentifier() { public void testFindAllByIdentifierAndType() { assertTrue(eventsRepository.findAllByIdentifier(null, null).isEmpty()); List events = eventsRepository.findAllByIdentifier("OPENMRS_UUID", "06c8644b-b560-45fd-9af5-b6b1484e3504"); + assertEquals(1, events.size()); assertEquals("d59504cc-09ef-4d09-9dc3-8f7eb65882fd", events.get(0).getFormSubmissionId()); assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); @@ -142,8 +152,10 @@ public void testFindEvents() { List events = eventsRepository.findEvents(eventSearchBean); assertEquals(7, events.size()); - eventSearchBean.setEventDateFrom(new DateTime("2018-01-10")); - eventSearchBean.setEventDateTo(new DateTime("2018-02-21")); + DateTime from = new DateTime("2018-01-10T11:59:37.380"); + DateTime to = new DateTime("2018-02-21T12:00:08.788"); + eventSearchBean.setEventDateFrom(from); + eventSearchBean.setEventDateTo(to); events = eventsRepository.findEvents(eventSearchBean); assertEquals(6, events.size()); @@ -165,13 +177,36 @@ public void testFindEvents() { events = eventsRepository.findEvents(eventSearchBean); assertEquals(2, events.size()); + for (Event event : events) { + assertEquals("3453hgb454-4j345n-llk345", event.getTeamId()); + assertEquals("ATeam", event.getTeam()); + assertEquals("42abc582-6658-488b-922e-7be500c070f3", event.getLocationId()); + assertEquals("biddemo", event.getProviderId()); + assertEquals("vaccination", event.getEntityType()); + assertEquals("Vaccination", event.getEventType()); + assertEquals("58b33379-dab2-4f5c-8f09-6d2bd63023d8", event.getBaseEntityId()); + assertTrue(event.getEventDate().isEqual(from) || event.getEventDate().isAfter(from)); + assertTrue(event.getEventDate().isEqual(to) || event.getEventDate().isBefore(to)); + } + eventSearchBean.setLastEditFrom(new DateTime()); eventSearchBean.setLastEditTo(new DateTime()); events = eventsRepository.findEvents(eventSearchBean); assertTrue(events.isEmpty()); + + DateTime editFrom = new DateTime("2018-03-16T10:03:01.537"); + DateTime editTo = new DateTime("2018-03-19T17:17:15.929"); + eventSearchBean.setLastEditFrom(editFrom); + eventSearchBean.setLastEditTo(editTo); + events = eventsRepository.findEvents(eventSearchBean); + assertEquals(2, events.size()); + for (Event event : events) { + assertTrue(event.getDateEdited().equals(editFrom) || event.getDateEdited().isAfter(editFrom)); + assertTrue(event.getDateEdited().equals(editTo) || event.getDateEdited().isBefore(editTo)); + } } - @Test(expected = RuntimeException.class) + @Test(expected = IllegalArgumentException.class) public void testFindEventsByDynamicQuery() { eventsRepository.findEventsByDynamicQuery("baseEntityId:4234324"); } @@ -179,7 +214,15 @@ public void testFindEventsByDynamicQuery() { @Test public void testFindByServerVersion() { assertEquals(15, eventsRepository.findByServerVersion(0).size()); - assertEquals(10, eventsRepository.findByServerVersion(1521183592609l).size()); + List events = eventsRepository.findByServerVersion(1521469045587l); + assertEquals(3, events.size()); + List expectedIds = Arrays.asList("05934ae338431f28bf6793b241780bac", "05934ae338431f28bf6793b241781149", + "05934ae338431f28bf6793b241781a1e"); + for (Event event : events) { + assertTrue(event.getServerVersion() >= 1521469045587l); + assertTrue(expectedIds.contains(event.getId())); + } + assertTrue(eventsRepository.findByServerVersion(1521469045597l).isEmpty()); } @@ -187,7 +230,17 @@ public void testFindByServerVersion() { public void testNotInOpenMRSByServerVersion() { Calendar cal = Calendar.getInstance(); assertEquals(7, eventsRepository.notInOpenMRSByServerVersion(0, cal).size()); - assertEquals(3, eventsRepository.notInOpenMRSByServerVersion(1521469045588l, cal).size()); + + cal.setTimeInMillis(1521469045589l); + List events = eventsRepository.notInOpenMRSByServerVersion(1521469045588l, cal); + assertEquals(2, events.size()); + + List expectedIds = Arrays.asList("05934ae338431f28bf6793b241780bac", "05934ae338431f28bf6793b241781149"); + for (Event event : events) { + assertTrue(event.getServerVersion() >= 1521469045588l && event.getServerVersion() <= cal.getTimeInMillis()); + assertTrue(expectedIds.contains(event.getId())); + } + assertTrue(eventsRepository.notInOpenMRSByServerVersion(1521469045597l, cal).isEmpty()); } @@ -195,8 +248,17 @@ public void testNotInOpenMRSByServerVersion() { public void testNotInOpenMRSByServerVersionAndType() { Calendar cal = Calendar.getInstance(); assertEquals(4, eventsRepository.notInOpenMRSByServerVersionAndType("Growth Monitoring", 0, cal).size()); - assertEquals(3, - eventsRepository.notInOpenMRSByServerVersionAndType("Growth Monitoring", 1521469045588l, cal).size()); + + cal.setTimeInMillis(1521469045589l); + List events = eventsRepository.notInOpenMRSByServerVersionAndType("Growth Monitoring", 1521469045588l, cal); + List expectedIds = Arrays.asList("05934ae338431f28bf6793b241780bac", "05934ae338431f28bf6793b241781149"); + assertEquals(2, events.size()); + for (Event event : events) { + assertTrue(event.getServerVersion() >= 1521469045588l && event.getServerVersion() <= cal.getTimeInMillis()); + assertTrue(expectedIds.contains(event.getId())); + assertEquals("Growth Monitoring", event.getEventType()); + } + assertTrue(eventsRepository.notInOpenMRSByServerVersion(1521469045597l, cal).isEmpty()); } @@ -205,6 +267,12 @@ public void testFindByClientAndConceptAndDate() { List events = eventsRepository.findByClientAndConceptAndDate("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "1", "2018-01-10", new DateTime().toString("yyyy-MM-dd")); assertEquals(5, events.size()); + for (Event event : events) { + assertTrue(event.getEventDate().equals(new DateTime("2018-01-10")) + || event.getEventDate().isAfter(new DateTime("2018-01-10"))); + assertEquals("58b33379-dab2-4f5c-8f09-6d2bd63023d8", event.getBaseEntityId()); + assertEquals("1", events.get(0).getObs(null, "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValues().get(0)); + } events = eventsRepository.findByClientAndConceptAndDate("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "1", "2018-03-20", new DateTime().toString("yyyy-MM-dd")); @@ -221,6 +289,12 @@ public void testFindByClientAndConceptAndDate() { new DateTime().toString("yyyy-MM-dd")); assertEquals(1, events.size()); + assertEquals("58b33379-dab2-4f5c-8f09-6d2bd63023d8", events.get(0).getBaseEntityId()); + assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); + assertEquals("Happy Kids Clinic", + events.get(0).getObs(null, "163531AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValues().get(0)); + assertTrue(events.get(0).getDateCreated().equals(new DateTime("2018-03-19")) + || events.get(0).getDateCreated().isAfter(new DateTime("2018-03-19"))); } @@ -234,8 +308,16 @@ public void testFindByBaseEntityIdAndConceptParentCode() { "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); assertEquals(1, events.size()); - assertEquals("05934ae338431f28bf6793b241bdbc55", events.get(0).getId()); + boolean found = false; + for (Obs obs : events.get(0).getObs()) { + if (obs.getParentCode().equals("886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA") + && obs.getFieldCode().equals("1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")) { + found = true; + break; + } + } + assertTrue(found); events = eventsRepository.findByBaseEntityIdAndConceptParentCode("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); @@ -255,10 +337,15 @@ public void testFindByConceptAndValue() { events = eventsRepository.findByConceptAndValue("1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "2018-02-21"); assertEquals(4, events.size()); + for (Event event : events) { + assertEquals("2018-02-21", event.getObs(null, "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValues().get(0)); + } events = eventsRepository.findByConceptAndValue("163531AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "Happy Kids Clinic"); assertEquals(1, events.size()); + assertEquals("58b33379-dab2-4f5c-8f09-6d2bd63023d8", events.get(0).getBaseEntityId()); + assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); } @@ -295,6 +382,17 @@ public void testFindEvents2() { eventSearchBean.setServerVersion(0l); events = eventsRepository.findEvents(eventSearchBean, BaseEntity.SERVER_VERSIOIN, "asc", 20); assertEquals(3, events.size()); + + long previousVersion = 0; + for (Event event : events) { + assertTrue(event.getTeam().equals("ATeam") || event.getTeam().equals("BTeam")); + assertTrue(event.getTeamId().equals("3453hgb454-4j345n-llk345") + || event.getTeamId().equals("3453hgb454-4j345n-llk348")); + assertEquals("42abc582-6658-488b-922e-7be500c070f3", event.getLocationId()); + assertEquals("biddemo", event.getProviderId()); + assertTrue(event.getServerVersion() >= previousVersion); + previousVersion = event.getServerVersion(); + } } @Test @@ -335,14 +433,20 @@ public void testFindEventByEventTypeBetweenTwoDates() { } assertEquals(9, eventsRepository.findEventByEventTypeBetweenTwoDates("Vaccination").size()); assertEquals(4, eventsRepository.findEventByEventTypeBetweenTwoDates("Growth Monitoring").size()); - assertEquals(1, eventsRepository.findEventByEventTypeBetweenTwoDates("Birth Registration").size()); + events = eventsRepository.findEventByEventTypeBetweenTwoDates("Birth Registration"); + assertEquals(1, events.size()); + assertEquals("58b33379-dab2-4f5c-8f09-6d2bd63023d8", events.get(0).getBaseEntityId()); + assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); } @Test public void testSafeRemove() { Event event = eventsRepository.get("05934ae338431f28bf6793b241bdb88c"); eventsRepository.safeRemove(event); - assertEquals(14, eventsRepository.getAll().size()); + List events = eventsRepository.getAll(); + assertEquals(14, events.size()); + for (Event e : events) + assertNotEquals("05934ae338431f28bf6793b241bdb88c", e.getId()); assertNull(eventsRepository.get("05934ae338431f28bf6793b241bdb88c")); } diff --git a/opensrp-core/src/test/resources/test-scripts/event.sql b/opensrp-core/src/test/resources/test-scripts/event.sql index a371041eb7..b41a7abb88 100644 --- a/opensrp-core/src/test/resources/test-scripts/event.sql +++ b/opensrp-core/src/test/resources/test-scripts/event.sql @@ -25,18 +25,18 @@ INSERT INTO core.event (id, json, date_deleted) VALUES INSERT INTO core.event_metadata (id, event_id, document_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, event_type, event_date, entity_type ,provider_id, location_id, team, team_id, date_created, date_edited, date_deleted) VALUES -(1, 1, '05934ae338431f28bf6793b2417696bf', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '29243014-48df-4165-a82d-f4878f6a830e', 1520945634380, null, 'Vaccination', '2018-03-13', 'vaccination', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), -(2, 2, '05934ae338431f28bf6793b24199e690', '43930c23-c787-4ddb-ab76-770f77e7b17d', '6b3243e9-3d45-495c-af69-f012061def01', 1521016638453, 'd3630a60-a1f4-4267-9225-f4cb728f4178', 'Vaccination', '2018-03-14', 'mother', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), -(3, 3, '05934ae338431f28bf6793b2419c64fb', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', 'bfbfabe8-d4ae-4db2-940f-a6f126ef7829', 1521033533700, null, 'Vaccination', '2018-03-14', 'vaccination', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), -(4, 4, '05934ae338431f28bf6793b2419c319a', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', 'd960046a-e2a0-4bbf-b687-d41c2a52d8c8', 1521044588444, null, 'Vaccination', '2018-03-13', 'vaccination', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), -(5, 5, '05934ae338431f28bf6793b241bdb88c', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'd59504cc-09ef-4d09-9dc3-8f7eb65882fd', 1521183592609, '06c8644b-b560-45fd-9af5-b6b1484e3504', 'Birth Registration', '2018-03-16', 'child', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), -(6, 6, '05934ae338431f28bf6793b241bdbb60', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'baf8e663-71a1-4a30-8d40-2f3cab45a6d7', 1521183593424, '35d6a414-a379-4ada-97ee-39f680eecb91', 'Vaccination', '2018-01-10', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), -(7, 7, '05934ae338431f28bf6793b241bdbc55', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '014413c8-4dbf-4876-977d-0c1dfb9e4d05', 1521183593424, '94ec8561-14ab-48d1-a6d4-4ae05191f6e6', 'Vaccination', '2018-01-10', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), -(8, 8, '05934ae338431f28bf6793b241bdc231', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '5f1b201d-2132-4eb9-8fa1-3169a61cc50a', 1521183593424, '85abab15-0be3-4a9d-962d-de99a920d3cb', 'Vaccination', '2018-02-21', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19', null, null), -(9, 9, '05934ae338431f28bf6793b241bdc3df', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '4bc04bbe-bb2f-4e4e-b123-0c6131b91fec', 1521183593424, '28baa742-4a00-480f-9fff-12629c765cc2', 'Vaccination', '2018-02-21', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', 'ATeam', '3453hgb454-4j345n-llk345', '2018-03-19', null, null), -(10, 10, '05934ae338431f28bf6793b241bdc44a', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '6947237c-5e2b-4ccd-953b-dd8b019e0484', 1521183593424, '34701637-5c2f-4483-a05e-46df003990ef', 'Vaccination', '2018-02-21', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', 'ATeam', '3453hgb454-4j345n-llk345', '2018-03-19', null, null), -(11, 11, '05934ae338431f28bf6793b241be69a5', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'd6c08393-ebde-4faa-ac94-11429c1233dd', 1521184133098, '4aecc0c1-e008-4227-938d-66db17236a3d', 'Vaccination', '2018-02-21', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', 'BTeam', '3453hgb454-4j345n-llk348', '2018-03-19', null, null), -(12, 12, '05934ae338431f28bf6793b24177a1dc', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '306b6dc2-fa15-4e48-9ac3-4f8044899051', 1521469045587, null, 'Growth Monitoring', '2018-01-13', 'weight', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), -(13, 13, '05934ae338431f28bf6793b241780bac', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '9bd94f7b-d7f5-4e38-bc0d-2fa7eb84dad3', 1521469045588, null, 'Growth Monitoring', '2018-03-12', 'weight', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19', null, null), -(14, 14, '05934ae338431f28bf6793b241781149', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '31c4a45a-09f4-4b01-abe8-a87526827df6', 1521469045589, null, 'Growth Monitoring', '2017-09-06', 'weight', 'biddemo2', '42b88545-7ebb-4e11-8d1a-3d3a924c8af5', null, null, '2018-03-19', null, null), -(15, 15, '05934ae338431f28bf6793b241781a1e', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '3f66450e-2b66-43da-9b9b-dae5fced764f', 1521469045590, null, 'Growth Monitoring', '2017-11-06', 'weight', 'biddemo2', '42b88545-7ebb-4e11-8d1a-3d3a924c8af5', null, null, '2018-03-19', null, null); +(1, 1, '05934ae338431f28bf6793b2417696bf', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '29243014-48df-4165-a82d-f4878f6a830e', 1520945634380, null, 'Vaccination', '2018-03-13 17:42:03.326000', 'vaccination', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19 17:27:26.477000', null, null), +(2, 2, '05934ae338431f28bf6793b24199e690', '43930c23-c787-4ddb-ab76-770f77e7b17d', '6b3243e9-3d45-495c-af69-f012061def01', 1521016638453, 'd3630a60-a1f4-4267-9225-f4cb728f4178', 'Vaccination', '2018-03-14 03:00:00.000000', 'mother', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19 17:27:28.717000', '2018-03-14 11:39:35.826000', null), +(3, 3, '05934ae338431f28bf6793b2419c64fb', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', 'bfbfabe8-d4ae-4db2-940f-a6f126ef7829', 1521033533700, null, 'Vaccination', '2018-03-14 19:09:51.379000', 'vaccination', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19 17:27:28.750000', null, null), +(4, 4, '05934ae338431f28bf6793b2419c319a', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', 'd960046a-e2a0-4bbf-b687-d41c2a52d8c8', 1521044588444, null, 'Vaccination', '2018-03-13 22:10:00.321000', 'vaccination', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19 17:27:29.019000', '2018-03-14 19:21:38.401000', null), +(5, 5, '05934ae338431f28bf6793b241bdb88c', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'd59504cc-09ef-4d09-9dc3-8f7eb65882fd', 1521183592609, '06c8644b-b560-45fd-9af5-b6b1484e3504', 'Birth Registration', '2018-03-16 03:00:00.000000', 'child', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19 17:27:29.364000', '2018-03-16 10:03:00.759000', null), +(6, 6, '05934ae338431f28bf6793b241bdbb60', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'baf8e663-71a1-4a30-8d40-2f3cab45a6d7', 1521183593424, '35d6a414-a379-4ada-97ee-39f680eecb91', 'Vaccination', '2018-01-10 11:59:37.380000', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19 17:27:29.371000', '2018-03-16 10:03:00.949000', null), +(7, 7, '05934ae338431f28bf6793b241bdbc55', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '014413c8-4dbf-4876-977d-0c1dfb9e4d05', 1521183593424, '94ec8561-14ab-48d1-a6d4-4ae05191f6e6', 'Vaccination', '2018-01-10 11:59:41.058000', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19 17:27:29.376000', '2018-03-16 10:03:01.148000', null), +(8, 8, '05934ae338431f28bf6793b241bdc231', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '5f1b201d-2132-4eb9-8fa1-3169a61cc50a', 1521183593424, '85abab15-0be3-4a9d-962d-de99a920d3cb', 'Vaccination', '2018-02-21 11:59:50.145000', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', null, null, '2018-03-19 17:27:29.385000', '2018-03-16 10:03:01.341000', null), +(9, 9, '05934ae338431f28bf6793b241bdc3df', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '4bc04bbe-bb2f-4e4e-b123-0c6131b91fec', 1521183593424, '28baa742-4a00-480f-9fff-12629c765cc2', 'Vaccination', '2018-02-21 11:59:55.977000', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', 'ATeam', '3453hgb454-4j345n-llk345', '2018-03-19 17:27:29.390000', '2018-03-16 10:03:01.537000', null), +(10, 10, '05934ae338431f28bf6793b241bdc44a', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '6947237c-5e2b-4ccd-953b-dd8b019e0484', 1521183593424, '34701637-5c2f-4483-a05e-46df003990ef', 'Vaccination', '2018-02-21 12:00:02.298000', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', 'ATeam', '3453hgb454-4j345n-llk345', '2018-03-19 17:27:29.394000', '2018-03-16 10:03:01.729000', null), +(11, 11, '05934ae338431f28bf6793b241be69a5', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', 'd6c08393-ebde-4faa-ac94-11429c1233dd', 1521184133098, '4aecc0c1-e008-4227-938d-66db17236a3d', 'Vaccination', '2018-02-21 12:00:08.788000', 'vaccination', 'biddemo', '42abc582-6658-488b-922e-7be500c070f3', 'BTeam', '3453hgb454-4j345n-llk348', '2018-03-19 17:27:29.398000', '2018-03-16 10:13:03.469000', null), +(12, 12, '05934ae338431f28bf6793b24177a1dc', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '306b6dc2-fa15-4e48-9ac3-4f8044899051', 1521469045587, null, 'Growth Monitoring', '2018-01-13 19:37:11.954000', 'weight', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19 17:28:40.255000', '2018-03-19 17:17:15.649000', null), +(13, 13, '05934ae338431f28bf6793b241780bac', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '9bd94f7b-d7f5-4e38-bc0d-2fa7eb84dad3', 1521469045588, null, 'Growth Monitoring', '2018-03-12 19:40:01.023000', 'weight', 'biddemo', '42b88545-7ebb-4e11-8d1a-3d3a924c8af4', null, null, '2018-03-19 17:28:40.260000', '2018-03-19 17:17:15.789000', null), +(14, 14, '05934ae338431f28bf6793b241781149', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '31c4a45a-09f4-4b01-abe8-a87526827df6', 1521469045589, null, 'Growth Monitoring', '2017-09-06 19:40:24.702000', 'weight', 'biddemo2', '42b88545-7ebb-4e11-8d1a-3d3a924c8af5', null, null, '2018-03-19 17:28:40.264000', '2018-03-19 17:17:15.929000', null), +(15, 15, '05934ae338431f28bf6793b241781a1e', 'ea1f9439-a663-4073-93b9-6ef2b8bca3c1', '3f66450e-2b66-43da-9b9b-dae5fced764f', 1521469045590, null, 'Growth Monitoring', '2017-11-06 19:42:02.327000', 'weight', 'biddemo2', '42b88545-7ebb-4e11-8d1a-3d3a924c8af5', null, null, '2018-03-19 17:28:40.268000', '2018-03-19 17:17:16.069000', null); \ No newline at end of file From be00321cad85d32fcc9c53713f2c009f8c0598da Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 6 Apr 2018 14:47:48 +0300 Subject: [PATCH 095/133] Add more scenarios to unit tests --- .../migrations/generator/generatorConfig.xml | 8 ++-- .../postgres/SearchRepositoryImpl.java | 2 +- .../postgres/StocksRepositoryImpl.java | 6 +++ .../postgres/ClientsRepositoryTest.java | 42 ++++++++++++++----- .../postgres/ErrorTraceRepositoryTest.java | 19 +++++++-- .../postgres/MultimediaRepositoryTest.java | 19 +++++++-- .../postgres/ReportsRepositoryTest.java | 21 +++++++--- .../postgres/StocksRepositoryTest.java | 36 ++++++++++++---- 8 files changed, 118 insertions(+), 35 deletions(-) diff --git a/assets/migrations/generator/generatorConfig.xml b/assets/migrations/generator/generatorConfig.xml index 024c0c70a9..92da5f6a27 100644 --- a/assets/migrations/generator/generatorConfig.xml +++ b/assets/migrations/generator/generatorConfig.xml @@ -45,14 +45,14 @@ typeHandler="org.opensrp.repository.postgres.handler.AlertTypeHandler" />
--> - -
+
+
--> diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/SearchRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/SearchRepositoryImpl.java index c1e8394f63..f3af899e76 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/SearchRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/SearchRepositoryImpl.java @@ -10,7 +10,7 @@ import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; -@Repository +@Repository("searchRepositoryPostgres") public class SearchRepositoryImpl implements SearchRepository { @Autowired diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java index b0a8325744..3f63fd4f9e 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java @@ -134,6 +134,12 @@ public List findAllByProviderid(String providerid) { return convert(stockMetadataMapper.selectMany(stockMetadataExample, 0, DEFAULT_FETCH_SIZE)); } + /** + * implements the method equivalent in couch repository that return stocks matching stock type id + * @param stockType the stock type + * @param stockTypeId the stock type id + * @return list of stock of a particluar stock type id + */ @Override public List findAllByIdentifier(String stockType, String stockTypeId) { return convert(stockMetadataMapper.selectByIdentifier(stockTypeId, 0, DEFAULT_FETCH_SIZE)); diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java index e2f25c5ed4..69accc39e7 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java @@ -277,13 +277,13 @@ public void testFindByCriteriaWithoutAddressBean() { searchBean.setGender("Male"); assertEquals(2, clientsRepository.findByCriteria(searchBean).size()); - searchBean.setBirthdateFrom(new DateTime()); + searchBean.setBirthdateFrom(new DateTime("2016-04-13")); searchBean.setBirthdateTo(new DateTime()); - assertEquals(0, clientsRepository.findByCriteria(searchBean).size()); + assertEquals(2, clientsRepository.findByCriteria(searchBean).size()); - searchBean.setDeathdateFrom(new DateTime("2000-01-01")); + searchBean.setDeathdateFrom(new DateTime("2018-01-01")); searchBean.setDeathdateTo(new DateTime()); - assertEquals(0, clientsRepository.findByCriteria(searchBean).size()); + assertEquals(1, clientsRepository.findByCriteria(searchBean).size()); searchBean = new ClientSearchBean(); searchBean.setAttributeType("Home_Facility"); @@ -305,15 +305,29 @@ public void testFindByCriteriaWithoutAddressBean() { @Test public void testFindByCriteriaWithEditDateParams() { - assertEquals(6, clientsRepository - .findByCriteria(new AddressSearchBean(), new DateTime("2018-03-13T12:57:05.652"), new DateTime()).size()); - assertEquals(15, - clientsRepository.findByCriteria(new AddressSearchBean(), new DateTime("2018-01-01"), new DateTime()).size()); + DateTime from = new DateTime("2018-03-13T12:57:05.652"); + DateTime to = new DateTime(); + List clients = clientsRepository.findByCriteria(new AddressSearchBean(), from, to); + assertEquals(6, clients.size()); + + for (Client client : clients) + assertTrue(client.getDateEdited().isEqual(from) || client.getDateEdited().isAfter(from)); + + to = from; + from = new DateTime("2018-01-01"); + clients = clientsRepository.findByCriteria(new AddressSearchBean(), from, to); + assertEquals(10, clients.size()); + + for (Client client : clients) { + assertTrue(client.getDateEdited().isEqual(from) || client.getDateEdited().isAfter(from)); + assertTrue(client.getDateEdited().isEqual(to) || client.getDateEdited().isBefore(to)); + } + AddressSearchBean addressSearchBean = new AddressSearchBean(); addressSearchBean.setCityVillage("hui"); - assertEquals(0, - clientsRepository.findByCriteria(addressSearchBean, new DateTime("2018-01-01"), new DateTime()).size()); + assertTrue( + clientsRepository.findByCriteria(addressSearchBean, new DateTime("2018-01-01"), new DateTime()).isEmpty()); } @Test @@ -349,7 +363,13 @@ public void testFindByEmptyServerVersion() { public void testFindByServerVersion() { assertEquals(5, clientsRepository.findByServerVersion(1520935878136l).size()); - assertEquals(2, clientsRepository.findByServerVersion(1521003136406l).size()); + List clients = clientsRepository.findByServerVersion(1521003136406l); + List expectedIds = Arrays.asList("05934ae338431f28bf6793b241839005", "05934ae338431f28bf6793b2418380ce"); + assertEquals(2, clients.size()); + for (Client client : clients) { + assertTrue(client.getServerVersion() >= 1521003136406l); + assertTrue(expectedIds.contains(client.getId())); + } } @Test diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ErrorTraceRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ErrorTraceRepositoryTest.java index 4974ac3723..8033a59011 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ErrorTraceRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ErrorTraceRepositoryTest.java @@ -85,7 +85,10 @@ public void testGetAll() { @Test public void testSafeRemove() { errorTraceRepository.safeRemove(errorTraceRepository.get("911c7520-f701-419e-b225-5e21286b585b")); - assertEquals(7, errorTraceRepository.getAll().size()); + List errors = errorTraceRepository.getAll(); + assertEquals(7, errors.size()); + for (ErrorTrace error : errors) + assertNotEquals("911c7520-f701-419e-b225-5e21286b585b", error.getId()); } @Test @@ -112,7 +115,12 @@ public void testExists() { public void testFindAllErrors() { assertEquals(8, errorTraceRepository.findAllErrors().size()); errorTraceRepository.safeRemove(errorTraceRepository.get("ea96c23d-bbf1-4365-bdf5-bcf56f08ce1f")); - assertEquals(7, errorTraceRepository.findAllErrors().size()); + + List errors = errorTraceRepository.findAllErrors(); + assertEquals(7, errors.size()); + + for (ErrorTrace error : errors) + assertNotEquals("ea96c23d-bbf1-4365-bdf5-bcf56f08ce1f", error.getId()); } @Test @@ -133,14 +141,17 @@ public void testFindAllUnSolvedErrors() { @Test public void testFindAllSolvedErrors() { - assertEquals(2, errorTraceRepository.findAllSolvedErrors().size()); + List errors = errorTraceRepository.findAllSolvedErrors(); + assertEquals(2, errors.size()); + for (ErrorTrace err : errors) + assertTrue(err.getStatus().equals(SOLVED)); ErrorTrace error = errorTraceRepository.get("48106c03-8900-4156-a7bf-93226e1d3e58"); error.setStatus(UNSOLVED); error.setDateClosed(null); errorTraceRepository.update(error); - List errors = errorTraceRepository.findAllSolvedErrors(); + errors = errorTraceRepository.findAllSolvedErrors(); assertEquals(1, errors.size()); assertEquals(new DateTime("2018-01-03T17:06:11.166"), errors.get(0).getDateOccurred()); assertEquals("FormSubmissionProcessor", errors.get(0).getErrorType()); diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/MultimediaRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/MultimediaRepositoryTest.java index a04af0a868..1f7e26fd50 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/MultimediaRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/MultimediaRepositoryTest.java @@ -1,8 +1,10 @@ package org.opensrp.repository.postgres; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNull; +import java.util.Arrays; import java.util.HashSet; import java.util.List; import java.util.Set; @@ -70,7 +72,16 @@ public void testGetAll() { "/tmp/b7jhkh23.jpg", "thumbnail"); multimediaRepository.add(multimedia); - assertEquals(6, multimediaRepository.getAll().size()); + List expectedClients = Arrays.asList("2332kkj-76385430sdfsd-23423423", "87dc3230-84f7-4088-b257-e8b3130ab86b", + "24eec0d8-e0ee-4f22-9d6b-3cca84bdefcf"); + int found = 0; + List multimediaList = multimediaRepository.getAll(); + assertEquals(6, multimediaList.size()); + for (Multimedia media : multimediaList) + if (expectedClients.contains(media.getCaseId())) + found++; + assertEquals(3, found); + } @Test @@ -79,7 +90,10 @@ public void testSafeRemove() { Multimedia multimedia = multimediaRepository.get("3157f9339bf0c948dd5d12aff82111e1"); multimediaRepository.safeRemove(multimedia); - assertEquals(4, multimediaRepository.getAll().size()); + List multimediaList = multimediaRepository.getAll(); + assertEquals(4, multimediaList.size()); + for (Multimedia media : multimediaList) + assertNotEquals("3157f9339bf0c948dd5d12aff82111e1", media.getId()); assertNull(multimediaRepository.get("3157f9339bf0c948dd5d12aff82111e1")); @@ -101,7 +115,6 @@ public void testAll() { List multimedia = multimediaRepository.all("tester11"); assertEquals(1, multimedia.size()); - assertEquals("317f8db1bb6cc4b15ecc9993a2922f47", multimedia.get(0).getId()); assertEquals("24eec0d8-e0ee-4f22-9d6b-3cca84bdefcf", multimedia.get(0).getCaseId()); } diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ReportsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ReportsRepositoryTest.java index 297d0dc5a3..65015ede37 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ReportsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ReportsRepositoryTest.java @@ -1,6 +1,7 @@ package org.opensrp.repository.postgres; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; @@ -69,13 +70,19 @@ public void testUpdate() { public void testGetAll() { assertEquals(5, reportsRepository.getAll().size()); reportsRepository.safeRemove(reportsRepository.get("cd09a3d4-01d9-485c-a1c5-a2eb078a61be")); - assertEquals(4, reportsRepository.getAll().size()); + List reports = reportsRepository.getAll(); + assertEquals(4, reports.size()); + for (Report report : reports) + assertNotEquals("cd09a3d4-01d9-485c-a1c5-a2eb078a61be", report.getId()); } @Test public void testSafeRemove() { reportsRepository.safeRemove(reportsRepository.get("c57ba49f-34b9-4986-9b87-69f48b1830c5")); - assertEquals(4, reportsRepository.getAll().size()); + List reports = reportsRepository.getAll(); + assertEquals(4, reports.size()); + for (Report report : reports) + assertNotEquals("c57ba49f-34b9-4986-9b87-69f48b1830c5", report.getId()); assertNull(reportsRepository.get("c57ba49f-34b9-4986-9b87-69f48b1830c5")); } @@ -138,10 +145,14 @@ public void testFindByEmptyServerVersion() { @Test public void testFindByServerVersion() { - assertEquals(1, reportsRepository.findByServerVersion(1503312366264l).size()); - - assertEquals(3, reportsRepository.findByServerVersion(1500307579515l).size()); + List reports = reportsRepository.findByServerVersion(1503312366264l); + assertEquals(1, reports.size()); + assertEquals("07271855-4018-497a-b180-6af01f0fa62b", reports.get(0).getId()); + reports = reportsRepository.findByServerVersion(1500307579515l); + assertEquals(3, reports.size()); + for (Report report : reports) + assertTrue(report.getServerVersion() >= 1500307579516l); assertTrue(reportsRepository.findByServerVersion(System.currentTimeMillis()).isEmpty()); } diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/StocksRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/StocksRepositoryTest.java index 4c5de90f06..9b4392e136 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/StocksRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/StocksRepositoryTest.java @@ -1,6 +1,7 @@ package org.opensrp.repository.postgres; import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotEquals; import static org.junit.Assert.assertNull; import static org.junit.Assert.assertTrue; @@ -72,28 +73,45 @@ public void testUpdate() { public void testGetAll() { assertEquals(15, stocksRepository.getAll().size()); stocksRepository.safeRemove(stocksRepository.get("05934ae338431f28bf6793b241b2daa6")); - assertEquals(14, stocksRepository.getAll().size()); + List stocks = stocksRepository.getAll(); + assertEquals(14, stocks.size()); + for (Stock stock : stocks) + assertNotEquals("05934ae338431f28bf6793b241b2daa6", stock.getId()); } @Test public void testSafeRemove() { stocksRepository.safeRemove(stocksRepository.get("05934ae338431f28bf6793b2419a606f")); - assertEquals(14, stocksRepository.getAll().size()); + List stocks = stocksRepository.getAll(); + assertEquals(14, stocks.size()); + for (Stock stock : stocks) + assertNotEquals("05934ae338431f28bf6793b2419a606f", stock.getId()); + assertNull(stocksRepository.get("05934ae338431f28bf6793b2419a606f")); } @Test public void testFindAllByProviderid() { assertEquals(12, stocksRepository.findAllByProviderid("biddemo").size()); - assertEquals(3, stocksRepository.findAllByProviderid("biddemo1").size()); + + List stocks = stocksRepository.findAllByProviderid("biddemo1"); + assertEquals(3, stocks.size()); + for (Stock stock : stocks) + assertEquals("biddemo1", stock.getProviderid()); + assertTrue(stocksRepository.findAllByProviderid("biddemo2").isEmpty()); } @Test public void testFindAllByIdentifier() { assertEquals(11, stocksRepository.findAllByIdentifier("vaccine_type", "1").size()); - assertEquals(4, stocksRepository.findAllByIdentifier("vaccine_type", "2").size()); + + List stocks = stocksRepository.findAllByIdentifier("vaccine_type", "2"); + assertEquals(4, stocks.size()); + for (Stock stock : stocks) + assertEquals("2", stock.getVaccine_type_id()); + assertTrue(stocksRepository.findAllByIdentifier("vaccine_type", "19").isEmpty()); } @@ -117,10 +135,11 @@ public void testFindStocksWithOrder() { assertEquals(5, stocks.size()); long previousVersion = 0; for (Stock stock : stocks) { + assertEquals("1", stock.getVaccine_type_id()); assertTrue(stock.getServerVersion() >= previousVersion); - previousVersion=stock.getServerVersion(); + previousVersion = stock.getServerVersion(); } - + } @Test @@ -184,6 +203,9 @@ public void testFindStocksStockbeanOnly() { public void testFindAllStocks() { assertEquals(15, stocksRepository.findAllStocks().size()); stocksRepository.safeRemove(stocksRepository.get("05934ae338431f28bf6793b241b2df09")); - assertEquals(14, stocksRepository.findAllStocks().size()); + List stocks = stocksRepository.findAllStocks(); + assertEquals(14, stocks.size()); + for (Stock stock : stocks) + assertNotEquals("05934ae338431f28bf6793b241b2df09", stock.getId()); } } From e7e9c1d8a6524c20f2a810db347b292fca2b5727 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 6 Apr 2018 07:17:33 -0500 Subject: [PATCH 096/133] Fix failing unit tests --- .../postgres/EventsRepositoryTest.java | 4 +-- .../test/resources/test-scripts/client.sql | 30 +++++++++---------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java index b7fa04c0bc..b9e0857a6e 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java @@ -194,8 +194,8 @@ public void testFindEvents() { events = eventsRepository.findEvents(eventSearchBean); assertTrue(events.isEmpty()); - DateTime editFrom = new DateTime("2018-03-16T10:03:01.537"); - DateTime editTo = new DateTime("2018-03-19T17:17:15.929"); + DateTime editFrom = new DateTime("2018-03-16T10:03:01.537+03:00"); + DateTime editTo = new DateTime("2018-03-19T17:17:15.929+03:00"); eventSearchBean.setLastEditFrom(editFrom); eventSearchBean.setLastEditTo(editTo); events = eventsRepository.findEvents(eventSearchBean); diff --git a/opensrp-core/src/test/resources/test-scripts/client.sql b/opensrp-core/src/test/resources/test-scripts/client.sql index 644b985ac6..7a6e6542aa 100644 --- a/opensrp-core/src/test/resources/test-scripts/client.sql +++ b/opensrp-core/src/test/resources/test-scripts/client.sql @@ -6,21 +6,21 @@ ALTER SEQUENCE core.client_id_seq RESTART WITH 16; ALTER SEQUENCE core.client_metadata_id_seq RESTART WITH 16; INSERT INTO core.client (id, json) VALUES -(1, '{"id": "05934ae338431f28bf6793b24159ce5d", "type": "Client", "gender": "Male", "lastName": "Child", "revision": "2-0b2b71f8189f101a5c4c69e44d4886f5", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Dre0", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000+03:00", "firstName": "Second", "attributes": {}, "dateEdited": "2018-03-13T00:52:58.942+03:00", "dateCreated": "2018-03-13T00:48:59.829+03:00", "identifiers": {"ZEIR_ID": "218221-0", "OPENMRS_UUID": "8796f967-2f7a-40f7-8586-d63dbc81b709"}, "baseEntityId": "287be17c-30a7-4482-8816-e2382ec502f1", "relationships": {"mother": ["22b8570a-3207-4af7-8da7-8a1c5b84d3ff"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(2, '{"id": "05934ae338431f28bf6793b24159dea7", "type": "Client", "gender": "Male", "lastName": " Child", "revision": "2-6ccd1e9150e9055193267acc3fd311e8", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rwre", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000+03:00", "firstName": "Third", "attributes": {}, "dateEdited": "2018-03-13T00:52:59.675+03:00", "dateCreated": "2018-03-13T00:52:01.121+03:00", "identifiers": {"ZEIR_ID": "218222-8", "OPENMRS_UUID": "99621619-688a-4f0f-b93e-68ab1b8cf49e"}, "baseEntityId": "9289b401-fbc6-4231-a59c-127dac40df74", "relationships": {"mother": ["0154839f-8766-4eda-b729-89067c7a8c5d"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(3, '{"id": "05934ae338431f28bf6793b24159ebc2", "type": "Client", "gender": "Female", "lastName": "Child", "revision": "2-0ea77a08483ea9a0c5849cb4fd3da368", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gjg", "address3": "c19431f1-566c-44ac-ad9e-dfd33eac8daa"}}], "birthdate": "2018-03-01T03:00:00.000+03:00", "firstName": "Fourth", "attributes": {}, "dateEdited": "2018-03-13T00:58:00.873+03:00", "dateCreated": "2018-03-13T00:54:42.889+03:00", "identifiers": {"ZEIR_ID": "218223-6", "OPENMRS_UUID": "07880fcb-0061-43b0-8ae8-6b52372b1a6b"}, "baseEntityId": "219655bb-a733-4d7a-8b1f-ecc5ff3af6cc", "relationships": {"mother": ["0154839f-8766-4eda-b729-89067c7a8c5d"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(4, '{"id": "05934ae338431f28bf6793b2415a0374", "type": "Client", "gender": "Female", "lastName": "Child", "revision": "2-5ec561cece5508f14bb0381b59e40baa", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Er", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000+03:00", "firstName": "Fith", "attributes": {}, "dateEdited": "2018-03-13T02:23:03.971+03:00", "dateCreated": "2018-03-13T02:20:08.984+03:00", "identifiers": {"ZEIR_ID": "218224-4", "OPENMRS_UUID": "cf58894b-71c6-41e0-a977-7283f2411cd5"}, "baseEntityId": "94f3e8fb-2f05-4fca-8119-2b593d1962eb", "relationships": {"mother": ["3abdb25a-f151-4a95-9311-bd30bf935085"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(5, '{"id": "05934ae338431f28bf6793b24159c647", "type": "Client", "gender": "Male", "lastName": "Child", "revision": "2-3867cacbf2a4b3736524552816381927", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rewe", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-01-04T03:00:00.000+03:00", "firstName": "First", "attributes": {}, "dateEdited": "2018-03-13T00:47:57.879+03:00", "dateCreated": "2018-03-13T00:42:58.436+03:00", "identifiers": {"ZEIR_ID": "218220-2", "OPENMRS_UUID": "9c4260f2-d296-4af1-b771-debda1b6cfd1"}, "baseEntityId": "33d9a17f-d729-4276-9891-b43e8b60fd12", "relationships": {"mother": ["d0ecee83-6ccd-4096-9188-f63a40fa2f63"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(6, '{"id": "05934ae338431f28bf6793b24164cbd9", "type": "Client", "gender": "Female", "lastName": "Mtini ", "revision": "2-70add9f425fe26094fe4542bdf9a9acf", "addresses": [{"addressType": "usual_residence", "addressFields": {"address1": "Church", "address2": "Tulia Gardens ", "address3": "f940e2a3-b553-496a-80b3-091891bb5194"}}], "birthdate": "2016-04-13T03:00:00.000+03:00", "firstName": "Sally", "attributes": {"CHW_Name": "Hellen", "Home_Facility": "Happy Kids Clinic", "CHW_Phone_Number": "0964357951", "Father_NRC_Number": "721345/67/8"}, "dateEdited": "2018-03-13T12:26:53.223+03:00", "dateCreated": "2018-03-13T12:26:43.857+03:00", "identifiers": {"ZEIR_ID": "218923-1", "OPENMRS_UUID": "ab91df5d-e433-40f3-b44f-427b73c9ae2a"}, "baseEntityId": "86c039a2-0b68-4166-849e-f49897e3a510", "relationships": {"mother": ["758dab58-7629-4da9-882f-ae5110bcd240"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(7, '{"id": "05934ae338431f28bf6793b241692648", "type": "Client", "gender": "Female", "lastName": "Babbyfour", "revision": "2-2fa38eef6330ee8753e1ea18a94512aa", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gcfd", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000+03:00", "firstName": "Januar", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:09.837+03:00", "dateCreated": "2018-03-13T13:11:18.453+03:00", "identifiers": {"ZEIR_ID": "218229-3", "OPENMRS_UUID": "825b4d23-a3ea-4c58-a95b-d0df2f9c1690"}, "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "relationships": {"mother": ["9ac3fac4-a74c-45d5-bedb-da357cec3779"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(8, '{"id": "05934ae338431f28bf6793b241693a2f", "type": "Client", "gender": "Female", "lastName": "Babyfive", "revision": "2-8a753553c0e0ae4ed0257bb6d686d2ea", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Home", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000+03:00", "firstName": "January", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:11.027+03:00", "dateCreated": "2018-03-13T13:11:18.725+03:00", "identifiers": {"ZEIR_ID": "218230-1", "OPENMRS_UUID": "11a1ecf6-7d6d-4e12-8e6f-bb3cf5a3ebb8"}, "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "relationships": {"mother": ["41d1841b-4d6c-4f06-b5e8-b55907892ee6"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(9, '{"id": "05934ae338431f28bf6793b2416946b7", "type": "Client", "gender": "Female", "lastName": "Babysix", "revision": "2-0684ed7a15c29c8bf479a36d8c5986c5", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gu", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000+03:00", "firstName": "January ", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:12.257+03:00", "dateCreated": "2018-03-13T13:11:19.005+03:00", "identifiers": {"ZEIR_ID": "218231-9", "OPENMRS_UUID": "eb4b258c-7558-436c-a1fe-e91d9e12f849"}, "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "relationships": {"mother": ["7bce6b9a-e575-4cc6-b987-a12284912e84"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(10, '{"id": "05934ae338431f28bf6793b24167817d", "type": "Client", "gender": "Male", "lastName": "Child", "revision": "2-9de838d2e671a8d5011cedf66143b023", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Guy", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000+03:00", "firstName": "Sixth", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:03.225+03:00", "dateCreated": "2018-03-13T12:53:04.188+03:00", "identifiers": {"ZEIR_ID": "218225-1", "OPENMRS_UUID": "43397e39-0a11-4bb7-ba2d-3820436bef85"}, "baseEntityId": "28caef27-d1b3-497b-8a55-954f2f0f6e24", "relationships": {"mother": ["ab1eda08-2185-4d5f-9301-abb17d376ded"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(11, '{"id": "05934ae338431f28bf6793b241679500", "type": "Client", "gender": "Male", "lastName": "Baby", "revision": "2-f7de9e0a0e63129a1e4a3016539a2194", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rer", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000+03:00", "deathdate": "2018-02-13T03:00:00.000+03:00", "firstName": "Jan", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:04.417+03:00", "dateCreated": "2018-03-13T12:53:04.453+03:00", "identifiers": {"ZEIR_ID": "218226-9", "OPENMRS_UUID": "7a8926a9-f35a-41ba-adbf-87712333d5c2"}, "baseEntityId": "f33c71c7-a9a4-495d-8028-b6d59e4034b3", "relationships": {"mother": ["7289296d-9ec9-450e-9389-88b5b0d329a0"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(12, '{"id": "05934ae338431f28bf6793b24167b6d1", "type": "Client", "gender": "Male", "lastName": "Babytwo", "revision": "2-ce3c6a238b86298059c0dd792f0c0dcc", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Ty", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000+03:00", "firstName": "Janu", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:05.652+03:00", "dateCreated": "2018-03-13T12:54:42.456+03:00", "identifiers": {"ZEIR_ID": "218227-7", "OPENMRS_UUID": "ba5d3927-414f-4796-ae1e-9b73b50a5573"}, "baseEntityId": "fe7b6350-16d2-41d0-8574-c194088705df", "relationships": {"mother": ["14715b97-f0d5-4515-813b-5698934dbf1d"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(13, '{"id": "05934ae338431f28bf6793b24162ca7e", "type": "Client", "gender": "Male", "lastName": "Owino", "revision": "2-5d274d303daa8ff1cd5eb5604b8e60f7", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Kilimani", "address3": "6c814e69-ed6f-4fcc-ac2c-8406508603f2"}}], "birthdate": "2017-02-13T03:00:00.000+03:00", "firstName": "George", "attributes": {"Home_Facility": "Happy Kids Clinic", "Child_Birth_Certificate": "7865", "Child_Register_Card_Number": "4567"}, "dateEdited": "2018-03-13T11:46:46.277+03:00", "dateCreated": "2018-03-13T11:42:01.573+03:00", "identifiers": {"ZEIR_ID": "218922-3", "OPENMRS_UUID": "c5780597-3d54-4298-b39f-9d38dfd14970"}, "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "relationships": {"mother": ["14f94928-ef60-4d1c-a6be-f46b3b844268"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(14, '{"id": "05934ae338431f28bf6793b2418380ce", "type": "Client", "gender": "Female", "lastName": "Gchf", "revision": "2-2d194250dc94b0ed20fbb2dac28a9020", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Chf", "address3": "144cea61-2322-4a2c-8963-d99b52aa1406"}}], "birthdate": "1960-01-01T03:00:00.000+03:00", "firstName": "Gg", "attributes": {}, "dateEdited": "2018-03-14T07:53:06.606+03:00", "dateCreated": "2018-03-14T07:52:16.620+03:00", "identifiers": {"M_ZEIR_ID": "218232-7_mother", "OPENMRS_UUID": "2ca99239-ba6e-42d6-92a5-a889d2de50c0"}, "baseEntityId": "cc127350-c1cd-4c3a-99d4-4d632882f522", "birthdateApprox": false, "deathdateApprox": false}'), -(15, '{"id": "05934ae338431f28bf6793b241839005", "type": "Client", "gender": "Female", "lastName": "Immunisedtwo", "revision": "2-db28bfef08ea6a88fc4d387bbb83b369", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Home", "address3": "144cea61-2322-4a2c-8963-d99b52aa1406"}}], "birthdate": "2017-06-13T03:00:00.000+03:00", "firstName": "Fully", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-14T07:53:07.496+03:00", "dateCreated": "2018-03-14T07:52:16.757+03:00", "identifiers": {"ZEIR_ID": "218233-5", "OPENMRS_UUID": "02d89e05-64ad-4fa3-86d9-93b669ec02c5"}, "baseEntityId": "d4eda055-60c6-44a4-ba48-61dfe6485bea", "relationships": {"mother": ["17a1f5ed-a4cd-4427-ad9f-6471f4fc963d"]}, "birthdateApprox": false, "deathdateApprox": false}'); +(1, '{"id": "05934ae338431f28bf6793b24159ce5d", "type": "Client", "gender": "Male", "lastName": "Child", "revision": "2-0b2b71f8189f101a5c4c69e44d4886f5", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Dre0", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Second", "attributes": {}, "dateEdited": "2018-03-13T00:52:58.942", "dateCreated": "2018-03-13T00:48:59.829", "identifiers": {"ZEIR_ID": "218221-0", "OPENMRS_UUID": "8796f967-2f7a-40f7-8586-d63dbc81b709"}, "baseEntityId": "287be17c-30a7-4482-8816-e2382ec502f1", "relationships": {"mother": ["22b8570a-3207-4af7-8da7-8a1c5b84d3ff"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(2, '{"id": "05934ae338431f28bf6793b24159dea7", "type": "Client", "gender": "Male", "lastName": " Child", "revision": "2-6ccd1e9150e9055193267acc3fd311e8", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rwre", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Third", "attributes": {}, "dateEdited": "2018-03-13T00:52:59.675", "dateCreated": "2018-03-13T00:52:01.121", "identifiers": {"ZEIR_ID": "218222-8", "OPENMRS_UUID": "99621619-688a-4f0f-b93e-68ab1b8cf49e"}, "baseEntityId": "9289b401-fbc6-4231-a59c-127dac40df74", "relationships": {"mother": ["0154839f-8766-4eda-b729-89067c7a8c5d"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(3, '{"id": "05934ae338431f28bf6793b24159ebc2", "type": "Client", "gender": "Female", "lastName": "Child", "revision": "2-0ea77a08483ea9a0c5849cb4fd3da368", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gjg", "address3": "c19431f1-566c-44ac-ad9e-dfd33eac8daa"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Fourth", "attributes": {}, "dateEdited": "2018-03-13T00:58:00.873", "dateCreated": "2018-03-13T00:54:42.889", "identifiers": {"ZEIR_ID": "218223-6", "OPENMRS_UUID": "07880fcb-0061-43b0-8ae8-6b52372b1a6b"}, "baseEntityId": "219655bb-a733-4d7a-8b1f-ecc5ff3af6cc", "relationships": {"mother": ["0154839f-8766-4eda-b729-89067c7a8c5d"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(4, '{"id": "05934ae338431f28bf6793b2415a0374", "type": "Client", "gender": "Female", "lastName": "Child", "revision": "2-5ec561cece5508f14bb0381b59e40baa", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Er", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Fith", "attributes": {}, "dateEdited": "2018-03-13T02:23:03.971", "dateCreated": "2018-03-13T02:20:08.984", "identifiers": {"ZEIR_ID": "218224-4", "OPENMRS_UUID": "cf58894b-71c6-41e0-a977-7283f2411cd5"}, "baseEntityId": "94f3e8fb-2f05-4fca-8119-2b593d1962eb", "relationships": {"mother": ["3abdb25a-f151-4a95-9311-bd30bf935085"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(5, '{"id": "05934ae338431f28bf6793b24159c647", "type": "Client", "gender": "Male", "lastName": "Child", "revision": "2-3867cacbf2a4b3736524552816381927", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rewe", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-01-04T03:00:00.000", "firstName": "First", "attributes": {}, "dateEdited": "2018-03-13T00:47:57.879", "dateCreated": "2018-03-13T00:42:58.436", "identifiers": {"ZEIR_ID": "218220-2", "OPENMRS_UUID": "9c4260f2-d296-4af1-b771-debda1b6cfd1"}, "baseEntityId": "33d9a17f-d729-4276-9891-b43e8b60fd12", "relationships": {"mother": ["d0ecee83-6ccd-4096-9188-f63a40fa2f63"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(6, '{"id": "05934ae338431f28bf6793b24164cbd9", "type": "Client", "gender": "Female", "lastName": "Mtini ", "revision": "2-70add9f425fe26094fe4542bdf9a9acf", "addresses": [{"addressType": "usual_residence", "addressFields": {"address1": "Church", "address2": "Tulia Gardens ", "address3": "f940e2a3-b553-496a-80b3-091891bb5194"}}], "birthdate": "2016-04-13T03:00:00.000", "firstName": "Sally", "attributes": {"CHW_Name": "Hellen", "Home_Facility": "Happy Kids Clinic", "CHW_Phone_Number": "0964357951", "Father_NRC_Number": "721345/67/8"}, "dateEdited": "2018-03-13T12:26:53.223", "dateCreated": "2018-03-13T12:26:43.857", "identifiers": {"ZEIR_ID": "218923-1", "OPENMRS_UUID": "ab91df5d-e433-40f3-b44f-427b73c9ae2a"}, "baseEntityId": "86c039a2-0b68-4166-849e-f49897e3a510", "relationships": {"mother": ["758dab58-7629-4da9-882f-ae5110bcd240"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(7, '{"id": "05934ae338431f28bf6793b241692648", "type": "Client", "gender": "Female", "lastName": "Babbyfour", "revision": "2-2fa38eef6330ee8753e1ea18a94512aa", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gcfd", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "Januar", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:09.837", "dateCreated": "2018-03-13T13:11:18.453", "identifiers": {"ZEIR_ID": "218229-3", "OPENMRS_UUID": "825b4d23-a3ea-4c58-a95b-d0df2f9c1690"}, "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "relationships": {"mother": ["9ac3fac4-a74c-45d5-bedb-da357cec3779"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(8, '{"id": "05934ae338431f28bf6793b241693a2f", "type": "Client", "gender": "Female", "lastName": "Babyfive", "revision": "2-8a753553c0e0ae4ed0257bb6d686d2ea", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Home", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "January", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:11.027", "dateCreated": "2018-03-13T13:11:18.725", "identifiers": {"ZEIR_ID": "218230-1", "OPENMRS_UUID": "11a1ecf6-7d6d-4e12-8e6f-bb3cf5a3ebb8"}, "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "relationships": {"mother": ["41d1841b-4d6c-4f06-b5e8-b55907892ee6"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(9, '{"id": "05934ae338431f28bf6793b2416946b7", "type": "Client", "gender": "Female", "lastName": "Babysix", "revision": "2-0684ed7a15c29c8bf479a36d8c5986c5", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gu", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "January ", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:12.257", "dateCreated": "2018-03-13T13:11:19.005", "identifiers": {"ZEIR_ID": "218231-9", "OPENMRS_UUID": "eb4b258c-7558-436c-a1fe-e91d9e12f849"}, "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "relationships": {"mother": ["7bce6b9a-e575-4cc6-b987-a12284912e84"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(10, '{"id": "05934ae338431f28bf6793b24167817d", "type": "Client", "gender": "Male", "lastName": "Child", "revision": "2-9de838d2e671a8d5011cedf66143b023", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Guy", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Sixth", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:03.225", "dateCreated": "2018-03-13T12:53:04.188", "identifiers": {"ZEIR_ID": "218225-1", "OPENMRS_UUID": "43397e39-0a11-4bb7-ba2d-3820436bef85"}, "baseEntityId": "28caef27-d1b3-497b-8a55-954f2f0f6e24", "relationships": {"mother": ["ab1eda08-2185-4d5f-9301-abb17d376ded"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(11, '{"id": "05934ae338431f28bf6793b241679500", "type": "Client", "gender": "Male", "lastName": "Baby", "revision": "2-f7de9e0a0e63129a1e4a3016539a2194", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rer", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "deathdate": "2018-02-13T03:00:00.000", "firstName": "Jan", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:04.417", "dateCreated": "2018-03-13T12:53:04.453", "identifiers": {"ZEIR_ID": "218226-9", "OPENMRS_UUID": "7a8926a9-f35a-41ba-adbf-87712333d5c2"}, "baseEntityId": "f33c71c7-a9a4-495d-8028-b6d59e4034b3", "relationships": {"mother": ["7289296d-9ec9-450e-9389-88b5b0d329a0"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(12, '{"id": "05934ae338431f28bf6793b24167b6d1", "type": "Client", "gender": "Male", "lastName": "Babytwo", "revision": "2-ce3c6a238b86298059c0dd792f0c0dcc", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Ty", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "Janu", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:05.652", "dateCreated": "2018-03-13T12:54:42.456", "identifiers": {"ZEIR_ID": "218227-7", "OPENMRS_UUID": "ba5d3927-414f-4796-ae1e-9b73b50a5573"}, "baseEntityId": "fe7b6350-16d2-41d0-8574-c194088705df", "relationships": {"mother": ["14715b97-f0d5-4515-813b-5698934dbf1d"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(13, '{"id": "05934ae338431f28bf6793b24162ca7e", "type": "Client", "gender": "Male", "lastName": "Owino", "revision": "2-5d274d303daa8ff1cd5eb5604b8e60f7", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Kilimani", "address3": "6c814e69-ed6f-4fcc-ac2c-8406508603f2"}}], "birthdate": "2017-02-13T03:00:00.000", "firstName": "George", "attributes": {"Home_Facility": "Happy Kids Clinic", "Child_Birth_Certificate": "7865", "Child_Register_Card_Number": "4567"}, "dateEdited": "2018-03-13T11:46:46.277", "dateCreated": "2018-03-13T11:42:01.573", "identifiers": {"ZEIR_ID": "218922-3", "OPENMRS_UUID": "c5780597-3d54-4298-b39f-9d38dfd14970"}, "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "relationships": {"mother": ["14f94928-ef60-4d1c-a6be-f46b3b844268"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(14, '{"id": "05934ae338431f28bf6793b2418380ce", "type": "Client", "gender": "Female", "lastName": "Gchf", "revision": "2-2d194250dc94b0ed20fbb2dac28a9020", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Chf", "address3": "144cea61-2322-4a2c-8963-d99b52aa1406"}}], "birthdate": "1960-01-01T03:00:00.000", "firstName": "Gg", "attributes": {}, "dateEdited": "2018-03-14T07:53:06.606", "dateCreated": "2018-03-14T07:52:16.620", "identifiers": {"M_ZEIR_ID": "218232-7_mother", "OPENMRS_UUID": "2ca99239-ba6e-42d6-92a5-a889d2de50c0"}, "baseEntityId": "cc127350-c1cd-4c3a-99d4-4d632882f522", "birthdateApprox": false, "deathdateApprox": false}'), +(15, '{"id": "05934ae338431f28bf6793b241839005", "type": "Client", "gender": "Female", "lastName": "Immunisedtwo", "revision": "2-db28bfef08ea6a88fc4d387bbb83b369", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Home", "address3": "144cea61-2322-4a2c-8963-d99b52aa1406"}}], "birthdate": "2017-06-13T03:00:00.000", "firstName": "Fully", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-14T07:53:07.496", "dateCreated": "2018-03-14T07:52:16.757", "identifiers": {"ZEIR_ID": "218233-5", "OPENMRS_UUID": "02d89e05-64ad-4fa3-86d9-93b669ec02c5"}, "baseEntityId": "d4eda055-60c6-44a4-ba48-61dfe6485bea", "relationships": {"mother": ["17a1f5ed-a4cd-4427-ad9f-6471f4fc963d"]}, "birthdateApprox": false, "deathdateApprox": false}'); INSERT INTO core.client_metadata (id, client_id, document_id, base_entity_id, relational_id, server_version, openmrs_uuid, unique_id, first_name, middle_name, last_name, birth_date) VALUES (1, 1, '05934ae338431f28bf6793b24159ce5d', '287be17c-30a7-4482-8816-e2382ec502f1', '22b8570a-3207-4af7-8da7-8a1c5b84d3ff', 1520891339766, '8796f967-2f7a-40f7-8586-d63dbc81b709', '218221-0', 'Second', null, 'Child', '2018-03-01'), From 4e2b2a5398b161fdf28b2119c34ab12193f432c1 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 6 Apr 2018 17:14:41 +0300 Subject: [PATCH 097/133] Mark Events and Clients as deleted instead of actual delete --- .../migrations/generator/generatorConfig.xml | 10 +- .../20180307100840_create_client_table.sql | 3 + ...307115355_create_client_metadata_table.sql | 2 + .../20180307131329_create_event_table.sql | 4 +- .../org/opensrp/domain/postgres/Client.java | 37 ++++++-- .../domain/postgres/ClientExample.java | 93 ++++++++++++++---- .../domain/postgres/ClientMetadata.java | 95 ++++++++++++------- .../postgres/ClientMetadataExample.java | 92 ++++++++++++++---- .../org/opensrp/domain/postgres/Event.java | 18 ++-- .../opensrp/domain/postgres/EventExample.java | 78 +++++---------- .../postgres/ClientsRepositoryImpl.java | 36 ++++--- .../postgres/EventsRepositoryImpl.java | 43 +++++---- .../postgres/mapper/ClientMapper.java | 22 ++--- .../postgres/mapper/ClientMetadataMapper.java | 22 ++--- .../postgres/mapper/EventMapper.java | 22 ++--- .../mapper/custom/xml/CustomClientMapper.xml | 11 ++- .../custom/xml/CustomClientMetadataMapper.xml | 6 +- .../mapper/custom/xml/CustomEventMapper.xml | 10 +- .../custom/xml/CustomEventMetadataMapper.xml | 4 +- .../postgres/mapper/xml/ClientMapper.xml | 59 +++++++----- .../mapper/xml/ClientMetadataMapper.xml | 59 +++++++----- .../postgres/mapper/xml/EventMapper.xml | 44 ++++----- .../postgres/EventsRepositoryTest.java | 16 +++- 23 files changed, 506 insertions(+), 280 deletions(-) diff --git a/assets/migrations/generator/generatorConfig.xml b/assets/migrations/generator/generatorConfig.xml index 92da5f6a27..85157e6585 100644 --- a/assets/migrations/generator/generatorConfig.xml +++ b/assets/migrations/generator/generatorConfig.xml @@ -14,7 +14,7 @@ - -
- + @@ -67,7 +68,7 @@ @@ -120,15 +121,15 @@ - id, json + id, json, date_deleted select count(*) from core.client @@ -224,7 +231,7 @@ update core.client @@ -234,6 +241,9 @@ json = #{record.json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler}, + + date_deleted = #{record.dateDeleted,jdbcType=TIMESTAMP}, + @@ -243,11 +253,12 @@ update core.client set id = #{record.id,jdbcType=BIGINT}, - json = #{record.json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler} + json = #{record.json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler}, + date_deleted = #{record.dateDeleted,jdbcType=TIMESTAMP} @@ -256,13 +267,16 @@ update core.client json = #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler}, + + date_deleted = #{dateDeleted,jdbcType=TIMESTAMP}, + where id = #{id,jdbcType=BIGINT} @@ -270,10 +284,11 @@ update core.client - set json = #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler} + set json = #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ClientTypeHandler}, + date_deleted = #{dateDeleted,jdbcType=TIMESTAMP} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml index ffb336d78e..bd2fa396c7 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/ClientMetadataMapper.xml @@ -5,7 +5,7 @@ @@ -19,12 +19,13 @@ + @@ -58,7 +59,7 @@ @@ -92,16 +93,16 @@ id, client_id, document_id, base_entity_id, relational_id, server_version, openmrs_uuid, - unique_id, first_name, middle_name, last_name, birth_date + unique_id, first_name, middle_name, last_name, birth_date, date_deleted select count(*) from core.client_metadata @@ -263,7 +270,7 @@ update core.client_metadata @@ -303,6 +310,9 @@ birth_date = #{record.birthDate,jdbcType=DATE}, + + date_deleted = #{record.dateDeleted,jdbcType=TIMESTAMP}, + @@ -312,7 +322,7 @@ update core.client_metadata set id = #{record.id,jdbcType=BIGINT}, @@ -326,7 +336,8 @@ first_name = #{record.firstName,jdbcType=VARCHAR}, middle_name = #{record.middleName,jdbcType=VARCHAR}, last_name = #{record.lastName,jdbcType=VARCHAR}, - birth_date = #{record.birthDate,jdbcType=DATE} + birth_date = #{record.birthDate,jdbcType=DATE}, + date_deleted = #{record.dateDeleted,jdbcType=TIMESTAMP} @@ -335,7 +346,7 @@ update core.client_metadata @@ -372,6 +383,9 @@ birth_date = #{birthDate,jdbcType=DATE}, + + date_deleted = #{dateDeleted,jdbcType=TIMESTAMP}, + where id = #{id,jdbcType=BIGINT} @@ -379,7 +393,7 @@ update core.client_metadata set client_id = #{clientId,jdbcType=BIGINT}, @@ -392,7 +406,8 @@ first_name = #{firstName,jdbcType=VARCHAR}, middle_name = #{middleName,jdbcType=VARCHAR}, last_name = #{lastName,jdbcType=VARCHAR}, - birth_date = #{birthDate,jdbcType=DATE} + birth_date = #{birthDate,jdbcType=DATE}, + date_deleted = #{dateDeleted,jdbcType=TIMESTAMP} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml index 382c35cabb..c541c19ad3 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/xml/EventMapper.xml @@ -5,17 +5,17 @@ - + @@ -68,7 +68,7 @@ @@ -121,7 +121,7 @@ id, json, date_deleted @@ -129,7 +129,7 @@ select @@ -148,7 +148,7 @@ select @@ -159,7 +159,7 @@ delete from core.event where id = #{id,jdbcType=BIGINT} @@ -168,7 +168,7 @@ delete from core.event @@ -179,18 +179,18 @@ insert into core.event (id, json, date_deleted) values (#{id,jdbcType=BIGINT}, #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.EventTypeHandler}, - #{dateDeleted,jdbcType=DATE}) + #{dateDeleted,jdbcType=TIMESTAMP}) insert into core.event @@ -212,7 +212,7 @@ #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.EventTypeHandler}, - #{dateDeleted,jdbcType=DATE}, + #{dateDeleted,jdbcType=TIMESTAMP}, @@ -220,7 +220,7 @@ select count(*) from core.event @@ -231,7 +231,7 @@ update core.event @@ -242,7 +242,7 @@ json = #{record.json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.EventTypeHandler}, - date_deleted = #{record.dateDeleted,jdbcType=DATE}, + date_deleted = #{record.dateDeleted,jdbcType=TIMESTAMP}, @@ -253,12 +253,12 @@ update core.event set id = #{record.id,jdbcType=BIGINT}, json = #{record.json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.EventTypeHandler}, - date_deleted = #{record.dateDeleted,jdbcType=DATE} + date_deleted = #{record.dateDeleted,jdbcType=TIMESTAMP} @@ -267,7 +267,7 @@ update core.event @@ -275,7 +275,7 @@ json = #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.EventTypeHandler}, - date_deleted = #{dateDeleted,jdbcType=DATE}, + date_deleted = #{dateDeleted,jdbcType=TIMESTAMP}, where id = #{id,jdbcType=BIGINT} @@ -284,11 +284,11 @@ update core.event set json = #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.EventTypeHandler}, - date_deleted = #{dateDeleted,jdbcType=DATE} + date_deleted = #{dateDeleted,jdbcType=TIMESTAMP} where id = #{id,jdbcType=BIGINT} \ No newline at end of file diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java index b9e0857a6e..d0d69b9bca 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java @@ -418,8 +418,20 @@ public void testFindByEmptyServerVersion() { Event event = eventsRepository.get("05934ae338431f28bf6793b241bdb88c"); event.setServerVersion(0l); eventsRepository.update(event); - assertEquals(1, eventsRepository.findByEmptyServerVersion().size()); - assertEquals("05934ae338431f28bf6793b241bdb88c", eventsRepository.findByEmptyServerVersion().get(0).getId()); + + event = eventsRepository.get("05934ae338431f28bf6793b241bdbb60"); + event.setServerVersion(null); + eventsRepository.update(event); + long beforeFetch = System.currentTimeMillis(); + List events = eventsRepository.findByEmptyServerVersion(); + assertEquals(2, events.size()); + for (Event loopEvent : events) { + assertTrue(loopEvent.getId().equals("05934ae338431f28bf6793b241bdb88c") + || loopEvent.getId().equals("05934ae338431f28bf6793b241bdbb60")); + //if serverVersion is null will automatically be set to current timestamp in org.opensrp.domain.BaseDataObject.serverVersion + assertTrue(loopEvent.getServerVersion() == 0 || loopEvent.getServerVersion() >= beforeFetch); + + } } @Test From 43fd7d2a611ab49030e91547deccf61a84995ab5 Mon Sep 17 00:00:00 2001 From: Ephraim Muhia Date: Mon, 9 Apr 2018 12:11:18 +0300 Subject: [PATCH 098/133] fixed query with 'and' 'or' Signed-off-by: Ephraim Muhia --- .../postgres/mapper/custom/xml/CustomClientMetadataMapper.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml index ea74e60d37..29cc78eabd 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomClientMetadataMapper.xml @@ -69,7 +69,7 @@ - where cm.first_name ilike #{name} or cm.middle_name ilike #{name} or cm.last_name ilike #{name} + where ( cm.first_name ilike #{name} or cm.middle_name ilike #{name} or cm.last_name ilike #{name} ) and cm.date_deleted is null LIMIT #{limit} OFFSET #{offset} From 593b440f10ef704e8788b93fdeab35c93b4cba5f Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 9 Apr 2018 15:45:14 +0300 Subject: [PATCH 099/133] Merge pull request #424 from OpenSRP/issue402 Postgres Repositories Unit testing --- .../repository/postgres/mapper/custom/CustomClientMapper.java | 1 - 1 file changed, 1 deletion(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMapper.java index b2eccfabf7..53c7a7bf00 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomClientMapper.java @@ -27,5 +27,4 @@ List selectByRelationshipIdOfType(@Param("relationshipType") String rela @Param("relationshipId") String relationshipId); List selectByRelationShip(String relationshipId); - } From 64df4a8c72eac4ba78dc0056245c5099a0037d63 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 9 Apr 2018 18:08:51 +0300 Subject: [PATCH 100/133] data migration scripts for transforming couch2pg single table to postgres datamodel --- .../migrate_actions.sql | 20 ++++++ .../data_migration_scripts/migrate_alerts.sql | 23 +++++++ .../migrate_app_state_tokens.sql | 11 ++++ .../migrate_clients.sql | 23 +++++++ .../migrate_error_trace.sql | 15 +++++ .../data_migration_scripts/migrate_events.sql | 64 +++++++++++++++++++ .../migrate_multimedia.sql | 13 ++++ .../migrate_reports.sql | 26 ++++++++ .../data_migration_scripts/migrate_stock.sql | 19 ++++++ 9 files changed, 214 insertions(+) create mode 100644 assets/migrations/data_migration_scripts/migrate_actions.sql create mode 100644 assets/migrations/data_migration_scripts/migrate_alerts.sql create mode 100644 assets/migrations/data_migration_scripts/migrate_app_state_tokens.sql create mode 100644 assets/migrations/data_migration_scripts/migrate_clients.sql create mode 100644 assets/migrations/data_migration_scripts/migrate_error_trace.sql create mode 100644 assets/migrations/data_migration_scripts/migrate_events.sql create mode 100644 assets/migrations/data_migration_scripts/migrate_multimedia.sql create mode 100644 assets/migrations/data_migration_scripts/migrate_reports.sql create mode 100644 assets/migrations/data_migration_scripts/migrate_stock.sql diff --git a/assets/migrations/data_migration_scripts/migrate_actions.sql b/assets/migrations/data_migration_scripts/migrate_actions.sql new file mode 100644 index 0000000000..07f81b438f --- /dev/null +++ b/assets/migrations/data_migration_scripts/migrate_actions.sql @@ -0,0 +1,20 @@ +--clear data before performing the migration +TRUNCATE TABLE core.action CASCADE; + +ALTER SEQUENCE core.action_id_seq RESTART WITH 1; + +ALTER SEQUENCE core.action_metadata_id_seq RESTART WITH 1; + +/* Insert into action */ +insert into core.action(json) +select doc as json from couchdb +where doc->>'type'='Action'; + +/* Insert into action metadata */ +INSERT INTO core.action_metadata(action_id, document_id, base_entity_id,server_version, provider_id,location_id,team,team_id) +select (select id from core.action where json->>'_id'=doc->>'_id') action_id,doc->>'_id' document_id, +doc->>'baseEntityId' as base_entity_id, +(doc->>'timeStamp')::BIGINT as server_version,doc->>'providerId' as provider_id,doc->>'locationId' as location_id, +doc->>'team' as team, doc->>'teamId' as team_id +from couchdb +where doc->>'type'='Action'; \ No newline at end of file diff --git a/assets/migrations/data_migration_scripts/migrate_alerts.sql b/assets/migrations/data_migration_scripts/migrate_alerts.sql new file mode 100644 index 0000000000..b610d33b10 --- /dev/null +++ b/assets/migrations/data_migration_scripts/migrate_alerts.sql @@ -0,0 +1,23 @@ +--clear data before performing the migration +TRUNCATE TABLE core.alert CASCADE; + +ALTER SEQUENCE core.alert_id_seq RESTART WITH 1; + +ALTER SEQUENCE core.alert_metadata_id_seq RESTART WITH 1; + +/* Insert into alert */ +insert into core.alert(json) +select doc as json from couchdb +where doc->>'type'='Alert'; + +/* Insert into alert metadata */ +INSERT INTO core.alert_metadata +(alert_id, document_id, base_entity_id,server_version, provider_id, + location_id,team,team_id,is_active,trigger_name) +select (select id from core.alert where json->>'_id'=doc->>'_id') alert_id,doc->>'_id' document_id, +doc->>'entityId' as base_entity_id, +(doc->>'timeStamp')::BIGINT as server_version,doc->>'providerId' as provider_id,doc->>'locationId' as location_id, +doc->>'team' as team, doc->>'teamId' as team_id, +doc->>'isActive' as is_active, doc->>'triggerName' as trigger_name +from couchdb +where doc->>'type'='Alert'; \ No newline at end of file diff --git a/assets/migrations/data_migration_scripts/migrate_app_state_tokens.sql b/assets/migrations/data_migration_scripts/migrate_app_state_tokens.sql new file mode 100644 index 0000000000..ad84953f59 --- /dev/null +++ b/assets/migrations/data_migration_scripts/migrate_app_state_tokens.sql @@ -0,0 +1,11 @@ +--clear data before performing the migration +TRUNCATE TABLE core.app_state_token; + +ALTER SEQUENCE core.app_state_token_id_seq RESTART WITH 1; + +/* Insert into app_state_token */ +insert into core.app_state_token(name,description,value,last_edited_date) +select doc->>'name' as name, doc->>'description' as description, +doc->>'value' as value, (doc->>'lastEditDate')::BIGINT as last_edited_date +from couchdb +where doc->>'type'='AppStateToken'; diff --git a/assets/migrations/data_migration_scripts/migrate_clients.sql b/assets/migrations/data_migration_scripts/migrate_clients.sql new file mode 100644 index 0000000000..e42b838128 --- /dev/null +++ b/assets/migrations/data_migration_scripts/migrate_clients.sql @@ -0,0 +1,23 @@ +--clear data before performing the migration +TRUNCATE TABLE core.client CASCADE; + +ALTER SEQUENCE core.client_id_seq RESTART WITH 1; + +ALTER SEQUENCE core.client_metadata_id_seq RESTART WITH 1; + +/* Insert into client */ +insert into core.client(json,date_deleted) +select doc as json, (doc->>'dateVoided')::TIMESTAMP as date_deleted from couchdb +where doc->>'type'='Client'; + +/* Insert into client metadata */ +INSERT INTO core.client_metadata (client_id, document_id, base_entity_id, relational_id, server_version, +openmrs_uuid, unique_id, first_name, middle_name, last_name, birth_date, date_deleted) +select (select id from core.client where json->>'_id'=doc->>'_id') as client_id,doc->>'_id' document_id, +doc->>'baseEntityId' as base_entity_id, +doc->'relationships'->'mother'->>0 as relational_id,(doc->>'serverVersion')::BIGINT as server_version, +doc->'identifiers'->>'OPENMRS_UUID' as openmrs_uuid,doc->'identifiers'->>'ZEIR_ID' as unique_id, +doc->>'firstName' as first_name, doc->>'MiddleName' as middle_name, doc->>'lastName' as last_name, +(doc->>'birthdate')::date as birth_date, (doc->>'dateVoided')::TIMESTAMP as date_deleted +from couchdb +where doc->>'type'='Client'; \ No newline at end of file diff --git a/assets/migrations/data_migration_scripts/migrate_error_trace.sql b/assets/migrations/data_migration_scripts/migrate_error_trace.sql new file mode 100644 index 0000000000..26ca13a9b2 --- /dev/null +++ b/assets/migrations/data_migration_scripts/migrate_error_trace.sql @@ -0,0 +1,15 @@ +--clear data before performing the migration +TRUNCATE TABLE error.error_trace; + +ALTER SEQUENCE error.error_trace_id_seq RESTART WITH 1; + +/* Insert into error_trace */ +INSERT INTO error.error_trace +(document_id, date_occurred, error_type, occurred_at, stack_trace, status, record_id, + date_closed, document_type, retry_url) +select doc->>'_id' document_id, (doc->>'dateOccurred')::timestamp as date_occurred, + doc->>'errorType' as error_type, doc->>'occurredAt' as occurred_at,doc->>'stackTrace' as stack_trace, + doc->>'status' as status, doc->>'recordId' as record_id, (doc->>'dateClosed')::timestamp as date_closed, + doc->>'documentType' as document_type, doc->>'retryUrl' as retry_url +from couchdb +where doc->>'type'='ErrorTrace'; diff --git a/assets/migrations/data_migration_scripts/migrate_events.sql b/assets/migrations/data_migration_scripts/migrate_events.sql new file mode 100644 index 0000000000..2c34040d86 --- /dev/null +++ b/assets/migrations/data_migration_scripts/migrate_events.sql @@ -0,0 +1,64 @@ +--clear data before performing the migration +TRUNCATE TABLE core.event CASCADE; + +ALTER SEQUENCE core.event_id_seq RESTART WITH 1; + +ALTER SEQUENCE core.event_metadata_id_seq RESTART WITH 1; + +/*Query to show constriants + SELECT CONSTRAINT_name FROM information_schema.CONSTRAINT_TABLE_usage WHERE TABLE_name = 'event_metadata'; +*/ + +/*disable formsubmission unique CONSTRAINT*/ +ALTER TABLE core.event_metadata DROP CONSTRAINT IF EXISTS event_metadata_form_submission_id_key ; + +/* Insert into event */ +insert into core.event(json,date_deleted) +select doc as json, (doc->>'dateVoided')::TIMESTAMP as date_deleted from couchdb +where doc->>'type'='Event'; + +/* Insert into event metadata */ +INSERT INTO core.event_metadata +( event_id, document_id, base_entity_id, form_submission_id, server_version, + openmrs_uuid, event_type, event_date, entity_type, provider_id, location_id, + team, team_id, date_created, date_edited, date_deleted) +select (select id from core.event where json->>'_id'=doc->>'_id') as event_id,doc->>'_id' document_id, +doc->>'baseEntityId' as base_entity_id,doc->>'formSubmissionId' as form_submission_id, +(doc->>'serverVersion')::BIGINT as server_version,doc->'identifiers'->>'OPENMRS_UUID' as openmrs_uuid, +doc->>'eventType' as event_type,(doc->>'eventDate')::TIMESTAMP as event_date, +doc->>'entityType' as entity_type,doc->>'providerId' as provider_id,doc->>'locationId' as location_id, +doc->>'team' as team, doc->>'teamId' as team_id,(doc->>'dateCreated')::TIMESTAMP as date_created, +(doc->>'dateEdited')::TIMESTAMP as date_edited,(doc->>'dateVoided')::TIMESTAMP as date_deleted +from couchdb +where doc->>'type'='Event'; + +/*set event_metadata foreign key to delete cascade*/ +ALTER TABLE core.event_metadata DROP CONSTRAINT IF EXISTS event_metadata_event_id_fkey ; + +ALTER TABLE core.event_metadata Add CONSTRAINT event_metadata_event_id_fkey FOREIGN KEY (event_id) +REFERENCES core.event(id) ON DELETE CASCADE ; + +/*delete cascade duplicate events and event_medatadata*/ +delete from core.event where id in ( +select e.event_id from core.event_metadata e + JOIN ( + SELECT + form_submission_id, + max(server_version) server_version + FROM core.event_metadata + GROUP BY form_submission_id + HAVING count(*) > 1 + ) d on e.form_submission_id=d.form_submission_id and e.server_version>'_id' document_id, doc->>'caseId' as base_entity_id, +doc->>'providerId' as provider_id,doc->>'contentType' as content_type, +doc->>'filePath' as file_path, doc->>'fileCategory' as file_category +from couchdb +where doc->>'type'='Multimedia'; diff --git a/assets/migrations/data_migration_scripts/migrate_reports.sql b/assets/migrations/data_migration_scripts/migrate_reports.sql new file mode 100644 index 0000000000..c7db6fc5b4 --- /dev/null +++ b/assets/migrations/data_migration_scripts/migrate_reports.sql @@ -0,0 +1,26 @@ +--clear data before performing the migration +TRUNCATE TABLE core.report CASCADE; + +ALTER SEQUENCE core.report_id_seq RESTART WITH 1; + +ALTER SEQUENCE core.report_metadata_id_seq RESTART WITH 1; + +/* Insert into report */ +insert into core.report(json) +select doc as json from couchdb +where doc->>'type'='Report'; + +/* Insert into report metadata */ + +/* Insert into report metadata */ +INSERT INTO core.report_metadata +(report_id, document_id,form_submission_id, base_entity_id,server_version,report_type,report_date, provider_id, + location_id,team,team_id,date_edited) +select (select id from core.report where json->>'_id'=doc->>'_id') report_id,doc->>'_id' document_id, +doc->>'formSubmissionId' as form_submission_id,doc->>'baseEntityId' as base_entity_id, +(doc->>'serverVersion')::BIGINT as server_version, +doc->>'reportType' as report_type,(doc->>'reportDate')::date as report_date, +doc->>'providerId' as provider_id,doc->>'locationId' as location_id, +doc->>'team' as team, doc->>'teamId' as team_id,(doc->>'dateEdited')::date as date_edited +from couchdb +where doc->>'type'='Report'; \ No newline at end of file diff --git a/assets/migrations/data_migration_scripts/migrate_stock.sql b/assets/migrations/data_migration_scripts/migrate_stock.sql new file mode 100644 index 0000000000..3db38f1fb8 --- /dev/null +++ b/assets/migrations/data_migration_scripts/migrate_stock.sql @@ -0,0 +1,19 @@ +--clear data before performing the migration +TRUNCATE TABLE core.stock CASCADE; + +ALTER SEQUENCE core.stock_id_seq RESTART WITH 1; + +ALTER SEQUENCE core.stock_metadata_id_seq RESTART WITH 1; + +/* Insert into stock */ +insert into core.stock(json) +select doc as json from couchdb +where doc->>'type'='Stock'; + +/* Insert into stock metadata */ +INSERT INTO core.stock_metadata(stock_id, document_id, server_version, provider_id,location_id,team,team_id) +select (select id from core.stock where json->>'_id'=doc->>'_id') stock_id,doc->>'_id' document_id, +(doc->>'serverVersion')::BIGINT as server_version,doc->>'providerid' as provider_id,doc->>'locationId' as location_id, +doc->>'team' as team, doc->>'teamId' as team_id +from couchdb +where doc->>'type'='Stock'; \ No newline at end of file From e0552d12bf20c1aaa298512e24e35a194327ac64 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 9 Apr 2018 18:09:24 +0300 Subject: [PATCH 101/133] Remove duplicate indexes --- .../scripts/20180307115355_create_client_metadata_table.sql | 2 -- .../scripts/20180307131558_create_event_metadata_table.sql | 3 +-- .../scripts/20180307145358_create_action_metadata_table.sql | 1 - .../scripts/20180307150448_create_report_metadata_table.sql | 1 - .../scripts/20180307151623_create_stock_metadata_table.sql | 1 - .../scripts/20180309113954_create_alert_metadata_table.sql | 1 - .../scripts/20180309132839_create_app_state_token_table.sql | 4 +--- .../scripts/20180309135847_create_mutli_media_table.sql | 1 - .../scripts/20180309140716_create_error_trace_table.sql | 2 +- 9 files changed, 3 insertions(+), 13 deletions(-) diff --git a/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql b/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql index a736277747..90565f0299 100644 --- a/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql +++ b/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql @@ -38,8 +38,6 @@ WITH ( OIDS = FALSE ) TABLESPACE core_space; -CREATE INDEX client_metadata_document_id_index ON core.client_metadata (document_id); -CREATE INDEX client_metadata_base_entity_id_index ON core.client_metadata (base_entity_id); CREATE INDEX client_metadata_relational_id_index ON core.client_metadata (relational_id); CREATE INDEX client_metadata_server_version_index ON core.client_metadata (server_version); CREATE INDEX client_metadata_openmrs_uuid_index ON core.client_metadata (openmrs_uuid); diff --git a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql index fb7984b4d6..d428d964e7 100644 --- a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql +++ b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql @@ -42,9 +42,8 @@ WITH ( OIDS = FALSE ) TABLESPACE core_space; -CREATE UNIQUE INDEX event_metadata_relational_id_unique_index ON core.event_metadata (form_submission_id); -CREATE INDEX event_metadata_document_id_index ON core.event_metadata (document_id); + CREATE INDEX event_metadata_base_entity_id_index ON core.event_metadata (base_entity_id); CREATE INDEX event_metadata_server_version_index ON core.event_metadata (server_version); CREATE INDEX event_metadata_openmrs_uuid_index ON core.event_metadata (openmrs_uuid); diff --git a/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql b/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql index e95a8f8f77..f99ef8baec 100644 --- a/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql +++ b/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql @@ -34,7 +34,6 @@ WITH ( OIDS = FALSE ) TABLESPACE core_space; -CREATE INDEX action_metadata_document_id_index ON core.action_metadata (document_id); CREATE INDEX action_metadata_base_entity_id_index ON core.action_metadata (base_entity_id); CREATE INDEX action_metadata_server_version_index ON core.action_metadata (server_version); CREATE INDEX action_metadata_provider_id_index ON core.action_metadata (provider_id); diff --git a/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql b/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql index 8014a513f3..57102e8a78 100644 --- a/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql +++ b/assets/migrations/scripts/20180307150448_create_report_metadata_table.sql @@ -38,7 +38,6 @@ WITH ( OIDS = FALSE ) TABLESPACE core_space; -CREATE INDEX report_metadata_document_id_index ON core.report_metadata (document_id); CREATE INDEX report_metadata_form_submission_id_index ON core.report_metadata (form_submission_id); CREATE INDEX report_metadata_base_entity_id_index ON core.report_metadata (base_entity_id); CREATE INDEX report_metadata_server_version_index ON core.report_metadata (server_version); diff --git a/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql b/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql index 8f69615b1e..420dd8734c 100644 --- a/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql +++ b/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql @@ -33,7 +33,6 @@ WITH ( OIDS = FALSE ) TABLESPACE core_space; -CREATE INDEX stock_metadata_document_id_index ON core.stock_metadata (document_id); CREATE INDEX stock_metadata_server_version_index ON core.stock_metadata (server_version); CREATE INDEX stock_metadata_provider_id_index ON core.stock_metadata (provider_id); CREATE INDEX stock_metadata_location_id_index ON core.stock_metadata (location_id); diff --git a/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql b/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql index cef33ff7f7..f207ba36ba 100644 --- a/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql +++ b/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql @@ -37,7 +37,6 @@ WITH ( OIDS = FALSE ) TABLESPACE core_space; -CREATE INDEX alert_metadata_document_id_index ON core.alert_metadata (document_id); CREATE INDEX alert_metadata_base_entity_id_index ON core.alert_metadata (base_entity_id); CREATE INDEX alert_metadata_server_version_index ON core.alert_metadata (server_version); CREATE INDEX alert_metadata_provider_id_index ON core.alert_metadata (provider_id); diff --git a/assets/migrations/scripts/20180309132839_create_app_state_token_table.sql b/assets/migrations/scripts/20180309132839_create_app_state_token_table.sql index 9f6a9936a8..ce47b13797 100644 --- a/assets/migrations/scripts/20180309132839_create_app_state_token_table.sql +++ b/assets/migrations/scripts/20180309132839_create_app_state_token_table.sql @@ -20,7 +20,7 @@ CREATE TABLE core.app_state_token ( id bigserial NOT NULL, - name character varying NOT NULL, + name character varying UNIQUE NOT NULL, description character varying, value character varying, last_edited_date bigint, @@ -30,8 +30,6 @@ WITH ( OIDS = FALSE ) TABLESPACE core_space; -CREATE INDEX app_state_token_name_index ON core.app_state_token (name); - -- //@UNDO -- SQL to undo the change goes here. diff --git a/assets/migrations/scripts/20180309135847_create_mutli_media_table.sql b/assets/migrations/scripts/20180309135847_create_mutli_media_table.sql index 2361a60c3b..21c10c7917 100644 --- a/assets/migrations/scripts/20180309135847_create_mutli_media_table.sql +++ b/assets/migrations/scripts/20180309135847_create_mutli_media_table.sql @@ -32,7 +32,6 @@ WITH ( OIDS = FALSE ) TABLESPACE core_space; -CREATE INDEX multi_media_document_id_index ON core.multi_media (document_id); CREATE INDEX multi_media_case_id_index ON core.multi_media (case_id); CREATE INDEX multi_media_provider_id_index ON core.multi_media (provider_id); diff --git a/assets/migrations/scripts/20180309140716_create_error_trace_table.sql b/assets/migrations/scripts/20180309140716_create_error_trace_table.sql index a45fda8bdb..3688807c01 100644 --- a/assets/migrations/scripts/20180309140716_create_error_trace_table.sql +++ b/assets/migrations/scripts/20180309140716_create_error_trace_table.sql @@ -36,7 +36,7 @@ WITH ( OIDS = FALSE ) TABLESPACE error_space; -CREATE INDEX error_trace_document_id_index ON error.error_trace (document_id); + CREATE INDEX error_trace_status_index ON error.error_trace (status); -- //@UNDO From 87f270524e07bddece0e4a9abb36a3e5ed740d29 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 9 Apr 2018 18:10:32 +0300 Subject: [PATCH 102/133] Merge branch 'couchdb-to-postgres' into issue428 From ffccd6769944fa270c5d30de41931e2b14af41b4 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Tue, 10 Apr 2018 12:03:23 +0300 Subject: [PATCH 103/133] Client repository unit test deleted records --- .../postgres/ClientsRepositoryTest.java | 73 +++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java index 69accc39e7..cdc09ac9fc 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java @@ -45,6 +45,10 @@ public void testGet() { assertEquals("Babysix", client.getLastName()); //missing client assertNull(clientsRepository.get("05934ae338bf6793b2416946b7")); + + //test deleted client + clientsRepository.safeRemove(clientsRepository.get("05934ae338431f28bf6793b2416946b7")); + assertNull(clientsRepository.get("05934ae338431f28bf6793b2416946b7")); } @Test @@ -90,6 +94,8 @@ public void testGetAll() { for (Client client : clients) assertNotEquals("05934ae338431f28bf6793b24164cbd9", client.getId()); + assertNull(clientsRepository.get("05934ae338431f28bf6793b24164cbd9")); + } @Test @@ -114,6 +120,10 @@ public void testFindByBaseEntityId() { assertEquals("Mtini", client.getLastName().trim()); assertNull(clientsRepository.findByBaseEntityId("f67823b0-378e-4a35-93fc-bb00def74e2f")); + + //test deleted client + clientsRepository.safeRemove(client); + assertNull(clientsRepository.findByBaseEntityId("86c039a2-0b68-4166-849e-f49897e3a510")); } @Test @@ -127,6 +137,9 @@ public void testFindAllClients() { assertEquals(14, clients.size()); for (Client client : clients) assertNotEquals("05934ae338431f28bf6793b24164cbd9", client.getId()); + + //test deleted client + assertNull(clientsRepository.get("05934ae338431f28bf6793b24164cbd9")); } @Test @@ -139,6 +152,11 @@ public void testFindAllByIdentifier() { assertEquals("Sally", clients.get(0).getFirstName()); assertEquals("Mtini", clients.get(0).getLastName().trim()); + //test deleted clients + clientsRepository.safeRemove(clients.get(0)); + assertTrue(clientsRepository + .findAllByIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "ab91df5d-e433-40f3-b44f-427b73c9ae2a").isEmpty()); + assertTrue(clientsRepository.findAllByIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "ab91df5d-e433-40f3-b44f-427b73ca") .isEmpty()); @@ -161,6 +179,10 @@ public void testAllByAttribute() { assertTrue(clientsRepository.findAllByAttribute("CHW_Phone_Number", "+0964357951").isEmpty()); assertTrue(clientsRepository.findAllByAttribute("Phone_Number", "0964357951").isEmpty()); + + //test deleted clients + clientsRepository.safeRemove(clients.get(0)); + assertTrue(clientsRepository.findAllByAttribute("CHW_Phone_Number", "0964357951").isEmpty()); } @Test @@ -185,6 +207,10 @@ public void testFindAllByMatchingName() { assertEquals(2, clientsRepository.findAllByMatchingName("January").size()); assertTrue(clientsRepository.findAllByMatchingName("Kimbley").isEmpty()); + + //test deleted clients + clientsRepository.safeRemove(clientsRepository.findAllByMatchingName("babytwo").get(0)); + assertTrue(clientsRepository.findAllByMatchingName("babytwo").isEmpty()); } @Test @@ -203,6 +229,11 @@ public void testFindByRelationshipIdAndDateCreated() { assertEquals("05934ae338431f28bf6793b2415a0374", client.getId()); assertEquals("94f3e8fb-2f05-4fca-8119-2b593d1962eb", client.getBaseEntityId()); assertEquals("2018-03-01", client.getBirthdate().toLocalDate().toString()); + + //test deleted clients + clientsRepository.safeRemove(client); + assertTrue(clientsRepository.findByRelationshipIdAndDateCreated("3abdb25a-f151-4a95-9311-bd30bf935085", + new DateTime("2018-03-13").toString(), new DateTime().toString()).isEmpty()); } @Test @@ -215,6 +246,10 @@ public void testFindByRelationshipId() { assertEquals("cf58894b-71c6-41e0-a977-7283f2411cd5", client.getIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE)); assertEquals("2018-03-01", client.getBirthdate().toLocalDate().toString()); + //test deleted clients + clientsRepository.safeRemove(client); + assertTrue(clientsRepository.findByRelationshipId("mother", "3abdb25a-f151-4a95-9311-bd30bf935085").isEmpty()); + assertTrue(clientsRepository.findByRelationshipId("father", "0154839f-8766-4eda-b729-89067c7a8c5d").isEmpty()); assertTrue(clientsRepository.findByRelationshipId("mother", "0154839f-4eda-b729-89067c7a8c5d").isEmpty()); @@ -263,6 +298,11 @@ public void testFindByCriteria() { addressSearchBean.setAddressType("usual_residence"); assertEquals(6, clientsRepository.findByCriteria(searchBean, addressSearchBean).size()); + //test deleted clients + for (Client client : clientsRepository.findByCriteria(searchBean, addressSearchBean)) + clientsRepository.safeRemove(client); + assertTrue(clientsRepository.findByCriteria(searchBean, addressSearchBean).isEmpty()); + } @Test @@ -301,6 +341,11 @@ public void testFindByCriteriaWithoutAddressBean() { searchBean.setLastEditTo(new DateTime()); assertEquals(6, clientsRepository.findByCriteria(searchBean).size()); + //test deleted clients + for (Client client : clientsRepository.findByCriteria(searchBean)) + clientsRepository.safeRemove(client); + assertTrue(clientsRepository.findByCriteria(searchBean).isEmpty()); + } @Test @@ -328,6 +373,11 @@ public void testFindByCriteriaWithEditDateParams() { addressSearchBean.setCityVillage("hui"); assertTrue( clientsRepository.findByCriteria(addressSearchBean, new DateTime("2018-01-01"), new DateTime()).isEmpty()); + + //test deleted clients + for (Client client : clientsRepository.findByCriteria(new AddressSearchBean(), from, to)) + clientsRepository.safeRemove(client); + assertTrue(clientsRepository.findByCriteria(new AddressSearchBean(), from, to).isEmpty()); } @Test @@ -340,6 +390,10 @@ public void testFindByRelationShip() { assertEquals("Fith", client.getFirstName()); assertEquals("2018-03-01", client.getBirthdate().toLocalDate().toString()); + //test deleted clients + clientsRepository.safeRemove(client); + assertTrue(clientsRepository.findByRelationShip("3abdb25a-f151-4a95-9311-bd30bf935085").isEmpty()); + assertTrue(clientsRepository.findByRelationShip("0154839f-4eda-b729-89067c7a8c5d").isEmpty()); } @@ -357,6 +411,10 @@ public void testFindByEmptyServerVersion() { assertEquals("2018-03-01", client.getBirthdate().toLocalDate().toString()); assertEquals("218224-4", client.getIdentifier("ZEIR_ID")); + //test deleted clients + clientsRepository.safeRemove(client); + assertTrue(clientsRepository.findByEmptyServerVersion().isEmpty()); + } @Test @@ -370,6 +428,11 @@ public void testFindByServerVersion() { assertTrue(client.getServerVersion() >= 1521003136406l); assertTrue(expectedIds.contains(client.getId())); } + + //test deleted clients + for (Client client : clients) + clientsRepository.safeRemove(client); + assertTrue(clientsRepository.findByServerVersion(1521003136406l).isEmpty()); } @Test @@ -393,6 +456,12 @@ public void testFindByFieldValue() { assertEquals("Jan", client.getFirstName()); assertEquals("2018-01-01", client.getBirthdate().toLocalDate().toString()); assertEquals("218226-9", client.getIdentifier("ZEIR_ID")); + + //test deleted clients + clientsRepository.safeRemove(client); + assertTrue(clientsRepository + .findByFieldValue(BASE_ENTITY_ID, Arrays.asList(new String[] { "f33c71c7-a9a4-495d-8028-b6d59e4034b3" })) + .isEmpty()); } @Test @@ -408,5 +477,9 @@ public void testNotInOpenMRSByServerVersion() { assertEquals("Fith", client.getFirstName()); assertEquals("2018-03-01", client.getBirthdate().toLocalDate().toString()); assertEquals("218224-4", client.getIdentifier("ZEIR_ID")); + + //test deleted clients + clientsRepository.safeRemove(client); + assertTrue(clientsRepository.notInOpenMRSByServerVersion(0l, Calendar.getInstance()).isEmpty()); } } From 1a343a30856efc034da67537a01e00e6615aecef Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Tue, 10 Apr 2018 18:41:48 +0300 Subject: [PATCH 104/133] Change the postgres typehander json library to jackson --- .../postgres/EventsRepositoryImpl.java | 1 + .../postgres/handler/ActionTypeHandler.java | 8 ++--- .../postgres/handler/AlertTypeHandler.java | 8 ++--- .../postgres/handler/BaseTypeHandler.java | 22 ++++++++++---- .../postgres/handler/ClientTypeHandler.java | 8 ++--- .../postgres/handler/EventTypeHandler.java | 9 +++--- .../postgres/handler/ReportTypeHandler.java | 8 ++--- .../postgres/handler/StockTypeHandler.java | 8 ++--- .../opensrp/util/DateTimeDeserializer.java | 29 ++++++++++++++++++ .../postgres/ClientsRepositoryTest.java | 1 + .../postgres/EventsRepositoryTest.java | 2 +- .../src/test/resources/test-scripts/event.sql | 30 +++++++++---------- 12 files changed, 87 insertions(+), 47 deletions(-) create mode 100644 opensrp-core/src/main/java/org/opensrp/util/DateTimeDeserializer.java diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java index 75c91cd07e..83fc5813aa 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java @@ -431,6 +431,7 @@ private List convert(List events) { List convertedEvents = new ArrayList<>(); for (org.opensrp.domain.postgres.Event event : events) { Event convertedEvent = convert(event); + logger.info(convertedEvent.getId() + ", rev: " + convertedEvent.getRevision()); if (convertedEvent != null) { convertedEvents.add(convertedEvent); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ActionTypeHandler.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ActionTypeHandler.java index 8fc7c36368..cd26b8fa24 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ActionTypeHandler.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ActionTypeHandler.java @@ -17,7 +17,7 @@ public class ActionTypeHandler extends BaseTypeHandler implements TypeHandler { @Override public void setParameter(PreparedStatement ps, int i, Event parameter, JdbcType jdbcType) throws SQLException { try { if (parameter != null) { - String jsonString = gson.toJson(parameter); + String jsonString = mapper.writeValueAsString(parameter); PGobject jsonObject = new PGobject(); jsonObject.setType("jsonb"); jsonObject.setValue(jsonString); @@ -37,7 +36,7 @@ public Event getResult(ResultSet rs, String columnName) throws SQLException { if (StringUtils.isBlank(jsonString)) { return null; } - return gson.fromJson(jsonString, Event.class); + return mapper.readValue(jsonString, Event.class); } catch (Exception e) { throw new SQLException(e); @@ -51,7 +50,7 @@ public Event getResult(ResultSet rs, int columnIndex) throws SQLException { if (StringUtils.isBlank(jsonString)) { return null; } - return gson.fromJson(jsonString, Event.class); + return mapper.readValue(jsonString, Event.class); } catch (Exception e) { throw new SQLException(e); @@ -65,7 +64,7 @@ public Event getResult(CallableStatement cs, int columnIndex) throws SQLExceptio if (StringUtils.isBlank(jsonString)) { return null; } - return gson.fromJson(jsonString, Event.class); + return mapper.readValue(jsonString, Event.class); } catch (Exception e) { throw new SQLException(e); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ReportTypeHandler.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ReportTypeHandler.java index b674912e2f..aed5f04b69 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ReportTypeHandler.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/ReportTypeHandler.java @@ -17,7 +17,7 @@ public class ReportTypeHandler extends BaseTypeHandler implements TypeHandler { + + public DateTimeDeserializer() { + super(DateTime.class); + } + + @Override + public DateTime deserialize(JsonParser jsonParser, DeserializationContext deserializationContext) + throws JsonParseException, IOException { + JsonToken currentToken = jsonParser.getCurrentToken(); + if (currentToken == JsonToken.VALUE_STRING) { + String dateTimeAsString = jsonParser.getText().trim(); + return new DateTime(dateTimeAsString); + } + return null; + + } +} diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java index cdc09ac9fc..ee21d99a35 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java @@ -43,6 +43,7 @@ public void testGet() { assertEquals("eb4b258c-7558-436c-a1fe-e91d9e12f849", client.getIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE)); assertEquals("January", client.getFirstName().trim()); assertEquals("Babysix", client.getLastName()); + assertEquals("05934ae338431f28bf6793b2416946b7",client.getId()); //missing client assertNull(clientsRepository.get("05934ae338bf6793b2416946b7")); diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java index d0d69b9bca..5b1d586f10 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java @@ -407,7 +407,7 @@ public void testUpdate() { eventsRepository.update(event); event = eventsRepository.get("05934ae338431f28bf6793b2419c64fb"); assertEquals(now, event.getServerVersion().longValue()); - assertEquals(new DateTime(now), event.getDateEdited()); + assertEquals(now, event.getDateEdited().getMillis()); assertEquals(3, event.getObs().size()); assertEquals(obs.getValue(), event.getObs(null, "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValue()); } diff --git a/opensrp-core/src/test/resources/test-scripts/event.sql b/opensrp-core/src/test/resources/test-scripts/event.sql index b41a7abb88..f2baef729c 100644 --- a/opensrp-core/src/test/resources/test-scripts/event.sql +++ b/opensrp-core/src/test/resources/test-scripts/event.sql @@ -7,21 +7,21 @@ ALTER SEQUENCE core.event_metadata_id_seq RESTART WITH 16; --insert data INSERT INTO core.event (id, json, date_deleted) VALUES -(1, '{"id": "05934ae338431f28bf6793b2417696bf", "obs": [{"set": [], "values": ["2018-03-13"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162586AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "mr_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162586AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "mr_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1520941739448, "duration": 0, "revision": "1-069bfb5078ff17f922c0bba799222878", "eventDate": "2018-03-13T17:42:03.326+03:00", "eventType": "Vaccination", "entityType": "vaccination", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:26.477+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1520945634380, "formSubmissionId": "29243014-48df-4165-a82d-f4878f6a830e"}', null), -(2, '{"id": "05934ae338431f28bf6793b24199e690", "obs": [{"set": [], "values": ["2018-03-14 10:31:33"], "fieldCode": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "start", "formSubmissionField": "start", "humanReadableValues": []}, {"set": [], "values": ["2018-03-14 10:39:56"], "fieldCode": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "end", "formSubmissionField": "end", "humanReadableValues": []}, {"set": [], "values": ["867104020634913"], "fieldCode": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "deviceid", "formSubmissionField": "deviceid", "humanReadableValues": []}], "type": "Event", "version": 1521016796414, "duration": 0, "revision": "2-615390b17f8f2f9e9aa92f5f4a8a7aaf", "eventDate": "2018-03-14T03:00:00.000+03:00", "eventType": "New Woman Registration", "dateEdited": "2018-03-14T11:39:35.826+03:00", "entityType": "mother", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:28.717+03:00", "identifiers": {"OPENMRS_UUID": "d3630a60-a1f4-4267-9225-f4cb728f4178"}, "baseEntityId": "43930c23-c787-4ddb-ab76-770f77e7b17d", "serverVersion": 1521016638453, "formSubmissionId": "6b3243e9-3d45-495c-af69-f012061def01"}', null), -(3, '{"id": "05934ae338431f28bf6793b2419c64fb", "obs": [{"set": [], "values": ["2018-03-14"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "measles_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "measles_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521033238310, "duration": 0, "revision": "1-dff06b7575a5177c7200b08570d14f4b", "eventDate": "2018-03-14T19:09:51.379+03:00", "eventType": "Vaccination", "entityType": "vaccination", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:28.750+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521033533700, "formSubmissionId": "bfbfabe8-d4ae-4db2-940f-a6f126ef7829"}', null), -(4, '{"id": "05934ae338431f28bf6793b2419c319a", "obs": [{"set": [], "values": ["2018-03-13"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "measles_1_", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "measles_1__dose", "humanReadableValues": []}], "type": "Event", "version": 1521044035486, "duration": 0, "revision": "3-2d669093b06c73fcd5c0fa7c4782e21d", "eventDate": "2018-03-13T22:10:00.321+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-14T19:21:38.401+03:00", "entityType": "vaccination", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.019+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521044588444, "formSubmissionId": "d960046a-e2a0-4bbf-b687-d41c2a52d8c8"}', null), -(5, '{"id": "05934ae338431f28bf6793b241bdb88c", "obs": [{"set": [], "values": ["42abc582-6658-488b-922e-7be500c070f3"], "fieldCode": "Home_Facility", "fieldType": "formsubmissionField", "parentCode": "", "fieldDataType": "text", "formSubmissionField": "Home_Facility", "humanReadableValues": []}, {"set": [], "values": ["2018-02-16"], "fieldCode": "163260AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "date", "formSubmissionField": "First_Health_Facility_Contact", "humanReadableValues": []}, {"set": [], "values": ["2.5"], "fieldCode": "5916AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "text", "formSubmissionField": "Birth_Weight", "humanReadableValues": []}, {"set": [], "values": ["1588AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"], "fieldCode": "1572AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "select one", "formSubmissionField": "Place_Birth", "humanReadableValues": ["Health facility"]}, {"set": [], "values": ["Happy Kids Clinic"], "fieldCode": "163531AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "text", "formSubmissionField": "Birth_Facility_Name", "humanReadableValues": []}, {"set": [], "values": ["664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"], "fieldCode": "1396AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "text", "formSubmissionField": "PMTCT_Status", "humanReadableValues": ["CNE"]}, {"set": [], "values": ["2018-03-16 08:57:43"], "fieldCode": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "start", "formSubmissionField": "start", "humanReadableValues": []}, {"set": [], "values": ["2018-03-16 08:59:04"], "fieldCode": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "end", "formSubmissionField": "end", "humanReadableValues": []}, {"set": [], "values": ["867104020633980"], "fieldCode": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "deviceid", "formSubmissionField": "deviceid", "humanReadableValues": []}], "type": "Event", "version": 1521183544980, "duration": 0, "revision": "2-04d992d294837437d5fc099fae979049", "eventDate": "2018-03-16T03:00:00.000+03:00", "eventType": "Birth Registration", "dateEdited": "2018-03-16T10:03:00.759+03:00", "entityType": "child", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.364+03:00", "identifiers": {"OPENMRS_UUID": "06c8644b-b560-45fd-9af5-b6b1484e3504"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183592609, "formSubmissionId": "d59504cc-09ef-4d09-9dc3-8f7eb65882fd"}', null), -(6, '{"id": "05934ae338431f28bf6793b241bdbb60", "obs": [{"set": [], "values": ["2018-01-10"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "opv_0", "humanReadableValues": []}, {"set": [], "values": ["0"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "opv_0_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602537, "duration": 0, "revision": "2-45e4b7c82520480edbc1adecec55f6ae", "eventDate": "2018-01-10T11:59:37.380+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:00.949+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.371+03:00", "identifiers": {"OPENMRS_UUID": "35d6a414-a379-4ada-97ee-39f680eecb91"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "baf8e663-71a1-4a30-8d40-2f3cab45a6d7"}', null), -(7, '{"id": "05934ae338431f28bf6793b241bdbc55", "obs": [{"set": [], "values": ["2018-01-10"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "bcg", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "bcg_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602575, "duration": 0, "revision": "2-1f5e07f8e65a09d5ca34cb21e6a29b41", "eventDate": "2018-01-10T11:59:41.058+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.148+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.376+03:00", "identifiers": {"OPENMRS_UUID": "94ec8561-14ab-48d1-a6d4-4ae05191f6e6"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "014413c8-4dbf-4876-977d-0c1dfb9e4d05"}', null), -(8, '{"id": "05934ae338431f28bf6793b241bdc231", "obs": [{"set": [], "values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "1685AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "penta_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "1685AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "penta_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602635, "duration": 0, "revision": "2-ad81df44c1f2eaba862585dd8918a16e", "eventDate": "2018-02-21T11:59:50.145+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.341+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.385+03:00", "identifiers": {"OPENMRS_UUID": "85abab15-0be3-4a9d-962d-de99a920d3cb"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "5f1b201d-2132-4eb9-8fa1-3169a61cc50a"}', null), -(9, '{"id": "05934ae338431f28bf6793b241bdc3df", "obs": [{"set": [], "values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "opv_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "opv_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602672, "duration": 0, "revision": "2-9f892924c7e9afe675bdb9f9a3d6231f", "eventDate": "2018-02-21T11:59:55.977+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.537+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.390+03:00", "identifiers": {"OPENMRS_UUID": "28baa742-4a00-480f-9fff-12629c765cc2"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "team":"ATeam", "teamId":"3453hgb454-4j345n-llk345","serverVersion": 1521183593424, "formSubmissionId": "4bc04bbe-bb2f-4e4e-b123-0c6131b91fec"}', null), -(10, '{"id": "05934ae338431f28bf6793b241bdc44a", "obs": [{"set": [], "values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "159698AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "rota_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "159698AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "rota_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602735, "duration": 0, "revision": "2-3514437b6b19290b16b49714bf0182e8", "eventDate": "2018-02-21T12:00:02.298+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.729+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.394+03:00", "identifiers": {"OPENMRS_UUID": "34701637-5c2f-4483-a05e-46df003990ef"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8","team":"ATeam", "teamId":"3453hgb454-4j345n-llk345", "serverVersion": 1521183593424, "formSubmissionId": "6947237c-5e2b-4ccd-953b-dd8b019e0484"}', null), -(11, '{"id": "05934ae338431f28bf6793b241be69a5", "obs": [{"set": [], "values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "pcv_1", "humanReadableValues": []}, {"set": [], "values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "pcv_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183849328, "duration": 0, "revision": "2-1ef09e6758ecd9f2adaa1eb35e143a7b", "eventDate": "2018-02-21T12:00:08.788+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:13:03.469+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.398+03:00", "identifiers": {"OPENMRS_UUID": "4aecc0c1-e008-4227-938d-66db17236a3d"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "team":"ATeam", "teamId":"3453hgb454-4j345n-llk345","serverVersion": 1521184133098, "formSubmissionId": "d6c08393-ebde-4faa-ac94-11429c1233dd"}', null), -(12, '{"id": "05934ae338431f28bf6793b24177a1dc", "obs": [{"set": [], "values": ["8.6"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"set": [], "values": ["-0.3160736521259359"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468856705, "duration": 0, "revision": "65-9ed92fd61bd67d89325ee3ea35c3f3cb", "eventDate": "2018-01-13T19:37:11.954+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:15.649+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:28:40.255+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045587, "formSubmissionId": "306b6dc2-fa15-4e48-9ac3-4f8044899051"}', null), -(13, '{"id": "05934ae338431f28bf6793b241780bac", "obs": [{"set": [], "values": ["11.8"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"set": [], "values": ["2.0903075436287146"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468857114, "duration": 0, "revision": "65-81466693915e45bc1feb1f8ccc466475", "eventDate": "2018-03-12T19:40:01.023+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:15.789+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:28:40.260+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045588, "formSubmissionId": "9bd94f7b-d7f5-4e38-bc0d-2fa7eb84dad3"}', null), -(14, '{"id": "05934ae338431f28bf6793b241781149", "obs": [{"set": [], "values": ["7.6"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"set": [], "values": ["0.10700349151262006"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468857524, "duration": 0, "revision": "65-9a91db1bb8e76c4c8a163c282c5d7479", "eventDate": "2017-09-06T19:40:24.702+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:15.929+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af5", "providerId": "biddemo2", "dateCreated": "2018-03-19T17:28:40.264+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045589, "formSubmissionId": "31c4a45a-09f4-4b01-abe8-a87526827df6"}', null), -(15, '{"id": "05934ae338431f28bf6793b241781a1e", "obs": [{"set": [], "values": ["9.3"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"set": [], "values": ["1.0535868964441777"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468857912, "duration": 0, "revision": "65-bb37dd0fda12683a31217d1157d86539", "eventDate": "2017-11-06T19:42:02.327+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:16.069+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af5", "providerId": "biddemo2", "dateCreated": "2018-03-19T17:28:40.268+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045590, "formSubmissionId": "3f66450e-2b66-43da-9b9b-dae5fced764f"}', null); +(1, '{"_id": "05934ae338431f28bf6793b2417696bf", "obs": [{"values": ["2018-03-13"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162586AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "mr_1", "humanReadableValues": []}, {"values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162586AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "mr_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1520941739448, "duration": 0, "_rev": "1-069bfb5078ff17f922c0bba799222878", "eventDate": "2018-03-13T17:42:03.326+03:00", "eventType": "Vaccination", "entityType": "vaccination", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:26.477+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1520945634380, "formSubmissionId": "29243014-48df-4165-a82d-f4878f6a830e"}', null), +(2, '{"_id": "05934ae338431f28bf6793b24199e690", "obs": [{"values": ["2018-03-14 10:31:33"], "fieldCode": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "start", "formSubmissionField": "start", "humanReadableValues": []}, {"values": ["2018-03-14 10:39:56"], "fieldCode": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "end", "formSubmissionField": "end", "humanReadableValues": []}, {"values": ["867104020634913"], "fieldCode": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "deviceid", "formSubmissionField": "deviceid", "humanReadableValues": []}], "type": "Event", "version": 1521016796414, "duration": 0, "_rev": "2-615390b17f8f2f9e9aa92f5f4a8a7aaf", "eventDate": "2018-03-14T03:00:00.000+03:00", "eventType": "New Woman Registration", "dateEdited": "2018-03-14T11:39:35.826+03:00", "entityType": "mother", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:28.717+03:00", "identifiers": {"OPENMRS_UUID": "d3630a60-a1f4-4267-9225-f4cb728f4178"}, "baseEntityId": "43930c23-c787-4ddb-ab76-770f77e7b17d", "serverVersion": 1521016638453, "formSubmissionId": "6b3243e9-3d45-495c-af69-f012061def01"}', null), +(3, '{"_id": "05934ae338431f28bf6793b2419c64fb", "obs": [{"values": ["2018-03-14"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "measles_1", "humanReadableValues": []}, {"values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "measles_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521033238310, "duration": 0, "_rev": "1-dff06b7575a5177c7200b08570d14f4b", "eventDate": "2018-03-14T19:09:51.379+03:00", "eventType": "Vaccination", "entityType": "vaccination", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:28.750+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521033533700, "formSubmissionId": "bfbfabe8-d4ae-4db2-940f-a6f126ef7829"}', null), +(4, '{"_id": "05934ae338431f28bf6793b2419c319a", "obs": [{"values": ["2018-03-13"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "measles_1_", "humanReadableValues": []}, {"values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "36AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "measles_1__dose", "humanReadableValues": []}], "type": "Event", "version": 1521044035486, "duration": 0, "_rev": "3-2d669093b06c73fcd5c0fa7c4782e21d", "eventDate": "2018-03-13T22:10:00.321+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-14T19:21:38.401+03:00", "entityType": "vaccination", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.019+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521044588444, "formSubmissionId": "d960046a-e2a0-4bbf-b687-d41c2a52d8c8"}', null), +(5, '{"_id": "05934ae338431f28bf6793b241bdb88c", "obs": [{"values": ["42abc582-6658-488b-922e-7be500c070f3"], "fieldCode": "Home_Facility", "fieldType": "formsubmissionField", "parentCode": "", "fieldDataType": "text", "formSubmissionField": "Home_Facility", "humanReadableValues": []}, {"values": ["2018-02-16"], "fieldCode": "163260AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "date", "formSubmissionField": "First_Health_Facility_Contact", "humanReadableValues": []}, {"values": ["2.5"], "fieldCode": "5916AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "text", "formSubmissionField": "Birth_Weight", "humanReadableValues": []}, {"values": ["1588AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"], "fieldCode": "1572AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "select one", "formSubmissionField": "Place_Birth", "humanReadableValues": ["Health facility"]}, {"values": ["Happy Kids Clinic"], "fieldCode": "163531AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "text", "formSubmissionField": "Birth_Facility_Name", "humanReadableValues": []}, {"values": ["664AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"], "fieldCode": "1396AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "text", "formSubmissionField": "PMTCT_Status", "humanReadableValues": ["CNE"]}, {"values": ["2018-03-16 08:57:43"], "fieldCode": "163137AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "start", "formSubmissionField": "start", "humanReadableValues": []}, {"values": ["2018-03-16 08:59:04"], "fieldCode": "163138AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "end", "formSubmissionField": "end", "humanReadableValues": []}, {"values": ["867104020633980"], "fieldCode": "163149AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "deviceid", "formSubmissionField": "deviceid", "humanReadableValues": []}], "type": "Event", "version": 1521183544980, "duration": 0, "_rev": "2-04d992d294837437d5fc099fae979049", "eventDate": "2018-03-16T03:00:00.000+03:00", "eventType": "Birth Registration", "dateEdited": "2018-03-16T10:03:00.759+03:00", "entityType": "child", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.364+03:00", "identifiers": {"OPENMRS_UUID": "06c8644b-b560-45fd-9af5-b6b1484e3504"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183592609, "formSubmissionId": "d59504cc-09ef-4d09-9dc3-8f7eb65882fd"}', null), +(6, '{"_id": "05934ae338431f28bf6793b241bdbb60", "obs": [{"values": ["2018-01-10"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "opv_0", "humanReadableValues": []}, {"values": ["0"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "opv_0_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602537, "duration": 0, "_rev": "2-45e4b7c82520480edbc1adecec55f6ae", "eventDate": "2018-01-10T11:59:37.380+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:00.949+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.371+03:00", "identifiers": {"OPENMRS_UUID": "35d6a414-a379-4ada-97ee-39f680eecb91"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "baf8e663-71a1-4a30-8d40-2f3cab45a6d7"}', null), +(7, '{"_id": "05934ae338431f28bf6793b241bdbc55", "obs": [{"values": ["2018-01-10"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "bcg", "humanReadableValues": []}, {"values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "bcg_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602575, "duration": 0, "_rev": "2-1f5e07f8e65a09d5ca34cb21e6a29b41", "eventDate": "2018-01-10T11:59:41.058+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.148+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.376+03:00", "identifiers": {"OPENMRS_UUID": "94ec8561-14ab-48d1-a6d4-4ae05191f6e6"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "014413c8-4dbf-4876-977d-0c1dfb9e4d05"}', null), +(8, '{"_id": "05934ae338431f28bf6793b241bdc231", "obs": [{"values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "1685AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "penta_1", "humanReadableValues": []}, {"values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "1685AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "penta_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602635, "duration": 0, "_rev": "2-ad81df44c1f2eaba862585dd8918a16e", "eventDate": "2018-02-21T11:59:50.145+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.341+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.385+03:00", "identifiers": {"OPENMRS_UUID": "85abab15-0be3-4a9d-962d-de99a920d3cb"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "serverVersion": 1521183593424, "formSubmissionId": "5f1b201d-2132-4eb9-8fa1-3169a61cc50a"}', null), +(9, '{"_id": "05934ae338431f28bf6793b241bdc3df", "obs": [{"values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "opv_1", "humanReadableValues": []}, {"values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "opv_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602672, "duration": 0, "_rev": "2-9f892924c7e9afe675bdb9f9a3d6231f", "eventDate": "2018-02-21T11:59:55.977+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.537+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.390+03:00", "identifiers": {"OPENMRS_UUID": "28baa742-4a00-480f-9fff-12629c765cc2"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "team":"ATeam", "teamId":"3453hgb454-4j345n-llk345","serverVersion": 1521183593424, "formSubmissionId": "4bc04bbe-bb2f-4e4e-b123-0c6131b91fec"}', null), +(10, '{"_id": "05934ae338431f28bf6793b241bdc44a", "obs": [{"values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "159698AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "rota_1", "humanReadableValues": []}, {"values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "159698AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "rota_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183602735, "duration": 0, "_rev": "2-3514437b6b19290b16b49714bf0182e8", "eventDate": "2018-02-21T12:00:02.298+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:03:01.729+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.394+03:00", "identifiers": {"OPENMRS_UUID": "34701637-5c2f-4483-a05e-46df003990ef"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8","team":"ATeam", "teamId":"3453hgb454-4j345n-llk345", "serverVersion": 1521183593424, "formSubmissionId": "6947237c-5e2b-4ccd-953b-dd8b019e0484"}', null), +(11, '{"_id": "05934ae338431f28bf6793b241be69a5", "obs": [{"values": ["2018-02-21"], "fieldCode": "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "date", "formSubmissionField": "pcv_1", "humanReadableValues": []}, {"values": ["1"], "fieldCode": "1418AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "162342AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldDataType": "calculate", "formSubmissionField": "pcv_1_dose", "humanReadableValues": []}], "type": "Event", "version": 1521183849328, "duration": 0, "_rev": "2-1ef09e6758ecd9f2adaa1eb35e143a7b", "eventDate": "2018-02-21T12:00:08.788+03:00", "eventType": "Vaccination", "dateEdited": "2018-03-16T10:13:03.469+03:00", "entityType": "vaccination", "locationId": "42abc582-6658-488b-922e-7be500c070f3", "providerId": "biddemo", "dateCreated": "2018-03-19T17:27:29.398+03:00", "identifiers": {"OPENMRS_UUID": "4aecc0c1-e008-4227-938d-66db17236a3d"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "team":"ATeam", "teamId":"3453hgb454-4j345n-llk345","serverVersion": 1521184133098, "formSubmissionId": "d6c08393-ebde-4faa-ac94-11429c1233dd"}', null), +(12, '{"_id": "05934ae338431f28bf6793b24177a1dc", "obs": [{"values": ["8.6"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"values": ["-0.3160736521259359"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468856705, "duration": 0, "_rev": "65-9ed92fd61bd67d89325ee3ea35c3f3cb", "eventDate": "2018-01-13T19:37:11.954+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:15.649+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:28:40.255+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045587, "formSubmissionId": "306b6dc2-fa15-4e48-9ac3-4f8044899051"}', null), +(13, '{"_id": "05934ae338431f28bf6793b241780bac", "obs": [{"values": ["11.8"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"values": ["2.0903075436287146"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468857114, "duration": 0, "_rev": "65-81466693915e45bc1feb1f8ccc466475", "eventDate": "2018-03-12T19:40:01.023+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:15.789+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af4", "providerId": "biddemo", "dateCreated": "2018-03-19T17:28:40.260+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045588, "formSubmissionId": "9bd94f7b-d7f5-4e38-bc0d-2fa7eb84dad3"}', null), +(14, '{"_id": "05934ae338431f28bf6793b241781149", "obs": [{"values": ["7.6"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"values": ["0.10700349151262006"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468857524, "duration": 0, "_rev": "65-9a91db1bb8e76c4c8a163c282c5d7479", "eventDate": "2017-09-06T19:40:24.702+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:15.929+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af5", "providerId": "biddemo2", "dateCreated": "2018-03-19T17:28:40.264+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045589, "formSubmissionId": "31c4a45a-09f4-4b01-abe8-a87526827df6"}', null), +(15, '{"_id": "05934ae338431f28bf6793b241781a1e", "obs": [{"values": ["9.3"], "fieldCode": "5089AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "decimal", "formSubmissionField": "Weight_Kgs", "humanReadableValues": []}, {"values": ["1.0535868964441777"], "fieldCode": "162584AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "fieldType": "concept", "parentCode": "", "fieldDataType": "calculation", "formSubmissionField": "Z_Score_Weight_Age", "humanReadableValues": []}], "type": "Event", "version": 1521468857912, "duration": 0, "_rev": "65-bb37dd0fda12683a31217d1157d86539", "eventDate": "2017-11-06T19:42:02.327+03:00", "eventType": "Growth Monitoring", "dateEdited": "2018-03-19T17:17:16.069+03:00", "entityType": "weight", "locationId": "42b88545-7ebb-4e11-8d1a-3d3a924c8af5", "providerId": "biddemo2", "dateCreated": "2018-03-19T17:28:40.268+03:00", "identifiers": {}, "baseEntityId": "ea1f9439-a663-4073-93b9-6ef2b8bca3c1", "serverVersion": 1521469045590, "formSubmissionId": "3f66450e-2b66-43da-9b9b-dae5fced764f"}', null); INSERT INTO core.event_metadata (id, event_id, document_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, event_type, event_date, entity_type ,provider_id, location_id, team, team_id, date_created, date_edited, date_deleted) VALUES From 8857a557709d9a8306b3c261a5ac46fdac5106c8 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Tue, 10 Apr 2018 18:48:10 +0300 Subject: [PATCH 105/133] Correct _id and _rev properties in test data --- .../test/resources/test-scripts/action.sql | 68 +++++++++---------- .../src/test/resources/test-scripts/alert.sql | 30 ++++---- .../test/resources/test-scripts/client.sql | 30 ++++---- .../test/resources/test-scripts/report.sql | 10 +-- .../src/test/resources/test-scripts/stock.sql | 30 ++++---- 5 files changed, 84 insertions(+), 84 deletions(-) diff --git a/opensrp-core/src/test/resources/test-scripts/action.sql b/opensrp-core/src/test/resources/test-scripts/action.sql index 5af96fc350..37c52cf614 100644 --- a/opensrp-core/src/test/resources/test-scripts/action.sql +++ b/opensrp-core/src/test/resources/test-scripts/action.sql @@ -6,40 +6,40 @@ ALTER SEQUENCE core.action_id_seq RESTART WITH 35; ALTER SEQUENCE core.action_metadata_id_seq RESTART WITH 35; INSERT INTO core.action (id, json) VALUES -(1, '{"id": "05934ae338431f28bf6793b241642462", "data": {"visitCode": "OPV 0", "completionDate": "2017-02-13"}, "type": "Action", "details": {}, "version": 0, "revision": "1-2879a3a80caa0ab8c599b766496b8234", "timeStamp": 1520932697689, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(2, '{"id": "05934ae338431f28bf6793b2416433c9", "data": {"visitCode": "BCG", "completionDate": "2017-02-13"}, "type": "Action", "details": {}, "version": 0, "revision": "1-6136b587025c608f3d4f41731eefb157", "timeStamp": 1520932698005, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(3, '{"id": "05934ae338431f28bf6793b241643a7e", "data": {"visitCode": "PENTA 1", "completionDate": "2017-03-27"}, "type": "Action", "details": {}, "version": 0, "revision": "1-2f64b198e90652c816a01b59b15d10c9", "timeStamp": 1520932698821, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(4, '{"id": "05934ae338431f28bf6793b241644dd7", "data": {"visitCode": "OPV 1", "completionDate": "2017-03-27"}, "type": "Action", "details": {}, "version": 0, "revision": "1-6fda14ca820ed569269b81cc28832619", "timeStamp": 1520932699621, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(5, '{"id": "05934ae338431f28bf6793b241645535", "data": {"visitCode": "ROTA 1", "completionDate": "2017-03-27"}, "type": "Action", "details": {}, "version": 0, "revision": "1-f00737fd2a6354d243c161c161a886fd", "timeStamp": 1520932700149, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(6, '{"id": "05934ae338431f28bf6793b241645f1f", "data": {"visitCode": "PCV 1", "completionDate": "2017-03-27"}, "type": "Action", "details": {}, "version": 0, "revision": "1-c66dfedbaf6582dc04c209c467f8a057", "timeStamp": 1520932700973, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(7, '{"id": "05934ae338431f28bf6793b2416473e0", "data": {"visitCode": "PENTA 2", "completionDate": "2017-04-24"}, "type": "Action", "details": {}, "version": 0, "revision": "1-02c3a00f308e4ce385ce558cf0d944d8", "timeStamp": 1520932701845, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(8, '{"id": "05934ae338431f28bf6793b2416481aa", "data": {"visitCode": "OPV 2", "completionDate": "2017-04-24"}, "type": "Action", "details": {}, "version": 0, "revision": "1-8c95d366cfe85f1b2dbfb3ca8c80fa60", "timeStamp": 1520932702653, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(9, '{"id": "05934ae338431f28bf6793b241648e9d", "data": {"visitCode": "ROTA 2", "completionDate": "2017-04-24"}, "type": "Action", "details": {}, "version": 0, "revision": "1-9ad54ee7aea405a883c41203f42b7102", "timeStamp": 1520932703185, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(10, '{"id": "05934ae338431f28bf6793b241649473", "data": {"visitCode": "PCV 2", "completionDate": "2017-04-24"}, "type": "Action", "details": {}, "version": 0, "revision": "1-660bbaae08f13bd1901bf0916c85d7f1", "timeStamp": 1520932703825, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(11, '{"id": "05934ae338431f28bf6793b24164a5d7", "data": {"visitCode": "PENTA 3", "completionDate": "2017-05-22"}, "type": "Action", "details": {}, "version": 0, "revision": "1-6a87e5caa57732fd5c3fef5dc5a4ba71", "timeStamp": 1520932704673, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(12, '{"id": "05934ae338431f28bf6793b24164b4ce", "data": {"visitCode": "OPV 3", "completionDate": "2017-05-22"}, "type": "Action", "details": {}, "version": 0, "revision": "1-9a13ae05df3839ea97d54d42150cf294", "timeStamp": 1520932705277, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(13, '{"id": "05934ae338431f28bf6793b24164c069", "data": {"visitCode": "PCV 3", "completionDate": "2017-05-22"}, "type": "Action", "details": {}, "version": 0, "revision": "1-2cab2feb95c70dcaabecb6f9eed6ddf2", "timeStamp": 1520932705889, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(14, '{"id": "05934ae338431f28bf6793b241651160", "data": {"visitCode": "MEASLES 1", "completionDate": "2017-11-14"}, "type": "Action", "details": {}, "version": 0, "revision": "1-8a96e017d3f3772d1fceeda32360af03", "timeStamp": 1520933247737, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), -(15, '{"id": "05934ae338431f28bf6793b241663fcd", "data": {"visitCode": "BCG", "completionDate": "2016-04-13"}, "type": "Action", "details": {}, "version": 0, "revision": "1-14792d0f46a0883ad712b1579229e327", "timeStamp": 1520933431893, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "86c039a2-0b68-4166-849e-f49897e3a510", "isActionActive": true}'), -(16, '{"id": "05934ae338431f28bf6793b2417bfe8f", "data": {"startDate": "2018-02-22", "visitCode": "penta1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PENTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-6356c0c4202703c768764a3475d7ce3b", "timeStamp": 1520978413525, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), -(17, '{"id": "05934ae338431f28bf6793b2417bf883", "data": {"startDate": "2018-02-22", "visitCode": "pcv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PCV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-076a5315cb585348af4335f3392f3f3d", "timeStamp": 1520978413537, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), -(18, '{"id": "05934ae338431f28bf6793b2417bf3c3", "data": {"startDate": "2018-02-22", "visitCode": "rota1", "expiryDate": "2018-08-01", "alertStatus": "urgent", "scheduleName": "ROTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-5d69b3061e54074f4e280ed3b0b06181", "timeStamp": 1520978413541, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), -(19, '{"id": "05934ae338431f28bf6793b2417c671b", "data": {"startDate": "2018-02-22", "visitCode": "rota1", "expiryDate": "2018-08-01", "alertStatus": "urgent", "scheduleName": "ROTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-35d72bbd1769bd66675997ac9e79164e", "timeStamp": 1520978413737, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), -(20, '{"id": "05934ae338431f28bf6793b2417c4bae", "data": {"startDate": "2018-01-11", "visitCode": "bcg", "expiryDate": "2019-01-01", "alertStatus": "urgent", "scheduleName": "BCG", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-232d50fcd2a7a7801633b5a0546cb753", "timeStamp": 1520978413764, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), -(21, '{"id": "05934ae338431f28bf6793b2417c4d6c", "data": {"startDate": "2018-02-22", "visitCode": "pcv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PCV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-2871da12dbce3cb16e0746f30cbc26fa", "timeStamp": 1520978413764, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), -(22, '{"id": "05934ae338431f28bf6793b2417c5aae", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-9c72f8f01fd21ae36e84a2def4db8732", "timeStamp": 1520978413765, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), -(23, '{"id": "05934ae338431f28bf6793b2417c705e", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-f72851fdbaac0f4f091054bbf60b8ed3", "timeStamp": 1520978413880, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), -(24, '{"id": "05934ae338431f28bf6793b2417c98f9", "data": {"startDate": "2018-02-22", "visitCode": "penta1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PENTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-fc9c73741eee67f6b71c84333ad6eb25", "timeStamp": 1520978413884, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), -(25, '{"id": "05934ae338431f28bf6793b2417c7d94", "data": {"startDate": "2018-01-11", "visitCode": "bcg", "expiryDate": "2019-01-01", "alertStatus": "urgent", "scheduleName": "BCG", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-ea88434f62397611c8e794eedbca74e4", "timeStamp": 1520978413894, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), -(26, '{"id": "05934ae338431f28bf6793b2417ca6cd", "data": {"startDate": "2018-02-22", "visitCode": "pcv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PCV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-6db5f0e05e5e69aa5f33429f6cdc75a7", "timeStamp": 1520978413945, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActionActive": true}'), -(27, '{"id": "05934ae338431f28bf6793b2417d0103", "data": {"startDate": "2018-02-22", "visitCode": "rota1", "expiryDate": "2018-08-01", "alertStatus": "urgent", "scheduleName": "ROTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-a28be37e4572a5e77a92461c76d0885e", "timeStamp": 1520978414164, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActionActive": true}'), -(28, '{"id": "05934ae338431f28bf6793b2417d1390", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-8da27b44f49e08574f5b8a7ad746a88c", "timeStamp": 1520978414184, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActionActive": true}'), -(29, '{"id": "05934ae338431f28bf6793b2417d0b1c", "data": {"startDate": "2018-02-22", "visitCode": "penta1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PENTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-87165e743ef46e7bfbdfea5d9e81d049", "timeStamp": 1520978414186, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActionActive": true}'), -(30, '{"id": "05934ae338431f28bf6793b2417d2ec2", "data": {"startDate": "2018-02-22", "visitCode": "penta1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PENTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-8506e63790993901b69708e013df5a8e", "timeStamp": 1520978414292, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), -(31, '{"id": "05934ae338431f28bf6793b2417d3aa0", "data": {"startDate": "2018-02-22", "visitCode": "rota1", "expiryDate": "2018-08-01", "alertStatus": "urgent", "scheduleName": "ROTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-636eec945c3c237fd8e90fe854dce081", "timeStamp": 1520978414313, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), -(32, '{"id": "05934ae338431f28bf6793b2417db6ca", "data": {"startDate": "2018-01-11", "visitCode": "bcg", "expiryDate": "2019-01-01", "alertStatus": "urgent", "scheduleName": "BCG", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-a8177920ff1fbef63a63f03851a343ee", "timeStamp": 1520978414508, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), -(33, '{"id": "05934ae338431f28bf6793b2417dba2d", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-51466c72f83907a175263b5750fe9b6c", "timeStamp": 1520978414513, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), -(34, '{"id": "05934ae338431f28bf6793b2417da475", "data": {"startDate": "2018-02-22", "visitCode": "pcv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PCV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "revision": "1-f18f7d27909a2cc3e3e27c5b4c116075", "timeStamp": 1520978414514, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'); +(1, '{"_id": "05934ae338431f28bf6793b241642462", "data": {"visitCode": "OPV 0", "completionDate": "2017-02-13"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-2879a3a80caa0ab8c599b766496b8234", "timeStamp": 1520932697689, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(2, '{"_id": "05934ae338431f28bf6793b2416433c9", "data": {"visitCode": "BCG", "completionDate": "2017-02-13"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-6136b587025c608f3d4f41731eefb157", "timeStamp": 1520932698005, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(3, '{"_id": "05934ae338431f28bf6793b241643a7e", "data": {"visitCode": "PENTA 1", "completionDate": "2017-03-27"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-2f64b198e90652c816a01b59b15d10c9", "timeStamp": 1520932698821, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(4, '{"_id": "05934ae338431f28bf6793b241644dd7", "data": {"visitCode": "OPV 1", "completionDate": "2017-03-27"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-6fda14ca820ed569269b81cc28832619", "timeStamp": 1520932699621, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(5, '{"_id": "05934ae338431f28bf6793b241645535", "data": {"visitCode": "ROTA 1", "completionDate": "2017-03-27"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-f00737fd2a6354d243c161c161a886fd", "timeStamp": 1520932700149, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(6, '{"_id": "05934ae338431f28bf6793b241645f1f", "data": {"visitCode": "PCV 1", "completionDate": "2017-03-27"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-c66dfedbaf6582dc04c209c467f8a057", "timeStamp": 1520932700973, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(7, '{"_id": "05934ae338431f28bf6793b2416473e0", "data": {"visitCode": "PENTA 2", "completionDate": "2017-04-24"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-02c3a00f308e4ce385ce558cf0d944d8", "timeStamp": 1520932701845, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(8, '{"_id": "05934ae338431f28bf6793b2416481aa", "data": {"visitCode": "OPV 2", "completionDate": "2017-04-24"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-8c95d366cfe85f1b2dbfb3ca8c80fa60", "timeStamp": 1520932702653, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(9, '{"_id": "05934ae338431f28bf6793b241648e9d", "data": {"visitCode": "ROTA 2", "completionDate": "2017-04-24"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-9ad54ee7aea405a883c41203f42b7102", "timeStamp": 1520932703185, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(10, '{"_id": "05934ae338431f28bf6793b241649473", "data": {"visitCode": "PCV 2", "completionDate": "2017-04-24"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-660bbaae08f13bd1901bf0916c85d7f1", "timeStamp": 1520932703825, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(11, '{"_id": "05934ae338431f28bf6793b24164a5d7", "data": {"visitCode": "PENTA 3", "completionDate": "2017-05-22"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-6a87e5caa57732fd5c3fef5dc5a4ba71", "timeStamp": 1520932704673, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(12, '{"_id": "05934ae338431f28bf6793b24164b4ce", "data": {"visitCode": "OPV 3", "completionDate": "2017-05-22"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-9a13ae05df3839ea97d54d42150cf294", "timeStamp": 1520932705277, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(13, '{"_id": "05934ae338431f28bf6793b24164c069", "data": {"visitCode": "PCV 3", "completionDate": "2017-05-22"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-2cab2feb95c70dcaabecb6f9eed6ddf2", "timeStamp": 1520932705889, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(14, '{"_id": "05934ae338431f28bf6793b241651160", "data": {"visitCode": "MEASLES 1", "completionDate": "2017-11-14"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-8a96e017d3f3772d1fceeda32360af03", "timeStamp": 1520933247737, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "isActionActive": true}'), +(15, '{"_id": "05934ae338431f28bf6793b241663fcd", "data": {"visitCode": "BCG", "completionDate": "2016-04-13"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-14792d0f46a0883ad712b1579229e327", "timeStamp": 1520933431893, "actionType": "closeAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "86c039a2-0b68-4166-849e-f49897e3a510", "isActionActive": true}'), +(16, '{"_id": "05934ae338431f28bf6793b2417bfe8f", "data": {"startDate": "2018-02-22", "visitCode": "penta1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PENTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-6356c0c4202703c768764a3475d7ce3b", "timeStamp": 1520978413525, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), +(17, '{"_id": "05934ae338431f28bf6793b2417bf883", "data": {"startDate": "2018-02-22", "visitCode": "pcv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PCV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-076a5315cb585348af4335f3392f3f3d", "timeStamp": 1520978413537, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), +(18, '{"_id": "05934ae338431f28bf6793b2417bf3c3", "data": {"startDate": "2018-02-22", "visitCode": "rota1", "expiryDate": "2018-08-01", "alertStatus": "urgent", "scheduleName": "ROTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-5d69b3061e54074f4e280ed3b0b06181", "timeStamp": 1520978413541, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), +(19, '{"_id": "05934ae338431f28bf6793b2417c671b", "data": {"startDate": "2018-02-22", "visitCode": "rota1", "expiryDate": "2018-08-01", "alertStatus": "urgent", "scheduleName": "ROTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-35d72bbd1769bd66675997ac9e79164e", "timeStamp": 1520978413737, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), +(20, '{"_id": "05934ae338431f28bf6793b2417c4bae", "data": {"startDate": "2018-01-11", "visitCode": "bcg", "expiryDate": "2019-01-01", "alertStatus": "urgent", "scheduleName": "BCG", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-232d50fcd2a7a7801633b5a0546cb753", "timeStamp": 1520978413764, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), +(21, '{"_id": "05934ae338431f28bf6793b2417c4d6c", "data": {"startDate": "2018-02-22", "visitCode": "pcv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PCV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-2871da12dbce3cb16e0746f30cbc26fa", "timeStamp": 1520978413764, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), +(22, '{"_id": "05934ae338431f28bf6793b2417c5aae", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-9c72f8f01fd21ae36e84a2def4db8732", "timeStamp": 1520978413765, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "isActionActive": true}'), +(23, '{"_id": "05934ae338431f28bf6793b2417c705e", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-f72851fdbaac0f4f091054bbf60b8ed3", "timeStamp": 1520978413880, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), +(24, '{"_id": "05934ae338431f28bf6793b2417c98f9", "data": {"startDate": "2018-02-22", "visitCode": "penta1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PENTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-fc9c73741eee67f6b71c84333ad6eb25", "timeStamp": 1520978413884, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), +(25, '{"_id": "05934ae338431f28bf6793b2417c7d94", "data": {"startDate": "2018-01-11", "visitCode": "bcg", "expiryDate": "2019-01-01", "alertStatus": "urgent", "scheduleName": "BCG", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-ea88434f62397611c8e794eedbca74e4", "timeStamp": 1520978413894, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "isActionActive": true}'), +(26, '{"_id": "05934ae338431f28bf6793b2417ca6cd", "data": {"startDate": "2018-02-22", "visitCode": "pcv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PCV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-6db5f0e05e5e69aa5f33429f6cdc75a7", "timeStamp": 1520978413945, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActionActive": true}'), +(27, '{"_id": "05934ae338431f28bf6793b2417d0103", "data": {"startDate": "2018-02-22", "visitCode": "rota1", "expiryDate": "2018-08-01", "alertStatus": "urgent", "scheduleName": "ROTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-a28be37e4572a5e77a92461c76d0885e", "timeStamp": 1520978414164, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActionActive": true}'), +(28, '{"_id": "05934ae338431f28bf6793b2417d1390", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-8da27b44f49e08574f5b8a7ad746a88c", "timeStamp": 1520978414184, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActionActive": true}'), +(29, '{"_id": "05934ae338431f28bf6793b2417d0b1c", "data": {"startDate": "2018-02-22", "visitCode": "penta1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PENTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-87165e743ef46e7bfbdfea5d9e81d049", "timeStamp": 1520978414186, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActionActive": true}'), +(30, '{"_id": "05934ae338431f28bf6793b2417d2ec2", "data": {"startDate": "2018-02-22", "visitCode": "penta1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PENTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-8506e63790993901b69708e013df5a8e", "timeStamp": 1520978414292, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), +(31, '{"_id": "05934ae338431f28bf6793b2417d3aa0", "data": {"startDate": "2018-02-22", "visitCode": "rota1", "expiryDate": "2018-08-01", "alertStatus": "urgent", "scheduleName": "ROTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-636eec945c3c237fd8e90fe854dce081", "timeStamp": 1520978414313, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), +(32, '{"_id": "05934ae338431f28bf6793b2417db6ca", "data": {"startDate": "2018-01-11", "visitCode": "bcg", "expiryDate": "2019-01-01", "alertStatus": "urgent", "scheduleName": "BCG", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-a8177920ff1fbef63a63f03851a343ee", "timeStamp": 1520978414508, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), +(33, '{"_id": "05934ae338431f28bf6793b2417dba2d", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-51466c72f83907a175263b5750fe9b6c", "timeStamp": 1520978414513, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), +(34, '{"_id": "05934ae338431f28bf6793b2417da475", "data": {"startDate": "2018-02-22", "visitCode": "pcv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PCV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-f18f7d27909a2cc3e3e27c5b4c116075", "timeStamp": 1520978414514, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'); INSERT INTO core.action_metadata (id, action_id, document_id, base_entity_id, server_version, provider_id, location_id, team, team_id) VALUES (1, 1, '05934ae338431f28bf6793b241642462', '67007c17-97bb-4732-a1b8-3a0c292b5432', 1520932697689, 'biddemo', null, null, null), diff --git a/opensrp-core/src/test/resources/test-scripts/alert.sql b/opensrp-core/src/test/resources/test-scripts/alert.sql index e2228a51d2..9c751e43c2 100644 --- a/opensrp-core/src/test/resources/test-scripts/alert.sql +++ b/opensrp-core/src/test/resources/test-scripts/alert.sql @@ -6,21 +6,21 @@ ALTER SEQUENCE core.alert_id_seq RESTART WITH 16; ALTER SEQUENCE core.alert_metadata_id_seq RESTART WITH 16; INSERT INTO core.alert (id, json) VALUES -(1, '{"id": "a6159ce3-c93c-4339-9766-d814a10ca2db", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403899, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "pcv2", "triggerName": "PCV 2", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), -(2, '{"id": "758aaf63-324e-4ccc-95f2-894be012dc25", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403900, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "opv2", "triggerName": "OPV 2", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), -(3, '{"id": "f210392d-2905-458a-8301-5a7fb844c448", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403899, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "pcv1", "triggerName": "PCV 1", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), -(4, '{"id": "52e33167-4b64-4189-bf0c-e7a916815bc9", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403837, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "penta2", "triggerName": "PENTA 2", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), -(5, '{"id": "07a17c79-1e96-478b-ab23-a56a748df09e", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403913, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "rota2", "triggerName": "ROTA 2", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), -(6, '{"id": "89bcc696-9491-4b03-8064-d7752b0cb12a", "type": "Alert", "details": {"urgent:end": "2022-04-20T00:00:00.000+02:00", "urgent:start": "2017-05-28T00:00:00.000+02:00"}, "entityId": "06e4d8c0-f3ff-458c-8141-53d199355c7a", "isActive": true, "alertType": "notification", "startDate": "2017-05-28T00:00:00.000+02:00", "timeStamp": 1521064813469, "expiryDate": "2022-04-20T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "urgent", "triggerCode": "opv3", "triggerName": "OPV 3", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), -(7, '{"id": "3aa476f0-50e3-489e-9778-5ae3dcea8640", "type": "Alert", "details": {"urgent:end": "2022-04-20T00:00:00.000+02:00", "urgent:start": "2017-05-28T00:00:00.000+02:00"}, "entityId": "06e4d8c0-f3ff-458c-8141-53d199355c7a", "isActive": true, "alertType": "notification", "startDate": "2017-05-28T00:00:00.000+02:00", "timeStamp": 1521064813617, "expiryDate": "2022-04-20T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "urgent", "triggerCode": "penta3", "triggerName": "PENTA 3", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), -(8, '{"id": "170c64f5-a187-4c90-b76d-09ff14d5e280", "type": "Alert", "details": {"urgent:end": "2022-04-20T00:00:00.000+02:00", "urgent:start": "2017-05-28T00:00:00.000+02:00"}, "entityId": "06e4d8c0-f3ff-458c-8141-53d199355c7a", "isActive": false, "alertType": "notification", "startDate": "2017-05-28T00:00:00.000+02:00", "timeStamp": 1521756016156, "dateClosed": "2018-03-27", "expiryDate": "2022-04-20T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "complete", "triggerCode": "pcv3", "triggerName": "PCV 3", "triggerType": "schedule", "dateComplete": "2018-03-27", "closingPeriod": "urgent", "beneficiaryType": "vaccination"}'), -(9, '{"id": "80242dd1-01ca-47ea-ae3c-dc0c24dd3f5f", "type": "Alert", "details": {"urgent:end": "2022-04-20T00:00:00.000+02:00", "urgent:start": "2017-05-28T00:00:00.000+02:00"}, "entityId": "06e4d8c0-f3ff-458c-8141-53d199355c7a", "isActive": true, "alertType": "notification", "startDate": "2017-05-28T00:00:00.000+02:00", "timeStamp": 1521064813385, "expiryDate": "2022-04-20T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "urgent", "triggerCode": "pcv3", "triggerName": "PCV 3", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), -(10, '{"id": "1b7ed001-201b-4503-a098-4b1cd509470d", "type": "Alert", "details": {"normal:end": "2018-03-23T00:00:00.000+02:00", "normal:start": "2018-03-13T00:00:00.000+02:00"}, "entityId": "7583329e-340e-4f64-8d6e-a7cbcf334455", "isActive": true, "alertType": "notification", "startDate": "2018-03-13T00:00:00.000+02:00", "timeStamp": 1520978413376, "expiryDate": "2018-03-23T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "normal", "triggerCode": "itn1", "triggerName": "ITN 1", "triggerType": "schedule", "beneficiaryType": "child"}'), -(11, '{"id": "32e7d8cd-28e6-4361-9a39-bee732e61d93", "type": "Alert", "details": {"normal:end": "2018-03-23T00:00:00.000+02:00", "normal:start": "2018-03-13T00:00:00.000+02:00"}, "entityId": "7583329e-340e-4f64-8d6e-a7cbcf334455", "isActive": true, "alertType": "notification", "startDate": "2018-03-13T00:00:00.000+02:00", "timeStamp": 1520978413593, "expiryDate": "2018-03-23T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "normal", "triggerCode": "bcg", "triggerName": "BCG", "triggerType": "schedule", "beneficiaryType": "child"}'), -(12, '{"id": "01741058-588c-4105-b2e4-6e5ae47f4880", "type": "Alert", "details": {"urgent:end": "2021-03-27T00:00:00.000+02:00", "urgent:start": "2017-04-06T00:00:00.000+02:00"}, "entityId": "980d55f5-60d8-4488-b75b-f511c3c839f7", "isActive": true, "alertType": "notification", "startDate": "2017-04-06T00:00:00.000+02:00", "timeStamp": 1522188003909, "expiryDate": "2021-03-27T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "urgent", "triggerCode": "deworming1", "triggerName": "DEWORMING 1", "triggerType": "schedule", "beneficiaryType": "child"}'), -(13, '{"id": "4ba278a4-7d91-4cae-a54d-8353c63e2940", "type": "Alert", "details": {"urgent:end": "2021-03-27T00:00:00.000+02:00", "urgent:start": "2016-10-07T00:00:00.000+02:00"}, "entityId": "980d55f5-60d8-4488-b75b-f511c3c839f7", "isActive": true, "alertType": "notification", "startDate": "2016-10-07T00:00:00.000+02:00", "timeStamp": 1522188003905, "expiryDate": "2021-03-27T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "urgent", "triggerCode": "vita1", "triggerName": "VIT A 1", "triggerType": "schedule", "beneficiaryType": "child"}'), -(14, '{"id": "950d34d1-a374-47aa-91ac-09a62373e624", "type": "Alert", "details": {"normal:end": "2018-07-01T00:00:00.000+02:00", "normal:start": "2018-01-01T00:00:00.000+02:00"}, "entityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActive": true, "alertType": "notification", "startDate": "2018-01-01T00:00:00.000+02:00", "timeStamp": 1520978414377, "expiryDate": "2018-07-01T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "normal", "triggerCode": "vitaifc2", "triggerName": "VIT A IFC 2", "triggerType": "schedule", "beneficiaryType": "child"}'), -(15, '{"id": "59bf074a-0415-40bb-9b15-d681613673d9", "type": "Alert", "entityId": "fe7b6350-16d2-41d0-8574-c194088705df", "isActive": false, "alertType": "notification", "startDate": "2018-02-22", "timeStamp": 1520978414781, "dateClosed": "2018-03-14", "expiryDate": "2022-11-01", "providerId": "biddemo", "alertStatus": "complete", "triggerCode": "pcv1", "triggerName": "PCV 1", "triggerType": "schedule", "dateComplete": "2018-02-12", "closingPeriod": "urgent", "beneficiaryType": "child"}'); +(1, '{"_id": "a6159ce3-c93c-4339-9766-d814a10ca2db", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403899, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "pcv2", "triggerName": "PCV 2", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), +(2, '{"_id": "758aaf63-324e-4ccc-95f2-894be012dc25", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403900, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "opv2", "triggerName": "OPV 2", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), +(3, '{"_id": "f210392d-2905-458a-8301-5a7fb844c448", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403899, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "pcv1", "triggerName": "PCV 1", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), +(4, '{"_id": "52e33167-4b64-4189-bf0c-e7a916815bc9", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403837, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "penta2", "triggerName": "PENTA 2", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), +(5, '{"_id": "07a17c79-1e96-478b-ab23-a56a748df09e", "type": "Alert", "details": {"upcoming:end": "2018-04-30T00:00:00.000+02:00", "upcoming:start": "2018-04-20T00:00:00.000+02:00"}, "entityId": "01a12dba-d25e-4518-8da3-cfa8cf5ebf40", "isActive": true, "alertType": "notification", "startDate": "2018-04-20T00:00:00.000+02:00", "timeStamp": 1521842403913, "expiryDate": "2018-04-30T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "upcoming", "triggerCode": "rota2", "triggerName": "ROTA 2", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), +(6, '{"_id": "89bcc696-9491-4b03-8064-d7752b0cb12a", "type": "Alert", "details": {"urgent:end": "2022-04-20T00:00:00.000+02:00", "urgent:start": "2017-05-28T00:00:00.000+02:00"}, "entityId": "06e4d8c0-f3ff-458c-8141-53d199355c7a", "isActive": true, "alertType": "notification", "startDate": "2017-05-28T00:00:00.000+02:00", "timeStamp": 1521064813469, "expiryDate": "2022-04-20T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "urgent", "triggerCode": "opv3", "triggerName": "OPV 3", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), +(7, '{"_id": "3aa476f0-50e3-489e-9778-5ae3dcea8640", "type": "Alert", "details": {"urgent:end": "2022-04-20T00:00:00.000+02:00", "urgent:start": "2017-05-28T00:00:00.000+02:00"}, "entityId": "06e4d8c0-f3ff-458c-8141-53d199355c7a", "isActive": true, "alertType": "notification", "startDate": "2017-05-28T00:00:00.000+02:00", "timeStamp": 1521064813617, "expiryDate": "2022-04-20T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "urgent", "triggerCode": "penta3", "triggerName": "PENTA 3", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), +(8, '{"_id": "170c64f5-a187-4c90-b76d-09ff14d5e280", "type": "Alert", "details": {"urgent:end": "2022-04-20T00:00:00.000+02:00", "urgent:start": "2017-05-28T00:00:00.000+02:00"}, "entityId": "06e4d8c0-f3ff-458c-8141-53d199355c7a", "isActive": false, "alertType": "notification", "startDate": "2017-05-28T00:00:00.000+02:00", "timeStamp": 1521756016156, "dateClosed": "2018-03-27", "expiryDate": "2022-04-20T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "complete", "triggerCode": "pcv3", "triggerName": "PCV 3", "triggerType": "schedule", "dateComplete": "2018-03-27", "closingPeriod": "urgent", "beneficiaryType": "vaccination"}'), +(9, '{"_id": "80242dd1-01ca-47ea-ae3c-dc0c24dd3f5f", "type": "Alert", "details": {"urgent:end": "2022-04-20T00:00:00.000+02:00", "urgent:start": "2017-05-28T00:00:00.000+02:00"}, "entityId": "06e4d8c0-f3ff-458c-8141-53d199355c7a", "isActive": true, "alertType": "notification", "startDate": "2017-05-28T00:00:00.000+02:00", "timeStamp": 1521064813385, "expiryDate": "2022-04-20T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "urgent", "triggerCode": "pcv3", "triggerName": "PCV 3", "triggerType": "schedule", "beneficiaryType": "vaccination"}'), +(10, '{"_id": "1b7ed001-201b-4503-a098-4b1cd509470d", "type": "Alert", "details": {"normal:end": "2018-03-23T00:00:00.000+02:00", "normal:start": "2018-03-13T00:00:00.000+02:00"}, "entityId": "7583329e-340e-4f64-8d6e-a7cbcf334455", "isActive": true, "alertType": "notification", "startDate": "2018-03-13T00:00:00.000+02:00", "timeStamp": 1520978413376, "expiryDate": "2018-03-23T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "normal", "triggerCode": "itn1", "triggerName": "ITN 1", "triggerType": "schedule", "beneficiaryType": "child"}'), +(11, '{"_id": "32e7d8cd-28e6-4361-9a39-bee732e61d93", "type": "Alert", "details": {"normal:end": "2018-03-23T00:00:00.000+02:00", "normal:start": "2018-03-13T00:00:00.000+02:00"}, "entityId": "7583329e-340e-4f64-8d6e-a7cbcf334455", "isActive": true, "alertType": "notification", "startDate": "2018-03-13T00:00:00.000+02:00", "timeStamp": 1520978413593, "expiryDate": "2018-03-23T00:00:00.000+02:00", "providerId": "DYuyi", "alertStatus": "normal", "triggerCode": "bcg", "triggerName": "BCG", "triggerType": "schedule", "beneficiaryType": "child"}'), +(12, '{"_id": "01741058-588c-4105-b2e4-6e5ae47f4880", "type": "Alert", "details": {"urgent:end": "2021-03-27T00:00:00.000+02:00", "urgent:start": "2017-04-06T00:00:00.000+02:00"}, "entityId": "980d55f5-60d8-4488-b75b-f511c3c839f7", "isActive": true, "alertType": "notification", "startDate": "2017-04-06T00:00:00.000+02:00", "timeStamp": 1522188003909, "expiryDate": "2021-03-27T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "urgent", "triggerCode": "deworming1", "triggerName": "DEWORMING 1", "triggerType": "schedule", "beneficiaryType": "child"}'), +(13, '{"_id": "4ba278a4-7d91-4cae-a54d-8353c63e2940", "type": "Alert", "details": {"urgent:end": "2021-03-27T00:00:00.000+02:00", "urgent:start": "2016-10-07T00:00:00.000+02:00"}, "entityId": "980d55f5-60d8-4488-b75b-f511c3c839f7", "isActive": true, "alertType": "notification", "startDate": "2016-10-07T00:00:00.000+02:00", "timeStamp": 1522188003905, "expiryDate": "2021-03-27T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "urgent", "triggerCode": "vita1", "triggerName": "VIT A 1", "triggerType": "schedule", "beneficiaryType": "child"}'), +(14, '{"_id": "950d34d1-a374-47aa-91ac-09a62373e624", "type": "Alert", "details": {"normal:end": "2018-07-01T00:00:00.000+02:00", "normal:start": "2018-01-01T00:00:00.000+02:00"}, "entityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "isActive": true, "alertType": "notification", "startDate": "2018-01-01T00:00:00.000+02:00", "timeStamp": 1520978414377, "expiryDate": "2018-07-01T00:00:00.000+02:00", "providerId": "biddemo", "alertStatus": "normal", "triggerCode": "vitaifc2", "triggerName": "VIT A IFC 2", "triggerType": "schedule", "beneficiaryType": "child"}'), +(15, '{"_id": "59bf074a-0415-40bb-9b15-d681613673d9", "type": "Alert", "entityId": "fe7b6350-16d2-41d0-8574-c194088705df", "isActive": false, "alertType": "notification", "startDate": "2018-02-22", "timeStamp": 1520978414781, "dateClosed": "2018-03-14", "expiryDate": "2022-11-01", "providerId": "biddemo", "alertStatus": "complete", "triggerCode": "pcv1", "triggerName": "PCV 1", "triggerType": "schedule", "dateComplete": "2018-02-12", "closingPeriod": "urgent", "beneficiaryType": "child"}'); INSERT INTO core.alert_metadata (id, alert_id, document_id, base_entity_id, server_version, provider_id, location_id, team, team_id, is_active, trigger_name) VALUES diff --git a/opensrp-core/src/test/resources/test-scripts/client.sql b/opensrp-core/src/test/resources/test-scripts/client.sql index 7a6e6542aa..884e220780 100644 --- a/opensrp-core/src/test/resources/test-scripts/client.sql +++ b/opensrp-core/src/test/resources/test-scripts/client.sql @@ -6,21 +6,21 @@ ALTER SEQUENCE core.client_id_seq RESTART WITH 16; ALTER SEQUENCE core.client_metadata_id_seq RESTART WITH 16; INSERT INTO core.client (id, json) VALUES -(1, '{"id": "05934ae338431f28bf6793b24159ce5d", "type": "Client", "gender": "Male", "lastName": "Child", "revision": "2-0b2b71f8189f101a5c4c69e44d4886f5", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Dre0", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Second", "attributes": {}, "dateEdited": "2018-03-13T00:52:58.942", "dateCreated": "2018-03-13T00:48:59.829", "identifiers": {"ZEIR_ID": "218221-0", "OPENMRS_UUID": "8796f967-2f7a-40f7-8586-d63dbc81b709"}, "baseEntityId": "287be17c-30a7-4482-8816-e2382ec502f1", "relationships": {"mother": ["22b8570a-3207-4af7-8da7-8a1c5b84d3ff"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(2, '{"id": "05934ae338431f28bf6793b24159dea7", "type": "Client", "gender": "Male", "lastName": " Child", "revision": "2-6ccd1e9150e9055193267acc3fd311e8", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rwre", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Third", "attributes": {}, "dateEdited": "2018-03-13T00:52:59.675", "dateCreated": "2018-03-13T00:52:01.121", "identifiers": {"ZEIR_ID": "218222-8", "OPENMRS_UUID": "99621619-688a-4f0f-b93e-68ab1b8cf49e"}, "baseEntityId": "9289b401-fbc6-4231-a59c-127dac40df74", "relationships": {"mother": ["0154839f-8766-4eda-b729-89067c7a8c5d"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(3, '{"id": "05934ae338431f28bf6793b24159ebc2", "type": "Client", "gender": "Female", "lastName": "Child", "revision": "2-0ea77a08483ea9a0c5849cb4fd3da368", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gjg", "address3": "c19431f1-566c-44ac-ad9e-dfd33eac8daa"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Fourth", "attributes": {}, "dateEdited": "2018-03-13T00:58:00.873", "dateCreated": "2018-03-13T00:54:42.889", "identifiers": {"ZEIR_ID": "218223-6", "OPENMRS_UUID": "07880fcb-0061-43b0-8ae8-6b52372b1a6b"}, "baseEntityId": "219655bb-a733-4d7a-8b1f-ecc5ff3af6cc", "relationships": {"mother": ["0154839f-8766-4eda-b729-89067c7a8c5d"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(4, '{"id": "05934ae338431f28bf6793b2415a0374", "type": "Client", "gender": "Female", "lastName": "Child", "revision": "2-5ec561cece5508f14bb0381b59e40baa", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Er", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Fith", "attributes": {}, "dateEdited": "2018-03-13T02:23:03.971", "dateCreated": "2018-03-13T02:20:08.984", "identifiers": {"ZEIR_ID": "218224-4", "OPENMRS_UUID": "cf58894b-71c6-41e0-a977-7283f2411cd5"}, "baseEntityId": "94f3e8fb-2f05-4fca-8119-2b593d1962eb", "relationships": {"mother": ["3abdb25a-f151-4a95-9311-bd30bf935085"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(5, '{"id": "05934ae338431f28bf6793b24159c647", "type": "Client", "gender": "Male", "lastName": "Child", "revision": "2-3867cacbf2a4b3736524552816381927", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rewe", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-01-04T03:00:00.000", "firstName": "First", "attributes": {}, "dateEdited": "2018-03-13T00:47:57.879", "dateCreated": "2018-03-13T00:42:58.436", "identifiers": {"ZEIR_ID": "218220-2", "OPENMRS_UUID": "9c4260f2-d296-4af1-b771-debda1b6cfd1"}, "baseEntityId": "33d9a17f-d729-4276-9891-b43e8b60fd12", "relationships": {"mother": ["d0ecee83-6ccd-4096-9188-f63a40fa2f63"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(6, '{"id": "05934ae338431f28bf6793b24164cbd9", "type": "Client", "gender": "Female", "lastName": "Mtini ", "revision": "2-70add9f425fe26094fe4542bdf9a9acf", "addresses": [{"addressType": "usual_residence", "addressFields": {"address1": "Church", "address2": "Tulia Gardens ", "address3": "f940e2a3-b553-496a-80b3-091891bb5194"}}], "birthdate": "2016-04-13T03:00:00.000", "firstName": "Sally", "attributes": {"CHW_Name": "Hellen", "Home_Facility": "Happy Kids Clinic", "CHW_Phone_Number": "0964357951", "Father_NRC_Number": "721345/67/8"}, "dateEdited": "2018-03-13T12:26:53.223", "dateCreated": "2018-03-13T12:26:43.857", "identifiers": {"ZEIR_ID": "218923-1", "OPENMRS_UUID": "ab91df5d-e433-40f3-b44f-427b73c9ae2a"}, "baseEntityId": "86c039a2-0b68-4166-849e-f49897e3a510", "relationships": {"mother": ["758dab58-7629-4da9-882f-ae5110bcd240"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(7, '{"id": "05934ae338431f28bf6793b241692648", "type": "Client", "gender": "Female", "lastName": "Babbyfour", "revision": "2-2fa38eef6330ee8753e1ea18a94512aa", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gcfd", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "Januar", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:09.837", "dateCreated": "2018-03-13T13:11:18.453", "identifiers": {"ZEIR_ID": "218229-3", "OPENMRS_UUID": "825b4d23-a3ea-4c58-a95b-d0df2f9c1690"}, "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "relationships": {"mother": ["9ac3fac4-a74c-45d5-bedb-da357cec3779"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(8, '{"id": "05934ae338431f28bf6793b241693a2f", "type": "Client", "gender": "Female", "lastName": "Babyfive", "revision": "2-8a753553c0e0ae4ed0257bb6d686d2ea", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Home", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "January", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:11.027", "dateCreated": "2018-03-13T13:11:18.725", "identifiers": {"ZEIR_ID": "218230-1", "OPENMRS_UUID": "11a1ecf6-7d6d-4e12-8e6f-bb3cf5a3ebb8"}, "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "relationships": {"mother": ["41d1841b-4d6c-4f06-b5e8-b55907892ee6"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(9, '{"id": "05934ae338431f28bf6793b2416946b7", "type": "Client", "gender": "Female", "lastName": "Babysix", "revision": "2-0684ed7a15c29c8bf479a36d8c5986c5", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gu", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "January ", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:12.257", "dateCreated": "2018-03-13T13:11:19.005", "identifiers": {"ZEIR_ID": "218231-9", "OPENMRS_UUID": "eb4b258c-7558-436c-a1fe-e91d9e12f849"}, "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "relationships": {"mother": ["7bce6b9a-e575-4cc6-b987-a12284912e84"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(10, '{"id": "05934ae338431f28bf6793b24167817d", "type": "Client", "gender": "Male", "lastName": "Child", "revision": "2-9de838d2e671a8d5011cedf66143b023", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Guy", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Sixth", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:03.225", "dateCreated": "2018-03-13T12:53:04.188", "identifiers": {"ZEIR_ID": "218225-1", "OPENMRS_UUID": "43397e39-0a11-4bb7-ba2d-3820436bef85"}, "baseEntityId": "28caef27-d1b3-497b-8a55-954f2f0f6e24", "relationships": {"mother": ["ab1eda08-2185-4d5f-9301-abb17d376ded"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(11, '{"id": "05934ae338431f28bf6793b241679500", "type": "Client", "gender": "Male", "lastName": "Baby", "revision": "2-f7de9e0a0e63129a1e4a3016539a2194", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rer", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "deathdate": "2018-02-13T03:00:00.000", "firstName": "Jan", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:04.417", "dateCreated": "2018-03-13T12:53:04.453", "identifiers": {"ZEIR_ID": "218226-9", "OPENMRS_UUID": "7a8926a9-f35a-41ba-adbf-87712333d5c2"}, "baseEntityId": "f33c71c7-a9a4-495d-8028-b6d59e4034b3", "relationships": {"mother": ["7289296d-9ec9-450e-9389-88b5b0d329a0"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(12, '{"id": "05934ae338431f28bf6793b24167b6d1", "type": "Client", "gender": "Male", "lastName": "Babytwo", "revision": "2-ce3c6a238b86298059c0dd792f0c0dcc", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Ty", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "Janu", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:05.652", "dateCreated": "2018-03-13T12:54:42.456", "identifiers": {"ZEIR_ID": "218227-7", "OPENMRS_UUID": "ba5d3927-414f-4796-ae1e-9b73b50a5573"}, "baseEntityId": "fe7b6350-16d2-41d0-8574-c194088705df", "relationships": {"mother": ["14715b97-f0d5-4515-813b-5698934dbf1d"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(13, '{"id": "05934ae338431f28bf6793b24162ca7e", "type": "Client", "gender": "Male", "lastName": "Owino", "revision": "2-5d274d303daa8ff1cd5eb5604b8e60f7", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Kilimani", "address3": "6c814e69-ed6f-4fcc-ac2c-8406508603f2"}}], "birthdate": "2017-02-13T03:00:00.000", "firstName": "George", "attributes": {"Home_Facility": "Happy Kids Clinic", "Child_Birth_Certificate": "7865", "Child_Register_Card_Number": "4567"}, "dateEdited": "2018-03-13T11:46:46.277", "dateCreated": "2018-03-13T11:42:01.573", "identifiers": {"ZEIR_ID": "218922-3", "OPENMRS_UUID": "c5780597-3d54-4298-b39f-9d38dfd14970"}, "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "relationships": {"mother": ["14f94928-ef60-4d1c-a6be-f46b3b844268"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(14, '{"id": "05934ae338431f28bf6793b2418380ce", "type": "Client", "gender": "Female", "lastName": "Gchf", "revision": "2-2d194250dc94b0ed20fbb2dac28a9020", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Chf", "address3": "144cea61-2322-4a2c-8963-d99b52aa1406"}}], "birthdate": "1960-01-01T03:00:00.000", "firstName": "Gg", "attributes": {}, "dateEdited": "2018-03-14T07:53:06.606", "dateCreated": "2018-03-14T07:52:16.620", "identifiers": {"M_ZEIR_ID": "218232-7_mother", "OPENMRS_UUID": "2ca99239-ba6e-42d6-92a5-a889d2de50c0"}, "baseEntityId": "cc127350-c1cd-4c3a-99d4-4d632882f522", "birthdateApprox": false, "deathdateApprox": false}'), -(15, '{"id": "05934ae338431f28bf6793b241839005", "type": "Client", "gender": "Female", "lastName": "Immunisedtwo", "revision": "2-db28bfef08ea6a88fc4d387bbb83b369", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Home", "address3": "144cea61-2322-4a2c-8963-d99b52aa1406"}}], "birthdate": "2017-06-13T03:00:00.000", "firstName": "Fully", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-14T07:53:07.496", "dateCreated": "2018-03-14T07:52:16.757", "identifiers": {"ZEIR_ID": "218233-5", "OPENMRS_UUID": "02d89e05-64ad-4fa3-86d9-93b669ec02c5"}, "baseEntityId": "d4eda055-60c6-44a4-ba48-61dfe6485bea", "relationships": {"mother": ["17a1f5ed-a4cd-4427-ad9f-6471f4fc963d"]}, "birthdateApprox": false, "deathdateApprox": false}'); +(1, '{"_id": "05934ae338431f28bf6793b24159ce5d", "type": "Client", "gender": "Male", "lastName": "Child", "_rev": "2-0b2b71f8189f101a5c4c69e44d4886f5", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Dre0", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Second", "attributes": {}, "dateEdited": "2018-03-13T00:52:58.942", "dateCreated": "2018-03-13T00:48:59.829", "identifiers": {"ZEIR_ID": "218221-0", "OPENMRS_UUID": "8796f967-2f7a-40f7-8586-d63dbc81b709"}, "baseEntityId": "287be17c-30a7-4482-8816-e2382ec502f1", "relationships": {"mother": ["22b8570a-3207-4af7-8da7-8a1c5b84d3ff"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(2, '{"_id": "05934ae338431f28bf6793b24159dea7", "type": "Client", "gender": "Male", "lastName": " Child", "_rev": "2-6ccd1e9150e9055193267acc3fd311e8", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rwre", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Third", "attributes": {}, "dateEdited": "2018-03-13T00:52:59.675", "dateCreated": "2018-03-13T00:52:01.121", "identifiers": {"ZEIR_ID": "218222-8", "OPENMRS_UUID": "99621619-688a-4f0f-b93e-68ab1b8cf49e"}, "baseEntityId": "9289b401-fbc6-4231-a59c-127dac40df74", "relationships": {"mother": ["0154839f-8766-4eda-b729-89067c7a8c5d"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(3, '{"_id": "05934ae338431f28bf6793b24159ebc2", "type": "Client", "gender": "Female", "lastName": "Child", "_rev": "2-0ea77a08483ea9a0c5849cb4fd3da368", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gjg", "address3": "c19431f1-566c-44ac-ad9e-dfd33eac8daa"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Fourth", "attributes": {}, "dateEdited": "2018-03-13T00:58:00.873", "dateCreated": "2018-03-13T00:54:42.889", "identifiers": {"ZEIR_ID": "218223-6", "OPENMRS_UUID": "07880fcb-0061-43b0-8ae8-6b52372b1a6b"}, "baseEntityId": "219655bb-a733-4d7a-8b1f-ecc5ff3af6cc", "relationships": {"mother": ["0154839f-8766-4eda-b729-89067c7a8c5d"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(4, '{"_id": "05934ae338431f28bf6793b2415a0374", "type": "Client", "gender": "Female", "lastName": "Child", "_rev": "2-5ec561cece5508f14bb0381b59e40baa", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Er", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Fith", "attributes": {}, "dateEdited": "2018-03-13T02:23:03.971", "dateCreated": "2018-03-13T02:20:08.984", "identifiers": {"ZEIR_ID": "218224-4", "OPENMRS_UUID": "cf58894b-71c6-41e0-a977-7283f2411cd5"}, "baseEntityId": "94f3e8fb-2f05-4fca-8119-2b593d1962eb", "relationships": {"mother": ["3abdb25a-f151-4a95-9311-bd30bf935085"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(5, '{"_id": "05934ae338431f28bf6793b24159c647", "type": "Client", "gender": "Male", "lastName": "Child", "_rev": "2-3867cacbf2a4b3736524552816381927", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rewe", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-01-04T03:00:00.000", "firstName": "First", "attributes": {}, "dateEdited": "2018-03-13T00:47:57.879", "dateCreated": "2018-03-13T00:42:58.436", "identifiers": {"ZEIR_ID": "218220-2", "OPENMRS_UUID": "9c4260f2-d296-4af1-b771-debda1b6cfd1"}, "baseEntityId": "33d9a17f-d729-4276-9891-b43e8b60fd12", "relationships": {"mother": ["d0ecee83-6ccd-4096-9188-f63a40fa2f63"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(6, '{"_id": "05934ae338431f28bf6793b24164cbd9", "type": "Client", "gender": "Female", "lastName": "Mtini ", "_rev": "2-70add9f425fe26094fe4542bdf9a9acf", "addresses": [{"addressType": "usual_residence", "addressFields": {"address1": "Church", "address2": "Tulia Gardens ", "address3": "f940e2a3-b553-496a-80b3-091891bb5194"}}], "birthdate": "2016-04-13T03:00:00.000", "firstName": "Sally", "attributes": {"CHW_Name": "Hellen", "Home_Facility": "Happy Kids Clinic", "CHW_Phone_Number": "0964357951", "Father_NRC_Number": "721345/67/8"}, "dateEdited": "2018-03-13T12:26:53.223", "dateCreated": "2018-03-13T12:26:43.857", "identifiers": {"ZEIR_ID": "218923-1", "OPENMRS_UUID": "ab91df5d-e433-40f3-b44f-427b73c9ae2a"}, "baseEntityId": "86c039a2-0b68-4166-849e-f49897e3a510", "relationships": {"mother": ["758dab58-7629-4da9-882f-ae5110bcd240"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(7, '{"_id": "05934ae338431f28bf6793b241692648", "type": "Client", "gender": "Female", "lastName": "Babbyfour", "_rev": "2-2fa38eef6330ee8753e1ea18a94512aa", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gcfd", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "Januar", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:09.837", "dateCreated": "2018-03-13T13:11:18.453", "identifiers": {"ZEIR_ID": "218229-3", "OPENMRS_UUID": "825b4d23-a3ea-4c58-a95b-d0df2f9c1690"}, "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "relationships": {"mother": ["9ac3fac4-a74c-45d5-bedb-da357cec3779"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(8, '{"_id": "05934ae338431f28bf6793b241693a2f", "type": "Client", "gender": "Female", "lastName": "Babyfive", "_rev": "2-8a753553c0e0ae4ed0257bb6d686d2ea", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Home", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "January", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:11.027", "dateCreated": "2018-03-13T13:11:18.725", "identifiers": {"ZEIR_ID": "218230-1", "OPENMRS_UUID": "11a1ecf6-7d6d-4e12-8e6f-bb3cf5a3ebb8"}, "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "relationships": {"mother": ["41d1841b-4d6c-4f06-b5e8-b55907892ee6"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(9, '{"_id": "05934ae338431f28bf6793b2416946b7", "type": "Client", "gender": "Female", "lastName": "Babysix", "_rev": "2-0684ed7a15c29c8bf479a36d8c5986c5", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gu", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "January ", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:12.257", "dateCreated": "2018-03-13T13:11:19.005", "identifiers": {"ZEIR_ID": "218231-9", "OPENMRS_UUID": "eb4b258c-7558-436c-a1fe-e91d9e12f849"}, "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "relationships": {"mother": ["7bce6b9a-e575-4cc6-b987-a12284912e84"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(10, '{"_id": "05934ae338431f28bf6793b24167817d", "type": "Client", "gender": "Male", "lastName": "Child", "_rev": "2-9de838d2e671a8d5011cedf66143b023", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Guy", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Sixth", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:03.225", "dateCreated": "2018-03-13T12:53:04.188", "identifiers": {"ZEIR_ID": "218225-1", "OPENMRS_UUID": "43397e39-0a11-4bb7-ba2d-3820436bef85"}, "baseEntityId": "28caef27-d1b3-497b-8a55-954f2f0f6e24", "relationships": {"mother": ["ab1eda08-2185-4d5f-9301-abb17d376ded"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(11, '{"_id": "05934ae338431f28bf6793b241679500", "type": "Client", "gender": "Male", "lastName": "Baby", "_rev": "2-f7de9e0a0e63129a1e4a3016539a2194", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rer", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "deathdate": "2018-02-13T03:00:00.000", "firstName": "Jan", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:04.417", "dateCreated": "2018-03-13T12:53:04.453", "identifiers": {"ZEIR_ID": "218226-9", "OPENMRS_UUID": "7a8926a9-f35a-41ba-adbf-87712333d5c2"}, "baseEntityId": "f33c71c7-a9a4-495d-8028-b6d59e4034b3", "relationships": {"mother": ["7289296d-9ec9-450e-9389-88b5b0d329a0"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(12, '{"_id": "05934ae338431f28bf6793b24167b6d1", "type": "Client", "gender": "Male", "lastName": "Babytwo", "_rev": "2-ce3c6a238b86298059c0dd792f0c0dcc", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Ty", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "Janu", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:05.652", "dateCreated": "2018-03-13T12:54:42.456", "identifiers": {"ZEIR_ID": "218227-7", "OPENMRS_UUID": "ba5d3927-414f-4796-ae1e-9b73b50a5573"}, "baseEntityId": "fe7b6350-16d2-41d0-8574-c194088705df", "relationships": {"mother": ["14715b97-f0d5-4515-813b-5698934dbf1d"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(13, '{"_id": "05934ae338431f28bf6793b24162ca7e", "type": "Client", "gender": "Male", "lastName": "Owino", "_rev": "2-5d274d303daa8ff1cd5eb5604b8e60f7", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Kilimani", "address3": "6c814e69-ed6f-4fcc-ac2c-8406508603f2"}}], "birthdate": "2017-02-13T03:00:00.000", "firstName": "George", "attributes": {"Home_Facility": "Happy Kids Clinic", "Child_Birth_Certificate": "7865", "Child_Register_Card_Number": "4567"}, "dateEdited": "2018-03-13T11:46:46.277", "dateCreated": "2018-03-13T11:42:01.573", "identifiers": {"ZEIR_ID": "218922-3", "OPENMRS_UUID": "c5780597-3d54-4298-b39f-9d38dfd14970"}, "baseEntityId": "67007c17-97bb-4732-a1b8-3a0c292b5432", "relationships": {"mother": ["14f94928-ef60-4d1c-a6be-f46b3b844268"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(14, '{"_id": "05934ae338431f28bf6793b2418380ce", "type": "Client", "gender": "Female", "lastName": "Gchf", "_rev": "2-2d194250dc94b0ed20fbb2dac28a9020", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Chf", "address3": "144cea61-2322-4a2c-8963-d99b52aa1406"}}], "birthdate": "1960-01-01T03:00:00.000", "firstName": "Gg", "attributes": {}, "dateEdited": "2018-03-14T07:53:06.606", "dateCreated": "2018-03-14T07:52:16.620", "identifiers": {"M_ZEIR_ID": "218232-7_mother", "OPENMRS_UUID": "2ca99239-ba6e-42d6-92a5-a889d2de50c0"}, "baseEntityId": "cc127350-c1cd-4c3a-99d4-4d632882f522", "birthdateApprox": false, "deathdateApprox": false}'), +(15, '{"_id": "05934ae338431f28bf6793b241839005", "type": "Client", "gender": "Female", "lastName": "Immunisedtwo", "_rev": "2-db28bfef08ea6a88fc4d387bbb83b369", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Home", "address3": "144cea61-2322-4a2c-8963-d99b52aa1406"}}], "birthdate": "2017-06-13T03:00:00.000", "firstName": "Fully", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-14T07:53:07.496", "dateCreated": "2018-03-14T07:52:16.757", "identifiers": {"ZEIR_ID": "218233-5", "OPENMRS_UUID": "02d89e05-64ad-4fa3-86d9-93b669ec02c5"}, "baseEntityId": "d4eda055-60c6-44a4-ba48-61dfe6485bea", "relationships": {"mother": ["17a1f5ed-a4cd-4427-ad9f-6471f4fc963d"]}, "birthdateApprox": false, "deathdateApprox": false}'); INSERT INTO core.client_metadata (id, client_id, document_id, base_entity_id, relational_id, server_version, openmrs_uuid, unique_id, first_name, middle_name, last_name, birth_date) VALUES (1, 1, '05934ae338431f28bf6793b24159ce5d', '287be17c-30a7-4482-8816-e2382ec502f1', '22b8570a-3207-4af7-8da7-8a1c5b84d3ff', 1520891339766, '8796f967-2f7a-40f7-8586-d63dbc81b709', '218221-0', 'Second', null, 'Child', '2018-03-01'), diff --git a/opensrp-core/src/test/resources/test-scripts/report.sql b/opensrp-core/src/test/resources/test-scripts/report.sql index b577bc975f..c7e0575cde 100644 --- a/opensrp-core/src/test/resources/test-scripts/report.sql +++ b/opensrp-core/src/test/resources/test-scripts/report.sql @@ -8,11 +8,11 @@ ALTER SEQUENCE core.report_metadata_id_seq RESTART WITH 6; --insert data INSERT INTO core.report (id, json) VALUES -(1, '{"id": "07271855-4018-497a-b180-6af01f0fa62b", "baseEntityId": "6654kk-mnj45-mmnfgd-l45645" , "type": "Report", "status": "ERROR", "version": 1503312366265, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-08-21T13:46:32.331+03:00", "locationId": "b0781dd2-e1b1-4878-8e6c-fba488eb9fa3", "providerId": "biddemo", "reportDate": "2017-06-28T01:00:00.000+03:00", "reportType": "HIA2", "identifiers": {"HIN":"1121K"}, "serverVersion": 1503312366265, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "2", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "0", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "0", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "2", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "0", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "0", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "10", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "0", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Weight below -3Z scores 24-59 months", "value": "0", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "Attendance child health 12-59 months (total)", "value": "0", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "0", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "1", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health (total)", "value": "43", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Attendance child health 12-59 months (male)", "value": "0", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Total weight below -3Z scores < five years", "value": "0", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "0", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "0", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "22", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "2", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "0", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "0", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "0", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "14", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "0", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "2", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "0", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "0", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "1", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Weight below -3Z scores 0-23 months", "value": "0", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "Total not gaining weight age < five years", "value": "0", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "21", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "0", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "0", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "10", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "0", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "0", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "1", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "Attendance child health < 12 months (total)", "value": "43", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "2", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "1", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "0", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "0", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "0", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "0", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "0", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "0", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "2", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "7073cef4-b974-4910-afa7-dd2ccadba089"}'), -(2, '{"id": "ecafd20f-c95b-4046-9355-9512e1908da4", "baseEntityId": "678343544-nhj7-jghdfgfd-mkjdkfg" ,"type": "Report", "status": "WARNING", "version": 1500056613263, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-07-17T18:38:43.492+03:00", "locationId": "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", "providerId": "biddemo", "reportDate": "2017-07-14T21:23:52.478+03:00", "reportType": "HIA2", "identifiers": {"WHO_R":"5934343"}, "serverVersion": 1500056613263, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "0", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "0", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "0", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "0", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "0", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "0", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "0", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "0", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Weight below -3Z scores 24-59 months", "value": "0", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "Attendance child health 12-59 months (total)", "value": "0", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "0", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "0", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health (total)", "value": "88", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Attendance child health 12-59 months (male)", "value": "0", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Total weight below -3Z scores < five years", "value": "0", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "0", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "0", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "54", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "0", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "0", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "0", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "0", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "0", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "0", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "0", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "0", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "0", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "0", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Weight below -3Z scores 0-23 months", "value": "0", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "Total not gaining weight age < five years", "value": "0", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "34", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "0", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "0", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "0", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "0", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "0", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "0", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "Attendance child health < 12 months (total)", "value": "88", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "0", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "0", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "0", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "0", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "0", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "0", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "0", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "0", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "0", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "1aea74ac-b737-477a-99d3-728011fbae3f"}'), -(3, '{"id": "c57ba49f-34b9-4986-9b87-69f48b1830c5", "type": "Report", "status": "WARNING", "version": 1500307579516, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-07-17T19:06:42.787+03:00", "locationId": "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", "providerId": "biddemo", "reportDate": "2017-05-01T01:00:00.000+03:00", "reportType": "HIA2", "identifiers": {"HIN":"56757L"}, "serverVersion": 1500307579516, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "0", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "0", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "0", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "0", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "0", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "0", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "0", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "0", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Weight below -3Z scores 24-59 months", "value": "0", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "Attendance child health 12-59 months (total)", "value": "0", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "0", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "0", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health (total)", "value": "4", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Attendance child health 12-59 months (male)", "value": "0", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Total weight below -3Z scores < five years", "value": "0", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "0", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "0", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "4", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "0", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "0", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "0", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "0", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "0", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "0", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "0", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "0", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "0", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "0", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Weight below -3Z scores 0-23 months", "value": "0", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "Total not gaining weight age < five years", "value": "0", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "0", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "0", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "0", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "0", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "0", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "0", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "0", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "Attendance child health < 12 months (total)", "value": "4", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "0", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "0", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "0", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "0", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "0", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "0", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "0", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "0", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "0", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "88f9fe90-1e45-46b3-8056-e932574dcbd9"}'), -(4, '{"id": "cd09a3d4-01d9-485c-a1c5-a2eb078a61be", "type": "Report", "status": "SUCCESS", "version": 1500394719661, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-07-18T19:18:41.822+03:00", "locationId": "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", "providerId": "biddemo", "reportDate": "2017-06-01T01:00:00.000+03:00", "reportType": "HIA2", "identifiers": {}, "serverVersion": 1500394719661, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "100", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "100", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "100", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "100", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "100", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "100", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "100", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "Weight below -3Z scores 24-59 months", "value": "100", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "100", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Attendance child health 12-59 months (total)", "value": "200", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "100", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "100", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health 12-59 months (male)", "value": "100", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Attendance child health (total)", "value": "400", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Total weight below -3Z scores < five years", "value": "200", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "200", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "100", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "100", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "100", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "100", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "100", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "100", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "100", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "200", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "100", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "100", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "100", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "Weight below -3Z scores 0-23 months", "value": "100", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "100", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Total not gaining weight age < five years", "value": "200", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "100", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "100", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "100", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "100", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "100", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "100", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "Attendance child health < 12 months (total)", "value": "200", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "100", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "100", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "100", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "100", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "100", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "100", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "200", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "100", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "100", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "100", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "d78a8105-f808-488a-b67a-0c4c46845194"}'), -(5, '{"id": "60ab7d5c-a051-4633-b0b3-f52b701cb261", "baseEntityId": "6654kk-mnj45-mmnfgd-l45645", "type": "Report", "status": "WARNING", "version": 1500445930478, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-07-19T09:32:41.737+03:00", "locationId": "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", "providerId": "biddemo", "reportDate": "2017-05-01T01:00:00.000+03:00", "reportType": "HIA2", "identifiers": {"HIN":"56757L"}, "serverVersion": null, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "0", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "0", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "0", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "0", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "0", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "0", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "0", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "0", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Weight below -3Z scores 24-59 months", "value": "0", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "Attendance child health 12-59 months (total)", "value": "0", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "0", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "0", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health (total)", "value": "1000000", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Attendance child health 12-59 months (male)", "value": "0", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Total weight below -3Z scores < five years", "value": "0", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "0", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "0", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "100000", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "0", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "0", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "0", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "0", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "0", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "0", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "0", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "0", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "0", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "0", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Weight below -3Z scores 0-23 months", "value": "0", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "Total not gaining weight age < five years", "value": "0", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "0", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "0", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "0", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "0", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "0", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "0", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "0", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "Attendance child health < 12 months (total)", "value": "10000", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "0", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "0", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "0", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "0", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "0", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "0", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "0", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "0", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "0", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "03b5d0b8-4f72-4415-9909-ce03b5802c75"}'); +(1, '{"_id": "07271855-4018-497a-b180-6af01f0fa62b", "baseEntityId": "6654kk-mnj45-mmnfgd-l45645" , "type": "Report", "status": "ERROR", "version": 1503312366265, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-08-21T13:46:32.331+03:00", "locationId": "b0781dd2-e1b1-4878-8e6c-fba488eb9fa3", "providerId": "biddemo", "reportDate": "2017-06-28T01:00:00.000+03:00", "reportType": "HIA2", "identifiers": {"HIN":"1121K"}, "serverVersion": 1503312366265, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "2", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "0", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "0", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "2", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "0", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "0", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "10", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "0", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Weight below -3Z scores 24-59 months", "value": "0", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "Attendance child health 12-59 months (total)", "value": "0", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "0", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "1", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health (total)", "value": "43", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Attendance child health 12-59 months (male)", "value": "0", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Total weight below -3Z scores < five years", "value": "0", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "0", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "0", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "22", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "2", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "0", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "0", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "0", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "14", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "0", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "2", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "0", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "0", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "1", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Weight below -3Z scores 0-23 months", "value": "0", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "Total not gaining weight age < five years", "value": "0", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "21", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "0", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "0", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "10", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "0", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "0", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "1", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "Attendance child health < 12 months (total)", "value": "43", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "2", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "1", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "0", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "0", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "0", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "0", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "0", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "0", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "2", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "7073cef4-b974-4910-afa7-dd2ccadba089"}'), +(2, '{"_id": "ecafd20f-c95b-4046-9355-9512e1908da4", "baseEntityId": "678343544-nhj7-jghdfgfd-mkjdkfg" ,"type": "Report", "status": "WARNING", "version": 1500056613263, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-07-17T18:38:43.492+03:00", "locationId": "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", "providerId": "biddemo", "reportDate": "2017-07-14T21:23:52.478+03:00", "reportType": "HIA2", "identifiers": {"WHO_R":"5934343"}, "serverVersion": 1500056613263, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "0", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "0", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "0", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "0", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "0", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "0", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "0", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "0", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Weight below -3Z scores 24-59 months", "value": "0", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "Attendance child health 12-59 months (total)", "value": "0", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "0", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "0", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health (total)", "value": "88", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Attendance child health 12-59 months (male)", "value": "0", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Total weight below -3Z scores < five years", "value": "0", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "0", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "0", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "54", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "0", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "0", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "0", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "0", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "0", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "0", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "0", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "0", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "0", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "0", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Weight below -3Z scores 0-23 months", "value": "0", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "Total not gaining weight age < five years", "value": "0", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "34", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "0", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "0", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "0", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "0", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "0", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "0", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "Attendance child health < 12 months (total)", "value": "88", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "0", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "0", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "0", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "0", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "0", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "0", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "0", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "0", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "0", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "1aea74ac-b737-477a-99d3-728011fbae3f"}'), +(3, '{"_id": "c57ba49f-34b9-4986-9b87-69f48b1830c5", "type": "Report", "status": "WARNING", "version": 1500307579516, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-07-17T19:06:42.787+03:00", "locationId": "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", "providerId": "biddemo", "reportDate": "2017-05-01T01:00:00.000+03:00", "reportType": "HIA2", "identifiers": {"HIN":"56757L"}, "serverVersion": 1500307579516, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "0", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "0", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "0", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "0", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "0", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "0", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "0", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "0", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Weight below -3Z scores 24-59 months", "value": "0", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "Attendance child health 12-59 months (total)", "value": "0", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "0", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "0", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health (total)", "value": "4", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Attendance child health 12-59 months (male)", "value": "0", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Total weight below -3Z scores < five years", "value": "0", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "0", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "0", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "4", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "0", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "0", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "0", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "0", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "0", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "0", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "0", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "0", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "0", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "0", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Weight below -3Z scores 0-23 months", "value": "0", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "Total not gaining weight age < five years", "value": "0", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "0", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "0", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "0", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "0", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "0", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "0", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "0", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "Attendance child health < 12 months (total)", "value": "4", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "0", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "0", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "0", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "0", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "0", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "0", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "0", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "0", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "0", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "88f9fe90-1e45-46b3-8056-e932574dcbd9"}'), +(4, '{"_id": "cd09a3d4-01d9-485c-a1c5-a2eb078a61be", "type": "Report", "status": "SUCCESS", "version": 1500394719661, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-07-18T19:18:41.822+03:00", "locationId": "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", "providerId": "biddemo", "reportDate": "2017-06-01T01:00:00.000+03:00", "reportType": "HIA2", "identifiers": {}, "serverVersion": 1500394719661, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "100", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "100", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "100", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "100", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "100", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "100", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "100", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "Weight below -3Z scores 24-59 months", "value": "100", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "100", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Attendance child health 12-59 months (total)", "value": "200", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "100", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "100", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health 12-59 months (male)", "value": "100", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Attendance child health (total)", "value": "400", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Total weight below -3Z scores < five years", "value": "200", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "200", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "100", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "100", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "100", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "100", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "100", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "100", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "100", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "200", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "100", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "100", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "100", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "Weight below -3Z scores 0-23 months", "value": "100", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "100", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Total not gaining weight age < five years", "value": "200", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "100", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "100", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "100", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "100", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "100", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "100", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "Attendance child health < 12 months (total)", "value": "200", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "100", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "100", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "100", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "100", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "100", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "100", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "200", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "100", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "100", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "100", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "d78a8105-f808-488a-b67a-0c4c46845194"}'), +(5, '{"_id": "60ab7d5c-a051-4633-b0b3-f52b701cb261", "baseEntityId": "6654kk-mnj45-mmnfgd-l45645", "type": "Report", "status": "WARNING", "version": 1500445930478, "duration": 0, "addresses": [], "attributes": {}, "dateEdited": "2017-07-19T09:32:41.737+03:00", "locationId": "9e4fc064-d8e7-4fcb-942e-cbcf6524fb24", "providerId": "biddemo", "reportDate": "2017-05-01T01:00:00.000+03:00", "reportType": "HIA2", "identifiers": {"HIN":"56757L"}, "serverVersion": null, "hia2Indicators": [{"label": "RV 2 (< 1 year) at facility", "value": "0", "dhisId": "dpKLNY9JjRR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at this facility in this month ", "indicatorCode": "CHN3-070"}, {"label": "Vitamin A supplement to infants and children 12-59 months", "value": "0", "dhisId": "JfY9vBHsyzF", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-070"}, {"label": "Child weighed 24-59 months", "value": "0", "dhisId": "sSxqU6qPyXr", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 24-59 months who attended clinic this month", "indicatorCode": "CHN2-010"}, {"label": "RV 1 (< 1 year) at facility", "value": "0", "dhisId": "ziezVvnYWj0", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at this facility in this month ", "indicatorCode": "CHN3-065"}, {"label": "Number of days fridge non-functional", "value": "0", "dhisId": "FGJcw1TCM9D", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of days during the month that vaccine storage fridge was not functioning ", "indicatorCode": "CHN3-090"}, {"label": "Attendance child health 12-59 months (female)", "value": "0", "dhisId": "ZDSUD6VHnoh", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-020"}, {"label": "PCV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-050-O"}, {"label": "OPV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-020-O"}, {"label": "IPV (< 1 year) at facility", "value": "0", "dhisId": "D2pqQ1bux6B", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at this facility in this month ", "indicatorCode": "CHN3-027"}, {"label": "OPV 3 (< 1 year) at facility ", "value": "0", "dhisId": "dqsYPg0F8DJ", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at this facility in this month ", "indicatorCode": "CHN3-025"}, {"label": "Weight below -3Z scores 24-59 months", "value": "0", "dhisId": "AzLJv6qTtPO", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is below -3Z scores", "indicatorCode": "CHN2-050"}, {"label": "Attendance child health 12-59 months (total)", "value": "0", "dhisId": "sZQXZ069Vgj", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of Total children aged 12 to 59 months who attended clinic this month", "indicatorCode": "CHN1-021"}, {"label": "OPV 0 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-010-O"}, {"label": "Not gaining weight 0-23 months", "value": "0", "dhisId": "H5cadfqRh7I", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 0-23 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-020"}, {"label": "BCG dose (< 1 year) at the facility", "value": "0", "dhisId": "ZTeQmMrVmNR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at this facility in this month ", "indicatorCode": "CHN3-005"}, {"label": "Attendance child health (total)", "value": "1000000", "dhisId": "YAY7yKAkSvq", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children < 5 who attended a clinic this month ", "indicatorCode": "CHN1-025"}, {"label": "Attendance child health 12-59 months (male)", "value": "0", "dhisId": "fl4bPFJRI5j", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged 12 to 59 months who attended a clinic this month", "indicatorCode": "CHN1-015"}, {"label": "Total weight below -3Z scores < five years", "value": "0", "dhisId": "OM9x7oS2qke", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight below -3Z scores", "indicatorCode": "CHN2-051"}, {"label": "Weight between -2Z & -3Z scores < five years", "value": "0", "dhisId": "WOZUqhR5W37", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-041"}, {"label": "Weight above 2Z scores 24-59 months", "value": "0", "dhisId": "ke26q8KPQPM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is above 2Z scores", "indicatorCode": "CHN2-060"}, {"label": "Attendance child health < 12 months (male)", "value": "100000", "dhisId": "n0uHub5ubqH", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of male children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-005"}, {"label": "Fully immunised (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080-O"}, {"label": "OPV 2 (< 1 year) at facility ", "value": "0", "dhisId": "Jbxssr389B6", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV2 dose at this facility in this month ", "indicatorCode": "CHN3-020"}, {"label": "Child weighed 0-23 months", "value": "0", "dhisId": "adkGrSGNt3L", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged 0-23 months who attended clinic this month", "indicatorCode": "CHN2-005"}, {"label": "Vitamin A supplement to infants and children 6-11 months", "value": "0", "dhisId": "DSbbltBORY3", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 6-11 months who received vitamin A at this facility in this month", "indicatorCode": "CHN2-065"}, {"label": "Deworming dose 12-59 months", "value": "0", "dhisId": "B8nBT4kGhtB", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children age 12-59 months who received a deworming dose at this facility in this month ", "indicatorCode": "CHN2-075"}, {"label": "Fully immunised (< 1 year) at facility", "value": "0", "dhisId": "dzllAar6RrI", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "\"Number of children < one year who have received the complete BCG", "indicatorCode": "CHN3-080"}, {"label": "Total weight above 2Z scores < five years", "value": "0", "dhisId": "Yi4grVdr9Q5", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age < 5 years whose weight is above 2Z scores", "indicatorCode": "CHN2-061"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at facility", "value": "0", "dhisId": "N7VEEjo8AdV", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at this facility in this month ", "indicatorCode": "CHN3-035"}, {"label": "Measles/MR 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-075-O"}, {"label": "OPV 4 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-030-O"}, {"label": "OPV 4 (< 1 year) at facility ", "value": "0", "dhisId": "poPXN7Wn3RL", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV4 dose at this facility in this month ", "indicatorCode": "CHN3-030"}, {"label": "Weight between -2Z & -3Z scores 0-23 months", "value": "0", "dhisId": "lcpx7xdVC3z", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-035"}, {"label": "OPV 0 (< 1 year) at facility ", "value": "0", "dhisId": "rwNWKJC4dIO", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV0 dose at this facility in this month ", "indicatorCode": "CHN3-010"}, {"label": "Weight below -3Z scores 0-23 months", "value": "0", "dhisId": "LpkrzZezPhP", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is below -3Z scores", "indicatorCode": "CHN2-045"}, {"label": "Total not gaining weight age < five years", "value": "0", "dhisId": "e10sC5c4pRz", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < five years who were weighed this month and did not gain >= 100g from the last weigh-in.", "indicatorCode": "CHN2-030"}, {"label": "Attendance child health < 12 months (female)", "value": "0", "dhisId": "IWwblgpMxiS", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of female children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-010"}, {"label": "PCV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-060-O"}, {"label": "RV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-070-O"}, {"label": "Not gaining weight 24-59 months", "value": "0", "dhisId": "xWDkbLq9kji", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children aged 24-59 months who were weighed this month who did not gain >= 100g of weight from the last weigh-in. ", "indicatorCode": "CHN2-025"}, {"label": "Attendance from outside catchment area", "value": "0", "dhisId": "WFxN7txijYV", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children who attended clinic and are not part of clinics catchment area", "indicatorCode": "CHN1-030"}, {"label": "IPV (< 1 year) at outreach", "value": "0", "dhisId": "RAbXk70XDMq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received IPV dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-027-O"}, {"label": "Children who received insecticide treated net", "value": "0", "dhisId": "G4vWZAJ0uz7", "category": "Vitamin A, Deworming, and ITNs", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children who received insecticide treated nets at this facility in this month ", "indicatorCode": "CHN2-080"}, {"label": "Weight between -2Z & -3Z scores 24-59 months", "value": "0", "dhisId": "hi9sRtkzimM", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 24-59 months whose weight is between -2Z and -3Z scores", "indicatorCode": "CHN2-040"}, {"label": "OPV 1 (< 1 year) at facility ", "value": "0", "dhisId": "J3Kd9wHj7mR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at this facility in this month ", "indicatorCode": "CHN3-015"}, {"label": "Attendance child health < 12 months (total)", "value": "10000", "dhisId": "C8vB7dH9ab4", "category": "Under 5 Clinic Attendance", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children aged < 12 months who attended a clinic this month.", "indicatorCode": "CHN1-011"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at facility", "value": "0", "dhisId": "R2JLWtup2XR", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at this facility in this month ", "indicatorCode": "CHN3-040"}, {"label": "RV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received RV 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-065-O"}, {"label": "PCV 1 (< 1 year) at facilty", "value": "0", "dhisId": "dPpDhpO7GpB", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 1 dose at this facility in this month ", "indicatorCode": "CHN3-050"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at facility", "value": "0", "dhisId": "ujEvTSZ0Wvn", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at this facility in this month ", "indicatorCode": "CHN3-045"}, {"label": "Measles/MR 2 (at 18 months) at facility", "value": "0", "dhisId": "sqfX5MniMIH", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at this facility in this month ", "indicatorCode": "CHN3-085"}, {"label": "BCG dose (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received BCG dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-005-O"}, {"label": "DPT-Hib-HepB 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-040-O"}, {"label": "Weight above 2Z scores 0-23 months", "value": "0", "dhisId": "gdrQ69fCF8B", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children age 0-23 months whose weight is above 2Z scores", "indicatorCode": "CHN2-055"}, {"label": "Total child weighed", "value": "0", "dhisId": "xIGHv5CY2fF", "category": "Growth Monitoring and Nutrition", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of total children weighed aged < 5 years who attended clinic this month", "indicatorCode": "CHN2-015"}, {"label": "DPT-Hib-HepB 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-035-O"}, {"label": "Measles/MR 1 (< 1 year) at facility", "value": "0", "dhisId": "zIM9ehVMkNW", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received Measles/ MR 1 dose at this facility in this month ", "indicatorCode": "CHN3-075"}, {"label": "Measles/MR 2 (at 18 months) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children at 18 months who received Measles/ MR 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-085-O"}, {"label": "PCV 3 (< 1 year) at facility", "value": "0", "dhisId": "K5XarM6QLxq", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 3 dose at this facility in this month ", "indicatorCode": "CHN3-060"}, {"label": "DPT-Hib-HepB 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received DPT-Hib+HepB 3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-045-O"}, {"label": "OPV 3 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV3 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-025-O"}, {"label": "OPV 1 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received OPV1 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-015-O"}, {"label": "PCV 2 (< 1 year) at facilty", "value": "0", "dhisId": "AU3Zp03Atnf", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at this facility in this month ", "indicatorCode": "CHN3-055"}, {"label": "PCV 2 (< 1 year) at outreach", "value": "0", "dhisId": "", "category": "Immunisation", "updatedAt": "1970-01-01T02:00:02.017+0200", "providerId": "biddemo", "description": "Number of children < one year who received PCV 2 dose at outreach conducted by this facility in this month ", "indicatorCode": "CHN3-055-O"}], "formSubmissionId": "03b5d0b8-4f72-4415-9909-ce03b5802c75"}'); INSERT INTO core.report_metadata (id, report_id, document_id, form_submission_id, base_entity_id, server_version, report_type, report_date, provider_id, location_id, team, team_id, date_edited) VALUES (1, 1, '07271855-4018-497a-b180-6af01f0fa62b', '7073cef4-b974-4910-afa7-dd2ccadba089', '6654kk-mnj45-mmnfgd-l45645', 1503312366265, 'HIA2', '2017-06-28', 'biddemo', 'b0781dd2-e1b1-4878-8e6c-fba488eb9fa3', null, null, '2017-08-21'), diff --git a/opensrp-core/src/test/resources/test-scripts/stock.sql b/opensrp-core/src/test/resources/test-scripts/stock.sql index 28c01a95a6..61c159f267 100644 --- a/opensrp-core/src/test/resources/test-scripts/stock.sql +++ b/opensrp-core/src/test/resources/test-scripts/stock.sql @@ -7,21 +7,21 @@ ALTER SEQUENCE core.stock_metadata_id_seq RESTART WITH 16; --insert data INSERT INTO core.stock (id, json) VALUES -(1, '{"id": "05934ae338431f28bf6793b24181ea5e", "type": "Stock", "value": -3, "to_from": "C/C", "version": 1521003030510, "revision": "1-4f090916632e2ae10f1ef7f972aaf6d2", "identifier": 1, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.515+03:00", "date_created": 1520892000000, "date_updated": 1520939303991, "serverVersion": 1521003030510, "vaccine_type_id": "2", "transaction_type": "issued"}'), -(2, '{"id": "05934ae338431f28bf6793b241974356", "type": "Stock", "value": 10, "to_from": "DHO", "version": 1521007341010, "revision": "1-f24ec853ded69d25028985069960f71a", "identifier": 2, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.587+03:00", "date_created": 1518559200000, "date_updated": 1521007053945, "serverVersion": 1521007341010, "vaccine_type_id": "1", "transaction_type": "received"}'), -(3, '{"id": "05934ae338431f28bf6793b241974f0e", "type": "Stock", "value": -1, "to_from": "C/C", "version": 1521007341010, "revision": "1-6e7a4b9ee84403f5fa25c5d83269149b", "identifier": 3, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.633+03:00", "date_created": 1520892000000, "date_updated": 1521007153528, "serverVersion": 1521007341010, "vaccine_type_id": "1", "transaction_type": "issued"}'), -(4, '{"id": "05934ae338431f28bf6793b241975c6c", "type": "Stock", "value": 12, "to_from": "Physical_recount", "version": 1521007342323, "revision": "1-a57ae3bf0a9d652f00dc33c23e2c7a52", "identifier": 4, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.655+03:00", "date_created": 1518559200000, "date_updated": 1521007339163, "serverVersion": 1521007342323, "vaccine_type_id": "2", "transaction_type": "loss_adjustment"}'), -(5, '{"id": "05934ae338431f28bf6793b241978ad9", "type": "Stock", "value": 20, "to_from": "DHO", "version": 1521009418783, "revision": "1-1421e42faf02e9fe5a65279ee3b199c3", "identifier": 5, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.672+03:00", "date_created": 1521000000000, "date_updated": 1521009346585, "serverVersion": 1521009418783, "vaccine_type_id": "1", "transaction_type": "received"}'), -(6, '{"id": "05934ae338431f28bf6793b2419a4bd9", "type": "Stock", "value": 20, "to_from": "DHO", "version": 1521022620903, "revision": "1-aba3734a871fb2b88deab7bb7e7f3a60", "identifier": 6, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.683+03:00", "date_created": 1519855200000, "date_updated": 1521022504878, "serverVersion": 1521022620903, "vaccine_type_id": "1", "transaction_type": "received"}'), -(7, '{"id": "05934ae338431f28bf6793b2419a590b", "type": "Stock", "value": -27, "to_from": "C/C", "version": 1521022620903, "revision": "1-5f6fdd394f6c34143f07798dd7fe74b0", "identifier": 7, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.689+03:00", "date_created": 1520632800000, "date_updated": 1521022571660, "serverVersion": 1521022620903, "vaccine_type_id": "1", "transaction_type": "issued"}'), -(8, '{"id": "05934ae338431f28bf6793b2419a606f", "type": "Stock", "value": 1, "to_from": "Physical_recount", "version": 1521023046990, "revision": "1-872a0dd1e50ea9437786f69fad2d182a", "identifier": 8, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.693+03:00", "date_created": 1518559200000, "date_updated": 1521022962706, "serverVersion": 1521023046990, "vaccine_type_id": "1", "transaction_type": "loss_adjustment"}'), -(9, '{"id": "05934ae338431f28bf6793b2419a6dc7", "type": "Stock", "value": 10, "to_from": "DHO", "version": 1521030501655, "revision": "1-a3846a988777e252c6f9aba383300b78", "identifier": 9, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.705+03:00", "date_created": 1518559200000, "date_updated": 1521027411881, "serverVersion": 1521030501655, "vaccine_type_id": "2", "transaction_type": "received"}'), -(10, '{"id": "05934ae338431f28bf6793b2419a72da", "type": "Stock", "value": -19, "to_from": "C/C", "version": 1521030501655, "revision": "1-42168381f27525e3c9022fbc46358a4b", "identifier": 10, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.735+03:00", "date_created": 1519164000000, "date_updated": 1521027466540, "serverVersion": 1521030501655, "vaccine_type_id": "2", "transaction_type": "issued"}'), -(11, '{"id": "05934ae338431f28bf6793b241b2daa6", "type": "Stock", "value": -7, "to_from": "C/C", "version": 1521074546344, "revision": "1-65d5197a96e17a8febf61324fbe5d454", "identifier": 11, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.755+03:00", "date_created": 1521064800000, "date_updated": 1521074321594, "serverVersion": 1521074546344, "vaccine_type_id": "1", "transaction_type": "issued"}'), -(12, '{"id": "05934ae338431f28bf6793b241b2df09", "type": "Stock", "value": -2, "to_from": "Physical_recount", "version": 1521074546344, "revision": "1-4069d28441029c88717f71d622eab412", "identifier": 12, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.771+03:00", "date_created": 1521064800000, "date_updated": 1521074352741, "serverVersion": 1521074546344, "vaccine_type_id": "1", "transaction_type": "loss_adjustment"}'), -(13, '{"id": "05934ae338431f28bf6793b241b3c445", "type": "Stock", "value": -6, "to_from": "C/C", "version": 1521112141441, "revision": "1-509d0919039dc1b0f9180aa187a87b75", "identifier": 13, "providerid": "biddemo1", "dateCreated": "2018-04-04T13:55:43.787+03:00", "date_created": 1520632800000, "date_updated": 1521111867821, "serverVersion": 1521112141441, "vaccine_type_id": "1", "transaction_type": "issued"}'), -(14, '{"id": "05934ae338431f28bf6793b241b3c6f9", "type": "Stock", "value": 2, "to_from": "DHO", "version": 1521112141441, "revision": "1-7e45403108a172bd63486e35ec99ce79", "identifier": 14, "providerid": "biddemo1", "dateCreated": "2018-04-04T13:55:43.804+03:00", "date_created": 1518645600000, "date_updated": 1521111912719, "serverVersion": 1521112141441, "vaccine_type_id": "1", "transaction_type": "received"}'), -(15, '{"id": "05934ae338431f28bf6793b241b3cd6f", "type": "Stock", "value": -55, "to_from": "C/C", "version": 1521112141441, "revision": "1-83e0bc2abeda38e5aa282d1f8d75e6bc", "identifier": 15, "providerid": "biddemo1", "dateCreated": "2018-04-04T13:55:43.809+03:00", "date_created": 1520460000000, "date_updated": 1521111967331, "serverVersion": 1521112141441, "vaccine_type_id": "1", "transaction_type": "issued"}'); +(1, '{"_id": "05934ae338431f28bf6793b24181ea5e", "type": "Stock", "value": -3, "to_from": "C/C", "version": 1521003030510, "_rev": "1-4f090916632e2ae10f1ef7f972aaf6d2", "identifier": 1, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.515+03:00", "date_created": 1520892000000, "date_updated": 1520939303991, "serverVersion": 1521003030510, "vaccine_type_id": "2", "transaction_type": "issued"}'), +(2, '{"_id": "05934ae338431f28bf6793b241974356", "type": "Stock", "value": 10, "to_from": "DHO", "version": 1521007341010, "_rev": "1-f24ec853ded69d25028985069960f71a", "identifier": 2, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.587+03:00", "date_created": 1518559200000, "date_updated": 1521007053945, "serverVersion": 1521007341010, "vaccine_type_id": "1", "transaction_type": "received"}'), +(3, '{"_id": "05934ae338431f28bf6793b241974f0e", "type": "Stock", "value": -1, "to_from": "C/C", "version": 1521007341010, "_rev": "1-6e7a4b9ee84403f5fa25c5d83269149b", "identifier": 3, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.633+03:00", "date_created": 1520892000000, "date_updated": 1521007153528, "serverVersion": 1521007341010, "vaccine_type_id": "1", "transaction_type": "issued"}'), +(4, '{"_id": "05934ae338431f28bf6793b241975c6c", "type": "Stock", "value": 12, "to_from": "Physical_recount", "version": 1521007342323, "_rev": "1-a57ae3bf0a9d652f00dc33c23e2c7a52", "identifier": 4, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.655+03:00", "date_created": 1518559200000, "date_updated": 1521007339163, "serverVersion": 1521007342323, "vaccine_type_id": "2", "transaction_type": "loss_adjustment"}'), +(5, '{"_id": "05934ae338431f28bf6793b241978ad9", "type": "Stock", "value": 20, "to_from": "DHO", "version": 1521009418783, "_rev": "1-1421e42faf02e9fe5a65279ee3b199c3", "identifier": 5, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.672+03:00", "date_created": 1521000000000, "date_updated": 1521009346585, "serverVersion": 1521009418783, "vaccine_type_id": "1", "transaction_type": "received"}'), +(6, '{"_id": "05934ae338431f28bf6793b2419a4bd9", "type": "Stock", "value": 20, "to_from": "DHO", "version": 1521022620903, "_rev": "1-aba3734a871fb2b88deab7bb7e7f3a60", "identifier": 6, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.683+03:00", "date_created": 1519855200000, "date_updated": 1521022504878, "serverVersion": 1521022620903, "vaccine_type_id": "1", "transaction_type": "received"}'), +(7, '{"_id": "05934ae338431f28bf6793b2419a590b", "type": "Stock", "value": -27, "to_from": "C/C", "version": 1521022620903, "_rev": "1-5f6fdd394f6c34143f07798dd7fe74b0", "identifier": 7, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.689+03:00", "date_created": 1520632800000, "date_updated": 1521022571660, "serverVersion": 1521022620903, "vaccine_type_id": "1", "transaction_type": "issued"}'), +(8, '{"_id": "05934ae338431f28bf6793b2419a606f", "type": "Stock", "value": 1, "to_from": "Physical_recount", "version": 1521023046990, "_rev": "1-872a0dd1e50ea9437786f69fad2d182a", "identifier": 8, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.693+03:00", "date_created": 1518559200000, "date_updated": 1521022962706, "serverVersion": 1521023046990, "vaccine_type_id": "1", "transaction_type": "loss_adjustment"}'), +(9, '{"_id": "05934ae338431f28bf6793b2419a6dc7", "type": "Stock", "value": 10, "to_from": "DHO", "version": 1521030501655, "_rev": "1-a3846a988777e252c6f9aba383300b78", "identifier": 9, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.705+03:00", "date_created": 1518559200000, "date_updated": 1521027411881, "serverVersion": 1521030501655, "vaccine_type_id": "2", "transaction_type": "received"}'), +(10, '{"_id": "05934ae338431f28bf6793b2419a72da", "type": "Stock", "value": -19, "to_from": "C/C", "version": 1521030501655, "_rev": "1-42168381f27525e3c9022fbc46358a4b", "identifier": 10, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.735+03:00", "date_created": 1519164000000, "date_updated": 1521027466540, "serverVersion": 1521030501655, "vaccine_type_id": "2", "transaction_type": "issued"}'), +(11, '{"_id": "05934ae338431f28bf6793b241b2daa6", "type": "Stock", "value": -7, "to_from": "C/C", "version": 1521074546344, "_rev": "1-65d5197a96e17a8febf61324fbe5d454", "identifier": 11, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.755+03:00", "date_created": 1521064800000, "date_updated": 1521074321594, "serverVersion": 1521074546344, "vaccine_type_id": "1", "transaction_type": "issued"}'), +(12, '{"_id": "05934ae338431f28bf6793b241b2df09", "type": "Stock", "value": -2, "to_from": "Physical_recount", "version": 1521074546344, "_rev": "1-4069d28441029c88717f71d622eab412", "identifier": 12, "providerid": "biddemo", "dateCreated": "2018-04-04T13:55:43.771+03:00", "date_created": 1521064800000, "date_updated": 1521074352741, "serverVersion": 1521074546344, "vaccine_type_id": "1", "transaction_type": "loss_adjustment"}'), +(13, '{"_id": "05934ae338431f28bf6793b241b3c445", "type": "Stock", "value": -6, "to_from": "C/C", "version": 1521112141441, "_rev": "1-509d0919039dc1b0f9180aa187a87b75", "identifier": 13, "providerid": "biddemo1", "dateCreated": "2018-04-04T13:55:43.787+03:00", "date_created": 1520632800000, "date_updated": 1521111867821, "serverVersion": 1521112141441, "vaccine_type_id": "1", "transaction_type": "issued"}'), +(14, '{"_id": "05934ae338431f28bf6793b241b3c6f9", "type": "Stock", "value": 2, "to_from": "DHO", "version": 1521112141441, "_rev": "1-7e45403108a172bd63486e35ec99ce79", "identifier": 14, "providerid": "biddemo1", "dateCreated": "2018-04-04T13:55:43.804+03:00", "date_created": 1518645600000, "date_updated": 1521111912719, "serverVersion": 1521112141441, "vaccine_type_id": "1", "transaction_type": "received"}'), +(15, '{"_id": "05934ae338431f28bf6793b241b3cd6f", "type": "Stock", "value": -55, "to_from": "C/C", "version": 1521112141441, "_rev": "1-83e0bc2abeda38e5aa282d1f8d75e6bc", "identifier": 15, "providerid": "biddemo1", "dateCreated": "2018-04-04T13:55:43.809+03:00", "date_created": 1520460000000, "date_updated": 1521111967331, "serverVersion": 1521112141441, "vaccine_type_id": "1", "transaction_type": "issued"}'); INSERT INTO core.stock_metadata (id, stock_id, document_id, server_version, provider_id, location_id, team, team_id) VALUES From 185bfe087dc292dd87235cab8caab4b2aa003d7f Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Wed, 11 Apr 2018 12:45:06 +0300 Subject: [PATCH 106/133] Add flag to make search missing clients optional during sync --- assets/config/opensrp.properties | 5 ++++- .../repository/postgres/EventsRepositoryImpl.java | 1 - .../postgres/handler/BaseTypeHandler.java | 12 ++++-------- .../java/org/opensrp/web/rest/EventResource.java | 14 +++++++++----- 4 files changed, 17 insertions(+), 15 deletions(-) diff --git a/assets/config/opensrp.properties b/assets/config/opensrp.properties index aebad7f8c1..221fd2c600 100644 --- a/assets/config/opensrp.properties +++ b/assets/config/opensrp.properties @@ -7,7 +7,7 @@ js.directory.name=/ziggy form.directory.name=/form multimedia.directory.name=/opt/multimedia form.download.files=form.xml, model.xml, form_definition.json -multimedia.directory.name=../multimedia/opensrp +#multimedia.directory.name=../multimedia/opensrp qrcodes.directory.name=/home/opensrp/qr-codes/ schedule.config.path=/schedules/schedule-config.xls @@ -88,3 +88,6 @@ file.maxUploadSize=20971520 #opnenSRP Site url opensrp.site.url="" + +#search for missing clients +opensrp.sync.search.missing.client=false diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java index 83fc5813aa..75c91cd07e 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java @@ -431,7 +431,6 @@ private List convert(List events) { List convertedEvents = new ArrayList<>(); for (org.opensrp.domain.postgres.Event event : events) { Event convertedEvent = convert(event); - logger.info(convertedEvent.getId() + ", rev: " + convertedEvent.getRevision()); if (convertedEvent != null) { convertedEvents.add(convertedEvent); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/BaseTypeHandler.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/BaseTypeHandler.java index e1359f5247..4c5f016729 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/BaseTypeHandler.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/handler/BaseTypeHandler.java @@ -9,16 +9,12 @@ public class BaseTypeHandler { - public static ObjectMapper mapper; + public static final ObjectMapper mapper = new StdObjectMapperFactory().createObjectMapper();; protected BaseTypeHandler() { - if (mapper == null) { - mapper = new StdObjectMapperFactory().createObjectMapper(); - SimpleModule dateTimeModule = new SimpleModule("DateTimeModule", new Version(0, 0, 0, null)); - dateTimeModule.addDeserializer(DateTime.class, new DateTimeDeserializer()); - mapper.registerModule(dateTimeModule); - } - + SimpleModule dateTimeModule = new SimpleModule("DateTimeModule", new Version(0, 0, 0, null)); + dateTimeModule.addDeserializer(DateTime.class, new DateTimeDeserializer()); + mapper.registerModule(dateTimeModule); } } diff --git a/opensrp-web/src/main/java/org/opensrp/web/rest/EventResource.java b/opensrp-web/src/main/java/org/opensrp/web/rest/EventResource.java index 14dd5253a8..c28ffdf113 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/rest/EventResource.java +++ b/opensrp-web/src/main/java/org/opensrp/web/rest/EventResource.java @@ -39,6 +39,7 @@ import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.stereotype.Controller; @@ -66,6 +67,9 @@ public class EventResource extends RestResource { Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") .registerTypeAdapter(DateTime.class, new DateTimeTypeConverter()).create(); + @Value("#{opensrp['opensrp.sync.search.missing.client']}") + private boolean searchMissingClients; + @Autowired public EventResource(ClientService clientService, EventService eventService) { this.clientService = clientService; @@ -114,8 +118,7 @@ protected ResponseEntity sync(HttpServletRequest request) { List events = new ArrayList(); List clientIds = new ArrayList(); List clients = new ArrayList(); - if (team != null || providerId != null || locationId != null || baseEntityId != null) { - + if (team != null || providerId != null || locationId != null || baseEntityId != null) { long startTime = System.currentTimeMillis(); EventSearchBean eventSearchBean = new EventSearchBean(); eventSearchBean.setTeam(team); @@ -125,7 +128,7 @@ protected ResponseEntity sync(HttpServletRequest request) { eventSearchBean.setBaseEntityId(baseEntityId); eventSearchBean.setServerVersion(lastSyncedServerVersion); events = eventService.findEvents(eventSearchBean, BaseEntity.SERVER_VERSIOIN, "asc", limit); - logger.info("fetching events took: " + (System.currentTimeMillis() - startTime) / 1000); + logger.info("fetching events took: " + (System.currentTimeMillis() - startTime)); if (!events.isEmpty()) { for (Event event : events) { if (event.getBaseEntityId() != null && !event.getBaseEntityId().isEmpty() @@ -138,7 +141,7 @@ protected ResponseEntity sync(HttpServletRequest request) { : clientIds.size(); clients.addAll(clientService.findByFieldValue(BASE_ENTITY_ID, clientIds.subList(i, end))); } - logger.info("fetching clients took: " + (System.currentTimeMillis() - startTime) / 1000); + logger.info("fetching clients took: " + (System.currentTimeMillis() - startTime)); List foundClientIds = new ArrayList<>(); for (Client client : clients) { @@ -155,7 +158,8 @@ protected ResponseEntity sync(HttpServletRequest request) { } } - logger.info("fetching missing clients took: " + (System.currentTimeMillis() - startTime) / 1000); + + logger.info("fetching missing clients took: " + (System.currentTimeMillis() - startTime)); } } From 71257da7c1f23a5b92346dd24bab72acecd51010 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Wed, 11 Apr 2018 16:56:21 +0300 Subject: [PATCH 107/133] cast alert is_active to boolean --- assets/migrations/data_migration_scripts/migrate_alerts.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/migrations/data_migration_scripts/migrate_alerts.sql b/assets/migrations/data_migration_scripts/migrate_alerts.sql index b610d33b10..340654bad8 100644 --- a/assets/migrations/data_migration_scripts/migrate_alerts.sql +++ b/assets/migrations/data_migration_scripts/migrate_alerts.sql @@ -18,6 +18,6 @@ select (select id from core.alert where json->>'_id'=doc->>'_id') alert_id,doc-> doc->>'entityId' as base_entity_id, (doc->>'timeStamp')::BIGINT as server_version,doc->>'providerId' as provider_id,doc->>'locationId' as location_id, doc->>'team' as team, doc->>'teamId' as team_id, -doc->>'isActive' as is_active, doc->>'triggerName' as trigger_name +(doc->>'isActive')::bool as is_active, doc->>'triggerName' as trigger_name from couchdb where doc->>'type'='Alert'; \ No newline at end of file From e9c7be63628efd416edf7724bc7a0213053c7ab5 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Wed, 11 Apr 2018 17:31:35 +0300 Subject: [PATCH 108/133] unique id to be ZEIR ID or Mother ZEIR ID --- assets/migrations/data_migration_scripts/migrate_clients.sql | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/assets/migrations/data_migration_scripts/migrate_clients.sql b/assets/migrations/data_migration_scripts/migrate_clients.sql index e42b838128..86c8038986 100644 --- a/assets/migrations/data_migration_scripts/migrate_clients.sql +++ b/assets/migrations/data_migration_scripts/migrate_clients.sql @@ -16,7 +16,8 @@ openmrs_uuid, unique_id, first_name, middle_name, last_name, birth_date, date_de select (select id from core.client where json->>'_id'=doc->>'_id') as client_id,doc->>'_id' document_id, doc->>'baseEntityId' as base_entity_id, doc->'relationships'->'mother'->>0 as relational_id,(doc->>'serverVersion')::BIGINT as server_version, -doc->'identifiers'->>'OPENMRS_UUID' as openmrs_uuid,doc->'identifiers'->>'ZEIR_ID' as unique_id, +doc->'identifiers'->>'OPENMRS_UUID' as openmrs_uuid, +coalesce(doc->'identifiers'->>'ZEIR_ID',doc->'identifiers'->>'M_ZEIR_ID') unique_id, doc->>'firstName' as first_name, doc->>'MiddleName' as middle_name, doc->>'lastName' as last_name, (doc->>'birthdate')::date as birth_date, (doc->>'dateVoided')::TIMESTAMP as date_deleted from couchdb From 9f16ca2df7d80fcac8673fa75f393fe2c29883b2 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 12 Apr 2018 11:32:19 +0300 Subject: [PATCH 109/133] Unit for deleting event and clients using date deleted flag --- .../postgres/ClientsRepositoryTest.java | 32 +++-- .../postgres/EventsRepositoryTest.java | 125 ++++++++++++++++-- 2 files changed, 139 insertions(+), 18 deletions(-) diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java index ee21d99a35..584d1119f3 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ClientsRepositoryTest.java @@ -67,6 +67,13 @@ public void testAdd() { assertEquals("mbangwa", client.getLastName()); assertEquals("233864-8", client.getIdentifier("ZEIR_ID")); + //test if a client with voided date add client as deleted + client = new Client("f67823b0-4a35-93fc-bb00def74e2f").withBirthdate(new DateTime("2017-03-31"), true) + .withGender("Male").withFirstName("Test").withLastName("Deleted"); + client.withDateVoided(new DateTime()); + clientsRepository.add(client); + assertNull(clientsRepository.findByBaseEntityId(client.getBaseEntityId())); + } @Test @@ -81,6 +88,11 @@ public void testUpdate() { assertEquals("Hummel", updatedClient.getFirstName()); assertEquals("Basialis", updatedClient.getLastName()); assertEquals("09876-98", client.getIdentifier("ZEIR_ID")); + + //test update with voided date deletes client + updatedClient.setDateVoided(new DateTime()); + clientsRepository.update(updatedClient); + assertNull(clientsRepository.get(updatedClient.getId())); } @Test @@ -91,6 +103,7 @@ public void testGetAll() { List clients = clientsRepository.getAll(); + //test deleted clients assertEquals(14, clients.size()); for (Client client : clients) assertNotEquals("05934ae338431f28bf6793b24164cbd9", client.getId()); @@ -145,6 +158,12 @@ public void testFindAllClients() { @Test public void testFindAllByIdentifier() { + assertTrue(clientsRepository.findAllByIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "ab91df5d-e433-40f3-b44f-427b73ca") + .isEmpty()); + + assertTrue( + clientsRepository.findAllByIdentifier("identifier_type", "ab91df5d-e433-40f3-b44f-427b73c9ae2a").isEmpty()); + List clients = clientsRepository.findAllByIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "ab91df5d-e433-40f3-b44f-427b73c9ae2a"); @@ -158,11 +177,6 @@ public void testFindAllByIdentifier() { assertTrue(clientsRepository .findAllByIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "ab91df5d-e433-40f3-b44f-427b73c9ae2a").isEmpty()); - assertTrue(clientsRepository.findAllByIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "ab91df5d-e433-40f3-b44f-427b73ca") - .isEmpty()); - - assertTrue( - clientsRepository.findAllByIdentifier("identifier_type", "ab91df5d-e433-40f3-b44f-427b73c9ae2a").isEmpty()); } @Test @@ -247,13 +261,13 @@ public void testFindByRelationshipId() { assertEquals("cf58894b-71c6-41e0-a977-7283f2411cd5", client.getIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE)); assertEquals("2018-03-01", client.getBirthdate().toLocalDate().toString()); - //test deleted clients - clientsRepository.safeRemove(client); - assertTrue(clientsRepository.findByRelationshipId("mother", "3abdb25a-f151-4a95-9311-bd30bf935085").isEmpty()); - assertTrue(clientsRepository.findByRelationshipId("father", "0154839f-8766-4eda-b729-89067c7a8c5d").isEmpty()); assertTrue(clientsRepository.findByRelationshipId("mother", "0154839f-4eda-b729-89067c7a8c5d").isEmpty()); + + //test deleted clients + clientsRepository.safeRemove(client); + assertTrue(clientsRepository.findByRelationshipId("mother", "3abdb25a-f151-4a95-9311-bd30bf935085").isEmpty()); } @Test diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java index 5b1d586f10..6624e4f67b 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java @@ -43,6 +43,10 @@ public void testGet() { //find non existent event assertNull(eventsRepository.get("05934ae338431f28bf4234gvnbvvh")); assertNull(eventsRepository.get(null)); + + //test results with deleted event + eventsRepository.safeRemove(event); + assertNull(eventsRepository.get(event.getId())); } @Test @@ -50,11 +54,14 @@ public void testGetAll() { List events = eventsRepository.getAll(); assertEquals(15, events.size()); - eventsRepository.safeRemove(eventsRepository.findById("05934ae338431f28bf6793b2419c319a")); + //test with deleted event + Event event = eventsRepository.findById("05934ae338431f28bf6793b2419c319a"); + eventsRepository.safeRemove(event); events = eventsRepository.getAll(); assertEquals(14, events.size()); - for (Event event : events) - assertNotEquals("05934ae338431f28bf6793b2419c319a", event.getId()); + for (Event e : events) + assertNotEquals("05934ae338431f28bf6793b2419c319a", e.getId()); + } @Test @@ -64,6 +71,10 @@ public void testFindAllByIdentifier() { assertEquals(1, events.size()); assertEquals("d59504cc-09ef-4d09-9dc3-8f7eb65882fd", events.get(0).getFormSubmissionId()); assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); + + //test with deleted event + eventsRepository.safeRemove(events.get(0)); + assertTrue(eventsRepository.findAllByIdentifier("06c8644b-b560-45fd-9af5-b6b1484e3504").isEmpty()); } @Test @@ -75,6 +86,10 @@ public void testFindAllByIdentifierAndType() { assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); assertTrue(eventsRepository.findAllByIdentifier("OPENMRS", "06c8644b-b560-45fd-9af5-b6b1484e3504").isEmpty()); + + //test with deleted event + eventsRepository.safeRemove(events.get(0)); + assertTrue(eventsRepository.findAllByIdentifier("OPENMRS_UUID", "06c8644b-b560-45fd-9af5-b6b1484e3504").isEmpty()); } @Test @@ -86,6 +101,10 @@ public void testFindById() { //find non existent event assertNull(eventsRepository.findById("05934ae338431f28bf4234gvnbvvh")); assertNull(eventsRepository.findById(null)); + + //test with deleted event + eventsRepository.safeRemove(event); + assertNull(eventsRepository.findById("05934ae338431f28bf6793b2419c319a")); } @Test @@ -97,6 +116,10 @@ public void testFindByFormSubmissionId() { //find non existent event assertNull(eventsRepository.findByFormSubmissionId("05934ae338431f28bf4234gvnbvvh")); assertNull(eventsRepository.findByFormSubmissionId(null)); + + //test with deleted event + eventsRepository.safeRemove(event); + assertNull(eventsRepository.findByFormSubmissionId("31c4a45a-09f4-4b01-abe8-a87526827df6")); } @Test @@ -111,6 +134,10 @@ public void testFindByBaseEntityId() { assertEquals("New Woman Registration", events.get(0).getEventType()); //non-existent records assertTrue(eventsRepository.findByBaseEntityId("05934ae338431f28bf4234gvnbvvh").isEmpty()); + + //test with deleted event + eventsRepository.safeRemove(events.get(0)); + assertTrue(eventsRepository.findByBaseEntityId("43930c23-c787-4ddb-ab76-770f77e7b17d").isEmpty()); } @Test @@ -126,6 +153,11 @@ public void testFindByBaseEntityAndFormSubmissionId() { assertEquals("New Woman Registration", event.getEventType()); //non-existent records assertNull(eventsRepository.findByBaseEntityAndFormSubmissionId("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "34354")); + + //test with deleted event + eventsRepository.safeRemove(event); + assertNull(eventsRepository.findByBaseEntityAndFormSubmissionId("43930c23-c787-4ddb-ab76-770f77e7b17d", + "6b3243e9-3d45-495c-af69-f012061def01")); } @Test @@ -142,6 +174,11 @@ public void testFindByBaseEntityAndType() { assertTrue( eventsRepository.findByBaseEntityAndType("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "Growth Monitoring").isEmpty()); assertTrue(eventsRepository.findByBaseEntityAndType("58b33379", "Vaccination").isEmpty()); + + //test with deleted event + eventsRepository.safeRemove(events.get(0)); + assertTrue(eventsRepository.findByBaseEntityAndType("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "Birth Registration") + .isEmpty()); } @Test @@ -204,6 +241,11 @@ public void testFindEvents() { assertTrue(event.getDateEdited().equals(editFrom) || event.getDateEdited().isAfter(editFrom)); assertTrue(event.getDateEdited().equals(editTo) || event.getDateEdited().isBefore(editTo)); } + + //test with deleted event + for (Event event : events) + eventsRepository.safeRemove(event); + assertTrue(eventsRepository.findEvents(eventSearchBean).isEmpty()); } @Test(expected = IllegalArgumentException.class) @@ -214,6 +256,10 @@ public void testFindEventsByDynamicQuery() { @Test public void testFindByServerVersion() { assertEquals(15, eventsRepository.findByServerVersion(0).size()); + + //missing data + assertTrue(eventsRepository.findByServerVersion(1521469045597l).isEmpty()); + List events = eventsRepository.findByServerVersion(1521469045587l); assertEquals(3, events.size()); List expectedIds = Arrays.asList("05934ae338431f28bf6793b241780bac", "05934ae338431f28bf6793b241781149", @@ -223,7 +269,10 @@ public void testFindByServerVersion() { assertTrue(expectedIds.contains(event.getId())); } - assertTrue(eventsRepository.findByServerVersion(1521469045597l).isEmpty()); + //test with deleted event + for (Event event : events) + eventsRepository.safeRemove(event); + assertTrue(eventsRepository.findByServerVersion(1521469045587l).isEmpty()); } @Test @@ -232,6 +281,10 @@ public void testNotInOpenMRSByServerVersion() { assertEquals(7, eventsRepository.notInOpenMRSByServerVersion(0, cal).size()); cal.setTimeInMillis(1521469045589l); + + //test missing data + assertTrue(eventsRepository.notInOpenMRSByServerVersion(1521469045597l, cal).isEmpty()); + List events = eventsRepository.notInOpenMRSByServerVersion(1521469045588l, cal); assertEquals(2, events.size()); @@ -241,7 +294,11 @@ public void testNotInOpenMRSByServerVersion() { assertTrue(expectedIds.contains(event.getId())); } - assertTrue(eventsRepository.notInOpenMRSByServerVersion(1521469045597l, cal).isEmpty()); + //test with deleted event + for (Event event : events) + eventsRepository.safeRemove(event); + assertTrue(eventsRepository.notInOpenMRSByServerVersion(1521469045588l, cal).isEmpty()); + } @Test @@ -249,6 +306,8 @@ public void testNotInOpenMRSByServerVersionAndType() { Calendar cal = Calendar.getInstance(); assertEquals(4, eventsRepository.notInOpenMRSByServerVersionAndType("Growth Monitoring", 0, cal).size()); + //missing data + assertTrue(eventsRepository.notInOpenMRSByServerVersion(1521469045597l, cal).isEmpty()); cal.setTimeInMillis(1521469045589l); List events = eventsRepository.notInOpenMRSByServerVersionAndType("Growth Monitoring", 1521469045588l, cal); List expectedIds = Arrays.asList("05934ae338431f28bf6793b241780bac", "05934ae338431f28bf6793b241781149"); @@ -259,7 +318,11 @@ public void testNotInOpenMRSByServerVersionAndType() { assertEquals("Growth Monitoring", event.getEventType()); } - assertTrue(eventsRepository.notInOpenMRSByServerVersion(1521469045597l, cal).isEmpty()); + //test with deleted event + for (Event event : events) + eventsRepository.safeRemove(event); + assertTrue(eventsRepository.notInOpenMRSByServerVersionAndType("Growth Monitoring", 1521469045588l, cal).isEmpty()); + } @Test @@ -296,11 +359,23 @@ public void testFindByClientAndConceptAndDate() { assertTrue(events.get(0).getDateCreated().equals(new DateTime("2018-03-19")) || events.get(0).getDateCreated().isAfter(new DateTime("2018-03-19"))); + //test with deleted event + eventsRepository.safeRemove(events.get(0)); + assertTrue(eventsRepository.findByClientAndConceptAndDate("58b33379-dab2-4f5c-8f09-6d2bd63023d8", + "163531AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "Happy Kids Clinic", "2018-03-19", new DateTime().toString("yyyy-MM-dd")) + .isEmpty()); + } @Test public void testFindByBaseEntityIdAndConceptParentCode() { + //missing data List events = eventsRepository.findByBaseEntityIdAndConceptParentCode("58b33379-dab2-4f5c-8f09-6d2bd63023d8", + "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); + + assertTrue(events.isEmpty()); + + events = eventsRepository.findByBaseEntityIdAndConceptParentCode("58b33379-dab2-4f5c-8f09-6d2bd63023d8", "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "783AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); assertEquals(2, events.size()); @@ -319,10 +394,11 @@ public void testFindByBaseEntityIdAndConceptParentCode() { } assertTrue(found); - events = eventsRepository.findByBaseEntityIdAndConceptParentCode("58b33379-dab2-4f5c-8f09-6d2bd63023d8", - "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA"); + //test with deleted event + eventsRepository.safeRemove(events.get(0)); + assertTrue(eventsRepository.findByBaseEntityIdAndConceptParentCode("58b33379-dab2-4f5c-8f09-6d2bd63023d8", + "1410AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "886AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").isEmpty()); - assertTrue(events.isEmpty()); } @Test @@ -347,6 +423,11 @@ public void testFindByConceptAndValue() { assertEquals("58b33379-dab2-4f5c-8f09-6d2bd63023d8", events.get(0).getBaseEntityId()); assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); + //test with deleted event + eventsRepository.safeRemove(events.get(0)); + assertTrue( + eventsRepository.findByConceptAndValue("163531AAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", "Happy Kids Clinic").isEmpty()); + } @Test @@ -393,6 +474,11 @@ public void testFindEvents2() { assertTrue(event.getServerVersion() >= previousVersion); previousVersion = event.getServerVersion(); } + + //test with deleted event + for (Event event : events) + eventsRepository.safeRemove(event); + assertTrue(eventsRepository.findEvents(eventSearchBean, BaseEntity.SERVER_VERSIOIN, "asc", 20).isEmpty()); } @Test @@ -410,6 +496,11 @@ public void testUpdate() { assertEquals(now, event.getDateEdited().getMillis()); assertEquals(3, event.getObs().size()); assertEquals(obs.getValue(), event.getObs(null, "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValue()); + + //test update with voided date deletes event + event.setDateVoided(new DateTime()); + eventsRepository.update(event); + assertNull(eventsRepository.get(event.getId())); } @Test @@ -432,6 +523,11 @@ public void testFindByEmptyServerVersion() { assertTrue(loopEvent.getServerVersion() == 0 || loopEvent.getServerVersion() >= beforeFetch); } + + //test with deleted event + for (Event e : events) + eventsRepository.safeRemove(e); + assertTrue(eventsRepository.findByEmptyServerVersion().isEmpty()); } @Test @@ -449,6 +545,10 @@ public void testFindEventByEventTypeBetweenTwoDates() { assertEquals(1, events.size()); assertEquals("58b33379-dab2-4f5c-8f09-6d2bd63023d8", events.get(0).getBaseEntityId()); assertEquals("05934ae338431f28bf6793b241bdb88c", events.get(0).getId()); + + //test with deleted event + eventsRepository.safeRemove(events.get(0)); + assertTrue(eventsRepository.findEventByEventTypeBetweenTwoDates("Birth Registration").isEmpty()); } @Test @@ -476,6 +576,13 @@ public void testAdd() { assertEquals(1, event.getObs().size()); assertEquals("3.5", event.getObs(null, "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValue()); + //test if an event with voided date add event as deleted + event = new Event().withBaseEntityId("2423nj-sdfsd-sf2dfsd-2399d").withEventType("Vaccination") + .withFormSubmissionId("hshj2342_jsjs-jhjsdfds-23").withEventDate(new DateTime()).withObs(obs); + event.setDateVoided(new DateTime()); + eventsRepository.add(event); + assertNull(eventsRepository.findByFormSubmissionId(event.getFormSubmissionId())); + } } From 1f2559dca0560d523e62fd5fc4a1675a31027409 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 12 Apr 2018 17:13:28 +0300 Subject: [PATCH 110/133] Use the main document to insert into metadata, cursor to be used for very large datasets or limited ram --- .../migrate_actions.sql | 34 +++++++++++++++---- .../data_migration_scripts/migrate_alerts.sql | 13 ++++--- .../migrate_clients.sql | 16 ++++----- .../data_migration_scripts/migrate_events.sql | 17 +++++----- .../migrate_reports.sql | 15 ++++---- .../data_migration_scripts/migrate_stock.sql | 9 +++-- 6 files changed, 60 insertions(+), 44 deletions(-) diff --git a/assets/migrations/data_migration_scripts/migrate_actions.sql b/assets/migrations/data_migration_scripts/migrate_actions.sql index 07f81b438f..2a26b829ea 100644 --- a/assets/migrations/data_migration_scripts/migrate_actions.sql +++ b/assets/migrations/data_migration_scripts/migrate_actions.sql @@ -12,9 +12,31 @@ where doc->>'type'='Action'; /* Insert into action metadata */ INSERT INTO core.action_metadata(action_id, document_id, base_entity_id,server_version, provider_id,location_id,team,team_id) -select (select id from core.action where json->>'_id'=doc->>'_id') action_id,doc->>'_id' document_id, -doc->>'baseEntityId' as base_entity_id, -(doc->>'timeStamp')::BIGINT as server_version,doc->>'providerId' as provider_id,doc->>'locationId' as location_id, -doc->>'team' as team, doc->>'teamId' as team_id -from couchdb -where doc->>'type'='Action'; \ No newline at end of file +select id action_id,json->>'_id' jsonument_id, +json->>'baseEntityId' as base_entity_id, +(json->>'timeStamp')::BIGINT as server_version,json->>'providerId' as provider_id,json->>'locationId' as location_id, +json->>'team' as team, json->>'teamId' as team_id +from core.action; + + +/*Incase of very large dataset or in low memory conditions use cursor below to insert into action_metadata + * + * The replicate the cursor to insert into other other documents types metadata + * + +DO $$ +DECLARE + DECLARE actions_cursor CURSOR FOR SELECT * FROM core.action; + t_action RECORD; +BEGIN + OPEN actions_cursor; + LOOP + FETCH actions_cursor INTO t_action; + EXIT WHEN NOT FOUND; + + INSERT INTO core.action_metadata(action_id, document_id, base_entity_id,server_version, provider_id,location_id,team,team_id) + VALUES (t_action.id ,t_action.json->>'_id',t_action.json->>'baseEntityId',(t_action.json->>'timeStamp')::BIGINT , + t_action.json->>'providerId',t_action.json->>'locationId',t_action.json->>'team',t_action.json->>'teamId'); + END LOOP; +END$$; +*/ diff --git a/assets/migrations/data_migration_scripts/migrate_alerts.sql b/assets/migrations/data_migration_scripts/migrate_alerts.sql index 340654bad8..c433ccefb0 100644 --- a/assets/migrations/data_migration_scripts/migrate_alerts.sql +++ b/assets/migrations/data_migration_scripts/migrate_alerts.sql @@ -14,10 +14,9 @@ where doc->>'type'='Alert'; INSERT INTO core.alert_metadata (alert_id, document_id, base_entity_id,server_version, provider_id, location_id,team,team_id,is_active,trigger_name) -select (select id from core.alert where json->>'_id'=doc->>'_id') alert_id,doc->>'_id' document_id, -doc->>'entityId' as base_entity_id, -(doc->>'timeStamp')::BIGINT as server_version,doc->>'providerId' as provider_id,doc->>'locationId' as location_id, -doc->>'team' as team, doc->>'teamId' as team_id, -(doc->>'isActive')::bool as is_active, doc->>'triggerName' as trigger_name -from couchdb -where doc->>'type'='Alert'; \ No newline at end of file +select id as alert_id,json->>'_id' document_id, +json->>'entityId' as base_entity_id, +(json->>'timeStamp')::BIGINT as server_version,json->>'providerId' as provider_id,json->>'locationId' as location_id, +json->>'team' as team, json->>'teamId' as team_id, +(json->>'isActive')::bool as is_active, json->>'triggerName' as trigger_name +from core.alert; \ No newline at end of file diff --git a/assets/migrations/data_migration_scripts/migrate_clients.sql b/assets/migrations/data_migration_scripts/migrate_clients.sql index 86c8038986..e6c21e7d5c 100644 --- a/assets/migrations/data_migration_scripts/migrate_clients.sql +++ b/assets/migrations/data_migration_scripts/migrate_clients.sql @@ -13,12 +13,10 @@ where doc->>'type'='Client'; /* Insert into client metadata */ INSERT INTO core.client_metadata (client_id, document_id, base_entity_id, relational_id, server_version, openmrs_uuid, unique_id, first_name, middle_name, last_name, birth_date, date_deleted) -select (select id from core.client where json->>'_id'=doc->>'_id') as client_id,doc->>'_id' document_id, -doc->>'baseEntityId' as base_entity_id, -doc->'relationships'->'mother'->>0 as relational_id,(doc->>'serverVersion')::BIGINT as server_version, -doc->'identifiers'->>'OPENMRS_UUID' as openmrs_uuid, -coalesce(doc->'identifiers'->>'ZEIR_ID',doc->'identifiers'->>'M_ZEIR_ID') unique_id, -doc->>'firstName' as first_name, doc->>'MiddleName' as middle_name, doc->>'lastName' as last_name, -(doc->>'birthdate')::date as birth_date, (doc->>'dateVoided')::TIMESTAMP as date_deleted -from couchdb -where doc->>'type'='Client'; \ No newline at end of file +select id as client_id,json->>'_id' document_id,json->>'baseEntityId' as base_entity_id, +json->'relationships'->'mother'->>0 as relational_id,(json->>'serverVersion')::BIGINT as server_version, +json->'identifiers'->>'OPENMRS_UUID' as openmrs_uuid, +coalesce(json->'identifiers'->>'ZEIR_ID',json->'identifiers'->>'M_ZEIR_ID') unique_id, +json->>'firstName' as first_name, json->>'MiddleName' as middle_name, json->>'lastName' as last_name, +(json->>'birthdate')::date as birth_date, (json->>'dateVoided')::TIMESTAMP as date_deleted +from core.client; \ No newline at end of file diff --git a/assets/migrations/data_migration_scripts/migrate_events.sql b/assets/migrations/data_migration_scripts/migrate_events.sql index 2c34040d86..e7f6bf5a4f 100644 --- a/assets/migrations/data_migration_scripts/migrate_events.sql +++ b/assets/migrations/data_migration_scripts/migrate_events.sql @@ -22,15 +22,14 @@ INSERT INTO core.event_metadata ( event_id, document_id, base_entity_id, form_submission_id, server_version, openmrs_uuid, event_type, event_date, entity_type, provider_id, location_id, team, team_id, date_created, date_edited, date_deleted) -select (select id from core.event where json->>'_id'=doc->>'_id') as event_id,doc->>'_id' document_id, -doc->>'baseEntityId' as base_entity_id,doc->>'formSubmissionId' as form_submission_id, -(doc->>'serverVersion')::BIGINT as server_version,doc->'identifiers'->>'OPENMRS_UUID' as openmrs_uuid, -doc->>'eventType' as event_type,(doc->>'eventDate')::TIMESTAMP as event_date, -doc->>'entityType' as entity_type,doc->>'providerId' as provider_id,doc->>'locationId' as location_id, -doc->>'team' as team, doc->>'teamId' as team_id,(doc->>'dateCreated')::TIMESTAMP as date_created, -(doc->>'dateEdited')::TIMESTAMP as date_edited,(doc->>'dateVoided')::TIMESTAMP as date_deleted -from couchdb -where doc->>'type'='Event'; +select id as event_id,json->>'_id' document_id, +json->>'baseEntityId' as base_entity_id,json->>'formSubmissionId' as form_submission_id, +(json->>'serverVersion')::BIGINT as server_version,json->'identifiers'->>'OPENMRS_UUID' as openmrs_uuid, +json->>'eventType' as event_type,(json->>'eventDate')::TIMESTAMP as event_date, +json->>'entityType' as entity_type,json->>'providerId' as provider_id,json->>'locationId' as location_id, +json->>'team' as team, json->>'teamId' as team_id,(json->>'dateCreated')::TIMESTAMP as date_created, +(json->>'dateEdited')::TIMESTAMP as date_edited,(json->>'dateVoided')::TIMESTAMP as date_deleted +from core.event; /*set event_metadata foreign key to delete cascade*/ ALTER TABLE core.event_metadata DROP CONSTRAINT IF EXISTS event_metadata_event_id_fkey ; diff --git a/assets/migrations/data_migration_scripts/migrate_reports.sql b/assets/migrations/data_migration_scripts/migrate_reports.sql index c7db6fc5b4..ba0fb2ce3c 100644 --- a/assets/migrations/data_migration_scripts/migrate_reports.sql +++ b/assets/migrations/data_migration_scripts/migrate_reports.sql @@ -16,11 +16,10 @@ where doc->>'type'='Report'; INSERT INTO core.report_metadata (report_id, document_id,form_submission_id, base_entity_id,server_version,report_type,report_date, provider_id, location_id,team,team_id,date_edited) -select (select id from core.report where json->>'_id'=doc->>'_id') report_id,doc->>'_id' document_id, -doc->>'formSubmissionId' as form_submission_id,doc->>'baseEntityId' as base_entity_id, -(doc->>'serverVersion')::BIGINT as server_version, -doc->>'reportType' as report_type,(doc->>'reportDate')::date as report_date, -doc->>'providerId' as provider_id,doc->>'locationId' as location_id, -doc->>'team' as team, doc->>'teamId' as team_id,(doc->>'dateEdited')::date as date_edited -from couchdb -where doc->>'type'='Report'; \ No newline at end of file +select id as report_id,json->>'_id' document_id, +json->>'formSubmissionId' as form_submission_id,json->>'baseEntityId' as base_entity_id, +(json->>'serverVersion')::BIGINT as server_version, +json->>'reportType' as report_type,(json->>'reportDate')::date as report_date, +json->>'providerId' as provider_id,json->>'locationId' as location_id, +json->>'team' as team, json->>'teamId' as team_id,(json->>'dateEdited')::date as date_edited +from core.report; \ No newline at end of file diff --git a/assets/migrations/data_migration_scripts/migrate_stock.sql b/assets/migrations/data_migration_scripts/migrate_stock.sql index 3db38f1fb8..bd6e3b96a6 100644 --- a/assets/migrations/data_migration_scripts/migrate_stock.sql +++ b/assets/migrations/data_migration_scripts/migrate_stock.sql @@ -12,8 +12,7 @@ where doc->>'type'='Stock'; /* Insert into stock metadata */ INSERT INTO core.stock_metadata(stock_id, document_id, server_version, provider_id,location_id,team,team_id) -select (select id from core.stock where json->>'_id'=doc->>'_id') stock_id,doc->>'_id' document_id, -(doc->>'serverVersion')::BIGINT as server_version,doc->>'providerid' as provider_id,doc->>'locationId' as location_id, -doc->>'team' as team, doc->>'teamId' as team_id -from couchdb -where doc->>'type'='Stock'; \ No newline at end of file +select id as stock_id,json->>'_id' document_id, +(json->>'serverVersion')::BIGINT as server_version,json->>'providerid' as provider_id,json->>'locationId' as location_id, +json->>'team' as team, json->>'teamId' as team_id +from core.stock; \ No newline at end of file From b7ea12b86c0f0dc780f50c4c14b8d71be950053b Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Thu, 12 Apr 2018 19:52:13 +0300 Subject: [PATCH 111/133] Events and Clients Services Integration tests --- .../postgres/ActionRepositoryImpl.java | 3 + .../postgres/AlertsRepositoryImpl.java | 2 + .../postgres/BaseRepositoryImpl.java | 15 + .../postgres/ClientsRepositoryImpl.java | 4 + .../postgres/EventsRepositoryImpl.java | 6 +- .../postgres/ReportsRepositoryImpl.java | 2 + .../postgres/StocksRepositoryImpl.java | 10 +- .../org/opensrp/service/EventService.java | 3 +- .../opensrp/service/ClientServiceTest.java | 203 ++++++++++++++ .../org/opensrp/service/EventServiceTest.java | 262 ++++++++++++++++++ .../test/resources/test-scripts/client.sql | 2 +- 11 files changed, 505 insertions(+), 7 deletions(-) create mode 100644 opensrp-core/src/test/java/org/opensrp/service/ClientServiceTest.java create mode 100644 opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java index 0a3b294485..2c3d819832 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java @@ -50,6 +50,8 @@ public void add(Action entity) { if (entity.getId() == null) entity.setId(UUID.randomUUID().toString()); + setRevision(entity); + org.opensrp.domain.postgres.Action pgAction = convert(entity, null); if (pgAction == null) { return; @@ -78,6 +80,7 @@ public void update(Action entity) { return; } + setRevision(entity); org.opensrp.domain.postgres.Action pgAction = convert(entity, id); if (pgAction == null) { return; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java index 2f5c6f0528..23d1917806 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/AlertsRepositoryImpl.java @@ -51,6 +51,7 @@ public void add(Alert entity) { if (entity.getId() == null) entity.setId(UUID.randomUUID().toString()); + setRevision(entity); org.opensrp.domain.postgres.Alert pgAlert = convert(entity, null); if (pgAlert == null) { return; @@ -79,6 +80,7 @@ public void update(Alert entity) { return; } + setRevision(entity); org.opensrp.domain.postgres.Alert pgAlert = convert(entity, id); if (pgAlert == null) { return; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java index 6f6e1f1e8b..e2357617eb 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java @@ -1,5 +1,6 @@ package org.opensrp.repository.postgres; +import org.motechproject.model.MotechBaseDataObject; import org.opensrp.common.AllConstants.BaseEntity; import org.slf4j.Logger; import org.slf4j.LoggerFactory; @@ -8,6 +9,8 @@ public abstract class BaseRepositoryImpl { public static int DEFAULT_FETCH_SIZE = 1000; + public static String REVISION_PREFIX = "v"; + public static String SERVER_VERSION = "server_version"; protected static Logger logger = LoggerFactory.getLogger(BaseRepositoryImpl.class.toString()); @@ -22,4 +25,16 @@ protected String getOrderByClause(String sortBy, String sortOrder) { return orderByClause; } + protected void setRevision(MotechBaseDataObject entity) { + if (entity.isNew()) + entity.setRevision(REVISION_PREFIX + 1); + else if (entity.getRevision().startsWith(REVISION_PREFIX)) + entity.setRevision( + REVISION_PREFIX + (Integer.parseInt(entity.getRevision().substring(REVISION_PREFIX.length())) + 1)); + else { + String[] revision = entity.getRevision().split("-"); + entity.setRevision((Integer.parseInt(revision[0]) + 1) + revision[1]); + } + } + } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java index 42a2a0a745..907a1f25d4 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ClientsRepositoryImpl.java @@ -62,6 +62,8 @@ public void add(Client entity) { if (entity.getId() == null) entity.setId(UUID.randomUUID().toString()); + setRevision(entity); + org.opensrp.domain.postgres.Client pgClient = convert(entity, null); if (pgClient == null) { return; @@ -89,6 +91,8 @@ public void update(Client entity) { return; } + setRevision(entity); + org.opensrp.domain.postgres.Client pgClient = convert(entity, id); if (pgClient == null) { return; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java index 75c91cd07e..3ed045873f 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java @@ -52,6 +52,7 @@ public void add(Event entity) { if (entity.getId() == null) entity.setId(UUID.randomUUID().toString()); + setRevision(entity); org.opensrp.domain.postgres.Event pgEvent = convert(entity, null); if (pgEvent == null) { @@ -81,6 +82,8 @@ public void update(Event entity) { return; } + setRevision(entity); + org.opensrp.domain.postgres.Event pgEvent = convert(entity, id); if (pgEvent == null) { return; @@ -449,7 +452,8 @@ private EventMetadata createMetadata(Event event, Long eventId) { eventMetadata.setFormSubmissionId(event.getFormSubmissionId()); eventMetadata.setOpenmrsUuid(event.getIdentifier(AllConstants.Client.OPENMRS_UUID_IDENTIFIER_TYPE)); eventMetadata.setEventType(event.getEventType()); - eventMetadata.setEventDate(event.getEventDate().toDate()); + if (event.getEventDate() != null) + eventMetadata.setEventDate(event.getEventDate().toDate()); eventMetadata.setEntityType(event.getEntityType()); eventMetadata.setProviderId(event.getProviderId()); eventMetadata.setLocationId(event.getLocationId()); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java index 5fa37fb43c..829f4ca3f7 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ReportsRepositoryImpl.java @@ -48,6 +48,7 @@ public void add(Report entity) { if (entity.getId() == null) entity.setId(UUID.randomUUID().toString()); + setRevision(entity); org.opensrp.domain.postgres.Report pgReport = convert(entity, null); if (pgReport == null) { @@ -78,6 +79,7 @@ public void update(Report entity) { return; } + setRevision(entity); org.opensrp.domain.postgres.Report pgReport = convert(entity, id); if (pgReport == null) { return; diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java index 3f63fd4f9e..1177ccd474 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/StocksRepositoryImpl.java @@ -46,6 +46,7 @@ public void add(Stock entity) { if (entity.getId() == null) entity.setId(UUID.randomUUID().toString()); + setRevision(entity); org.opensrp.domain.postgres.Stock pgStock = convert(entity, null); if (pgStock == null) { @@ -76,6 +77,7 @@ public void update(Stock entity) { return; } + setRevision(entity); org.opensrp.domain.postgres.Stock pgStock = convert(entity, id); if (pgStock == null) { return; @@ -135,10 +137,12 @@ public List findAllByProviderid(String providerid) { } /** - * implements the method equivalent in couch repository that return stocks matching stock type id - * @param stockType the stock type + * implements the method equivalent in couch repository that return stocks matching stock type + * id + * + * @param stockType the stock type * @param stockTypeId the stock type id - * @return list of stock of a particluar stock type id + * @return list of stock of a particluar stock type id */ @Override public List findAllByIdentifier(String stockType, String stockTypeId) { diff --git a/opensrp-core/src/main/java/org/opensrp/service/EventService.java b/opensrp-core/src/main/java/org/opensrp/service/EventService.java index c59ecfcab7..e78e2e3d72 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/EventService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/EventService.java @@ -143,8 +143,7 @@ public synchronized Event processOutOfArea(Event event) { List clients = clientService.findAllByIdentifier(Client.ZEIR_ID.toUpperCase(), identifier); if (clients != null && !clients.isEmpty()) { - org.opensrp.domain.Client client = clients.get(0); - + org.opensrp.domain.Client client = clients.get(0); //set providerid to the last providerid who served this client in their catchment (assumption) List existingEvents = findByBaseEntityAndType(client.getBaseEntityId(), "Birth Registration"); if (existingEvents != null && !existingEvents.isEmpty()) { diff --git a/opensrp-core/src/test/java/org/opensrp/service/ClientServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/ClientServiceTest.java new file mode 100644 index 0000000000..2f3b5af882 --- /dev/null +++ b/opensrp-core/src/test/java/org/opensrp/service/ClientServiceTest.java @@ -0,0 +1,203 @@ +package org.opensrp.service; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.junit.Assert.assertTrue; +import static org.opensrp.common.AllConstants.Client.OPENMRS_UUID_IDENTIFIER_TYPE; + +import java.util.HashSet; +import java.util.Set; + +import org.joda.time.DateTime; +import org.json.JSONException; +import org.junit.Before; +import org.junit.Test; +import org.opensrp.domain.Address; +import org.opensrp.domain.Client; +import org.opensrp.repository.ClientsRepository; +import org.opensrp.repository.postgres.BaseRepositoryTest; +import org.opensrp.repository.postgres.ClientsRepositoryImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; + +public class ClientServiceTest extends BaseRepositoryTest { + + private ClientService clientService; + + @Autowired + @Qualifier("clientsRepositoryPostgres") + private ClientsRepository clientsRepository; + + @Before + public void setUpPostgresRepository() { + clientService = new ClientService(clientsRepository); + } + + @Override + protected Set getDatabaseScripts() { + Set scripts = new HashSet(); + scripts.add("client.sql"); + return scripts; + } + + @Test + public void testAddClient() { + Client client = new Client("f67823b0-378e-4a35-93fc-bb00def74e2f").withBirthdate(new DateTime("2017-03-31"), true) + .withGender("Male").withFirstName("xobili").withLastName("mbangwa"); + client.withIdentifier("ZEIR_ID", "233864-8").withAttribute("Home_Facility", "Linda"); + clientService.addClient(client); + assertEquals(16, clientService.findAllClients().size()); + + Client savedClient = clientService.find("f67823b0-378e-4a35-93fc-bb00def74e2f"); + assertNotNull(savedClient.getId()); + assertEquals(new DateTime("2017-03-31"), client.getBirthdate()); + assertEquals("xobili", client.getFirstName()); + assertEquals("mbangwa", client.getLastName()); + assertEquals("233864-8", client.getIdentifier("ZEIR_ID")); + + //test adding existing client is updated + DateTime timeBeforeUpdate = new DateTime(); + savedClient.withMiddleName("Rustus"); + clientService.addClient(savedClient); + + Client updatedClient = clientService.find(savedClient.getBaseEntityId()); + assertEquals("Rustus", updatedClient.getMiddleName()); + assertEquals(ClientsRepositoryImpl.REVISION_PREFIX + 2, updatedClient.getRevision()); + assertTrue(timeBeforeUpdate.isBefore(updatedClient.getDateEdited())); + + } + + @Test + public void testFindClient() { + Client client = new Client("33d9a17f-d729-4276-9891-b43e8b60fd12"); + assertEquals("05934ae338431f28bf6793b24159c647", clientService.findClient(client).getId()); + + client.withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "9c4260f2-d296-4af1-b771-debda1b6cfd1").withIdentifier("ZEIR_ID", + "218220-2"); + assertEquals("05934ae338431f28bf6793b24159c647", clientService.findClient(client).getId()); + + client = new Client(""); + client.withIdentifier("ZEIR_ID", "218220-211"); + assertNull(clientService.findClient(client)); + + client.withBaseEntityId("3423fdsf-23423-hjh23423"); + + assertNull(clientService.findClient(client)); + + client = new Client(""); + assertNull(clientService.findClient(client)); + + client.withIdentifier("ZEIR_ID", "218225-1"); + assertEquals("05934ae338431f28bf6793b24167817d", clientService.findClient(client).getId()); + } + + @Test + public void testFind() { + assertEquals("05934ae338431f28bf6793b24159c647", clientService.find("33d9a17f-d729-4276-9891-b43e8b60fd12").getId()); + + assertNull(clientService.find("3423fdsf-23423-hjh23423")); + } + + @Test(expected = IllegalArgumentException.class) + public void testUpdateClient_NewClient() throws JSONException { + Client client = new Client("33d9a17f-d729-4276-9891-b43e8b60fd12"); + clientService.updateClient(client); + } + + @Test(expected = IllegalArgumentException.class) + public void testUpdateClient_Client_Not_Exists() throws JSONException { + Client client = clientService.find("67007c17-97bb-4732-a1b8-3a0c292b5432"); + clientsRepository.safeRemove(client); + client.setFirstName("Conses"); + clientService.updateClient(client); + } + + @Test() + public void testUpdateClient() throws JSONException { + Client client = clientService.find("67007c17-97bb-4732-a1b8-3a0c292b5432"); + client.withFirstName("Conses").withMiddleName("Divens").withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, + "2321312-dsfsd"); + clientService.updateClient(client); + + Client updatedClient = clientService.find("67007c17-97bb-4732-a1b8-3a0c292b5432"); + assertEquals("Conses", updatedClient.getFirstName()); + assertEquals("Divens", updatedClient.getMiddleName()); + assertEquals("2321312-dsfsd", updatedClient.getIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE)); + } + + @Test + public void testMergeClient() { + Client client = clientService.find("cc127350-c1cd-4c3a-99d4-4d632882f522"); + Address address = new Address().withCountry("KE").withStateProvince("Punja").withAddressType("home"); + + client.withFirstName("Conses").withMiddleName("Divens").withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "2321312-dsfsd") + .withAttribute("Zone", "Zone3").withAddress(address); + + Client mergedClient = clientService.mergeClient(client); + assertEquals("Conses", mergedClient.getFirstName()); + assertEquals("Divens", mergedClient.getMiddleName()); + assertEquals("2321312-dsfsd", mergedClient.getIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE)); + assertEquals("Zone3", mergedClient.getAttribute("Zone")); + assertEquals(address, mergedClient.getAddress(address.getAddressType())); + + } + + @Test + public void testAddorUpdate() { + Client client = new Client("f67823b0-378e-4a35-93fc-bb00def74e2f").withBirthdate(new DateTime("2017-03-31"), true) + .withGender("Male").withFirstName("xobili").withLastName("mbangwa"); + client.withIdentifier("ZEIR_ID", "233864-8").withAttribute("Home_Facility", "Linda"); + clientService.addorUpdate(client); + assertEquals(16, clientService.findAllClients().size()); + + Client savedClient = clientService.find("f67823b0-378e-4a35-93fc-bb00def74e2f"); + assertNotNull(savedClient.getId()); + assertEquals(new DateTime("2017-03-31"), client.getBirthdate()); + assertEquals("xobili", client.getFirstName()); + assertEquals("mbangwa", client.getLastName()); + assertEquals("233864-8", client.getIdentifier("ZEIR_ID")); + + //test adding existing client is updated + DateTime timeBeforeUpdate = new DateTime(); + savedClient.withMiddleName("Rustus"); + clientService.addorUpdate(savedClient); + + Client updatedClient = clientService.find(savedClient.getBaseEntityId()); + assertEquals("Rustus", updatedClient.getMiddleName()); + assertEquals(ClientsRepositoryImpl.REVISION_PREFIX + 2, updatedClient.getRevision()); + assertTrue(timeBeforeUpdate.isBefore(updatedClient.getDateEdited())); + } + + @Test + public void testAddorUpdateWithServerVersionFlag() { + Client client = new Client("f67823b0-378e-4a35-93fc-bb00def74e2f").withBirthdate(new DateTime("2017-03-31"), true) + .withGender("Male").withFirstName("xobili").withLastName("mbangwa"); + client.withIdentifier("ZEIR_ID", "233864-8").withAttribute("Home_Facility", "Linda"); + clientService.addorUpdate(client, false); + assertEquals(16, clientService.findAllClients().size()); + + Client savedClient = clientService.find("f67823b0-378e-4a35-93fc-bb00def74e2f"); + assertNotNull(savedClient.getId()); + assertEquals(new DateTime("2017-03-31"), client.getBirthdate()); + assertEquals("xobili", client.getFirstName()); + assertEquals("mbangwa", client.getLastName()); + assertEquals("233864-8", client.getIdentifier("ZEIR_ID")); + + long existingServerVesion = savedClient.getServerVersion(); + //test adding existing client is updated + DateTime timeBeforeUpdate = new DateTime(); + savedClient.withMiddleName("Rustus"); + clientService.addorUpdate(savedClient, false); + + Client updatedClient = clientService.find(savedClient.getBaseEntityId()); + assertEquals("Rustus", updatedClient.getMiddleName()); + assertEquals(ClientsRepositoryImpl.REVISION_PREFIX + 2, updatedClient.getRevision()); + assertTrue(timeBeforeUpdate.isBefore(updatedClient.getDateEdited())); + assertEquals(existingServerVesion, updatedClient.getServerVersion().longValue()); + + clientService.addorUpdate(savedClient, true); + assertTrue(clientService.find(savedClient.getBaseEntityId()).getServerVersion() > existingServerVesion); + } + +} diff --git a/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java new file mode 100644 index 0000000000..ba089bbb0f --- /dev/null +++ b/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java @@ -0,0 +1,262 @@ +package org.opensrp.service; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertNotNull; +import static org.junit.Assert.assertNull; +import static org.opensrp.common.AllConstants.Event.OPENMRS_UUID_IDENTIFIER_TYPE; + +import java.sql.SQLException; +import java.util.HashSet; +import java.util.Set; + +import org.joda.time.DateTime; +import org.joda.time.Minutes; +import org.junit.Before; +import org.junit.Test; +import org.opensrp.common.AllConstants.Client; +import org.opensrp.domain.Event; +import org.opensrp.domain.Obs; +import org.opensrp.repository.ClientsRepository; +import org.opensrp.repository.EventsRepository; +import org.opensrp.repository.postgres.BaseRepositoryTest; +import org.opensrp.repository.postgres.EventsRepositoryImpl; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.dao.DuplicateKeyException; + +public class EventServiceTest extends BaseRepositoryTest { + + private EventService eventService; + + @Autowired + @Qualifier("eventsRepositoryPostgres") + private EventsRepository eventsRepository; + + @Autowired + @Qualifier("clientsRepositoryPostgres") + private ClientsRepository clientsRepository; + + private Set scripts = new HashSet();; + + @Before + public void setUpPostgresRepository() { + eventService = new EventService(eventsRepository, new ClientService(clientsRepository)); + } + + @Override + protected Set getDatabaseScripts() { + scripts.add("event.sql"); + return scripts; + } + + @Test + public void testFindByUniqueId() { + assertEquals("05934ae338431f28bf6793b241be69a5", eventService.find("4aecc0c1-e008-4227-938d-66db17236a3d").getId()); + + assertEquals("05934ae338431f28bf6793b241bdb88c", eventService.find("06c8644b-b560-45fd-9af5-b6b1484e3504").getId()); + + assertNull(eventService.find("50102f0a-a9c9-1d-a6c476433b3c")); + + //deleted event + eventsRepository.safeRemove(eventService.find("06c8644b-b560-45fd-9af5-b6b1484e3504")); + assertNull(eventService.find("06c8644b-b560-45fd-9af5-b6b1484e3504")); + } + + @Test + public void testFindByEvent() { + Event event = new Event(); + assertNull(eventService.find(event)); + + event.withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "94ec8561-14ab-48d1-a6d4-4ae05191f6e6"); + + assertEquals("05934ae338431f28bf6793b241bdbc55", eventService.find(event).getId()); + + //deleted event + eventsRepository.safeRemove(eventService.find(event)); + assertNull(eventService.find(event)); + } + + @Test + public void testFindByEventId() { + Event event = eventService.findById("05934ae338431f28bf6793b2419c319a"); + assertEquals("ea1f9439-a663-4073-93b9-6ef2b8bca3c1", event.getBaseEntityId()); + assertEquals("d960046a-e2a0-4bbf-b687-d41c2a52d8c8", event.getFormSubmissionId()); + assertEquals("Vaccination", event.getEventType()); + + assertNull(eventService.findById("50102f0a-a9c9-1d-a6c476433b3c")); + + //deleted event + eventsRepository.safeRemove(event); + assertNull(eventService.findById(event.getId())); + } + + @Test + public void testAddEvent() { + Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); + Event event = new Event().withBaseEntityId("435534534543").withEventType("Growth Monitoring") + .withFormSubmissionId("gjhg34534 nvbnv3345345__4").withEventDate(new DateTime()).withObs(obs); + + eventService.addEvent(event); + + event = eventService.findByFormSubmissionId("gjhg34534 nvbnv3345345__4"); + assertEquals("435534534543", event.getBaseEntityId()); + assertEquals("Growth Monitoring", event.getEventType()); + assertEquals(1, event.getObs().size()); + assertEquals("3.5", event.getObs(null, "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValue()); + + //test if an event with voided date add event as deleted + event = new Event().withBaseEntityId("2423nj-sdfsd-sf2dfsd-2399d").withEventType("Vaccination") + .withFormSubmissionId("hshj2342_jsjs-jhjsdfds-23").withEventDate(new DateTime()).withObs(obs); + event.setDateVoided(new DateTime()); + eventService.addEvent(event); + assertNull(eventService.findByFormSubmissionId(event.getFormSubmissionId())); + } + + @Test(expected = IllegalArgumentException.class) + public void testAddEvent_For_ExistingEvent() { + Event event = eventService.findById("05934ae338431f28bf6793b241bdc44a"); + eventService.addEvent(event); + } + + @Test(expected = IllegalArgumentException.class) + public void testAddEvent_Duplicate_Identifiers() { + Event event = new Event().withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "4aecc0c1-e008-4227-938d-66db17236a3d"); + eventService.addEvent(event); + } + + @Test(expected = IllegalArgumentException.class) + public void testAddEvent_Duplicate_BaseEntity_FormSubmission() { + Event event = new Event().withBaseEntityId("58b33379-dab2-4f5c-8f09-6d2bd63023d8") + .withFormSubmissionId("5f1b201d-2132-4eb9-8fa1-3169a61cc50a"); + eventService.addEvent(event); + } + + @Test(expected = DuplicateKeyException.class) + public void testAddEvent_Duplicate_FormSubmission() { + Event event = new Event().withBaseEntityId("58b33379-dab2-4f") + .withFormSubmissionId("5f1b201d-2132-4eb9-8fa1-3169a61cc50a"); + eventService.addEvent(event); + + } + + @Test + public void testProcessOutOfArea() throws SQLException { + scripts.add("client.sql"); + populateDatabase(); + Event event = new Event().withEventType("Temperature").withProviderId("tester111") + .withLocationId("2242342-23dsfsdfds").withIdentifier(Client.ZEIR_ID, "218229-3"); + Event outOfAreaEvent = eventService.processOutOfArea(event); + assertEquals(1, outOfAreaEvent.getDetails().size()); + assertEquals("biddemo", outOfAreaEvent.getDetails().get("out_of_catchment_provider_id")); + assertEquals("42abc582-6658-488b-922e-7be500c070f3", outOfAreaEvent.getLocationId()); + assertEquals("biddemo", outOfAreaEvent.getProviderId()); + + event = new Event().withEventType("Out of Area Service").withProviderId("tester111").withLocationId("2242342-23dsfsdfds") + .withIdentifier(Client.ZEIR_ID, "218229-3"); + + outOfAreaEvent = eventService.processOutOfArea(event); + assertEquals(event, outOfAreaEvent); + assertEquals(15, eventService.getAll().size()); + + Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); + event = new Event().withEventType("Growth Monitoring").withFormSubmissionId("gjhg34534 nvbnv3345345__4") + .withEventDate(new DateTime()).withObs(obs).withIdentifier(Client.ZEIR_ID, "218229-3"); + + outOfAreaEvent = eventService.processOutOfArea(event); + assertEquals(event, outOfAreaEvent); + + //assertEquals(16, eventService.getAll().size()); + + } + + @Test + public void testAddorUpdateEvent() { + Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); + Event event = new Event().withBaseEntityId("435534534543").withEventType("Growth Monitoring") + .withFormSubmissionId("gjhg34534 nvbnv3345345__4").withEventDate(new DateTime()).withObs(obs); + + eventService.addorUpdateEvent(event); + + Event updatedEvent = eventService.findByFormSubmissionId("gjhg34534 nvbnv3345345__4"); + assertEquals("435534534543", updatedEvent.getBaseEntityId()); + assertEquals("Growth Monitoring", updatedEvent.getEventType()); + assertEquals(1, updatedEvent.getObs().size()); + assertEquals("3.5", updatedEvent.getObs(null, "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValue()); + assertNull(updatedEvent.getDateEdited()); + + event.setTeam("ATeam"); + event.setProviderId("tester11"); + event.setLocationId("321312-fsff-2328"); + eventService.addorUpdateEvent(event); + + updatedEvent = eventService.findByFormSubmissionId("gjhg34534 nvbnv3345345__4"); + assertEquals("ATeam", updatedEvent.getTeam()); + assertEquals("tester11", updatedEvent.getProviderId()); + assertEquals("321312-fsff-2328", updatedEvent.getLocationId()); + assertEquals(EventsRepositoryImpl.REVISION_PREFIX + 2, updatedEvent.getRevision()); + assertNotNull(updatedEvent.getDateEdited()); + + //test if an event with voided date add event as deleted + event = new Event().withBaseEntityId("2423nj-sdfsd-sf2dfsd-2399d").withEventType("Vaccination") + .withFormSubmissionId("hshj2342_jsjs-jhjsdfds-23").withEventDate(new DateTime()).withObs(obs); + event.setDateVoided(new DateTime()); + eventService.addorUpdateEvent(event); + assertNull(eventService.findByFormSubmissionId(event.getFormSubmissionId())); + } + + @Test(expected = IllegalArgumentException.class) + public void testUpdateEvent_NonExistingEvent() { + Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); + Event event = new Event().withBaseEntityId("435534534543").withEventType("Growth Monitoring") + .withFormSubmissionId("gjhg34534 nvbnv3345345__4").withEventDate(new DateTime()).withObs(obs); + + eventService.updateEvent(event); + } + + @Test + public void testUpdateEvent() { + DateTime timebeforeUpdate = DateTime.now(); + Event event = eventService.findById("05934ae338431f28bf6793b24177a1dc"); + Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); + event.withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "62242n-223423-2332").addObs(obs); + eventService.updateEvent(event); + + Event updatedEvent = eventService.findById(event.getId()); + assertEquals(0, Minutes.minutesBetween(timebeforeUpdate, updatedEvent.getDateEdited()).getMinutes()); + assertEquals("3.5", updatedEvent.getObs(null, "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValue()); + assertEquals("62242n-223423-2332", updatedEvent.getIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE)); + + } + + @Test(expected = IllegalArgumentException.class) + public void testMergeEvent_Missing_Identifiers() { + Event event = new Event().withBaseEntityId("435534534543").withEventType("Growth Monitoring"); + eventService.mergeEvent(event); + } + + @Test(expected = IllegalArgumentException.class) + public void testMergeEvent_NonExisting_Identifiers() { + Event event = new Event().withBaseEntityId("435534534543").withEventType("Growth Monitoring") + .withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "242332-hgfhfh-dfg8d"); + eventService.mergeEvent(event); + } + + @Test + public void testMergeEvent() { + Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); + Event event = new Event().withEventType("Growth Monitoring") + .withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "4aecc0c1-e008-4227-938d-66db17236a3d") + .withEventDate(new DateTime()).withObs(obs); + + eventService.mergeEvent(event); + + Event updatedEvent = eventService.find("4aecc0c1-e008-4227-938d-66db17236a3d"); + + assertEquals("05934ae338431f28bf6793b241be69a5", updatedEvent.getId()); + assertEquals("Growth Monitoring", updatedEvent.getEventType()); + assertEquals(1, updatedEvent.getObs().size()); + assertEquals("3.5", updatedEvent.getObs(null, "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA").getValue()); + assertEquals(0, Minutes.minutesBetween(DateTime.now(), updatedEvent.getDateEdited()).getMinutes()); + } + +} diff --git a/opensrp-core/src/test/resources/test-scripts/client.sql b/opensrp-core/src/test/resources/test-scripts/client.sql index 884e220780..87c1a20690 100644 --- a/opensrp-core/src/test/resources/test-scripts/client.sql +++ b/opensrp-core/src/test/resources/test-scripts/client.sql @@ -29,7 +29,7 @@ INSERT INTO core.client_metadata (id, client_id, document_id, base_entity_id, re (4, 4, '05934ae338431f28bf6793b2415a0374', '94f3e8fb-2f05-4fca-8119-2b593d1962eb', '3abdb25a-f151-4a95-9311-bd30bf935085', 1520896808942, 'cf58894b-71c6-41e0-a977-7283f2411cd5', '218224-4', 'Fith', null, 'Child', '2018-03-01'), (5, 5, '05934ae338431f28bf6793b24159c647', '33d9a17f-d729-4276-9891-b43e8b60fd12', 'd0ecee83-6ccd-4096-9188-f63a40fa2f63', 1520890978382, '9c4260f2-d296-4af1-b771-debda1b6cfd1', '218220-2', 'First', null, 'Child', '2018-01-04'), (6, 6, '05934ae338431f28bf6793b24164cbd9', '86c039a2-0b68-4166-849e-f49897e3a510', '758dab58-7629-4da9-882f-ae5110bcd240', 1520933203799, 'ab91df5d-e433-40f3-b44f-427b73c9ae2a', '218923-1', 'Sally', null, 'Mtini ', '2016-04-13'), -(7, 7, '05934ae338431f28bf6793b241692648', '4a2a4ad9-cd29-47cb-bdb9-5b617a73b898', '9ac3fac4-a74c-45d5-bedb-da357cec3779', 1520935878137, '825b4d23-a3ea-4c58-a95b-d0df2f9c1690', '218229-3', 'Januar', null, 'Babbyfour', '2018-01-01'), +(7, 7, '05934ae338431f28bf6793b241692648', '58b33379-dab2-4f5c-8f09-6d2bd63023d8', '9ac3fac4-a74c-45d5-bedb-da357cec3779', 1520935878137, '825b4d23-a3ea-4c58-a95b-d0df2f9c1690', '218229-3', 'Januar', null, 'Babbyfour', '2018-01-01'), (8, 8, '05934ae338431f28bf6793b241693a2f', 'aabcd2cc-c111-41c6-85e6-cb5d9e350d08', '41d1841b-4d6c-4f06-b5e8-b55907892ee6', 1520935878137, '11a1ecf6-7d6d-4e12-8e6f-bb3cf5a3ebb8', '218230-1', 'January', null, 'Babyfive', '2018-01-01'), (9, 9, '05934ae338431f28bf6793b2416946b7', '469597f0-eefe-4171-afef-f7234cbb2859', '7bce6b9a-e575-4cc6-b987-a12284912e84', 1520935878137, 'eb4b258c-7558-436c-a1fe-e91d9e12f849', '218231-9', 'January ', null, 'Babysix', '2018-01-01'), (10, 10, '05934ae338431f28bf6793b24167817d', '28caef27-d1b3-497b-8a55-954f2f0f6e24', 'ab1eda08-2185-4d5f-9301-abb17d376ded', 1520934784144, '43397e39-0a11-4bb7-ba2d-3820436bef85', '218225-1', 'Sixth', null, 'Child', '2018-03-01'), From 29a4a085a9f10eb21afa1b31b24636c387aa1c6f Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 13 Apr 2018 11:01:43 +0300 Subject: [PATCH 112/133] Integration test outOfService Events in EventService --- .../main/java/org/opensrp/service/ClientService.java | 10 ---------- .../main/java/org/opensrp/service/EventService.java | 3 +-- .../java/org/opensrp/service/EventServiceTest.java | 6 +++--- 3 files changed, 4 insertions(+), 15 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/service/ClientService.java b/opensrp-core/src/main/java/org/opensrp/service/ClientService.java index dbcd1bcfce..a8142ee806 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/ClientService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/ClientService.java @@ -222,16 +222,6 @@ public Client addorUpdate(Client client) { return client; } - public Client imageUpdate(Client client) { - if (client.getBaseEntityId() == null) { - throw new RuntimeException("No baseEntityId"); - } - client.setDateEdited(DateTime.now()); - client.setServerVersion(null); - allClients.update(client); - return client; - } - public Client addorUpdate(Client client, boolean resetServerVersion) { if (client.getBaseEntityId() == null) { throw new RuntimeException("No baseEntityId"); diff --git a/opensrp-core/src/main/java/org/opensrp/service/EventService.java b/opensrp-core/src/main/java/org/opensrp/service/EventService.java index e78e2e3d72..abd8d8b38c 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/EventService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/EventService.java @@ -136,8 +136,7 @@ && getByBaseEntityAndFormSubmissionId(event.getBaseEntityId(), event.getFormSubm * @return */ public synchronized Event processOutOfArea(Event event) { - if (event.getBaseEntityId() == null || event.getBaseEntityId().isEmpty()) { - + if (event.getBaseEntityId() == null || event.getBaseEntityId().isEmpty()) { //get events identifiers; String identifier = event.getIdentifier(Client.ZEIR_ID); List clients = clientService.findAllByIdentifier(Client.ZEIR_ID.toUpperCase(), diff --git a/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java index ba089bbb0f..d99b6b3dca 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java @@ -143,7 +143,7 @@ public void testAddEvent_Duplicate_FormSubmission() { public void testProcessOutOfArea() throws SQLException { scripts.add("client.sql"); populateDatabase(); - Event event = new Event().withEventType("Temperature").withProviderId("tester111") + Event event = new Event().withEventType("Vaccination").withProviderId("tester111") .withLocationId("2242342-23dsfsdfds").withIdentifier(Client.ZEIR_ID, "218229-3"); Event outOfAreaEvent = eventService.processOutOfArea(event); assertEquals(1, outOfAreaEvent.getDetails().size()); @@ -159,13 +159,13 @@ public void testProcessOutOfArea() throws SQLException { assertEquals(15, eventService.getAll().size()); Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); - event = new Event().withEventType("Growth Monitoring").withFormSubmissionId("gjhg34534 nvbnv3345345__4") + event = new Event().withEventType("Out of Area Service - Growth Monitoring").withFormSubmissionId("gjhg34534 nvbnv3345345__4") .withEventDate(new DateTime()).withObs(obs).withIdentifier(Client.ZEIR_ID, "218229-3"); outOfAreaEvent = eventService.processOutOfArea(event); assertEquals(event, outOfAreaEvent); - //assertEquals(16, eventService.getAll().size()); + assertEquals(16, eventService.getAll().size()); } From 63fe7df877d2db547e1ddb5855985b7fe66f3701 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 13 Apr 2018 14:07:21 +0300 Subject: [PATCH 113/133] Stock and Multimedia services integration tests --- assets/config/opensrp.properties | 1 - .../postgres/ErrorTraceRepositoryImpl.java | 2 + .../postgres/MultimediaRepositoryImpl.java | 2 + .../org/opensrp/service/StockService.java | 6 +- .../org/opensrp/service/EventServiceTest.java | 10 +- .../service/MultiMediaServiceTest.java | 116 ++++++++++++++++++ .../org/opensrp/service/StockServiceTest.java | 115 +++++++++++------ 7 files changed, 205 insertions(+), 47 deletions(-) create mode 100644 opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java diff --git a/assets/config/opensrp.properties b/assets/config/opensrp.properties index 221fd2c600..7eccfece2c 100644 --- a/assets/config/opensrp.properties +++ b/assets/config/opensrp.properties @@ -7,7 +7,6 @@ js.directory.name=/ziggy form.directory.name=/form multimedia.directory.name=/opt/multimedia form.download.files=form.xml, model.xml, form_definition.json -#multimedia.directory.name=../multimedia/opensrp qrcodes.directory.name=/home/opensrp/qr-codes/ schedule.config.path=/schedules/schedule-config.xls diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ErrorTraceRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ErrorTraceRepositoryImpl.java index aac76b1021..e39b35f537 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ErrorTraceRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ErrorTraceRepositoryImpl.java @@ -46,6 +46,7 @@ public void add(ErrorTrace entity) { if (entity.getId() == null) entity.setId(UUID.randomUUID().toString()); + setRevision(entity); org.opensrp.domain.postgres.ErrorTrace pgErrorTrace = convert(entity, null); if (pgErrorTrace == null) { @@ -67,6 +68,7 @@ public void update(ErrorTrace entity) { if (id == null) { //ErrorTrace doesn't not exist return; } + setRevision(entity); org.opensrp.domain.postgres.ErrorTrace pgErrorTrace = convert(entity, id); errorTraceMapper.updateByPrimaryKey(pgErrorTrace); diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java index 1878ae6516..1f8b18464d 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/MultimediaRepositoryImpl.java @@ -38,6 +38,7 @@ public void add(Multimedia entity) { if (entity.getId() == null) entity.setId(UUID.randomUUID().toString()); + setRevision(entity); MultiMedia pgMultiMedia = convert(entity, null); if (pgMultiMedia == null) { @@ -59,6 +60,7 @@ public void update(Multimedia entity) { if (id == null) { //Multimedia doesn't not exist return; } + setRevision(entity); MultiMedia pgEntity = convert(entity, id); multiMediaMapper.updateByPrimaryKey(pgEntity); diff --git a/opensrp-core/src/main/java/org/opensrp/service/StockService.java b/opensrp-core/src/main/java/org/opensrp/service/StockService.java index b459b434a6..9b871df178 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/StockService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/StockService.java @@ -45,8 +45,8 @@ public List findAllStocks() { public Stock find(Stock stock) { Stock st = allStocks.findById(stock.getId()); - if (st != null) { - throw new IllegalArgumentException("Stock with same id exist " + st.getId() + " exist."); + if (st == null) { + return null; } else { return stock; } @@ -58,7 +58,7 @@ public synchronized Stock addStock(Stock stock) { throw new IllegalArgumentException( "A stock already exists with given id. Consider updating data.[" + st.getId() + "]"); } - + allStocks.add(stock); return stock; } diff --git a/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java index d99b6b3dca..c6fd19419a 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java @@ -46,6 +46,7 @@ public void setUpPostgresRepository() { @Override protected Set getDatabaseScripts() { scripts.add("event.sql"); + scripts.add("client.sql"); return scripts; } @@ -151,16 +152,17 @@ public void testProcessOutOfArea() throws SQLException { assertEquals("42abc582-6658-488b-922e-7be500c070f3", outOfAreaEvent.getLocationId()); assertEquals("biddemo", outOfAreaEvent.getProviderId()); - event = new Event().withEventType("Out of Area Service").withProviderId("tester111").withLocationId("2242342-23dsfsdfds") - .withIdentifier(Client.ZEIR_ID, "218229-3"); + event = new Event().withEventType("Out of Area Service").withProviderId("tester111") + .withLocationId("2242342-23dsfsdfds").withIdentifier(Client.ZEIR_ID, "218229-3"); outOfAreaEvent = eventService.processOutOfArea(event); assertEquals(event, outOfAreaEvent); assertEquals(15, eventService.getAll().size()); Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); - event = new Event().withEventType("Out of Area Service - Growth Monitoring").withFormSubmissionId("gjhg34534 nvbnv3345345__4") - .withEventDate(new DateTime()).withObs(obs).withIdentifier(Client.ZEIR_ID, "218229-3"); + event = new Event().withEventType("Out of Area Service - Growth Monitoring") + .withFormSubmissionId("gjhg34534 nvbnv3345345__4").withEventDate(new DateTime()).withObs(obs) + .withIdentifier(Client.ZEIR_ID, "218229-3"); outOfAreaEvent = eventService.processOutOfArea(event); assertEquals(event, outOfAreaEvent); diff --git a/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java new file mode 100644 index 0000000000..87b12603f8 --- /dev/null +++ b/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java @@ -0,0 +1,116 @@ +package org.opensrp.service; + +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; + +import java.io.File; +import java.io.IOException; +import java.nio.file.Files; +import java.nio.file.Paths; +import java.util.HashSet; +import java.util.Set; + +import org.joda.time.DateTime; +import org.joda.time.Minutes; +import org.junit.Assert; +import org.junit.Before; +import org.junit.Test; +import org.opensrp.domain.Client; +import org.opensrp.domain.Multimedia; +import org.opensrp.dto.form.MultimediaDTO; +import org.opensrp.repository.ClientsRepository; +import org.opensrp.repository.MultimediaRepository; +import org.opensrp.repository.postgres.BaseRepositoryTest; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.mock.web.MockMultipartFile; +import org.springframework.web.multipart.MultipartFile; + +public class MultiMediaServiceTest extends BaseRepositoryTest { + + private MultimediaService multimediaService; + + private ClientService clientService; + + @Autowired + @Qualifier("multimediaRepositoryPostgres") + private MultimediaRepository multimediaRepository; + + @Autowired + @Qualifier("clientsRepositoryPostgres") + private ClientsRepository clientsRepository; + + @Value("#{opensrp['multimedia.directory.name']}") + String baseMultimediaDirPath; + + @Before + public void setUp() { + clientService = new ClientService(clientsRepository); + multimediaService = new MultimediaService(multimediaRepository, clientService); + multimediaService.baseMultimediaDirPath = baseMultimediaDirPath; + } + + @Override + protected Set getDatabaseScripts() { + Set scripts = new HashSet(); + scripts.add("multimedia.sql"); + scripts.add("client.sql"); + return scripts; + } + + @Test + public void testUploadFile() throws IOException { + String content = "876nsfsdfs-sdfsfsdf"; + MultipartFile multimediaFile = new MockMultipartFile("mockFile", "test.jpg", "image/jpeg", content.getBytes()); + MultimediaDTO multimediaDTO = new MultimediaDTO("469597f0-eefe-4171-afef-f7234cbb2859", "biddemo", + multimediaFile.getContentType(), "", "profilepic"); + + assertTrue(multimediaService.uploadFile(multimediaDTO, multimediaFile)); + + //assertEquals(multimediaFile, multimediaService.findByCaseId("469597f0-eefe-4171-afef-f7234cbb2859")); + + File file = new File(baseMultimediaDirPath + File.separator + MultimediaService.IMAGES_DIR + File.separator + + "469597f0-eefe-4171-afef-f7234cbb2859.jpg"); + System.out.println(file.getAbsolutePath()); + assertTrue(file.exists()); + assertTrue(file.canRead()); + + assertEquals(content, new String(Files.readAllBytes(Paths.get(file.getAbsolutePath())))); + + } + + @Test + public void testFaveMultimediaFile() throws IOException { + String baseEntityId = "469597f0-eefe-4171-afef-f7234cbb2859"; + String content = "876nsfsdfs-sdfsfsdf"; + MultipartFile multimediaFile = new MockMultipartFile("mockFile", "test.jpg", "image/jpeg", content.getBytes()); + MultimediaDTO multimediaDTO = new MultimediaDTO(baseEntityId, "biddemo", multimediaFile.getContentType(), "", + "profile_picture"); + + assertEquals("success", multimediaService.saveMultimediaFile(multimediaDTO, multimediaFile)); + + File file = new File(baseMultimediaDirPath + File.separator + MultimediaService.IMAGES_DIR + File.separator + + baseEntityId + ".jpg"); + System.out.println(file.getAbsolutePath()); + assertTrue(file.exists()); + assertTrue(file.canRead()); + + assertEquals(content, new String(Files.readAllBytes(Paths.get(file.getAbsolutePath())))); + Client client = clientService.find(baseEntityId); + + Multimedia savedMultimedia = multimediaService.findByCaseId(baseEntityId); + assertEquals(multimediaDTO.getFilePath(), savedMultimedia.getFilePath()); + assertEquals(file.getAbsolutePath(), savedMultimedia.getFilePath()); + assertEquals(multimediaDTO.getContentType(), savedMultimedia.getContentType()); + assertEquals(multimediaDTO.getFileCategory(), savedMultimedia.getFileCategory()); + + assertEquals(5, multimediaService.getMultimediaFiles("biddemo").size()); + assertEquals(6, multimediaRepository.getAll().size()); + + assertEquals(baseEntityId + ".jpg", client.getAttribute("Patient Image")); + Assert.assertEquals(0, Minutes.minutesBetween(client.getDateEdited(), DateTime.now()).getMinutes()); + + } + +} diff --git a/opensrp-core/src/test/java/org/opensrp/service/StockServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/StockServiceTest.java index c88bf8be0c..766c28aaf4 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/StockServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/StockServiceTest.java @@ -1,48 +1,53 @@ package org.opensrp.service; -import static org.mockito.MockitoAnnotations.initMocks; +import java.sql.SQLException; +import java.util.HashSet; +import java.util.List; +import java.util.Set; +import org.joda.time.DateTime; +import org.joda.time.Minutes; import org.junit.Assert; -import org.junit.Before; import org.junit.Test; -import org.mockito.Mock; -import org.mockito.Mockito; import org.opensrp.domain.Stock; -import org.opensrp.repository.couch.AllStocks; -import org.opensrp.service.StockService; -import static org.mockito.Mockito.verify; -import static org.mockito.Mockito.when; -import java.util.List; -import static java.util.Arrays.asList; +import org.opensrp.repository.StocksRepository; +import org.opensrp.repository.postgres.BaseRepositoryTest; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.beans.factory.annotation.Qualifier; /** - * Tests {@link RegistrationDataService}. + * Integration Tests for {@link StockService}. */ -public class StockServiceTest { +public class StockServiceTest extends BaseRepositoryTest { - @Mock - private AllStocks allStocks; - - @Mock private StockService stockService; - @Before - public void setUp() throws Exception { - initMocks(this); - stockService = new StockService(allStocks); - + @Autowired + @Qualifier("stocksRepositoryPostgres") + private StocksRepository stocksRepository; + + @Override + protected Set getDatabaseScripts() { + Set scripts = new HashSet<>(); + scripts.add("stock.sql"); + return scripts; + } + + @Override + public void populateDatabase() throws SQLException { + super.populateDatabase(); + stockService = new StockService(stocksRepository); Stock stock1 = new Stock(Long.parseLong("123"), "VT", "TT", "4-2", 10, Long.parseLong("20062017"), "TF", Long.parseLong("20062017"), Long.parseLong("12345")); Stock stock2 = new Stock(Long.parseLong("123"), "VT", "TT", "4-2", 10, Long.parseLong("20062017"), "TF", Long.parseLong("20062017"), Long.parseLong("12345")); - when(stockService.getAll()).thenReturn(asList(stock1, stock2)); - when(stockService.findAllByProviderid("4-2")).thenReturn(asList(stock1)); - + stockService.addStock(stock1); + stockService.addStock(stock2); } @Test public void shouldSaveStock() { - Stock stock = new Stock(Long.parseLong("123"), "VT", "TT", "4-2", 10, Long.parseLong("20062017"), " TF", + Stock stock = new Stock(Long.parseLong("124"), "VT1", "TT1", "4-2", 10, Long.parseLong("20062017"), " TF", Long.parseLong("20062017"), Long.parseLong("12345")); Stock savedStock = stockService.addorUpdateStock(stock); @@ -52,27 +57,59 @@ public void shouldSaveStock() { } @Test - public void shouldFetchStocksByProcider() throws Exception { - Stock stock1 = new Stock(Long.parseLong("123"), "VT", "TT", "4-2", 10, Long.parseLong("20062017"), "TF", + public void shouldUpdateStockWithSaveorUpdate() { + List stocks = stockService.findAllByProviderid("4-2"); + for (Stock stock : stocks) { + stock.setVaccine_type_id("12334"); + stock.setTransaction_type("Restocking_1"); + stock.setValue(stock.getValue() * 2); + stockService.addorUpdateStock(stock); + } + stocks = stockService.findAllByProviderid("4-2"); + for (Stock savedStock : stocks) { + Assert.assertEquals(0, Minutes.minutesBetween(savedStock.getDateEdited(), DateTime.now()).getMinutes()); + Assert.assertEquals("12334", savedStock.getVaccine_type_id()); + Assert.assertEquals("Restocking_1", savedStock.getTransaction_type()); + Assert.assertEquals(20, savedStock.getValue()); + } + } + + @Test + public void shouldUpdateStock() { + List stocks = stockService.findAllByProviderid("4-2"); + for (Stock stock : stocks) { + stock.setVaccine_type_id("12334"); + stock.setTransaction_type("Restocking_1"); + stock.setValue(stock.getValue() * 2); + stockService.updateStock(stock); + } + stocks = stockService.findAllByProviderid("4-2"); + for (Stock savedStock : stocks) { + Assert.assertEquals(0, Minutes.minutesBetween(savedStock.getDateEdited(), DateTime.now()).getMinutes()); + Assert.assertEquals("12334", savedStock.getVaccine_type_id()); + Assert.assertEquals("Restocking_1", savedStock.getTransaction_type()); + Assert.assertEquals(20, savedStock.getValue()); + } + } + + @Test(expected = IllegalArgumentException.class) + public void shouldNotUpdateStockForNewStock() { + Stock stock = new Stock(Long.parseLong("124"), "VT1", "TT1", "4-2", 10, Long.parseLong("20062017"), " TF", Long.parseLong("20062017"), Long.parseLong("12345")); - + stockService.updateStock(stock); + } + + @Test + public void shouldFetchStocksByProcider() throws Exception { List fecthedListByProviderid = stockService.findAllByProviderid("4-2"); - - Assert.assertEquals(fecthedListByProviderid.get(0).getProviderid(), stock1.getProviderid()); + for (Stock stock : fecthedListByProviderid) + Assert.assertEquals("4-2", stock.getProviderid()); } @Test public void shouldFetchAll() throws Exception { - Stock stock1 = new Stock(Long.parseLong("123"), "VT", "TT", "4-2", 10, Long.parseLong("20062017"), "TF", - Long.parseLong("20062017"), Long.parseLong("12345")); - Stock stock2 = new Stock(Long.parseLong("123"), "VT", "TT", "4-2", 10, Long.parseLong("20062017"), "TF", - Long.parseLong("20062017"), Long.parseLong("12345")); - List fecthedListAll = stockService.getAll(); - - List expectedListAll = asList(stock1, stock2); - - Assert.assertEquals(fecthedListAll.get(0).getProviderid(), expectedListAll.get(0).getProviderid()); + Assert.assertEquals(17, fecthedListAll.size()); } } From f21d5d83442b9063f47e10e0c124df2729eb92f6 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 13 Apr 2018 16:48:06 +0300 Subject: [PATCH 114/133] Use composite indexes, remove unnecessary indexes --- .../20180307115355_create_client_metadata_table.sql | 9 ++------- .../20180307131558_create_event_metadata_table.sql | 12 +----------- .../20180307145358_create_action_metadata_table.sql | 6 +----- .../20180307151623_create_stock_metadata_table.sql | 6 +----- .../20180309113954_create_alert_metadata_table.sql | 10 ++-------- 5 files changed, 7 insertions(+), 36 deletions(-) diff --git a/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql b/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql index 90565f0299..29d5029d41 100644 --- a/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql +++ b/assets/migrations/scripts/20180307115355_create_client_metadata_table.sql @@ -38,14 +38,9 @@ WITH ( OIDS = FALSE ) TABLESPACE core_space; -CREATE INDEX client_metadata_relational_id_index ON core.client_metadata (relational_id); + CREATE INDEX client_metadata_server_version_index ON core.client_metadata (server_version); -CREATE INDEX client_metadata_openmrs_uuid_index ON core.client_metadata (openmrs_uuid); -CREATE INDEX client_metadata_unique_id_index ON core.client_metadata (unique_id); -CREATE INDEX client_metadata_first_name_index ON core.client_metadata (first_name NULLS LAST); -CREATE INDEX client_metadata_middle_name_index ON core.client_metadata (middle_name NULLS LAST); -CREATE INDEX client_metadata_last_name_index ON core.client_metadata (last_name NULLS LAST); -CREATE INDEX client_metadata_birth_date_index ON core.client_metadata (birth_date); +CREATE INDEX client_metadata_identifiers_index ON core.client_metadata (openmrs_uuid,unique_id); CREATE INDEX client_metadata_date_deleted_index ON core.client_metadata (date_deleted); -- //@UNDO diff --git a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql index d428d964e7..3396ef7f53 100644 --- a/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql +++ b/assets/migrations/scripts/20180307131558_create_event_metadata_table.sql @@ -43,21 +43,11 @@ WITH ( ) TABLESPACE core_space; - +CREATE INDEX event_metadata_sync_index ON core.event_metadata (provider_id,location_id,team,team_id,server_version); CREATE INDEX event_metadata_base_entity_id_index ON core.event_metadata (base_entity_id); -CREATE INDEX event_metadata_server_version_index ON core.event_metadata (server_version); CREATE INDEX event_metadata_openmrs_uuid_index ON core.event_metadata (openmrs_uuid); -CREATE INDEX event_metadata_event_type_index ON core.event_metadata (event_type); -CREATE INDEX event_metadata_event_date_index ON core.event_metadata (event_date); -CREATE INDEX event_metadata_provider_id_index ON core.event_metadata (provider_id); -CREATE INDEX event_metadata_location_id_index ON core.event_metadata (location_id); -CREATE INDEX event_metadata_team_index ON core.event_metadata (team); -CREATE INDEX event_metadata_team_id_index ON core.event_metadata (team_id); -CREATE INDEX event_metadata_date_created_index ON core.event_metadata (date_created); -CREATE INDEX event_metadata_date_edited_index ON core.event_metadata (date_edited); CREATE INDEX event_metadata_date_deleted_index ON core.event_metadata (date_deleted); - -- //@UNDO -- SQL to undo the change goes here. diff --git a/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql b/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql index f99ef8baec..e3774e228d 100644 --- a/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql +++ b/assets/migrations/scripts/20180307145358_create_action_metadata_table.sql @@ -35,11 +35,7 @@ WITH ( ) TABLESPACE core_space; CREATE INDEX action_metadata_base_entity_id_index ON core.action_metadata (base_entity_id); -CREATE INDEX action_metadata_server_version_index ON core.action_metadata (server_version); -CREATE INDEX action_metadata_provider_id_index ON core.action_metadata (provider_id); -CREATE INDEX action_metadata_location_id_index ON core.action_metadata (location_id); -CREATE INDEX action_metadata_team_index ON core.action_metadata (team); -CREATE INDEX action_metadata_team_id_index ON core.action_metadata (team_id); +CREATE INDEX action_metadata_sync_index ON core.action_metadata (provider_id,server_version); -- //@UNDO diff --git a/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql b/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql index 420dd8734c..241853d53c 100644 --- a/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql +++ b/assets/migrations/scripts/20180307151623_create_stock_metadata_table.sql @@ -33,11 +33,7 @@ WITH ( OIDS = FALSE ) TABLESPACE core_space; -CREATE INDEX stock_metadata_server_version_index ON core.stock_metadata (server_version); -CREATE INDEX stock_metadata_provider_id_index ON core.stock_metadata (provider_id); -CREATE INDEX stock_metadata_location_id_index ON core.stock_metadata (location_id); -CREATE INDEX stock_metadata_team_index ON core.stock_metadata (team); -CREATE INDEX stock_metadata_team_id_index ON core.stock_metadata (team_id); +CREATE INDEX stock_metadata_sync_index ON core.stock_metadata (provider_id,server_version); -- //@UNDO -- SQL to undo the change goes here. diff --git a/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql b/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql index f207ba36ba..6cb5439804 100644 --- a/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql +++ b/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql @@ -37,14 +37,8 @@ WITH ( OIDS = FALSE ) TABLESPACE core_space; -CREATE INDEX alert_metadata_base_entity_id_index ON core.alert_metadata (base_entity_id); -CREATE INDEX alert_metadata_server_version_index ON core.alert_metadata (server_version); -CREATE INDEX alert_metadata_provider_id_index ON core.alert_metadata (provider_id); -CREATE INDEX alert_metadata_location_id_index ON core.alert_metadata (location_id); -CREATE INDEX alert_metadata_team_index ON core.alert_metadata (team); -CREATE INDEX alert_metadata_team_id_index ON core.alert_metadata (team_id); -CREATE INDEX alert_metadata_is_active_index ON core.alert_metadata (is_active); -CREATE INDEX alert_metadata_trigger_name_index ON core.alert_metadata (trigger_name); +CREATE INDEX alert_metadata_composite_index ON core.alert_metadata (base_entity_id,provider_id,server_version,trigger_name); + -- //@UNDO -- SQL to undo the change goes here. From c880591a3d90cbb8f1a38f7a2fe256b575ab1c20 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 16 Apr 2018 14:44:38 +0300 Subject: [PATCH 115/133] Add is_active to unique key --- .../scripts/20180309113954_create_alert_metadata_table.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql b/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql index 6cb5439804..5498e12685 100644 --- a/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql +++ b/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql @@ -31,7 +31,7 @@ CREATE TABLE core.alert_metadata is_active boolean, trigger_name character varying, PRIMARY KEY (id), - UNIQUE(base_entity_id,provider_id,trigger_name) + UNIQUE(base_entity_id,provider_id,trigger_name,is_active) ) WITH ( OIDS = FALSE From 4f8da150e301c67cbd43e2c0872561bbb2c45717 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 16 Apr 2018 15:14:49 +0300 Subject: [PATCH 116/133] Correct revision update logic --- .../org/opensrp/repository/postgres/BaseRepositoryImpl.java | 2 +- .../java/org/opensrp/service/MultiMediaServiceTest.java | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java index e2357617eb..7b0c5d70b4 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/BaseRepositoryImpl.java @@ -33,7 +33,7 @@ else if (entity.getRevision().startsWith(REVISION_PREFIX)) REVISION_PREFIX + (Integer.parseInt(entity.getRevision().substring(REVISION_PREFIX.length())) + 1)); else { String[] revision = entity.getRevision().split("-"); - entity.setRevision((Integer.parseInt(revision[0]) + 1) + revision[1]); + entity.setRevision((Integer.parseInt(revision[0]) + 1) + "-" + revision[1]); } } diff --git a/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java index 87b12603f8..942c70b3d4 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java @@ -81,10 +81,10 @@ public void testUploadFile() throws IOException { } @Test - public void testFaveMultimediaFile() throws IOException { - String baseEntityId = "469597f0-eefe-4171-afef-f7234cbb2859"; + public void testSaveMultimediaFile() throws IOException { + String baseEntityId = "469597f0-7453-fsfsf-afef-f723b2859"; String content = "876nsfsdfs-sdfsfsdf"; - MultipartFile multimediaFile = new MockMultipartFile("mockFile", "test.jpg", "image/jpeg", content.getBytes()); + MultipartFile multimediaFile = new MockMultipartFile("mockFile", "test1.jpg", "image/jpeg", content.getBytes()); MultimediaDTO multimediaDTO = new MultimediaDTO(baseEntityId, "biddemo", multimediaFile.getContentType(), "", "profile_picture"); From 71641ea886b7cdbc0e4ff4e888e69e869668ee4a Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 16 Apr 2018 15:17:40 +0300 Subject: [PATCH 117/133] Code cleanup --- .../org/opensrp/service/ClientServiceTest.java | 4 ++-- .../java/org/opensrp/service/EventServiceTest.java | 14 +++++++------- .../org/opensrp/service/MultiMediaServiceTest.java | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/opensrp-core/src/test/java/org/opensrp/service/ClientServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/ClientServiceTest.java index 2f3b5af882..436050e2fd 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/ClientServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/ClientServiceTest.java @@ -100,13 +100,13 @@ public void testFind() { } @Test(expected = IllegalArgumentException.class) - public void testUpdateClient_NewClient() throws JSONException { + public void testUpdateClientNewClient() throws JSONException { Client client = new Client("33d9a17f-d729-4276-9891-b43e8b60fd12"); clientService.updateClient(client); } @Test(expected = IllegalArgumentException.class) - public void testUpdateClient_Client_Not_Exists() throws JSONException { + public void testUpdateClientClientNotExists() throws JSONException { Client client = clientService.find("67007c17-97bb-4732-a1b8-3a0c292b5432"); clientsRepository.safeRemove(client); client.setFirstName("Conses"); diff --git a/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java index c6fd19419a..0726735c4a 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java @@ -114,26 +114,26 @@ public void testAddEvent() { } @Test(expected = IllegalArgumentException.class) - public void testAddEvent_For_ExistingEvent() { + public void testAddEventForExistingEvent() { Event event = eventService.findById("05934ae338431f28bf6793b241bdc44a"); eventService.addEvent(event); } @Test(expected = IllegalArgumentException.class) - public void testAddEvent_Duplicate_Identifiers() { + public void testAddEventDuplicateIdentifiers() { Event event = new Event().withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "4aecc0c1-e008-4227-938d-66db17236a3d"); eventService.addEvent(event); } @Test(expected = IllegalArgumentException.class) - public void testAddEvent_Duplicate_BaseEntity_FormSubmission() { + public void testAddEventDuplicateBaseEntityFormSubmission() { Event event = new Event().withBaseEntityId("58b33379-dab2-4f5c-8f09-6d2bd63023d8") .withFormSubmissionId("5f1b201d-2132-4eb9-8fa1-3169a61cc50a"); eventService.addEvent(event); } @Test(expected = DuplicateKeyException.class) - public void testAddEvent_Duplicate_FormSubmission() { + public void testAddEventDuplicateFormSubmission() { Event event = new Event().withBaseEntityId("58b33379-dab2-4f") .withFormSubmissionId("5f1b201d-2132-4eb9-8fa1-3169a61cc50a"); eventService.addEvent(event); @@ -207,7 +207,7 @@ public void testAddorUpdateEvent() { } @Test(expected = IllegalArgumentException.class) - public void testUpdateEvent_NonExistingEvent() { + public void testUpdateEventNonExistingEvent() { Obs obs = new Obs("concept", "decimal", "1730AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA", null, "3.5", null, "weight"); Event event = new Event().withBaseEntityId("435534534543").withEventType("Growth Monitoring") .withFormSubmissionId("gjhg34534 nvbnv3345345__4").withEventDate(new DateTime()).withObs(obs); @@ -231,13 +231,13 @@ public void testUpdateEvent() { } @Test(expected = IllegalArgumentException.class) - public void testMergeEvent_Missing_Identifiers() { + public void testMergeEventMissingIdentifiers() { Event event = new Event().withBaseEntityId("435534534543").withEventType("Growth Monitoring"); eventService.mergeEvent(event); } @Test(expected = IllegalArgumentException.class) - public void testMergeEvent_NonExisting_Identifiers() { + public void testMergeEventNonExistingIdentifiers() { Event event = new Event().withBaseEntityId("435534534543").withEventType("Growth Monitoring") .withIdentifier(OPENMRS_UUID_IDENTIFIER_TYPE, "242332-hgfhfh-dfg8d"); eventService.mergeEvent(event); diff --git a/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java index 942c70b3d4..6c24ca3d5f 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java @@ -42,7 +42,7 @@ public class MultiMediaServiceTest extends BaseRepositoryTest { private ClientsRepository clientsRepository; @Value("#{opensrp['multimedia.directory.name']}") - String baseMultimediaDirPath; + private String baseMultimediaDirPath; @Before public void setUp() { From 766ffcdf8c0eea602fc23530532d7c4903f63a91 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 16 Apr 2018 15:47:16 +0300 Subject: [PATCH 118/133] Travis create the multimedia upload directory writable by travis user --- .travis.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 4e963b9c78..0f51585064 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,6 +16,8 @@ before_script: - psql -c "CREATE DATABASE opensrp_test WITH OWNER = opensrp_admin;" -U postgres - chmod +x assets/migrations/run_mybatis_migrations.sh - sudo ./assets/migrations/run_mybatis_migrations.sh + - sudo mkdir -p /opt/multimedia + - sudo chmod 755 /opt/multimedia script: - javac -version - java -version From d273b10bdd7011307097023cba01140a642733d9 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 16 Apr 2018 15:47:59 +0300 Subject: [PATCH 119/133] Merge pull request #429 from OpenSRP/issue428 Migration scripts for migrating data from couchdb to postgres --- ...0309113954_create_alert_metadata_table.sql | 1 + .../org/opensrp/web/rest/EventResource.java | 37 ++++++++++--------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql b/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql index 5498e12685..db2d34288d 100644 --- a/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql +++ b/assets/migrations/scripts/20180309113954_create_alert_metadata_table.sql @@ -37,6 +37,7 @@ WITH ( OIDS = FALSE ) TABLESPACE core_space; + CREATE INDEX alert_metadata_composite_index ON core.alert_metadata (base_entity_id,provider_id,server_version,trigger_name); diff --git a/opensrp-web/src/main/java/org/opensrp/web/rest/EventResource.java b/opensrp-web/src/main/java/org/opensrp/web/rest/EventResource.java index c28ffdf113..ac3af50871 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/rest/EventResource.java +++ b/opensrp-web/src/main/java/org/opensrp/web/rest/EventResource.java @@ -118,8 +118,8 @@ protected ResponseEntity sync(HttpServletRequest request) { List events = new ArrayList(); List clientIds = new ArrayList(); List clients = new ArrayList(); - if (team != null || providerId != null || locationId != null || baseEntityId != null) { - long startTime = System.currentTimeMillis(); + long startTime = System.currentTimeMillis(); + if (team != null || providerId != null || locationId != null || baseEntityId != null) { EventSearchBean eventSearchBean = new EventSearchBean(); eventSearchBean.setTeam(team); eventSearchBean.setTeamId(teamId); @@ -142,25 +142,26 @@ protected ResponseEntity sync(HttpServletRequest request) { clients.addAll(clientService.findByFieldValue(BASE_ENTITY_ID, clientIds.subList(i, end))); } logger.info("fetching clients took: " + (System.currentTimeMillis() - startTime)); - - List foundClientIds = new ArrayList<>(); - for (Client client : clients) { - foundClientIds.add(client.getBaseEntityId()); - } - - boolean removed = clientIds.removeAll(foundClientIds); - if (removed) { - for (String clientId : clientIds) { - Client client = clientService.getByBaseEntityId(clientId); - if (client != null) { - clients.add(client); - } + } + } + + if (searchMissingClients) { + + List foundClientIds = new ArrayList<>(); + for (Client client : clients) { + foundClientIds.add(client.getBaseEntityId()); + } + + boolean removed = clientIds.removeAll(foundClientIds); + if (removed) { + for (String clientId : clientIds) { + Client client = clientService.getByBaseEntityId(clientId); + if (client != null) { + clients.add(client); } - } - - logger.info("fetching missing clients took: " + (System.currentTimeMillis() - startTime)); } + logger.info("fetching missing clients took: " + (System.currentTimeMillis() - startTime)); } JsonArray eventsArray = (JsonArray) gson.toJsonTree(events, new TypeToken>() {}.getType()); From a6ce6226bd4f1a0c47881daf487b7c8d253c0871 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 16 Apr 2018 16:00:06 +0300 Subject: [PATCH 120/133] Set multimedia permissions recussively --- .travis.yml | 2 +- .../test/java/org/opensrp/service/MultiMediaServiceTest.java | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 0f51585064..1f4fd47c57 100644 --- a/.travis.yml +++ b/.travis.yml @@ -17,7 +17,7 @@ before_script: - chmod +x assets/migrations/run_mybatis_migrations.sh - sudo ./assets/migrations/run_mybatis_migrations.sh - sudo mkdir -p /opt/multimedia - - sudo chmod 755 /opt/multimedia + - sudo chmod -R 755 /opt/multimedia script: - javac -version - java -version diff --git a/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java index 6c24ca3d5f..20b6d8a822 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java @@ -12,7 +12,6 @@ import org.joda.time.DateTime; import org.joda.time.Minutes; -import org.junit.Assert; import org.junit.Before; import org.junit.Test; import org.opensrp.domain.Client; @@ -109,7 +108,7 @@ public void testSaveMultimediaFile() throws IOException { assertEquals(6, multimediaRepository.getAll().size()); assertEquals(baseEntityId + ".jpg", client.getAttribute("Patient Image")); - Assert.assertEquals(0, Minutes.minutesBetween(client.getDateEdited(), DateTime.now()).getMinutes()); + assertEquals(0, Minutes.minutesBetween(client.getDateEdited(), DateTime.now()).getMinutes()); } From 0edc369c3eb52121c175ffe6e5a7583fd9c65432 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 16 Apr 2018 16:49:36 +0300 Subject: [PATCH 121/133] Merge 'couchdb-to-postgres' into issue430 --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1f4fd47c57..760f8901b8 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,8 @@ before_script: - psql -c "CREATE DATABASE opensrp_test WITH OWNER = opensrp_admin;" -U postgres - chmod +x assets/migrations/run_mybatis_migrations.sh - sudo ./assets/migrations/run_mybatis_migrations.sh - - sudo mkdir -p /opt/multimedia - - sudo chmod -R 755 /opt/multimedia + - sudo mkdir -p /opt/multimedia/patient_images + - sudo chmod -R 755 /opt/multimedia/patient_images script: - javac -version - java -version From 10aa9ba01074cb30dde5370c03b7290d51606df8 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 16 Apr 2018 17:12:41 +0300 Subject: [PATCH 122/133] Set multimedia permissions --- .travis.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 760f8901b8..763231881d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,8 +16,9 @@ before_script: - psql -c "CREATE DATABASE opensrp_test WITH OWNER = opensrp_admin;" -U postgres - chmod +x assets/migrations/run_mybatis_migrations.sh - sudo ./assets/migrations/run_mybatis_migrations.sh + - id - sudo mkdir -p /opt/multimedia/patient_images - - sudo chmod -R 755 /opt/multimedia/patient_images + - sudo chown -R 777 /opt/multimedia/patient_images script: - javac -version - java -version From a8aa3c1200f3bc4a2068f3f27b17b4979c29b147 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Mon, 16 Apr 2018 17:51:39 +0300 Subject: [PATCH 123/133] Set multimedia directory ownership to travis user --- .travis.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index 763231881d..2435450dee 100644 --- a/.travis.yml +++ b/.travis.yml @@ -16,9 +16,8 @@ before_script: - psql -c "CREATE DATABASE opensrp_test WITH OWNER = opensrp_admin;" -U postgres - chmod +x assets/migrations/run_mybatis_migrations.sh - sudo ./assets/migrations/run_mybatis_migrations.sh - - id - - sudo mkdir -p /opt/multimedia/patient_images - - sudo chown -R 777 /opt/multimedia/patient_images + - sudo mkdir -p /opt/multimedia + - sudo chown -R travis:travis /opt/multimedia script: - javac -version - java -version From 3b6f1f40b5ecbbc35c6932acdb46f525aa30958f Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Tue, 17 Apr 2018 09:33:47 +0300 Subject: [PATCH 124/133] MultiMediaTest testSaveMultimediaFile with existing client --- .../java/org/opensrp/service/MultiMediaServiceTest.java | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java index 20b6d8a822..d9a3359863 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java @@ -61,16 +61,17 @@ protected Set getDatabaseScripts() { @Test public void testUploadFile() throws IOException { String content = "876nsfsdfs-sdfsfsdf"; + String baseEntityId = "67007c17-97bb-4732-a1b8-3a0c292b5432"; MultipartFile multimediaFile = new MockMultipartFile("mockFile", "test.jpg", "image/jpeg", content.getBytes()); - MultimediaDTO multimediaDTO = new MultimediaDTO("469597f0-eefe-4171-afef-f7234cbb2859", "biddemo", - multimediaFile.getContentType(), "", "profilepic"); + MultimediaDTO multimediaDTO = new MultimediaDTO(baseEntityId, "biddemo", multimediaFile.getContentType(), "", + "profilepic"); assertTrue(multimediaService.uploadFile(multimediaDTO, multimediaFile)); //assertEquals(multimediaFile, multimediaService.findByCaseId("469597f0-eefe-4171-afef-f7234cbb2859")); File file = new File(baseMultimediaDirPath + File.separator + MultimediaService.IMAGES_DIR + File.separator - + "469597f0-eefe-4171-afef-f7234cbb2859.jpg"); + + baseEntityId + ".jpg"); System.out.println(file.getAbsolutePath()); assertTrue(file.exists()); assertTrue(file.canRead()); @@ -81,7 +82,7 @@ public void testUploadFile() throws IOException { @Test public void testSaveMultimediaFile() throws IOException { - String baseEntityId = "469597f0-7453-fsfsf-afef-f723b2859"; + String baseEntityId = "469597f0-eefe-4171-afef-f7234cbb2859"; String content = "876nsfsdfs-sdfsfsdf"; MultipartFile multimediaFile = new MockMultipartFile("mockFile", "test1.jpg", "image/jpeg", content.getBytes()); MultimediaDTO multimediaDTO = new MultimediaDTO(baseEntityId, "biddemo", multimediaFile.getContentType(), "", From b1bcaf2d045b719ab7287f91bec2e7973582f476 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Wed, 18 Apr 2018 10:16:55 +0300 Subject: [PATCH 125/133] Merge pull request #432 from OpenSRP/issue430 Cleanup Postgres migration --- opensrp-core/src/test/resources/test-scripts/client.sql | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opensrp-core/src/test/resources/test-scripts/client.sql b/opensrp-core/src/test/resources/test-scripts/client.sql index 87c1a20690..a066b0701a 100644 --- a/opensrp-core/src/test/resources/test-scripts/client.sql +++ b/opensrp-core/src/test/resources/test-scripts/client.sql @@ -12,7 +12,7 @@ INSERT INTO core.client (id, json) VALUES (4, '{"_id": "05934ae338431f28bf6793b2415a0374", "type": "Client", "gender": "Female", "lastName": "Child", "_rev": "2-5ec561cece5508f14bb0381b59e40baa", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Er", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Fith", "attributes": {}, "dateEdited": "2018-03-13T02:23:03.971", "dateCreated": "2018-03-13T02:20:08.984", "identifiers": {"ZEIR_ID": "218224-4", "OPENMRS_UUID": "cf58894b-71c6-41e0-a977-7283f2411cd5"}, "baseEntityId": "94f3e8fb-2f05-4fca-8119-2b593d1962eb", "relationships": {"mother": ["3abdb25a-f151-4a95-9311-bd30bf935085"]}, "birthdateApprox": false, "deathdateApprox": false}'), (5, '{"_id": "05934ae338431f28bf6793b24159c647", "type": "Client", "gender": "Male", "lastName": "Child", "_rev": "2-3867cacbf2a4b3736524552816381927", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Rewe", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-01-04T03:00:00.000", "firstName": "First", "attributes": {}, "dateEdited": "2018-03-13T00:47:57.879", "dateCreated": "2018-03-13T00:42:58.436", "identifiers": {"ZEIR_ID": "218220-2", "OPENMRS_UUID": "9c4260f2-d296-4af1-b771-debda1b6cfd1"}, "baseEntityId": "33d9a17f-d729-4276-9891-b43e8b60fd12", "relationships": {"mother": ["d0ecee83-6ccd-4096-9188-f63a40fa2f63"]}, "birthdateApprox": false, "deathdateApprox": false}'), (6, '{"_id": "05934ae338431f28bf6793b24164cbd9", "type": "Client", "gender": "Female", "lastName": "Mtini ", "_rev": "2-70add9f425fe26094fe4542bdf9a9acf", "addresses": [{"addressType": "usual_residence", "addressFields": {"address1": "Church", "address2": "Tulia Gardens ", "address3": "f940e2a3-b553-496a-80b3-091891bb5194"}}], "birthdate": "2016-04-13T03:00:00.000", "firstName": "Sally", "attributes": {"CHW_Name": "Hellen", "Home_Facility": "Happy Kids Clinic", "CHW_Phone_Number": "0964357951", "Father_NRC_Number": "721345/67/8"}, "dateEdited": "2018-03-13T12:26:53.223", "dateCreated": "2018-03-13T12:26:43.857", "identifiers": {"ZEIR_ID": "218923-1", "OPENMRS_UUID": "ab91df5d-e433-40f3-b44f-427b73c9ae2a"}, "baseEntityId": "86c039a2-0b68-4166-849e-f49897e3a510", "relationships": {"mother": ["758dab58-7629-4da9-882f-ae5110bcd240"]}, "birthdateApprox": false, "deathdateApprox": false}'), -(7, '{"_id": "05934ae338431f28bf6793b241692648", "type": "Client", "gender": "Female", "lastName": "Babbyfour", "_rev": "2-2fa38eef6330ee8753e1ea18a94512aa", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gcfd", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "Januar", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:09.837", "dateCreated": "2018-03-13T13:11:18.453", "identifiers": {"ZEIR_ID": "218229-3", "OPENMRS_UUID": "825b4d23-a3ea-4c58-a95b-d0df2f9c1690"}, "baseEntityId": "4a2a4ad9-cd29-47cb-bdb9-5b617a73b898", "relationships": {"mother": ["9ac3fac4-a74c-45d5-bedb-da357cec3779"]}, "birthdateApprox": false, "deathdateApprox": false}'), +(7, '{"_id": "05934ae338431f28bf6793b241692648", "type": "Client", "gender": "Female", "lastName": "Babbyfour", "_rev": "2-2fa38eef6330ee8753e1ea18a94512aa", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gcfd", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "Januar", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:09.837", "dateCreated": "2018-03-13T13:11:18.453", "identifiers": {"ZEIR_ID": "218229-3", "OPENMRS_UUID": "825b4d23-a3ea-4c58-a95b-d0df2f9c1690"}, "baseEntityId": "58b33379-dab2-4f5c-8f09-6d2bd63023d8", "relationships": {"mother": ["9ac3fac4-a74c-45d5-bedb-da357cec3779"]}, "birthdateApprox": false, "deathdateApprox": false}'), (8, '{"_id": "05934ae338431f28bf6793b241693a2f", "type": "Client", "gender": "Female", "lastName": "Babyfive", "_rev": "2-8a753553c0e0ae4ed0257bb6d686d2ea", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Home", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "January", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:11.027", "dateCreated": "2018-03-13T13:11:18.725", "identifiers": {"ZEIR_ID": "218230-1", "OPENMRS_UUID": "11a1ecf6-7d6d-4e12-8e6f-bb3cf5a3ebb8"}, "baseEntityId": "aabcd2cc-c111-41c6-85e6-cb5d9e350d08", "relationships": {"mother": ["41d1841b-4d6c-4f06-b5e8-b55907892ee6"]}, "birthdateApprox": false, "deathdateApprox": false}'), (9, '{"_id": "05934ae338431f28bf6793b2416946b7", "type": "Client", "gender": "Female", "lastName": "Babysix", "_rev": "2-0684ed7a15c29c8bf479a36d8c5986c5", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Gu", "address3": "82b4de33-a336-4671-820b-32a32ace8819"}}], "birthdate": "2018-01-01T03:00:00.000", "firstName": "January ", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T13:12:12.257", "dateCreated": "2018-03-13T13:11:19.005", "identifiers": {"ZEIR_ID": "218231-9", "OPENMRS_UUID": "eb4b258c-7558-436c-a1fe-e91d9e12f849"}, "baseEntityId": "469597f0-eefe-4171-afef-f7234cbb2859", "relationships": {"mother": ["7bce6b9a-e575-4cc6-b987-a12284912e84"]}, "birthdateApprox": false, "deathdateApprox": false}'), (10, '{"_id": "05934ae338431f28bf6793b24167817d", "type": "Client", "gender": "Male", "lastName": "Child", "_rev": "2-9de838d2e671a8d5011cedf66143b023", "addresses": [{"addressType": "usual_residence", "addressFields": {"address2": "Guy", "address3": "78e20b3d-f25e-436f-9cb0-9a505d362f34"}}], "birthdate": "2018-03-01T03:00:00.000", "firstName": "Sixth", "attributes": {"Home_Facility": "Happy Kids Clinic"}, "dateEdited": "2018-03-13T12:57:03.225", "dateCreated": "2018-03-13T12:53:04.188", "identifiers": {"ZEIR_ID": "218225-1", "OPENMRS_UUID": "43397e39-0a11-4bb7-ba2d-3820436bef85"}, "baseEntityId": "28caef27-d1b3-497b-8a55-954f2f0f6e24", "relationships": {"mother": ["ab1eda08-2185-4d5f-9301-abb17d376ded"]}, "birthdateApprox": false, "deathdateApprox": false}'), From a6dd0b6f4b3add6563e933fab03745a072f7a172 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 20 Apr 2018 14:39:34 +0300 Subject: [PATCH 126/133] Update Unit tests to reflect master branch --- .../resources/applicationContext-opensrp.xml | 4 ++-- .../org/opensrp/service/EventServiceTest.java | 4 ++-- .../opensrp/service/MultiMediaServiceTest.java | 18 ++---------------- 3 files changed, 6 insertions(+), 20 deletions(-) diff --git a/opensrp-core/src/main/resources/applicationContext-opensrp.xml b/opensrp-core/src/main/resources/applicationContext-opensrp.xml index 2343f7f6e9..bad0b47046 100644 --- a/opensrp-core/src/main/resources/applicationContext-opensrp.xml +++ b/opensrp-core/src/main/resources/applicationContext-opensrp.xml @@ -26,7 +26,7 @@ - - + + diff --git a/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java index 0726735c4a..3ee7625f81 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/EventServiceTest.java @@ -149,7 +149,7 @@ public void testProcessOutOfArea() throws SQLException { Event outOfAreaEvent = eventService.processOutOfArea(event); assertEquals(1, outOfAreaEvent.getDetails().size()); assertEquals("biddemo", outOfAreaEvent.getDetails().get("out_of_catchment_provider_id")); - assertEquals("42abc582-6658-488b-922e-7be500c070f3", outOfAreaEvent.getLocationId()); + assertEquals("2242342-23dsfsdfds", outOfAreaEvent.getLocationId()); assertEquals("biddemo", outOfAreaEvent.getProviderId()); event = new Event().withEventType("Out of Area Service").withProviderId("tester111") @@ -167,7 +167,7 @@ public void testProcessOutOfArea() throws SQLException { outOfAreaEvent = eventService.processOutOfArea(event); assertEquals(event, outOfAreaEvent); - assertEquals(16, eventService.getAll().size()); + assertEquals(15, eventService.getAll().size()); } diff --git a/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java b/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java index d9a3359863..2554b70581 100644 --- a/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java +++ b/opensrp-core/src/test/java/org/opensrp/service/MultiMediaServiceTest.java @@ -10,14 +10,10 @@ import java.util.HashSet; import java.util.Set; -import org.joda.time.DateTime; -import org.joda.time.Minutes; import org.junit.Before; import org.junit.Test; -import org.opensrp.domain.Client; import org.opensrp.domain.Multimedia; import org.opensrp.dto.form.MultimediaDTO; -import org.opensrp.repository.ClientsRepository; import org.opensrp.repository.MultimediaRepository; import org.opensrp.repository.postgres.BaseRepositoryTest; import org.springframework.beans.factory.annotation.Autowired; @@ -30,23 +26,16 @@ public class MultiMediaServiceTest extends BaseRepositoryTest { private MultimediaService multimediaService; - private ClientService clientService; - @Autowired @Qualifier("multimediaRepositoryPostgres") private MultimediaRepository multimediaRepository; - @Autowired - @Qualifier("clientsRepositoryPostgres") - private ClientsRepository clientsRepository; - @Value("#{opensrp['multimedia.directory.name']}") private String baseMultimediaDirPath; @Before public void setUp() { - clientService = new ClientService(clientsRepository); - multimediaService = new MultimediaService(multimediaRepository, clientService); + multimediaService = new MultimediaService(multimediaRepository); multimediaService.baseMultimediaDirPath = baseMultimediaDirPath; } @@ -97,7 +86,7 @@ public void testSaveMultimediaFile() throws IOException { assertTrue(file.canRead()); assertEquals(content, new String(Files.readAllBytes(Paths.get(file.getAbsolutePath())))); - Client client = clientService.find(baseEntityId); + Multimedia savedMultimedia = multimediaService.findByCaseId(baseEntityId); assertEquals(multimediaDTO.getFilePath(), savedMultimedia.getFilePath()); @@ -108,9 +97,6 @@ public void testSaveMultimediaFile() throws IOException { assertEquals(5, multimediaService.getMultimediaFiles("biddemo").size()); assertEquals(6, multimediaRepository.getAll().size()); - assertEquals(baseEntityId + ".jpg", client.getAttribute("Patient Image")); - assertEquals(0, Minutes.minutesBetween(client.getDateEdited(), DateTime.now()).getMinutes()); - } } From e7f7cec69adaab169446e90ac53c5ab1835a9ce7 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 20 Apr 2018 14:51:08 +0300 Subject: [PATCH 127/133] Implement findByProvider in postgres --- .../repository/postgres/EventsRepositoryImpl.java | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java index 3ed045873f..9ef5b5b888 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/EventsRepositoryImpl.java @@ -373,6 +373,13 @@ public List findEventByEventTypeBetweenTwoDates(String eventType) { return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, DEFAULT_FETCH_SIZE)); } + @Override + public List findByProvider(String provider) { + EventMetadataExample example = new EventMetadataExample(); + example.createCriteria().andProviderIdEqualTo(provider); + return convert(eventMetadataMapper.selectManyWithRowBounds(example, 0, DEFAULT_FETCH_SIZE)); + } + @Override protected Long retrievePrimaryKey(Event t) { Object uniqueId = getUniqueField(t); @@ -400,12 +407,6 @@ protected Object getUniqueField(Event t) { return t.getId(); } - @Override - public List findByProvider(String provider) { - // TODO Auto-generated method stub - return null; - } - // Private Methods private Event convert(org.opensrp.domain.postgres.Event event) { if (event == null || event.getJson() == null || !(event.getJson() instanceof Event)) { From aecfd6fb53082d3d19d8a0c7bd76e9dcec678db9 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 20 Apr 2018 15:44:02 +0300 Subject: [PATCH 128/133] Implements findAllActionNotExpired on Postgres, unit test added methods --- .../postgres/ActionRepositoryImpl.java | 3 +- .../mapper/custom/CustomActionMapper.java | 3 ++ .../mapper/custom/xml/CustomActionMapper.xml | 49 ++++++++++++------- .../postgres/ActionsRepositoryTest.java | 9 ++++ .../postgres/EventsRepositoryTest.java | 15 ++++++ .../test/resources/test-scripts/action.sql | 2 +- 6 files changed, 59 insertions(+), 22 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java index 2c3d819832..11cef3db13 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/ActionRepositoryImpl.java @@ -241,8 +241,7 @@ public List findByCriteria(String team, String providerId, long timeStam @Override public List findAllActionNotExpired() { - // TODO Auto-generated method stub - return null; + return convert(actionMapper.selectNotExpired(0, DEFAULT_FETCH_SIZE)); } //private methods diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomActionMapper.java b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomActionMapper.java index 90c37f7846..3957fae497 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomActionMapper.java +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/CustomActionMapper.java @@ -2,6 +2,7 @@ import java.util.List; +import org.apache.ibatis.annotations.Param; import org.opensrp.domain.postgres.Action; import org.opensrp.repository.postgres.mapper.ActionMapper; @@ -12,4 +13,6 @@ public interface CustomActionMapper extends ActionMapper { Action selectByDocumentId(String documentId); List selectIdsByTarget(String actionTarget); + + List selectNotExpired(@Param("offset") int offset, @Param("limit") int limit); } diff --git a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMapper.xml b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMapper.xml index 42a2897db9..d895eb3b47 100644 --- a/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMapper.xml +++ b/opensrp-core/src/main/java/org/opensrp/repository/postgres/mapper/custom/xml/CustomActionMapper.xml @@ -14,26 +14,37 @@ insert into core.action - - - id, - - - json, - - - - - #{id,jdbcType=BIGINT}, - - - #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ActionTypeHandler}, - - + + + id, + + + json, + + + + + #{id,jdbcType=BIGINT}, + + + #{json,jdbcType=OTHER,typeHandler=org.opensrp.repository.postgres.handler.ActionTypeHandler}, + + - - + select id from core.action where json->>'actionTarget' = #{actionTarget,jdbcType=VARCHAR} + + \ No newline at end of file diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ActionsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ActionsRepositoryTest.java index a9dda93768..c64bfa82ee 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/ActionsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/ActionsRepositoryTest.java @@ -240,4 +240,13 @@ public void testFindByCriteria() { assertEquals("2018-04-23", actions.get(0).data().get("completionDate")); } + + @Test + public void testFindAllActionNotExpired() { + List actions = actionsRepository.findAllActionNotExpired(); + assertEquals(1, actions.size()); + assertEquals("05934ae338431f28bf6793b2417dba2d", actions.get(0).getId()); + + } + } diff --git a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java index 6624e4f67b..b700c5f273 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/postgres/EventsRepositoryTest.java @@ -585,4 +585,19 @@ public void testAdd() { } + @Test + public void testFindByProvider() { + List events = eventsRepository.findByProvider("biddemo"); + assertEquals(13, events.size()); + events = eventsRepository.findByProvider("biddemo2"); + assertEquals(2, events.size()); + for (Event event : events) { + assertEquals("biddemo2", event.getProviderId()); + assertTrue(event.getId().equals("05934ae338431f28bf6793b241781149") + || event.getId().equals("05934ae338431f28bf6793b241781a1e")); + } + + assertTrue(eventsRepository.findByProvider("biddemo9").isEmpty()); + } + } diff --git a/opensrp-core/src/test/resources/test-scripts/action.sql b/opensrp-core/src/test/resources/test-scripts/action.sql index 37c52cf614..61b12d8e2e 100644 --- a/opensrp-core/src/test/resources/test-scripts/action.sql +++ b/opensrp-core/src/test/resources/test-scripts/action.sql @@ -38,7 +38,7 @@ INSERT INTO core.action (id, json) VALUES (30, '{"_id": "05934ae338431f28bf6793b2417d2ec2", "data": {"startDate": "2018-02-22", "visitCode": "penta1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PENTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-8506e63790993901b69708e013df5a8e", "timeStamp": 1520978414292, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), (31, '{"_id": "05934ae338431f28bf6793b2417d3aa0", "data": {"startDate": "2018-02-22", "visitCode": "rota1", "expiryDate": "2018-08-01", "alertStatus": "urgent", "scheduleName": "ROTA 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-636eec945c3c237fd8e90fe854dce081", "timeStamp": 1520978414313, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), (32, '{"_id": "05934ae338431f28bf6793b2417db6ca", "data": {"startDate": "2018-01-11", "visitCode": "bcg", "expiryDate": "2019-01-01", "alertStatus": "urgent", "scheduleName": "BCG", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-a8177920ff1fbef63a63f03851a343ee", "timeStamp": 1520978414508, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), -(33, '{"_id": "05934ae338431f28bf6793b2417dba2d", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-51466c72f83907a175263b5750fe9b6c", "timeStamp": 1520978414513, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), +(33, '{"_id": "05934ae338431f28bf6793b2417dba2d", "data": {"startDate": "2018-02-22", "visitCode": "opv1", "expiryDate": "2022-11-01", "alertStatus": "normal", "scheduleName": "OPV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-51466c72f83907a175263b5750fe9b6c", "timeStamp": 1520978414513, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'), (34, '{"_id": "05934ae338431f28bf6793b2417da475", "data": {"startDate": "2018-02-22", "visitCode": "pcv1", "expiryDate": "2022-11-01", "alertStatus": "urgent", "scheduleName": "PCV 1", "beneficiaryType": "child"}, "type": "Action", "details": {}, "version": 0, "_rev": "1-f18f7d27909a2cc3e3e27c5b4c116075", "timeStamp": 1520978414514, "actionType": "createAlert", "providerId": "biddemo", "actionTarget": "alert", "baseEntityId": "b06e0847-0d68-4f5c-9288-58bc394fe052", "isActionActive": true}'); INSERT INTO core.action_metadata (id, action_id, document_id, base_entity_id, server_version, provider_id, location_id, team, team_id) VALUES From 63c3490b372d8a08b7e0e446875f445f9b8ee0a8 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 20 Apr 2018 16:05:28 +0300 Subject: [PATCH 129/133] Code cleanup --- .../opensrp/domain/postgres/ErrorTraceExample.java | 1 - .../org/opensrp/domain/postgres/EventExample.java | 3 +-- .../domain/postgres/EventMetadataExample.java | 1 - .../scheduler/repository/couch/AllActions.java | 3 ++- .../scheduler/repository/couch/AllAlerts.java | 2 +- .../repository/it/AllAlertsIntegrationTest.java | 13 +++---------- .../service/scheduling/BNFSchedulesService.java | 3 +-- .../service/scheduling/BNFSchedulesServiceTest.java | 5 ++--- .../service/scheduling/HHSchedulesServiceTest.java | 4 +--- 9 files changed, 11 insertions(+), 24 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java index ed5bce76c4..f82c9b3a72 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/ErrorTraceExample.java @@ -2,7 +2,6 @@ import java.util.ArrayList; import java.util.Date; -import java.util.Iterator; import java.util.List; public class ErrorTraceExample { diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java index abcbb1e50c..d76a590a96 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventExample.java @@ -1,9 +1,8 @@ package org.opensrp.domain.postgres; import java.util.ArrayList; -import java.util.List; import java.util.Date; -import java.util.Iterator; +import java.util.List; public class EventExample { /** diff --git a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java index 594c4dab5d..b580e6741a 100644 --- a/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java +++ b/opensrp-core/src/main/java/org/opensrp/domain/postgres/EventMetadataExample.java @@ -2,7 +2,6 @@ import java.util.ArrayList; import java.util.Date; -import java.util.Iterator; import java.util.List; public class EventMetadataExample { diff --git a/opensrp-core/src/main/java/org/opensrp/scheduler/repository/couch/AllActions.java b/opensrp-core/src/main/java/org/opensrp/scheduler/repository/couch/AllActions.java index a9c7381f41..be32db0f4a 100644 --- a/opensrp-core/src/main/java/org/opensrp/scheduler/repository/couch/AllActions.java +++ b/opensrp-core/src/main/java/org/opensrp/scheduler/repository/couch/AllActions.java @@ -26,7 +26,7 @@ public class AllActions extends MotechBaseRepository implements ActionsR private static Logger logger = LoggerFactory.getLogger(AllActions.class.toString()); - LuceneActionRepository luceneActionRepo; + private LuceneActionRepository luceneActionRepo; @Autowired protected AllActions(@Qualifier(AllConstants.OPENSRP_DATABASE_CONNECTOR) CouchDbConnector db, @@ -138,4 +138,5 @@ public List findByCriteria(String team, String providerId, long timeStam public List findAllActionNotExpired() { return db.queryView(createQuery("action_by_alertStatus_not_expired").includeDocs(true), Action.class); } + } diff --git a/opensrp-core/src/main/java/org/opensrp/scheduler/repository/couch/AllAlerts.java b/opensrp-core/src/main/java/org/opensrp/scheduler/repository/couch/AllAlerts.java index 35e5ee96a9..3eac33282b 100644 --- a/opensrp-core/src/main/java/org/opensrp/scheduler/repository/couch/AllAlerts.java +++ b/opensrp-core/src/main/java/org/opensrp/scheduler/repository/couch/AllAlerts.java @@ -94,7 +94,7 @@ public List findByEntityIdTriggerAndTimeStamp(String entityId, String tri public void markAllAsClosedFor(String entityId, String reasonForClose) { List actions = findActiveAlertByEntityId(entityId); for (Alert action : actions) { - action.markAlertAsClosed(reasonForClose);; + action.markAlertAsClosed(reasonForClose); } db.executeBulk(actions); } diff --git a/opensrp-core/src/test/java/org/opensrp/repository/it/AllAlertsIntegrationTest.java b/opensrp-core/src/test/java/org/opensrp/repository/it/AllAlertsIntegrationTest.java index b35e062147..2a65f24b49 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/it/AllAlertsIntegrationTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/it/AllAlertsIntegrationTest.java @@ -1,26 +1,20 @@ package org.opensrp.repository.it; import static java.util.Arrays.asList; -import static junit.framework.Assert.assertEquals; -import static junit.framework.Assert.assertFalse; -import static junit.framework.Assert.assertTrue; +import static org.junit.Assert.assertEquals; +import static org.junit.Assert.assertTrue; import static org.opensrp.dto.AlertStatus.normal; -import static org.opensrp.dto.BeneficiaryType.mother; -import java.util.ArrayList; import java.util.List; import org.joda.time.DateTime; import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import org.opensrp.dto.ActionData; import org.opensrp.dto.AlertStatus; -import org.opensrp.scheduler.Action; import org.opensrp.scheduler.Alert; import org.opensrp.scheduler.Alert.AlertType; import org.opensrp.scheduler.Alert.TriggerType; -import org.opensrp.scheduler.repository.couch.AllActions; import org.opensrp.scheduler.repository.couch.AllAlerts; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.test.context.ContextConfiguration; @@ -31,7 +25,7 @@ public class AllAlertsIntegrationTest { @Autowired - AllAlerts allAlerts; + private AllAlerts allAlerts; @Before public void setUp() throws Exception { @@ -308,7 +302,6 @@ public void shouldAddNewAlertWhenThereIsNoExistingAlert() throws Exception { assertTrue(allAlerts.findActiveAlertByEntityId("Entity 1").size() == 1); } - @SuppressWarnings("deprecation") @Test public void shouldUpdateAlertAsAnInactive() { DateTime dueDate = DateTime.now().minusDays(1); diff --git a/opensrp-register/src/main/java/org/opensrp/register/service/scheduling/BNFSchedulesService.java b/opensrp-register/src/main/java/org/opensrp/register/service/scheduling/BNFSchedulesService.java index 37a6005d1b..cb19cefa5d 100644 --- a/opensrp-register/src/main/java/org/opensrp/register/service/scheduling/BNFSchedulesService.java +++ b/opensrp-register/src/main/java/org/opensrp/register/service/scheduling/BNFSchedulesService.java @@ -7,7 +7,6 @@ import org.joda.time.LocalDate; import org.opensrp.scheduler.HealthSchedulerService; -import org.opensrp.scheduler.repository.ActionsRepository; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -21,7 +20,7 @@ public class BNFSchedulesService { private HealthSchedulerService scheduler; @Autowired - public BNFSchedulesService(HealthSchedulerService scheduler, ActionsRepository allActions) { + public BNFSchedulesService(HealthSchedulerService scheduler) { this.scheduler = scheduler; } diff --git a/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/BNFSchedulesServiceTest.java b/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/BNFSchedulesServiceTest.java index a20edebd76..b7cffc6d0f 100644 --- a/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/BNFSchedulesServiceTest.java +++ b/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/BNFSchedulesServiceTest.java @@ -1,5 +1,6 @@ package org.opensrp.register.service.scheduling; +import static org.mockito.Mockito.times; import static org.mockito.MockitoAnnotations.initMocks; import java.util.List; @@ -7,7 +8,6 @@ import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.log4j.spi.LoggingEvent; -import org.bouncycastle.util.Times; import org.joda.time.LocalDate; import org.junit.Assert; import org.junit.Before; @@ -21,7 +21,6 @@ import org.opensrp.scheduler.repository.couch.AllActions; import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.modules.junit4.PowerMockRunner; -import static org.mockito.Mockito.times; @RunWith(PowerMockRunner.class) @PowerMockIgnore({ "org.apache.log4j.*", "org.apache.commons.logging.*" }) @@ -35,7 +34,7 @@ public class BNFSchedulesServiceTest extends TestResourceLoader { @Before public void setUp() throws Exception { initMocks(this); - bnfSchedulesService = new BNFSchedulesService(scheduler,allActions); + bnfSchedulesService = new BNFSchedulesService(scheduler); } @Test diff --git a/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/HHSchedulesServiceTest.java b/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/HHSchedulesServiceTest.java index a129d1833f..923da0b72d 100644 --- a/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/HHSchedulesServiceTest.java +++ b/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/HHSchedulesServiceTest.java @@ -1,5 +1,6 @@ package org.opensrp.register.service.scheduling; +import static org.mockito.Mockito.times; import static org.mockito.MockitoAnnotations.initMocks; import java.util.List; @@ -7,7 +8,6 @@ import org.apache.log4j.Level; import org.apache.log4j.Logger; import org.apache.log4j.spi.LoggingEvent; -import org.bouncycastle.util.Times; import org.joda.time.LocalDate; import org.junit.Assert; import org.junit.Before; @@ -18,10 +18,8 @@ import org.opensrp.common.util.TestLoggerAppender; import org.opensrp.register.service.handler.TestResourceLoader; import org.opensrp.scheduler.HealthSchedulerService; -import org.opensrp.scheduler.repository.couch.AllActions; import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.modules.junit4.PowerMockRunner; -import static org.mockito.Mockito.times; @RunWith(PowerMockRunner.class) @PowerMockIgnore({ "org.apache.log4j.*", "org.apache.commons.logging.*" }) From 41e77844f7a8dc05391079ee14d8bb15a1387223 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 20 Apr 2018 16:46:27 +0300 Subject: [PATCH 130/133] Code cleanup --- .../opensrp/service/FormSubmissionDataMigrationService.java | 2 -- .../repository/lucene/it/LuceneClientRepositoryTest.java | 2 +- .../repository/lucene/it/LuceneSearchRepositoryTest.java | 1 - .../register/service/scheduling/BNFSchedulesServiceTest.java | 3 --- .../src/main/java/org/opensrp/web/rest/ValidateResource.java | 2 +- 5 files changed, 2 insertions(+), 8 deletions(-) diff --git a/opensrp-core/src/main/java/org/opensrp/service/FormSubmissionDataMigrationService.java b/opensrp-core/src/main/java/org/opensrp/service/FormSubmissionDataMigrationService.java index 9858a11e2e..502eab2f1e 100644 --- a/opensrp-core/src/main/java/org/opensrp/service/FormSubmissionDataMigrationService.java +++ b/opensrp-core/src/main/java/org/opensrp/service/FormSubmissionDataMigrationService.java @@ -18,8 +18,6 @@ import org.springframework.beans.factory.annotation.Qualifier; import org.springframework.stereotype.Service; -import com.mysql.jdbc.StringUtils; - /** * @author onamacuser This service fetches existing form submissions data from couchdb and converts * them to events and clients diff --git a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java index d4d15680e4..16c8cb5740 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java @@ -348,7 +348,7 @@ public void shouldFindByBaseEntityFieldAndValue() { addObjectToRepository(Collections.singletonList(expectedClient), allClients); - List actualClients = luceneClientRepository.getByFieldValue(AllConstants.BaseEntity.BASE_ENTITY_ID, + List actualClients = luceneClientRepository.getByFieldValue(BASE_ENTITY_ID, BASE_ENTITY_ID); assertEquals(1, actualClients.size()); assertEquals(expectedClient, actualClients.get(0)); diff --git a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneSearchRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneSearchRepositoryTest.java index d36f05ea10..b7035def95 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneSearchRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneSearchRepositoryTest.java @@ -8,7 +8,6 @@ import static org.opensrp.util.SampleFullDomainObject.EPOCH_DATE_TIME; import static org.opensrp.util.SampleFullDomainObject.FEMALE; import static org.opensrp.util.SampleFullDomainObject.FIRST_NAME; -import static org.opensrp.util.SampleFullDomainObject.IDENTIFIER_VALUE; import static org.opensrp.util.SampleFullDomainObject.LAST_NAME; import static org.opensrp.util.SampleFullDomainObject.MIDDLE_NAME; import static org.opensrp.util.SampleFullDomainObject.attributes; diff --git a/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/BNFSchedulesServiceTest.java b/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/BNFSchedulesServiceTest.java index b7cffc6d0f..86636f675c 100644 --- a/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/BNFSchedulesServiceTest.java +++ b/opensrp-register/src/test/java/org/opensrp/register/service/scheduling/BNFSchedulesServiceTest.java @@ -18,7 +18,6 @@ import org.opensrp.common.util.TestLoggerAppender; import org.opensrp.register.service.handler.TestResourceLoader; import org.opensrp.scheduler.HealthSchedulerService; -import org.opensrp.scheduler.repository.couch.AllActions; import org.powermock.core.classloader.annotations.PowerMockIgnore; import org.powermock.modules.junit4.PowerMockRunner; @@ -29,8 +28,6 @@ public class BNFSchedulesServiceTest extends TestResourceLoader { private BNFSchedulesService bnfSchedulesService; @Mock private HealthSchedulerService scheduler; - @Mock - private AllActions allActions; @Before public void setUp() throws Exception { initMocks(this); diff --git a/opensrp-web/src/main/java/org/opensrp/web/rest/ValidateResource.java b/opensrp-web/src/main/java/org/opensrp/web/rest/ValidateResource.java index b0acdd5b9a..29b7ed7893 100644 --- a/opensrp-web/src/main/java/org/opensrp/web/rest/ValidateResource.java +++ b/opensrp-web/src/main/java/org/opensrp/web/rest/ValidateResource.java @@ -41,7 +41,7 @@ public class ValidateResource { private EventService eventService; - Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") + private Gson gson = new GsonBuilder().setDateFormat("yyyy-MM-dd'T'HH:mm:ss.SSSZ") .registerTypeAdapter(DateTime.class, new DateTimeTypeConverter()).create(); @Autowired From c8917eec078465cfbe53b7167630471e286cb796 Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Fri, 20 Apr 2018 16:57:09 +0300 Subject: [PATCH 131/133] Code cleanup --- .../repository/lucene/it/LuceneClientRepositoryTest.java | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java index 16c8cb5740..c1a7bc5aa0 100644 --- a/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java +++ b/opensrp-core/src/test/java/org/opensrp/repository/lucene/it/LuceneClientRepositoryTest.java @@ -26,7 +26,6 @@ import org.junit.Before; import org.junit.Test; import org.opensrp.BaseIntegrationTest; -import org.opensrp.common.AllConstants; import org.opensrp.domain.Address; import org.opensrp.domain.Client; import org.opensrp.repository.couch.AllClients; @@ -365,7 +364,7 @@ public void shouldReturnEmptyForBaseEntityFieldAndValue() { addObjectToRepository(Collections.singletonList(expectedClient), allClients); - List actualClients = luceneClientRepository.getByFieldValue(AllConstants.BaseEntity.BASE_ENTITY_ID, value); + List actualClients = luceneClientRepository.getByFieldValue(BASE_ENTITY_ID, value); assertEquals(0, actualClients.size()); } @@ -385,7 +384,7 @@ public void shouldFindByBaseEntityFieldAndValues() { addObjectToRepository(asList(expectedClient, expectedClient2), allClients); - List actualClients = luceneClientRepository.getByFieldValue(AllConstants.BaseEntity.BASE_ENTITY_ID, + List actualClients = luceneClientRepository.getByFieldValue(BASE_ENTITY_ID, asList(BASE_ENTITY_ID, DIFFERENT_BASE_ENTITY_ID)); assertEquals(2, actualClients.size()); assertTwoListAreSameIgnoringOrder(asList(expectedClient, expectedClient2), actualClients); @@ -407,12 +406,12 @@ public void shouldReturnEmptyForNullOrEmptyValues() { addObjectToRepository(asList(expectedClient, expectedClient2), allClients); - List actualClients = luceneClientRepository.getByFieldValue(AllConstants.BaseEntity.BASE_ENTITY_ID, + List actualClients = luceneClientRepository.getByFieldValue(BASE_ENTITY_ID, Collections.EMPTY_LIST); assertEquals(0, actualClients.size()); List nullList = null; - actualClients = luceneClientRepository.getByFieldValue(AllConstants.BaseEntity.BASE_ENTITY_ID, nullList); + actualClients = luceneClientRepository.getByFieldValue(BASE_ENTITY_ID, nullList); assertEquals(0, actualClients.size()); } From f6b08eb72728db1dc9f081b65cefc353759ed87a Mon Sep 17 00:00:00 2001 From: Samuel Githengi Date: Tue, 24 Apr 2018 16:59:59 +0300 Subject: [PATCH 132/133] Use cursor to delete duplicate migrated events, cascade delete taking very long --- .../data_migration_scripts/migrate_events.sql | 47 +++++++++++-------- 1 file changed, 28 insertions(+), 19 deletions(-) diff --git a/assets/migrations/data_migration_scripts/migrate_events.sql b/assets/migrations/data_migration_scripts/migrate_events.sql index e7f6bf5a4f..cfa7e59b8d 100644 --- a/assets/migrations/data_migration_scripts/migrate_events.sql +++ b/assets/migrations/data_migration_scripts/migrate_events.sql @@ -31,15 +31,15 @@ json->>'team' as team, json->>'teamId' as team_id,(json->>'dateCreated')::TIMEST (json->>'dateEdited')::TIMESTAMP as date_edited,(json->>'dateVoided')::TIMESTAMP as date_deleted from core.event; -/*set event_metadata foreign key to delete cascade*/ -ALTER TABLE core.event_metadata DROP CONSTRAINT IF EXISTS event_metadata_event_id_fkey ; +/* create and index to help identify duplicates faster*/ +CREATE INDEX event_metadata_duplicate_index on core.event_metadata(form_submission_id,server_version); -ALTER TABLE core.event_metadata Add CONSTRAINT event_metadata_event_id_fkey FOREIGN KEY (event_id) -REFERENCES core.event(id) ON DELETE CASCADE ; - -/*delete cascade duplicate events and event_medatadata*/ -delete from core.event where id in ( -select e.event_id from core.event_metadata e +/*delete duplicates in events and event_medatadata. + * Disable cascade(fk) triggers for performance(faster delete) */ +DO $$ +DECLARE + DECLARE duplicate_events_cursor CURSOR FOR +select e.event_id,e.id from core.event_metadata e JOIN ( SELECT form_submission_id, @@ -47,17 +47,26 @@ select e.event_id from core.event_metadata e FROM core.event_metadata GROUP BY form_submission_id HAVING count(*) > 1 - ) d on e.form_submission_id=d.form_submission_id and e.server_version Date: Wed, 25 Apr 2018 10:26:28 +0300 Subject: [PATCH 133/133] code cleanup --- assets/migrations/data_migration_scripts/migrate_events.sql | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/assets/migrations/data_migration_scripts/migrate_events.sql b/assets/migrations/data_migration_scripts/migrate_events.sql index cfa7e59b8d..b5d4cb84b8 100644 --- a/assets/migrations/data_migration_scripts/migrate_events.sql +++ b/assets/migrations/data_migration_scripts/migrate_events.sql @@ -35,9 +35,8 @@ from core.event; CREATE INDEX event_metadata_duplicate_index on core.event_metadata(form_submission_id,server_version); /*delete duplicates in events and event_medatadata. - * Disable cascade(fk) triggers for performance(faster delete) */ + * Disable cascade(fk) triggers for better performance(faster delete) */ DO $$ -DECLARE DECLARE duplicate_events_cursor CURSOR FOR select e.event_id,e.id from core.event_metadata e JOIN ( @@ -58,7 +57,7 @@ BEGIN EXIT WHEN NOT FOUND; delete from core.event_metadata where id =rec.id; delete from core.event where id =rec.event_id; - END LOOP; + END LOOP; CLOSE duplicate_events_cursor; ALTER TABLE core.event_metadata ENABLE TRIGGER ALL; ALTER TABLE core.event ENABLE TRIGGER ALL;