Allon Mureinik has uploaded a new change for review.

Change subject: core: Remove GetNotificationEventMap
......................................................................

core: Remove GetNotificationEventMap

GetNotificationEventMapQuery is not used anywhere in
the code, and hence should be removed.

This patch removes the following:
1. The GetNotificationEventMapQuery class.
2. The GetNotificationEventMap constant representing
   it in VdcQueryType.
3. The getAllEventMaps() method in EvetDAO, its
   implementation, test and underlying stored procedure, as this
   method was only used by the aforementioned query.

Change-Id: Icfb382d6d294ac4ce940646cc0ef33f35d9e10cc
Signed-off-by: Allon Mureinik <[email protected]>
---
M backend/manager/dbscripts/event_sp.sql
D 
backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetNotificationEventMapQuery.java
M 
backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
M 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/EventDAO.java
M 
backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/EventDAODbFacadeImpl.java
M 
backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/EventDAOTest.java
6 files changed, 0 insertions(+), 53 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-engine refs/changes/03/13603/1

diff --git a/backend/manager/dbscripts/event_sp.sql 
b/backend/manager/dbscripts/event_sp.sql
index bd8f0f1..f2e0839 100644
--- a/backend/manager/dbscripts/event_sp.sql
+++ b/backend/manager/dbscripts/event_sp.sql
@@ -6,22 +6,6 @@
 
 
 ----------------------------------------------------------------
--- [event_map] Table
---
-
-
-Create or replace FUNCTION GetAllFromevent_map() RETURNS SETOF event_map
-   AS $procedure$
-BEGIN
-   RETURN QUERY SELECT *
-   FROM event_map;
-
-END; $procedure$
-LANGUAGE plpgsql;
-
-
-
-----------------------------------------------------------------
 -- [event_notification_hist] Table
 --
 
diff --git 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetNotificationEventMapQuery.java
 
b/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetNotificationEventMapQuery.java
deleted file mode 100644
index 537334f..0000000
--- 
a/backend/manager/modules/bll/src/main/java/org/ovirt/engine/core/bll/GetNotificationEventMapQuery.java
+++ /dev/null
@@ -1,16 +0,0 @@
-package org.ovirt.engine.core.bll;
-
-import org.ovirt.engine.core.common.queries.VdcQueryParametersBase;
-import org.ovirt.engine.core.dal.dbbroker.DbFacade;
-
-public class GetNotificationEventMapQuery<P extends VdcQueryParametersBase> 
extends QueriesCommandBase<P> {
-    public GetNotificationEventMapQuery(P parameters) {
-        super(parameters);
-    }
-
-    @Override
-    protected void executeQueryCommand() {
-
-        
getQueryReturnValue().setReturnValue(DbFacade.getInstance().getEventDao().getAllEventMaps());
-    }
-}
diff --git 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
index 227976b..21d99e4 100644
--- 
a/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
+++ 
b/backend/manager/modules/common/src/main/java/org/ovirt/engine/core/common/queries/VdcQueryType.java
@@ -197,7 +197,6 @@
     GetPermittedStorageDomainsByStoragePoolId(VdcQueryAuthType.User),
 
     // Event Notification
-    GetNotificationEventMap,
     GetAllEventSubscribers,
     GetEventSubscribersBySubscriberId,
     GetEventSubscribersBySubscriberIdGrouped,
diff --git 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/EventDAO.java
 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/EventDAO.java
index c292cea..9b9648a 100644
--- 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/EventDAO.java
+++ 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/EventDAO.java
@@ -58,6 +58,4 @@
     void unsubscribe(event_subscriber subscriber);
 
     List<EventMap> getEventMapByName(String event_up_name);
-
-    List<EventMap> getAllEventMaps();
 }
diff --git 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/EventDAODbFacadeImpl.java
 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/EventDAODbFacadeImpl.java
index 4663fa5..85814ed 100644
--- 
a/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/EventDAODbFacadeImpl.java
+++ 
b/backend/manager/modules/dal/src/main/java/org/ovirt/engine/core/dao/EventDAODbFacadeImpl.java
@@ -123,13 +123,6 @@
 
     @SuppressWarnings("unchecked")
     @Override
-    public List<EventMap> getAllEventMaps() {
-        MapSqlParameterSource parameterSource = 
getCustomMapSqlParameterSource();
-        return getCallsHandler().executeReadList("GetAllFromevent_map", 
EventMapRowMapper.instance, parameterSource);
-    }
-
-    @SuppressWarnings("unchecked")
-    @Override
     public List<EventMap> getEventMapByName(String event_up_name) {
         MapSqlParameterSource parameterSource = 
getCustomMapSqlParameterSource().addValue("event_name", event_up_name);
         return getCallsHandler().executeReadList("GetEventMapByName", 
EventMapRowMapper.instance, parameterSource);
diff --git 
a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/EventDAOTest.java
 
b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/EventDAOTest.java
index b4dac59..f1e3177 100644
--- 
a/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/EventDAOTest.java
+++ 
b/backend/manager/modules/dal/src/test/java/org/ovirt/engine/core/dao/EventDAOTest.java
@@ -17,7 +17,6 @@
 
 public class EventDAOTest extends BaseDAOTestCase {
     private static final int FREE_AUDIT_LOG_ID = 44295;
-    private static final int EVENT_MAP_COUNT = 1;
     private EventDAO dao;
     private Guid existingSubscriber;
     private Guid newSubscriber;
@@ -169,14 +168,4 @@
             assertEquals("TestRun", mapping.getEventUpName());
         }
     }
-
-    @Test
-    public void testGetAllEventMaps() {
-        List<EventMap> result = dao.getAllEventMaps();
-
-        assertNotNull(result);
-        assertFalse(result.isEmpty());
-        assertEquals(EVENT_MAP_COUNT, result.size());
-    }
-
 }


--
To view, visit http://gerrit.ovirt.org/13603
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Icfb382d6d294ac4ce940646cc0ef33f35d9e10cc
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-engine
Gerrit-Branch: master
Gerrit-Owner: Allon Mureinik <[email protected]>
_______________________________________________
Engine-patches mailing list
[email protected]
http://lists.ovirt.org/mailman/listinfo/engine-patches

Reply via email to