[hibernate-commits] Hibernate SVN: r17967 - in sandbox/trunk/new-metadata: src and 8 other directories.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Thu Nov 12 15:52:13 EST 2009


Author: steve.ebersole at jboss.com
Date: 2009-11-12 15:52:13 -0500 (Thu, 12 Nov 2009)
New Revision: 17967

Added:
   sandbox/trunk/new-metadata/build.gradle
   sandbox/trunk/new-metadata/settings.gradle
   sandbox/trunk/new-metadata/src/
   sandbox/trunk/new-metadata/src/main/
   sandbox/trunk/new-metadata/src/main/java/
   sandbox/trunk/new-metadata/src/main/java/org/
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/java/
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/java/Nature.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/java/package.html
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/mapping/
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/mapping/DatatypeMapping.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/mapping/package.html
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/AbstractColumn.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/AbstractColumnConstraint.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/AbstractTable.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Column.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Constraint.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Datatype.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/DerivedColumn.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Exportable.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/ForeignKey.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Index.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/LogicalTable.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/PhysicalColumn.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/PhysicalTable.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/PrimaryKey.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Table.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/UniqueKey.java
   sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/package.html
Modified:
   sandbox/trunk/new-metadata/
Log:
selective move from local working


Property changes on: sandbox/trunk/new-metadata
___________________________________________________________________
Name: svn:ignore
   - target
local
*.ipr
*.iws
*.iml
.classpath
.project
.nbattrs
*.log
*.properties
.clover
.idea

   + target
build
local
*.ipr
*.iws
*.iml
.classpath
.project
.nbattrs
*.log
*.properties
.clover
.idea


Added: sandbox/trunk/new-metadata/build.gradle
===================================================================
--- sandbox/trunk/new-metadata/build.gradle	                        (rev 0)
+++ sandbox/trunk/new-metadata/build.gradle	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,40 @@
+usePlugin('java')
+
+defaultTasks 'classes'
+
+repositories {
+    mavenCentral()
+    mavenRepo name: "jboss", urls: "http://repository.jboss.org/maven2/"
+    mavenRepo name: "jboss-snapshots", urls: "http://snapshots.jboss.org/maven2/"
+}
+
+group = 'org.hibernate.sandbox'
+version = '1.0.0-SNAPSHOT'
+
+dependencies {
+    hibernateVersion = '3.3.2.GA'
+    slf4jVersion = '1.5.8'
+    jtaVersion = '1.1'
+    javassistVersion = '3.9.0.GA'
+
+    junitVersion = '3.8.2'
+
+    h2Version = '1.0.79'
+
+    compile(
+            [group: 'org.slf4j', name: 'slf4j-api', version: slf4jVersion],
+            [group: 'org.hibernate', name: 'hibernate-core', version: hibernateVersion]
+    )
+    testCompile(
+            [group: 'junit', name: 'junit', version: junitVersion]
+    )
+    testRuntime(
+            [group: 'org.slf4j', name: 'jcl-over-slf4j', version: slf4jVersion],
+            [group: 'org.slf4j', name: 'slf4j-log4j12', version: slf4jVersion],
+            [group: 'javassist', name:'javassist', version: javassistVersion],
+            [group: "com.h2database", name: "h2", version: h2Version]
+    )
+}
+
+targetCompatibility = "1.4"
+sourceCompatibility = "1.4"

