diff --git a/src/main/java/com/loafle/overflow/module/infra/service/InfraHostService.java b/src/main/java/com/loafle/overflow/module/infra/service/InfraHostService.java new file mode 100644 index 0000000..16f6092 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraHostService.java @@ -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)); + } +} diff --git a/src/main/java/com/loafle/overflow/module/infra/service/InfraMachineService.java b/src/main/java/com/loafle/overflow/module/infra/service/InfraMachineService.java new file mode 100644 index 0000000..cbd5b4b --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraMachineService.java @@ -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)); + } + +} diff --git a/src/main/java/com/loafle/overflow/module/infra/service/InfraOSApplicationService.java b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSApplicationService.java new file mode 100644 index 0000000..9abc243 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSApplicationService.java @@ -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)); + } +} diff --git a/src/main/java/com/loafle/overflow/module/infra/service/InfraOSDaemonService.java b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSDaemonService.java new file mode 100644 index 0000000..ff57af7 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSDaemonService.java @@ -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)); + } +} diff --git a/src/main/java/com/loafle/overflow/module/infra/service/InfraOSPortService.java b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSPortService.java new file mode 100644 index 0000000..10dfb12 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSPortService.java @@ -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)); + } +} diff --git a/src/main/java/com/loafle/overflow/module/infra/service/InfraOSService.java b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSService.java new file mode 100644 index 0000000..afcc823 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraOSService.java @@ -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)); + } +} diff --git a/src/main/java/com/loafle/overflow/module/infra/service/InfraService.java b/src/main/java/com/loafle/overflow/module/infra/service/InfraService.java index 0302f6d..15123bf 100644 --- a/src/main/java/com/loafle/overflow/module/infra/service/InfraService.java +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraService.java @@ -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)); } diff --git a/src/main/java/com/loafle/overflow/module/infra/service/InfraServiceService.java b/src/main/java/com/loafle/overflow/module/infra/service/InfraServiceService.java new file mode 100644 index 0000000..d8eedb1 --- /dev/null +++ b/src/main/java/com/loafle/overflow/module/infra/service/InfraServiceService.java @@ -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)); + } +}