This commit is contained in:
insanity 2017-06-28 16:15:42 +09:00
parent 674df29a94
commit d4d7030733
8 changed files with 173 additions and 43 deletions

View File

@ -0,0 +1,25 @@
package com.loafle.overflow.module.infra.service;
import com.loafle.overflow.module.infra.dao.InfraHostDAO;
import com.loafle.overflow.module.infra.model.InfraHost;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Created by insanity on 17. 6. 28.
*/
@Service
public class InfraHostService {
@Autowired
InfraHostDAO infraHostDAO;
public InfraHost regist(InfraHost infraHost) {
return this.infraHostDAO.save(infraHost);
}
public InfraHost read(String id) {
return this.infraHostDAO.findOne(Long.valueOf(id));
}
}

View File

@ -0,0 +1,24 @@
package com.loafle.overflow.module.infra.service;
import com.loafle.overflow.module.infra.dao.InfraMachineDAO;
import com.loafle.overflow.module.infra.model.InfraMachine;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Created by insanity on 17. 6. 28.
*/
@Service
public class InfraMachineService {
@Autowired
InfraMachineDAO infraMachineDAO;
public InfraMachine regist(InfraMachine infraMachine) {
return this.infraMachineDAO.save(infraMachine);
}
public InfraMachine read(String id) {
return this.infraMachineDAO.findOne(Long.valueOf(id));
}
}

View File

@ -0,0 +1,25 @@
package com.loafle.overflow.module.infra.service;
import com.loafle.overflow.module.infra.dao.InfraOSApplicationDAO;
import com.loafle.overflow.module.infra.model.InfraOSApplication;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Created by insanity on 17. 6. 28.
*/
@Service
public class InfraOSApplicationService {
@Autowired
InfraOSApplicationDAO infraOSApplicationDAO;
public InfraOSApplication regist(InfraOSApplication infraOSApplication) {
return this.infraOSApplicationDAO.save(infraOSApplication);
}
public InfraOSApplication read(String id) {
return this.infraOSApplicationDAO.findOne(Long.valueOf(id));
}
}

View File

@ -0,0 +1,25 @@
package com.loafle.overflow.module.infra.service;
import com.loafle.overflow.module.infra.dao.InfraOSDaemonDAO;
import com.loafle.overflow.module.infra.model.InfraOSDaemon;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Created by insanity on 17. 6. 28.
*/
@Service
public class InfraOSDaemonService {
@Autowired
InfraOSDaemonDAO infraOSDaemonDAO;
public InfraOSDaemon regist(InfraOSDaemon infraOSDaemon) {
return this.infraOSDaemonDAO.save(infraOSDaemon);
}
public InfraOSDaemon read(String id) {
return this.infraOSDaemonDAO.findOne(Long.valueOf(id));
}
}

View File

@ -0,0 +1,25 @@
package com.loafle.overflow.module.infra.service;
import com.loafle.overflow.module.infra.dao.InfraOSPortDAO;
import com.loafle.overflow.module.infra.model.InfraOSPort;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Created by insanity on 17. 6. 28.
*/
@Service
public class InfraOSPortService {
@Autowired
InfraOSPortDAO infraOSPortDAO;
public InfraOSPort regist(InfraOSPort infraOSPort) {
return this.infraOSPortDAO.save(infraOSPort);
}
public InfraOSPort read(String id) {
return this.infraOSPortDAO.findOne(Long.valueOf(id));
}
}

View File

@ -0,0 +1,25 @@
package com.loafle.overflow.module.infra.service;
import com.loafle.overflow.module.infra.dao.InfraOSDAO;
import com.loafle.overflow.module.infra.model.InfraOS;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Created by insanity on 17. 6. 28.
*/
@Service
public class InfraOSService {
@Autowired
InfraOSDAO infraOSDAO;
public InfraOS regist(InfraOS infraOS) {
return this.infraOSDAO.save(infraOS);
}
public InfraOS read(String id) {
return this.infraOSDAO.findOne(Long.valueOf(id));
}
}

View File

@ -1,7 +1,7 @@
package com.loafle.overflow.module.infra.service;
import com.loafle.overflow.module.infra.dao.*;
import com.loafle.overflow.module.infra.model.*;
import com.loafle.overflow.module.infra.dao.InfraDAO;
import com.loafle.overflow.module.infra.model.Infra;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -14,52 +14,11 @@ public class InfraService {
@Autowired
InfraDAO infraDAO;
@Autowired
InfraMachineDAO infraMachineDAO;
@Autowired
InfraHostDAO infraHostDAO;
@Autowired
InfraOSDAO infraOSDAO;
@Autowired
InfraOSApplicationDAO infraOSApplicationDAO;
@Autowired
InfraOSDaemonDAO infraOSDaemonDAO;
@Autowired
InfraOSPortDAO infraOSPortDAO;
@Autowired
InfraServiceDAO infraServiceDAO;
public Infra regist(Infra infra) {
return this.infraDAO.save(infra);
}
public InfraMachine registMachine(InfraMachine infraMachine) {
return this.infraMachineDAO.save(infraMachine);
}
public InfraHost registHost(InfraHost infraHost) {
return this.infraHostDAO.save(infraHost);
}
public InfraOS registOS(InfraOS infraOS) {
return this.infraOSDAO.save(infraOS);
}
public InfraOSApplication registOSApplication(InfraOSApplication infraOSApplication) {
return this.infraOSApplicationDAO.save(infraOSApplication);
}
public InfraOSDaemon registOSDaemon(InfraOSDaemon infraOSDaemon) {
return this.infraOSDaemonDAO.save(infraOSDaemon);
}
public InfraOSPort registOSPort(InfraOSPort infraOSPort) {
return this.infraOSPortDAO.save(infraOSPort);
}
public com.loafle.overflow.module.infra.model.InfraService registService(com.loafle.overflow.module.infra.model.InfraService infraService) {
return this.infraServiceDAO.save(infraService);
}
public Infra read(String id) {
return this.infraDAO.findOne(Long.valueOf(id));
}

View File

@ -0,0 +1,22 @@
package com.loafle.overflow.module.infra.service;
import com.loafle.overflow.module.infra.dao.InfraServiceDAO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
/**
* Created by insanity on 17. 6. 28.
*/
@Service
public class InfraServiceService {
@Autowired
InfraServiceDAO infraServiceDAO;
public com.loafle.overflow.module.infra.model.InfraService regist(com.loafle.overflow.module.infra.model.InfraService infraService) {
return this.infraServiceDAO.save(infraService);
}
public com.loafle.overflow.module.infra.model.InfraService read(String id) {
return this.infraServiceDAO.findOne(Long.valueOf(id));
}
}