Extract the Common Tool
[holmes/rule-management.git] / rulemgt / src / main / java / org / onap / holmes / rulemgt / db / mapper / CorrelationRuleMapper.java
diff --git a/rulemgt/src/main/java/org/onap/holmes/rulemgt/db/mapper/CorrelationRuleMapper.java b/rulemgt/src/main/java/org/onap/holmes/rulemgt/db/mapper/CorrelationRuleMapper.java
deleted file mode 100644 (file)
index 98d7d01..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-/**\r
- * Copyright 2017 ZTE Corporation.\r
- *\r
- * Licensed under the Apache License, Version 2.0 (the "License");\r
- * you may not use this file except in compliance with the License.\r
- * You may obtain a copy of the License at\r
- *\r
- *     http://www.apache.org/licenses/LICENSE-2.0\r
- *\r
- * Unless required by applicable law or agreed to in writing, software\r
- * distributed under the License is distributed on an "AS IS" BASIS,\r
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\r
- * See the License for the specific language governing permissions and\r
- * limitations under the License.\r
- */\r
-package org.onap.holmes.rulemgt.db.mapper;\r
-\r
-import org.onap.holmes.common.api.entity.CorrelationRule;\r
-import org.skife.jdbi.v2.StatementContext;\r
-import org.skife.jdbi.v2.tweak.ResultSetMapper;\r
-\r
-import java.sql.ResultSet;\r
-import java.sql.SQLException;\r
-import java.util.Properties;\r
-\r
-public class CorrelationRuleMapper implements ResultSetMapper<CorrelationRule> {\r
-    @Override\r
-    public CorrelationRule map(int i, ResultSet resultSet, StatementContext statementContext) throws SQLException {\r
-        CorrelationRule correlationRule = new CorrelationRule();\r
-        correlationRule.setName(resultSet.getString("name"));\r
-        correlationRule.setRid(resultSet.getString("rid"));\r
-        correlationRule.setDescription(resultSet.getString("description"));\r
-        correlationRule.setEnabled(resultSet.getInt("enable"));\r
-        correlationRule.setTemplateID(resultSet.getInt("templateID"));\r
-        correlationRule.setEngineID(resultSet.getString("engineID"));\r
-        correlationRule.setEngineType(resultSet.getString("engineType"));\r
-        correlationRule.setCreator(resultSet.getString("creator"));\r
-        correlationRule.setCreateTime(resultSet.getDate("createTime"));\r
-        correlationRule.setModifier(resultSet.getString("updator"));\r
-        correlationRule.setUpdateTime(resultSet.getDate("updateTime"));\r
-        correlationRule.setParams((Properties)resultSet.getObject("params"));\r
-        correlationRule.setContent(resultSet.getString("content"));\r
-        correlationRule.setVendor(resultSet.getString("vendor"));\r
-        correlationRule.setPackageName(resultSet.getString("package"));\r
-        correlationRule.setClosedControlLoopName(resultSet.getString("ctrlloop"));\r
-        return correlationRule;\r
-    }\r
-\r
-}\r