All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.dianping.cat.alarm.ServerAlarmRuleDao Maven / Gradle / Ivy

The newest version!
package com.dianping.cat.alarm;

import java.util.List;
import org.unidal.dal.jdbc.DalException;
import org.unidal.dal.jdbc.AbstractDao;
import org.unidal.dal.jdbc.Readset;
import org.unidal.dal.jdbc.Updateset;

public class ServerAlarmRuleDao extends AbstractDao {
   public ServerAlarmRule createLocal() {
      ServerAlarmRule proto = new ServerAlarmRule();

      return proto;
   }

   public int deleteByPK(ServerAlarmRule proto) throws DalException {
      return getQueryEngine().deleteSingle(
            ServerAlarmRuleEntity.DELETE_BY_PK,
            proto);
   }
   
   public List findAll(Readset readset) throws DalException {
      ServerAlarmRule proto = new ServerAlarmRule();

      List result = getQueryEngine().queryMultiple(
            ServerAlarmRuleEntity.FIND_ALL, 
            proto,
            readset);
      
      return result;
   }
   
   public ServerAlarmRule findByPK(int keyId, Readset readset) throws DalException {
      ServerAlarmRule proto = new ServerAlarmRule();

      proto.setKeyId(keyId);

      ServerAlarmRule result = getQueryEngine().querySingle(
            ServerAlarmRuleEntity.FIND_BY_PK, 
            proto,
            readset);
      
      return result;
   }
   
   @Override
   protected Class[] getEntityClasses() {
      return new Class[] { ServerAlarmRuleEntity.class };
   }

   public int insert(ServerAlarmRule proto) throws DalException {
      return getQueryEngine().insertSingle(
            ServerAlarmRuleEntity.INSERT,
            proto);
   }
   
   public int updateByPK(ServerAlarmRule proto, Updateset updateset) throws DalException {
      return getQueryEngine().updateSingle(
            ServerAlarmRuleEntity.UPDATE_BY_PK,
            proto,
            updateset);
   }
   
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy