com.cory.service.ClusterService Maven / Gradle / Ivy
package com.cory.service;
import com.cory.dao.ClusterDao;
import com.cory.enums.ClusterStatus;
import com.cory.model.Cluster;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.context.annotation.ScopedProxyMode;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
/**
* generated by CodeGenerator on 2017/5/10.
*/
@Service
@Scope(proxyMode = ScopedProxyMode.TARGET_CLASS)
@Transactional
public class ClusterService extends BaseService {
@Autowired
private ClusterDao clusterDao;
@Override
public ClusterDao getDao() {
return clusterDao;
}
public Cluster getByIp(String ip) {
return clusterDao.getByIp(ip);
}
public void updateStatus(String ip, ClusterStatus status) {
clusterDao.updateStatus(ip, status);
}
}