Added: sandbox/trunk/new-metadata/settings.gradle
===================================================================
--- sandbox/trunk/new-metadata/settings.gradle	                        (rev 0)
+++ sandbox/trunk/new-metadata/settings.gradle	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1 @@
+rootProject.name = 'hibernate-new-metadata'

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/java/Nature.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/java/Nature.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/java/Nature.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,78 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.java;
+
+import java.io.Serializable;
+import java.util.HashMap;
+
+/**
+ * Enumerations of the various types or natures of attributes.
+ *
+ * @author Steve Ebersole
+ */
+public class Nature implements Serializable {
+	private static final HashMap INSTANCES = new HashMap();
+
+	public static final Nature VALUE = new Nature( "VALUE" );
+	public static final Nature COMPONENT = new Nature( "COMPONENT" );
+	public static final Nature ANY = new Nature( "ANY", true );
+	public static final Nature ENTITY = new Nature( "ENTITY", true );
+	public static final Nature COLLECTION = new Nature( "COLLECTION", true );
+
+	static {
+		INSTANCES.put( VALUE.name, VALUE );
+		INSTANCES.put( COMPONENT.name, COMPONENT );
+		INSTANCES.put( ANY.name, ANY );
+		INSTANCES.put( ENTITY.name, ENTITY );
+		INSTANCES.put( COLLECTION.name, COLLECTION );
+	}
+
+	private final String name;
+	private final boolean association;
+
+	private Nature(String name, boolean association) {
+		this.name = name;
+		this.association = association;
+	}
+
+	private Nature(String name) {
+		this( name, false );
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public boolean isAssociation() {
+		return association;
+	}
+
+	public String toString() {
+		return super.toString() + "[" + getName() + "]";
+	}
+
+	private Object readResolve() {
+		return INSTANCES.get( name );
+	}
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/java/package.html
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/java/package.html	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/java/package.html	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,31 @@
+<!--
+  ~ Hibernate, Relational Persistence for Idiomatic Java
+  ~
+  ~ Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+  ~ third-party contributors as indicated by either @author tags or express
+  ~ copyright attribution statements applied by the authors.  All
+  ~ third-party contributions are distributed under license by Red Hat Inc.
+  ~
+  ~ This copyrighted material is made available to anyone wishing to use, modify,
+  ~ copy, or redistribute it subject to the terms and conditions of the GNU
+  ~ Lesser General Public License, as published by the Free Software Foundation.
+  ~
+  ~ This program is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+  ~ or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+  ~ for more details.
+  ~
+  ~ You should have received a copy of the GNU Lesser General Public License
+  ~ along with this distribution; if not, write to:
+  ~ Free Software Foundation, Inc.
+  ~ 51 Franklin Street, Fifth Floor
+  ~ Boston, MA  02110-1301  USA
+  -->
+
+<html>
+<body>
+<p>
+    This package defines metadata modeling of a Java domain model.
+</p>
+</body>
+</html>

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/mapping/DatatypeMapping.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/mapping/DatatypeMapping.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/mapping/DatatypeMapping.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,47 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.mapping;
+
+import org.hibernate.metadata.schema.Datatype;
+
+/**
+ * Represents the structural information pertaining to mapping between a Java type and an SQL <tt>datatype</tt>.
+ *
+ * @author Steve Ebersole
+ */
+public interface DatatypeMapping {
+	/**
+	 * Retrieve the Java type described by this mapping.
+	 *
+	 * @return The Java class.
+	 */
+	public Class getJavaType();
+
+	/**
+	 * Retrieve the metadata about the contained SQL datatypes.
+	 *
+	 * @return The SQL datatype metadata.
+	 */
+	public Datatype getSqlDatatypes();
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/mapping/package.html
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/mapping/package.html	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/mapping/package.html	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,34 @@
+<!--
+  ~ Hibernate, Relational Persistence for Idiomatic Java
+  ~
+  ~ Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+  ~ third-party contributors as indicated by either @author tags or express
+  ~ copyright attribution statements applied by the authors.  All
+  ~ third-party contributions are distributed under license by Red Hat Inc.
+  ~
+  ~ This copyrighted material is made available to anyone wishing to use, modify,
+  ~ copy, or redistribute it subject to the terms and conditions of the GNU
+  ~ Lesser General Public License, as published by the Free Software Foundation.
+  ~
+  ~ This program is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+  ~ or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+  ~ for more details.
+  ~
+  ~ You should have received a copy of the GNU Lesser General Public License
+  ~ along with this distribution; if not, write to:
+  ~ Free Software Foundation, Inc.
+  ~ 51 Franklin Street, Fifth Floor
+  ~ Boston, MA  02110-1301  USA
+  -->
+
+<html>
+<body>
+<p>
+    This package builds upon the {@link org.hibernate.metadata.schema} package providing
+    metadata modeling of Java entities to that RDBMS schema.
+</p>
+ at see org.hibernate.metadata.schema
+ at see org.hibernate.metadata.java
+</body>
+</html>

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/AbstractColumn.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/AbstractColumn.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/AbstractColumn.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,44 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.schema;
+
+/**
+ * Basic support for {@link Column} implementations.
+ *
+ * @author Steve Ebersole
+ */
+public abstract class AbstractColumn implements Column {
+	private final Table table;
+
+	protected AbstractColumn(Table table) {
+		this.table = table;
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public Table getTable() {
+		return table;
+	}
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/AbstractColumnConstraint.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/AbstractColumnConstraint.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/AbstractColumnConstraint.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,59 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.schema;
+
+import java.util.List;
+import java.util.ArrayList;
+
+/**
+ * Support for contraints which specifically apply to a column or series of columns.
+ *
+ * @author Steve Ebersole
+ */
+public abstract class AbstractColumnConstraint implements Constraint {
+	private final Table table;
+	private final String name;
+	private List/*<Column>*/ columns = new ArrayList();
+
+	protected AbstractColumnConstraint(Table table, String name) {
+		this.table = table;
+		this.name = name;
+	}
+
+	public Table getTable() {
+		return table;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public List/*<Column>*/ getColumns() {
+		return columns;
+	}
+
+	public void addColumn(Column column) {
+		columns.add( column );
+	}
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/AbstractTable.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/AbstractTable.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/AbstractTable.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,49 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.schema;
+
+import java.util.Iterator;
+import java.util.LinkedHashSet;
+
+/**
+ * TODO : javadoc
+ *
+ * @author Steve Ebersole
+ */
+public abstract class AbstractTable implements Table {
+	private PrimaryKey primaryKey = new PrimaryKey( this );
+	private final LinkedHashSet columns = new LinkedHashSet();
+
+	public void addColumn(Column column) {
+		columns.add( column );
+	}
+
+	public PrimaryKey getPrimaryKey() {
+		return primaryKey;
+	}
+
+	public Iterator iterateColumns() {
+		return columns.iterator();
+	}
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Column.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Column.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Column.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,40 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.schema;
+
+/**
+ * Models a column within a {@link Table}.
+ *
+ * @author Steve Ebersole
+ */
+public interface Column {
+	/**
+	 * Retrieve the table that owns this column.
+	 *
+	 * @return The owning table.
+	 */
+	public Table getTable();
+
+	public String toDebugString();
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Constraint.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Constraint.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Constraint.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,42 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.schema;
+
+import java.util.List;
+
+/**
+ * Basic contract for the types of constraints we fully support as metdata constructs:<ul>
+ * <li>primary key contraint</li>
+ * <li>foreign key constraint</li>
+ * <li>unique constraint</li>
+ * </ul>
+ *
+ * @author Steve Ebersole
+ */
+public interface Constraint {
+	public Table getTable();
+	public String getName();
+
+	public List/*<Column>*/ getColumns();
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Datatype.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Datatype.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Datatype.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,54 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.schema;
+
+/**
+ * Models a SQL DATATYPE.
+ *
+ * @author Steve Ebersole
+ */
+public class Datatype {
+	private final int typeCode;
+	private final String typeName;
+	private final Class javaType;
+
+	public Datatype(int typeCode, String typeName, Class javaType) {
+		this.typeCode = typeCode;
+		this.typeName = typeName;
+		this.javaType = javaType;
+	}
+
+	public int getTypeCode() {
+		return typeCode;
+	}
+
+	public String getTypeName() {
+		return typeName;
+	}
+
+	public Class getJavaType() {
+		return javaType;
+	}
+
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/DerivedColumn.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/DerivedColumn.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/DerivedColumn.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,42 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.schema;
+
+/**
+ * A derived column is the result of a <tt>formula</tt> mapping.
+ *
+ * @author Steve Ebersole
+ */
+public class DerivedColumn extends AbstractColumn implements Column {
+	public DerivedColumn(Table table) {
+		super( table );
+	}
+
+	/**
+	 * {@inheritDoc}
+	 */
+	public String toDebugString() {
+		return getTable().toDebugString() + ".{derived-column}";
+	}
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Exportable.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Exportable.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Exportable.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,39 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.schema;
+
+/**
+ * Contract for entities (in the ERD sense) which can be exported via <tt>CREATE</tt>, <tt>ALTER</tt>, etc
+ * statements.
+ *
+ * @author Steve Ebersole
+ */
+public interface Exportable {
+	/**
+	 * Get a uniqueing identifier to make sure we are not exporting the same database structure multiple times.
+	 *
+	 * @return The exporting identifier.
+	 */
+	public String getExportIdentifier();
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/ForeignKey.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/ForeignKey.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/ForeignKey.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,115 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.schema;
+
+import java.util.List;
+import java.util.ArrayList;
+
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+/**
+ * TODO : javadoc
+ *
+ * @author Steve Ebersole
+ */
+public class ForeignKey implements Constraint {
+	private static final Logger log = LoggerFactory.getLogger( ForeignKey.class );
+
+	private final Table sourceTable;
+	private final Table targetTable;
+	private final String name;
+
+	private List/*<Column>*/ sourceColumns = new ArrayList();
+	private List/*<Column>*/ targetColumns;
+
+	public ForeignKey(Table sourceTable, Table targetTable, String name) {
+		this.sourceTable = sourceTable;
+		this.targetTable = targetTable;
+		this.name = name;
+	}
+
+	public ForeignKey(Table sourceTable, Table targetTable) {
+		this( sourceTable, targetTable, null );
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public Table getTable() {
+		return getSourceTable();
+	}
+
+	public Table getSourceTable() {
+		return sourceTable;
+	}
+
+	public Table getTargetTable() {
+		return targetTable;
+	}
+
+	public List/*<Column>*/ getColumns() {
+		return getSourceColumns();
+	}
+
+	public List getSourceColumns() {
+		return sourceColumns;
+	}
+
+	public List getTargetColumns() {
+		return targetColumns == null
+				? getTargetTable().getPrimaryKey().getColumns()
+				: targetColumns;
+	}
+
+	public void addColumnMapping(Column sourceColumn, Column targetColumn) {
+		if ( targetColumn == null ) {
+			if ( targetColumns != null ) {
+				if ( log.isWarnEnabled() ) {
+					log.warn(
+							"Attempt to map column [" + sourceColumn.toDebugString()
+									+ "] to no target column after explicit target column(s) named for FK [name="
+									+ getName() + "]"
+					);
+				}
+			}
+		}
+		else {
+			if ( targetColumns == null ) {
+				if ( !sourceColumns.isEmpty() ) {
+					log.warn(
+							"Column mapping mismatch as part of FK [table=" + getTable().toDebugString()
+									+ ", name=" + getName() + "] while adding source column ["
+									+ sourceColumn.toDebugString() + "]"
+					);
+				}
+				targetColumns = new ArrayList();
+			}
+			targetColumns.add( targetColumn );
+		}
+		sourceColumns.add( sourceColumn );
+	}
+
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Index.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Index.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Index.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,35 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.schema;
+
+/**
+ * TODO : javadoc
+ *
+ * @author Steve Ebersole
+ */
+public class Index extends AbstractColumnConstraint implements Constraint {
+	protected Index(Table table, String name) {
+		super( table, name );
+	}
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/LogicalTable.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/LogicalTable.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/LogicalTable.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,57 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.schema;
+
+import java.util.Set;
+import java.util.HashSet;
+
+/**
+ * A <tt>data container</tt> defined by a <tt>SELECT</tt> statement.  This translates into an inline view in the
+ * SQL statements: <code>select ... from (select ... from logical_table_table ...) ...</code>
+ *
+ * @author Steve Ebersole
+ */
+public class LogicalTable extends AbstractTable implements Table {
+	private final String select;
+	private Set synchronizedTableSpaces = java.util.Collections.EMPTY_SET;
+
+	public LogicalTable(String select) {
+		this.select = select;
+	}
+
+	public void addSynchronizedTableSpace(String space) {
+		if ( synchronizedTableSpaces == java.util.Collections.EMPTY_SET ) {
+			synchronizedTableSpaces = new HashSet();
+		}
+		synchronizedTableSpaces.add( space );
+	}
+
+	public Set getSpaces() {
+		return synchronizedTableSpaces;
+	}
+
+	public String toDebugString() {
+		return "{inline-view}";
+	}
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/PhysicalColumn.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/PhysicalColumn.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/PhysicalColumn.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,46 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.schema;
+
+/**
+ * TODO : javadoc
+ *
+ * @author Steve Ebersole
+ */
+public class PhysicalColumn extends AbstractColumn implements Column {
+	private final String name;
+
+	protected PhysicalColumn(Table table, String name) {
+		super( table );
+		this.name = name;
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public String toDebugString() {
+		return getTable().toDebugString() + '.' + getName();
+	}
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/PhysicalTable.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/PhysicalTable.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/PhysicalTable.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,58 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.schema;
+
+import java.util.Set;
+
+/**
+ * Models the concept of a relational <tt>TABLE</tt> (or <tt>VIEW</tt>) database to which we map information.
+ *
+ * @author Gavin King
+ * @author Steve Ebersole
+ */
+public class PhysicalTable extends AbstractTable implements Table, Exportable {
+	private final String explicitSchema;
+	private final String explicitCatalog;
+	private final String name;
+	private final Set spaces;
+
+	public PhysicalTable(String explicitSchema, String explicitCatalog, String name) {
+		this.explicitSchema = explicitSchema;
+		this.explicitCatalog = explicitCatalog;
+		this.name = name;
+		this.spaces = java.util.Collections.singleton( name );
+	}
+
+	public String getExportIdentifier() {
+		return name;
+	}
+
+	public Set getSpaces() {
+		return spaces;
+	}
+
+	public String toDebugString() {
+		return name;
+	}
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/PrimaryKey.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/PrimaryKey.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/PrimaryKey.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,53 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.schema;
+
+
+/**
+ * Models a table's primary key.
+ * <p/>
+ * NOTE : This need not be a physical primary key; we just mean a column or columns which uniquely identify rows in
+ * the table.  Of course it is recommended to define proper integrity constraints, including primary keys.
+ *
+ * @author Steve Ebersole
+ */
+public class PrimaryKey extends AbstractColumnConstraint implements Constraint {
+	// IMPL NOTE : I override the name behavior here because:
+	//		(1) primary keys are not required to be named.
+	//		(2) because a primary key is required for each table, it is easier to allow setting the constraint name
+	// 			later in terms of building the metamodel
+	private String name;
+
+	public PrimaryKey(Table table) {
+		super( table, null );
+	}
+
+	public String getName() {
+		return name;
+	}
+
+	public void setName(String name) {
+		this.name = name;
+	}
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Table.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Table.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/Table.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,44 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.schema;
+
+import java.util.Iterator;
+import java.util.Set;
+
+/**
+ * Contract for data containers (what the ANSI SQL spec calls "table specifications") to which we can map
+ * entity state.
+ *
+ * @author Steve Ebersole
+ */
+public interface Table {
+	public PrimaryKey getPrimaryKey();
+
+	public void addColumn(Column column);
+
+	public Iterator iterateColumns();
+	public Set getSpaces();
+
+	public String toDebugString();
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/UniqueKey.java
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/UniqueKey.java	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/UniqueKey.java	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,35 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+ * third-party contributors as indicated by either @author tags or express
+ * copyright attribution statements applied by the authors.  All
+ * third-party contributions are distributed under license by Red Hat Inc.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA  02110-1301  USA
+ */
+package org.hibernate.metadata.schema;
+
+/**
+ * TODO : javadoc
+ *
+ * @author Steve Ebersole
+ */
+public class UniqueKey extends AbstractColumnConstraint implements Constraint {
+	protected UniqueKey(Table table, String name) {
+		super( table, name );
+	}
+}

Added: sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/package.html
===================================================================
--- sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/package.html	                        (rev 0)
+++ sandbox/trunk/new-metadata/src/main/java/org/hibernate/metadata/schema/package.html	2009-11-12 20:52:13 UTC (rev 17967)
@@ -0,0 +1,31 @@
+<!--
+  ~ Hibernate, Relational Persistence for Idiomatic Java
+  ~
+  ~ Copyright (c) 2009 by Red Hat Inc and/or its affiliates or by
+  ~ third-party contributors as indicated by either @author tags or express
+  ~ copyright attribution statements applied by the authors.  All
+  ~ third-party contributions are distributed under license by Red Hat Inc.
+  ~
+  ~ This copyrighted material is made available to anyone wishing to use, modify,
+  ~ copy, or redistribute it subject to the terms and conditions of the GNU
+  ~ Lesser General Public License, as published by the Free Software Foundation.
+  ~
+  ~ This program is distributed in the hope that it will be useful,
+  ~ but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+  ~ or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License
+  ~ for more details.
+  ~
+  ~ You should have received a copy of the GNU Lesser General Public License
+  ~ along with this distribution; if not, write to:
+  ~ Free Software Foundation, Inc.
+  ~ 51 Franklin Street, Fifth Floor
+  ~ Boston, MA  02110-1301  USA
+  -->
+
+<html>
+<body>
+<p>
+    This package defines metadata modeling of a RDBMS schema.
+</p>
+</body>
+</html>



More information about the hibernate-commits mailing list