Author: dgeraskov
Date: 2011-11-22 18:41:59 -0500 (Tue, 22 Nov 2011)
New Revision: 36547
Added:
branches/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/api/IColumn.java
branches/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/api/IPrimaryKey.java
branches/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/api/ITable.java
Log:
Move database reading to console extension
Added:
branches/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/api/IColumn.java
===================================================================
---
branches/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/api/IColumn.java
(rev 0)
+++
branches/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/api/IColumn.java 2011-11-22
23:41:59 UTC (rev 36547)
@@ -0,0 +1,23 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.console.ext.api;
+
+/**
+ * @author Dmitry Geraskov {geraskov(a)gmail.com}
+ *
+ */
+public interface IColumn {
+
+ public String getName();
+
+ public Integer getSqlTypeCode();
+
+}
Added:
branches/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/api/IPrimaryKey.java
===================================================================
---
branches/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/api/IPrimaryKey.java
(rev 0)
+++
branches/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/api/IPrimaryKey.java 2011-11-22
23:41:59 UTC (rev 36547)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.console.ext.api;
+
+import java.util.List;
+
+/**
+ * @author Dmitry Geraskov {geraskov(a)gmail.com}
+ *
+ */
+public interface IPrimaryKey {
+
+ boolean containsColumn(IColumn col);
+
+ int getColumnSpan();
+
+ IColumn getColumn(int i);
+
+ List<IColumn> getColumns();
+
+ ITable getTable();
+
+}
Added:
branches/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/api/ITable.java
===================================================================
---
branches/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/api/ITable.java
(rev 0)
+++
branches/hibernatetools-multiversion2/plugins/org.hibernate.eclipse/src/org/hibernate/console/ext/api/ITable.java 2011-11-22
23:41:59 UTC (rev 36547)
@@ -0,0 +1,31 @@
+/*******************************************************************************
+ * Copyright (c) 2011 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributor:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.hibernate.console.ext.api;
+
+import java.util.Iterator;
+
+/**
+ *
+ * @author Dmitry Geraskov {geraskov(a)gmail.com}
+ *
+ */
+public interface ITable {
+
+ public String getName();
+
+ public String getSchema();
+
+ public String getCatalog();
+
+ public IPrimaryKey getPrimaryKey();
+
+ public Iterator<IColumn> getColumnIterator();
+}