Skip to content

Commit 5c88af3

Browse files
committedJun 29, 2013
Initial commit
0 parents  commit 5c88af3

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+9208
-0
lines changed
 

‎pom.xml

+126
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
4+
<modelVersion>4.0.0</modelVersion>
5+
<groupId>org.gujavasc.app</groupId>
6+
<artifactId>demo</artifactId>
7+
<version>1.0.0-SNAPSHOT</version>
8+
<packaging>war</packaging>
9+
<properties>
10+
<version.junit>4.11</version.junit>
11+
<version.arquillian_core>1.0.4.Final</version.arquillian_core>
12+
</properties>
13+
<dependencyManagement>
14+
<dependencies>
15+
<dependency>
16+
<groupId>org.jboss.spec</groupId>
17+
<artifactId>jboss-javaee-6.0</artifactId>
18+
<version>3.0.2.Final</version>
19+
<type>pom</type>
20+
<scope>import</scope>
21+
</dependency>
22+
<dependency>
23+
<groupId>org.jboss.arquillian</groupId>
24+
<artifactId>arquillian-bom</artifactId>
25+
<version>${version.arquillian_core}</version>
26+
<type>pom</type>
27+
<scope>import</scope>
28+
</dependency>
29+
</dependencies>
30+
</dependencyManagement>
31+
<dependencies>
32+
<dependency>
33+
<groupId>org.hibernate.javax.persistence</groupId>
34+
<artifactId>hibernate-jpa-2.0-api</artifactId>
35+
<scope>provided</scope>
36+
</dependency>
37+
<dependency>
38+
<groupId>org.jboss.spec.javax.ejb</groupId>
39+
<artifactId>jboss-ejb-api_3.1_spec</artifactId>
40+
<scope>provided</scope>
41+
</dependency>
42+
<dependency>
43+
<groupId>javax.enterprise</groupId>
44+
<artifactId>cdi-api</artifactId>
45+
<scope>provided</scope>
46+
</dependency>
47+
<dependency>
48+
<groupId>org.jboss.spec.javax.annotation</groupId>
49+
<artifactId>jboss-annotations-api_1.1_spec</artifactId>
50+
<scope>provided</scope>
51+
</dependency>
52+
<dependency>
53+
<groupId>org.jboss.spec.javax.faces</groupId>
54+
<artifactId>jboss-jsf-api_2.1_spec</artifactId>
55+
<scope>provided</scope>
56+
</dependency>
57+
<dependency>
58+
<groupId>org.jboss.spec.javax.ws.rs</groupId>
59+
<artifactId>jboss-jaxrs-api_1.1_spec</artifactId>
60+
<scope>provided</scope>
61+
</dependency>
62+
<dependency>
63+
<groupId>junit</groupId>
64+
<artifactId>junit</artifactId>
65+
<version>${version.junit}</version>
66+
<scope>test</scope>
67+
</dependency>
68+
<dependency>
69+
<groupId>org.jboss.arquillian.junit</groupId>
70+
<artifactId>arquillian-junit-container</artifactId>
71+
<scope>test</scope>
72+
</dependency>
73+
</dependencies>
74+
<repositories>
75+
<repository>
76+
<id>JBOSS_NEXUS</id>
77+
<url>http://repository.jboss.org/nexus/content/groups/public</url>
78+
</repository>
79+
</repositories>
80+
<build>
81+
<finalName>demo</finalName>
82+
<plugins>
83+
<plugin>
84+
<artifactId>maven-war-plugin</artifactId>
85+
<version>2.1.1</version>
86+
<configuration>
87+
<failOnMissingWebXml>false</failOnMissingWebXml>
88+
</configuration>
89+
</plugin>
90+
<plugin>
91+
<artifactId>maven-compiler-plugin</artifactId>
92+
<version>2.3.2</version>
93+
<configuration>
94+
<source>1.6</source>
95+
<target>1.6</target>
96+
<encoding>UTF-8</encoding>
97+
</configuration>
98+
</plugin>
99+
</plugins>
100+
</build>
101+
<profiles>
102+
<profile>
103+
<id>arq-jboss_as_remote_7.x</id>
104+
<build>
105+
<plugins>
106+
<plugin>
107+
<artifactId>maven-surefire-plugin</artifactId>
108+
<version>2.14.1</version>
109+
<configuration>
110+
<systemPropertyVariables>
111+
<arquillian.launch>JBOSS_AS_REMOTE_7.X</arquillian.launch>
112+
</systemPropertyVariables>
113+
</configuration>
114+
</plugin>
115+
</plugins>
116+
</build>
117+
<dependencies>
118+
<dependency>
119+
<groupId>org.jboss.as</groupId>
120+
<artifactId>jboss-as-arquillian-container-remote</artifactId>
121+
<version>7.2.0.Final</version>
122+
</dependency>
123+
</dependencies>
124+
</profile>
125+
</profiles>
126+
</project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,133 @@
1+
package org.gujavasc.app.model;
2+
3+
import javax.persistence.Entity;
4+
import java.io.Serializable;
5+
import javax.persistence.Id;
6+
import javax.persistence.GeneratedValue;
7+
import javax.persistence.GenerationType;
8+
import javax.persistence.Column;
9+
import javax.persistence.Version;
10+
import java.lang.Override;
11+
import java.util.Date;
12+
import javax.persistence.Temporal;
13+
import javax.persistence.TemporalType;
14+
import java.util.Set;
15+
import java.util.HashSet;
16+
import org.gujavasc.app.model.Session;
17+
import javax.persistence.OneToMany;
18+
import javax.persistence.CascadeType;
19+
import javax.xml.bind.annotation.XmlRootElement;
20+
21+
@Entity
22+
@XmlRootElement
23+
public class Conference implements Serializable
24+
{
25+
26+
@Id
27+
@GeneratedValue(strategy = GenerationType.AUTO)
28+
@Column(name = "id", updatable = false, nullable = false)
29+
private Long id = null;
30+
@Version
31+
@Column(name = "version")
32+
private int version = 0;
33+
34+
@Column
35+
private String name;
36+
37+
@Temporal(TemporalType.DATE)
38+
private Date conferenceDate;
39+
40+
@OneToMany(mappedBy = "conference", cascade = CascadeType.ALL)
41+
private Set<Session> sessions = new HashSet<Session>();
42+
43+
public Long getId()
44+
{
45+
return this.id;
46+
}
47+
48+
public void setId(final Long id)
49+
{
50+
this.id = id;
51+
}
52+
53+
public int getVersion()
54+
{
55+
return this.version;
56+
}
57+
58+
public void setVersion(final int version)
59+
{
60+
this.version = version;
61+
}
62+
63+
@Override
64+
public boolean equals(Object that)
65+
{
66+
if (this == that)
67+
{
68+
return true;
69+
}
70+
if (that == null)
71+
{
72+
return false;
73+
}
74+
if (getClass() != that.getClass())
75+
{
76+
return false;
77+
}
78+
if (id != null)
79+
{
80+
return id.equals(((Conference) that).id);
81+
}
82+
return super.equals(that);
83+
}
84+
85+
@Override
86+
public int hashCode()
87+
{
88+
if (id != null)
89+
{
90+
return id.hashCode();
91+
}
92+
return super.hashCode();
93+
}
94+
95+
public String getName()
96+
{
97+
return this.name;
98+
}
99+
100+
public void setName(final String name)
101+
{
102+
this.name = name;
103+
}
104+
105+
public Date getConferenceDate()
106+
{
107+
return this.conferenceDate;
108+
}
109+
110+
public void setConferenceDate(final Date conferenceDate)
111+
{
112+
this.conferenceDate = conferenceDate;
113+
}
114+
115+
@Override
116+
public String toString()
117+
{
118+
String result = getClass().getSimpleName() + " ";
119+
if (name != null && !name.trim().isEmpty())
120+
result += "name: " + name;
121+
return result;
122+
}
123+
124+
public Set<Session> getSessions()
125+
{
126+
return this.sessions;
127+
}
128+
129+
public void setSessions(final Set<Session> sessions)
130+
{
131+
this.sessions = sessions;
132+
}
133+
}

0 commit comments

Comments
 (0)
Please sign in to comment.