diff options
author | Devan Goodwin <dgoodwin@redhat.com> | 2009-11-06 12:50:04 -0400 |
---|---|---|
committer | Devan Goodwin <dgoodwin@redhat.com> | 2009-11-06 12:50:04 -0400 |
commit | 8d167b75c4cc028dedd5d99f94cdf8f27bb25c16 (patch) | |
tree | 7c6bb11ee7e59ac23c2daaf962dfc003b96d6bf5 | |
parent | 54d01e4b118d8d123d675caecdfdfc0b6414a0e2 (diff) | |
download | candlepin-8d167b75c4cc028dedd5d99f94cdf8f27bb25c16.tar.gz candlepin-8d167b75c4cc028dedd5d99f94cdf8f27bb25c16.tar.xz candlepin-8d167b75c4cc028dedd5d99f94cdf8f27bb25c16.zip |
Complete ConsumerType db mapping.
-rw-r--r-- | proxy/build.xml | 7 | ||||
-rw-r--r-- | proxy/code/src/org/fedoraproject/candlepin/model/ConsumerType.java | 27 |
2 files changed, 26 insertions, 8 deletions
diff --git a/proxy/build.xml b/proxy/build.xml index 05a7ae0..6f0a6f4 100644 --- a/proxy/build.xml +++ b/proxy/build.xml @@ -589,15 +589,10 @@ <fileset id="eclipse.lib" dir="/opt/eclipse/plugins"> <include name="**/*.jar" /> </fileset> - <!-- fileset definition for JDBC --> - <fileset id="jdbc.lib" dir="/usr/share/java"> - <include name="**/*.jar" /> - </fileset> - <property name="dir.genhbm" value="build/schemagen/" /> + <property name="dir.genhbm" value="build/schemagen/" /> <taskdef name="hibernatetool" classname="org.hibernate.tool.ant.HibernateToolTask" classpathref="libjars"/> - <target name="gen-schema"> <delete dir="${dir.genhbm}" /> <mkdir dir="${dir.genhbm}" /> diff --git a/proxy/code/src/org/fedoraproject/candlepin/model/ConsumerType.java b/proxy/code/src/org/fedoraproject/candlepin/model/ConsumerType.java index 9ead523..b5bb510 100644 --- a/proxy/code/src/org/fedoraproject/candlepin/model/ConsumerType.java +++ b/proxy/code/src/org/fedoraproject/candlepin/model/ConsumerType.java @@ -14,20 +14,27 @@ */ package org.fedoraproject.candlepin.model; +import java.io.Serializable; + import javax.persistence.Entity; +import javax.persistence.GeneratedValue; +import javax.persistence.GenerationType; import javax.persistence.Id; +import javax.persistence.Table; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; /** - * Represents the tyep of consumer. + * Represents the type of consumer. */ @XmlRootElement @XmlAccessorType(XmlAccessType.PROPERTY) @Entity -public class ConsumerType extends BaseModel { +@Table(name="cp_consumer_type") +public class ConsumerType extends BaseModel implements Serializable { + private Long id; private String label; /** @@ -47,6 +54,22 @@ public class ConsumerType extends BaseModel { } /** + * @return the id + */ + @Id + @GeneratedValue(strategy=GenerationType.AUTO) + public Long getId() { + return id; + } + + /** + * @param id the id to set + */ + public void setId(Long id) { + this.id = id; + } + + /** * @return Returns the label. */ @Id |