2 * Copyright 2017 ZTE Corporation.
\r
4 * Licensed under the Apache License, Version 2.0 (the "License");
\r
5 * you may not use this file except in compliance with the License.
\r
6 * You may obtain a copy of the License at
\r
8 * http://www.apache.org/licenses/LICENSE-2.0
\r
10 * Unless required by applicable law or agreed to in writing, software
\r
11 * distributed under the License is distributed on an "AS IS" BASIS,
\r
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
\r
13 * See the License for the specific language governing permissions and
\r
14 * limitations under the License.
\r
16 package org.openo.holmes.common.db;
\r
18 import java.util.List;
\r
20 import org.openo.holmes.common.api.entity.AlarmsCorrelation;
\r
21 import org.skife.jdbi.v2.sqlobject.BindBean;
\r
22 import org.skife.jdbi.v2.sqlobject.SqlQuery;
\r
23 import org.skife.jdbi.v2.sqlobject.SqlUpdate;
\r
24 import org.skife.jdbi.v2.sqlobject.customizers.RegisterMapper;
\r
26 import org.openo.holmes.common.db.mapper.AlarmsCorrelationMapper;
\r
28 @RegisterMapper(AlarmsCorrelationMapper.class)
\r
29 public interface AlarmsCorrelationDao {
\r
31 @SqlUpdate("INSERT INTO APLUS_CORRELATION (ruleId,ruleInfo,resultType,createTime,parentAlarmId,childAlarmId,reserve1,reserve2,reserve3) values(:ruleId,:ruleInfo,:resultType,:createTime,:parentAlarmId,:childAlarmId,:reserve1,:reserve2,:reserve3)")
\r
32 public abstract void save(@BindBean AlarmsCorrelation aplusCorrelation);
\r
34 @SqlQuery("SELECT * FROM APLUS_CORRELATION")
\r
35 public abstract List<AlarmsCorrelation> queryAll();
\r