[Schmitzm-commits] r2277 - in trunk: . schmitzm-hibernate schmitzm-hibernate/src schmitzm-hibernate/src/META-INF schmitzm-hibernate/src/main schmitzm-hibernate/src/main/java schmitzm-hibernate/src/main/java/de schmitzm-hibernate/src/main/java/de/schmitzm schmitzm-hibernate/src/main/java/de/schmitzm/db schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/types

scm-commit at wald.intevation.org scm-commit at wald.intevation.org
Sat Mar 23 16:32:19 CET 2013


Author: mojays
Date: 2013-03-23 16:32:18 +0100 (Sat, 23 Mar 2013)
New Revision: 2277

Added:
   trunk/schmitzm-hibernate/
   trunk/schmitzm-hibernate/pom.xml
   trunk/schmitzm-hibernate/src/
   trunk/schmitzm-hibernate/src/META-INF/
   trunk/schmitzm-hibernate/src/META-INF/MANIFEST.MF
   trunk/schmitzm-hibernate/src/main/
   trunk/schmitzm-hibernate/src/main/java/
   trunk/schmitzm-hibernate/src/main/java/de/
   trunk/schmitzm-hibernate/src/main/java/de/schmitzm/
   trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/
   trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/
   trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/types/
   trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/types/AbstractUniqueIDType.java
   trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/types/UniqueIDType.java
Log:
New SCHMITZM sub-project for general/reusable Hibernate classes and utilities


Property changes on: trunk/schmitzm-hibernate
___________________________________________________________________
Added: svn:ignore
   + *.classpath
*.project
.settings
target


Added: trunk/schmitzm-hibernate/pom.xml
===================================================================
--- trunk/schmitzm-hibernate/pom.xml	                        (rev 0)
+++ trunk/schmitzm-hibernate/pom.xml	2013-03-23 15:32:18 UTC (rev 2277)
@@ -0,0 +1,52 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+	xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+	<modelVersion>4.0.0</modelVersion>
+
+	<artifactId>schmitzm-hibernate</artifactId>
+	<packaging>jar</packaging>
+
+	<parent>
+		<groupId>de.schmitzm</groupId>
+		<artifactId>schmitzm-parent</artifactId>
+		<version>2.8-SNAPSHOT</version>
+		<relativePath>../schmitzm-parent/pom.xml</relativePath>
+	</parent>
+
+	<name>schmitzm-hibernate</name>
+
+	<dependencies>
+
+		<dependency>
+			<groupId>de.schmitzm</groupId>
+			<artifactId>schmitzm-core</artifactId>
+			<version>${project.version}</version>
+			<type>test-jar</type>
+			<scope>test</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>de.schmitzm</groupId>
+			<artifactId>schmitzm-core</artifactId>
+			<version>${project.version}</version>
+			<type>jar</type>
+			<scope>compile</scope>
+		</dependency>
+
+		<dependency>
+			<groupId>org.hibernate</groupId>
+			<artifactId>hibernate-entitymanager</artifactId>
+			<version>3.4.0.GA</version>
+			<scope>compile</scope>
+		</dependency>
+		<dependency>
+			<groupId>org.hibernate</groupId>
+			<artifactId>hibernate-core</artifactId>
+			<version>3.3.2.GA</version>
+			<type>jar</type>
+			<scope>compile</scope>
+		</dependency>
+	</dependencies>
+
+	<build>
+	</build>
+</project>

Added: trunk/schmitzm-hibernate/src/META-INF/MANIFEST.MF
===================================================================
--- trunk/schmitzm-hibernate/src/META-INF/MANIFEST.MF	                        (rev 0)
+++ trunk/schmitzm-hibernate/src/META-INF/MANIFEST.MF	2013-03-23 15:32:18 UTC (rev 2277)
@@ -0,0 +1,3 @@
+Manifest-Version: 1.0
+Class-Path: 
+

Added: trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/types/AbstractUniqueIDType.java
===================================================================
--- trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/types/AbstractUniqueIDType.java	                        (rev 0)
+++ trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/types/AbstractUniqueIDType.java	2013-03-23 15:32:18 UTC (rev 2277)
@@ -0,0 +1,32 @@
+package de.schmitzm.db.hibernate.types;
+
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.MappedSuperclass;
+
+/**
+ * Super type for all types which have a unique ID as primary key.
+ * @author <a href="mailto:martin.schmitz at koeln.de">Martin Schmitz</a>
+ */
+ at MappedSuperclass
+public abstract class AbstractUniqueIDType implements UniqueIDType {
+	/** The internal (unique) id of the entity. */
+	@Id
+	@GeneratedValue(strategy = GenerationType.SEQUENCE)
+	protected Integer id;
+
+	/**
+	 * Returns the internal (unique) ID of the enum value.
+	 */
+	public Integer getId() {
+		return id;
+	}
+
+	/**
+	 * Sets the internal (unique) ID of the enum value.
+	 */
+	public void setId(Integer id) {
+		this.id = id;
+	}
+}

Added: trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/types/UniqueIDType.java
===================================================================
--- trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/types/UniqueIDType.java	                        (rev 0)
+++ trunk/schmitzm-hibernate/src/main/java/de/schmitzm/db/hibernate/types/UniqueIDType.java	2013-03-23 15:32:18 UTC (rev 2277)
@@ -0,0 +1,18 @@
+package de.schmitzm.db.hibernate.types;
+
+
+/**
+ * Super type for all types which have a unique ID as primary key.
+ * @author <a href="mailto:martin.schmitz at koeln.de">Martin Schmitz</a>
+ */
+public interface UniqueIDType {
+	/**
+	 * Returns the internal (unique) ID of the enum value.
+	 */
+	public Integer getId();
+
+	/**
+	 * Sets the internal (unique) ID of the enum value.
+	 */
+	public void setId(Integer id);
+}



More information about the Schmitzm-commits mailing list