Merge remote-tracking branch 'origin/master'

This commit is contained in:
geek 2017-06-23 14:28:22 +09:00
commit 9ef8cbdca5
16 changed files with 82 additions and 73 deletions

View File

@ -15,7 +15,6 @@ public class MetaCrawler {
private String description; private String description;
@Id @Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
public short getId() { public short getId() {
return id; return id;
} }

View File

@ -22,7 +22,6 @@ public class MetaCrawlerInputItem {
private String keyValue; private String keyValue;
@Id @Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
public int getId() { public int getId() {
return id; return id;
} }

View File

@ -14,7 +14,6 @@ public class MetaInfraType {
private Date createDate; private Date createDate;
@Id @Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
public int getId() { public int getId() {
return id; return id;
} }

View File

@ -15,7 +15,6 @@ public class MetaInfraVendor {
private MetaInfraType metaInfraType; private MetaInfraType metaInfraType;
@Id @Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
public int getId() { public int getId() {
return id; return id;
} }

View File

@ -15,7 +15,6 @@ public class MetaInputType {
private Date createDate; private Date createDate;
@Id @Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
public short getId() { public short getId() {
return id; return id;
} }
@ -45,7 +44,7 @@ public class MetaInputType {
} }
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = true) @Column(name = "CREATE_DATE", nullable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -1,6 +1,9 @@
package com.loafle.overflow.meta.model; package com.loafle.overflow.meta.model;
import javax.persistence.*; import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
/** /**
* Created by root on 17. 6. 22. * Created by root on 17. 6. 22.
@ -20,7 +23,6 @@ public class MetaMemberStatus {
} }
@Id @Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
public short getId() { public short getId() {
return id; return id;
} }

View File

@ -15,7 +15,6 @@ public class MetaNotification {
private String description; private String description;
@Id @Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
public long getId() { public long getId() {
return id; return id;
} }

View File

@ -14,7 +14,6 @@ public class MetaProbeArchitecture {
private Date createDate; private Date createDate;
@Id @Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
public short getId() { public short getId() {
return id; return id;
} }
@ -34,7 +33,7 @@ public class MetaProbeArchitecture {
} }
@Temporal(TemporalType.TIMESTAMP) @Temporal(TemporalType.TIMESTAMP)
@Column(name = "CREATE_DATE", nullable = true) @Column(name = "CREATE_DATE", nullable = false)
public Date getCreateDate() { public Date getCreateDate() {
return createDate; return createDate;
} }

View File

@ -14,7 +14,6 @@ public class MetaProbeOs {
private Date createDate; private Date createDate;
@Id @Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
public short getId() { public short getId() {
return id; return id;
} }

View File

@ -15,7 +15,6 @@ public class MetaProbeTaskType {
private Date createDate; private Date createDate;
@Id @Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
public short getId() { public short getId() {
return id; return id;
} }

View File

@ -15,7 +15,6 @@ public class MetaSensorItemType {
private Date createDate; private Date createDate;
@Id @Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
public short getId() { public short getId() {
return id; return id;
} }

View File

@ -15,7 +15,6 @@ public class MetaVendorCrawler {
private Date createDate; private Date createDate;
@Id @Id
@GeneratedValue(strategy= GenerationType.IDENTITY)
public int getId() { public int getId() {
return id; return id;
} }

View File

@ -0,0 +1,39 @@
package com.loafle.overflow.module.domain.dao;
import com.loafle.overflow.AppConfig;
import com.loafle.overflow.JdbcConfiguration;
import com.loafle.overflow.module.domain.Domain;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import java.util.Date;
import static org.junit.Assert.*;
/**
* Created by root on 17. 6. 23.
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class})
public class DomainDAOTest {
@Autowired
private DomainDAO domainDAO;
@Test
public void testCreate() {
Domain domain = new Domain();
domain.setCreateDate(new Date());
domain.setName("snoop's domain");
this.domainDAO.save(domain);
}
}

View File

@ -0,0 +1,28 @@
package com.loafle.overflow.module.domain.dao;
import com.loafle.overflow.AppConfig;
import com.loafle.overflow.JdbcConfiguration;
import com.loafle.overflow.module.domain.DomainMember;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.test.context.ContextConfiguration;
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
import static org.junit.Assert.*;
/**
* Created by root on 17. 6. 23.
*/
@RunWith(SpringJUnit4ClassRunner.class)
@ContextConfiguration(classes = {AppConfig.class, JdbcConfiguration.class})
public class DomainMemberDAOTest {
@Test
public void testCreate() {
DomainMember domainMember = new DomainMember();
}
}

View File

@ -2,8 +2,10 @@ package com.loafle.overflow.module.noauthprobe.dao;
import com.loafle.overflow.AppConfig; import com.loafle.overflow.AppConfig;
import com.loafle.overflow.JdbcConfiguration; import com.loafle.overflow.JdbcConfiguration;
import com.loafle.overflow.module.domain.Domain;
import com.loafle.overflow.module.noauthprobe.model.NoAuthProbe; import com.loafle.overflow.module.noauthprobe.model.NoAuthProbe;
import com.loafle.overflow.module.noauthprobe.type.AuthType; import com.loafle.overflow.module.noauthprobe.type.AuthType;
import org.junit.Assert;
import org.junit.Ignore; import org.junit.Ignore;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
@ -45,6 +47,13 @@ public class NoAuthProbeDAOTest {
noAuthProbe.setStatus(AuthType.PROCESS); noAuthProbe.setStatus(AuthType.PROCESS);
noAuthProbe.setTempProbeKey("4444"); noAuthProbe.setTempProbeKey("4444");
Domain d = new Domain();
d.setId(1);
noAuthProbe.setDomain(d);
System.out.println(noAuthProbe.getId());
Assert.assertNotEquals(noAuthProbe.getId(), 0);
} }

View File

@ -1,58 +0,0 @@
//package com.loafle.overflow.noauthagent.dao;
//
//import com.loafle.overflow.module.noauthagent.dao.JPANoAuthAgentDAO;
//import com.loafle.overflow.module.noauthagent.model.NoAuthAgent;
//import com.loafle.overflow.module.noauthagent.type.AuthType;
//import org.junit.Before;
//import org.junit.Test;
//
//import java.util.Date;
//
///**
// * Created by root on 17. 6. 4.
// */
//public class JPANoAuthAgentDAOTest {
//
// private JPANoAuthAgentDAO jpaNoAuthAgentDAO = null;
//
// @Before
// public void Before() {
// this.jpaNoAuthAgentDAO = new JPANoAuthAgentDAO();
// }
//
// @Test
// public void findByTempKey() throws Exception {
//
// NoAuthAgent noAuthAgent = new NoAuthAgent();
// noAuthAgent.setTempKey("3398473-90847903874");
//
// NoAuthAgent aa = this.jpaNoAuthAgentDAO.findByTempKey(noAuthAgent);
//
// System.out.println(aa.getAuthStatus());
//
// }
//
// @Test
// public void findAllByNoAuth() throws Exception {
// }
//
//
// @Test
// public void createNoAuthAgent() {
// NoAuthAgent noAuthAgent = new NoAuthAgent();
//
//
// noAuthAgent.setApiKey("aaaaaaa");
// noAuthAgent.setDate(new Date());
// noAuthAgent.setHostName("Snoop pc");
// noAuthAgent.setLocalIP(4123);
// noAuthAgent.setTempKey("3398473-90847903874");
// noAuthAgent.setAuthStatus(AuthType.WAIT);
//
// this.jpaNoAuthAgentDAO.create(noAuthAgent);
// }
//
//
//
//
//}