Java Doc for Table.java in » Database-ORM » openjpa » org » apache » openjpa » jdbc » schema » Java Source Code / Java DocumentationJava Source Code and Java Documentation
Java Source Code / Java Documentation
1.
6.0 JDK Core
2.
6.0 JDK Modules
3.
6.0 JDK Modules com.sun
4.
6.0 JDK Modules com.sun.java
5.
6.0 JDK Modules sun
6.
6.0 JDK Platform
7.
Ajax
8.
Apache Harmony Java SE
9.
Aspect oriented
10.
Authentication Authorization
11.
Blogger System
12.
Build
13.
Byte Code
14.
Cache
15.
Chart
16.
Chat
17.
Code Analyzer
18.
Collaboration
19.
Content Management System
20.
Database Client
21.
Database DBMS
22.
Database JDBC Connection Pool
23.
Database ORM
24.
Development
25.
EJB Server geronimo
26.
EJB Server GlassFish
27.
EJB Server JBoss 4.2.1
28.
EJB Server resin 3.1.5
29.
ERP CRM Financial
30.
ESB
31.
Forum
32.
GIS
33.
Graphic Library
34.
Groupware
35.
HTML Parser
36.
IDE
37.
IDE Eclipse
38.
IDE Netbeans
39.
Installer
40.
Internationalization Localization
41.
Inversion of Control
42.
Issue Tracking
43.
J2EE
44.
JBoss
45.
JMS
46.
JMX
47.
Library
48.
Mail Clients
49.
Net
50.
Parser
51.
PDF
52.
Portal
53.
Profiler
54.
Project Management
55.
Report
56.
RSS RDF
57.
Rule Engine
58.
Science
59.
Scripting
60.
Search Engine
61.
Security
62.
Sevlet Container
63.
Source Control
64.
Swing Library
65.
Template Engine
66.
Test Coverage
67.
Testing
68.
UML
69.
Web Crawler
70.
Web Framework
71.
Web Mail
72.
Web Server
73.
Web Services
74.
Web Services apache cxf 2.0.1
75.
Web Services AXIS2
76.
Wiki Engine
77.
Workflow Engines
78.
XML
79.
XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation
»
Database ORM
»
openjpa
»
org.apache.openjpa.jdbc.schema
Source Cross Reference
Class Diagram
Java Document (Java Doc)
java.lang
.Object
org.apache.openjpa.jdbc.schema
.NameSet
org.apache.openjpa.jdbc.schema
.Table
Table
public
class Table extends
NameSet
implements
Comparable
,
SourceTracker
(Code)
Represents a database table.
author:
Abe White
author:
Stephen Kim
Constructor Summary
public
Table
()
Default constructor.
public
Table
(
String
name,
Schema
schema)
Constructor.
Method Summary
public
Column
addColumn
(
String
name)
Add a column to the table.
public
ForeignKey
addForeignKey
()
Add a foreign key to the table.
public
ForeignKey
addForeignKey
(
String
name)
Add a foreign key to the table.
public
Index
addIndex
(
String
name)
Add an index to the table.
public
PrimaryKey
addPrimaryKey
()
Set the primary key for the table.
public
PrimaryKey
addPrimaryKey
(
String
name)
Set the primary key for the table.
public
Unique
addUnique
(
String
name)
Add a unique constraint to the table.
void
changeAutoAssigned
(
Column
col)
Called by columns when their auto increment status changes.
void
changeRelationId
(
Column
col)
Called by columns when their relation id status changes.
public
int
compareTo
(
Object
other)
public
Column
[]
getAutoAssignedColumns
()
Return this table's auto-assigned columns.
public
Column
getColumn
(
String
name)
Return the column with the given name, or null if none.
public
Column
[]
getColumns
()
Return the table's columns, in alphabetical order.
public
String
getComment
()
public
ForeignKey
getForeignKey
(
String
name)
Return the foreign key with the given name.
public
ForeignKey
[]
getForeignKeys
()
Return all foreign keys for the table.
public
String
getFullName
()
Return the table name, including schema, using '.' as the catalog separator.
public
Index
getIndex
(
String
name)
Return the index with the given name, or null if none.
public
Index
[]
getIndexes
()
Return the table's indexes.
public
String
getName
()
Return the name of the table.
public
PrimaryKey
getPrimaryKey
()
Return the primary key for the table, if any.
public
Column
[]
getRelationIdColumns
()
Return this table's relation id columns.
public
String
getResourceName
()
public
Schema
getSchema
()
Return the schema for the table.
public
String
getSchemaName
()
The table's schema name.
public
File
getSourceFile
()
public
Object
getSourceScope
()
public
int
getSourceType
()
public
Unique
getUnique
(
String
name)
Return the unique constraint with the given name, or null if none.
public
Unique
[]
getUniques
()
Return the table's unique constraints.
public
boolean
hasComment
()
public
Column
importColumn
(
Column
col)
Import a column from another table.
public
ForeignKey
importForeignKey
(
ForeignKey
fk)
Import a foreign key; column names must match columns of this table.
public
Index
importIndex
(
Index
idx)
Import an index; column names must match columns of this table.
public
PrimaryKey
importPrimaryKey
(
PrimaryKey
pk)
Import a primary key; column names must match columns of this table.
public
Unique
importUnique
(
Unique
unq)
Import a constraint; column names must match columns of this table.
void
indexColumns
()
Called by columns to ensure that all columns are properly indexed before returning that information to the user.
void
indexForeignKeys
()
Called by foreign keys to ensure that all fks are properly indexed before returning that information to the user.
void
remove
()
Called when the table is removed from its schema.
public
boolean
removeColumn
(
Column
col)
Remove the given column from the table.
public
boolean
removeForeignKey
(
ForeignKey
fk)
Remove the given foreign key from the table.
public
boolean
removeIndex
(
Index
idx)
Remove the given index from the table.
public
boolean
removePrimaryKey
()
Remove the primary key from this table.
public
boolean
removeUnique
(
Unique
unq)
Remove the given unique constraint from the table.
public
void
setComment
(
String
comment)
public
void
setName
(
String
name)
Set the name of the table.
public
void
setSchemaName
(
String
name)
The table's schema name.
public
void
setSource
(
File
source, int srcType)
public
String
toString
()
Constructor Detail
Table
public
Table()
(Code)
Default constructor.
Table
public
Table(
String
name,
Schema
schema)
(Code)
Constructor.
Parameters:
name - the table name
Parameters:
schema - the table schema
Method Detail
addColumn
public
Column
addColumn(
String
name)
(Code)
Add a column to the table.
addForeignKey
public
ForeignKey
addForeignKey()
(Code)
Add a foreign key to the table.
addForeignKey
public
ForeignKey
addForeignKey(
String
name)
(Code)
Add a foreign key to the table. Duplicate key names are not allowed.
addIndex
public
Index
addIndex(
String
name)
(Code)
Add an index to the table.
addPrimaryKey
public
PrimaryKey
addPrimaryKey()
(Code)
Set the primary key for the table.
addPrimaryKey
public
PrimaryKey
addPrimaryKey(
String
name)
(Code)
Set the primary key for the table.
addUnique
public
Unique
addUnique(
String
name)
(Code)
Add a unique constraint to the table.
changeAutoAssigned
void changeAutoAssigned(
Column
col)
(Code)
Called by columns when their auto increment status changes.
changeRelationId
void changeRelationId(
Column
col)
(Code)
Called by columns when their relation id status changes.
compareTo
public
int compareTo(
Object
other)
(Code)
getAutoAssignedColumns
public
Column
[] getAutoAssignedColumns()
(Code)
Return this table's auto-assigned columns.
getColumn
public
Column
getColumn(
String
name)
(Code)
Return the column with the given name, or null if none.
getColumns
public
Column
[] getColumns()
(Code)
Return the table's columns, in alphabetical order.
getComment
public
String
getComment()
(Code)
getForeignKey
public
ForeignKey
getForeignKey(
String
name)
(Code)
Return the foreign key with the given name. If multiple foreign keys have the name, the first match is returned.
getForeignKeys
public
ForeignKey
[] getForeignKeys()
(Code)
Return all foreign keys for the table.
getFullName
public
String
getFullName()
(Code)
Return the table name, including schema, using '.' as the catalog separator.
getIndex
public
Index
getIndex(
String
name)
(Code)
Return the index with the given name, or null if none.
getIndexes
public
Index
[] getIndexes()
(Code)
Return the table's indexes.
getName
public
String
getName()
(Code)
Return the name of the table.
getPrimaryKey
public
PrimaryKey
getPrimaryKey()
(Code)
Return the primary key for the table, if any.
getRelationIdColumns
public
Column
[] getRelationIdColumns()
(Code)
Return this table's relation id columns.
getResourceName
public
String
getResourceName()
(Code)
getSchema
public
Schema
getSchema()
(Code)
Return the schema for the table.
getSchemaName
public
String
getSchemaName()
(Code)
The table's schema name.
getSourceFile
public
File
getSourceFile()
(Code)
getSourceScope
public
Object
getSourceScope()
(Code)
getSourceType
public
int getSourceType()
(Code)
getUnique
public
Unique
getUnique(
String
name)
(Code)
Return the unique constraint with the given name, or null if none.
getUniques
public
Unique
[] getUniques()
(Code)
Return the table's unique constraints.
hasComment
public
boolean hasComment()
(Code)
importColumn
public
Column
importColumn(
Column
col)
(Code)
Import a column from another table.
importForeignKey
public
ForeignKey
importForeignKey(
ForeignKey
fk)
(Code)
Import a foreign key; column names must match columns of this table.
importIndex
public
Index
importIndex(
Index
idx)
(Code)
Import an index; column names must match columns of this table.
importPrimaryKey
public
PrimaryKey
importPrimaryKey(
PrimaryKey
pk)
(Code)
Import a primary key; column names must match columns of this table.
importUnique
public
Unique
importUnique(
Unique
unq)
(Code)
Import a constraint; column names must match columns of this table.
indexColumns
void indexColumns()
(Code)
Called by columns to ensure that all columns are properly indexed before returning that information to the user.
indexForeignKeys
void indexForeignKeys()
(Code)
Called by foreign keys to ensure that all fks are properly indexed before returning that information to the user.
remove
void remove()
(Code)
Called when the table is removed from its schema. Removes all table members, and invalidates the table.
removeColumn
public
boolean removeColumn(
Column
col)
(Code)
Remove the given column from the table. true if the column was removed, false if not in the table
removeForeignKey
public
boolean removeForeignKey(
ForeignKey
fk)
(Code)
Remove the given foreign key from the table. true if the key was removed, false if not in the table
removeIndex
public
boolean removeIndex(
Index
idx)
(Code)
Remove the given index from the table. true if the index was removed, false if not in the table
removePrimaryKey
public
boolean removePrimaryKey()
(Code)
Remove the primary key from this table. true if there was a pk to remove, false otherwise
removeUnique
public
boolean removeUnique(
Unique
unq)
(Code)
Remove the given unique constraint from the table. true if the constraint was removed, false if not in the table
setComment
public
void setComment(
String
comment)
(Code)
setName
public
void setName(
String
name)
(Code)
Set the name of the table. This method can only be called on tables that are not part of a schema.
setSchemaName
public
void setSchemaName(
String
name)
(Code)
The table's schema name. You can only call this method on tables whose schema object is not set.
setSource
public
void setSource(
File
source, int srcType)
(Code)
toString
public
String
toString()
(Code)
Methods inherited from
org.apache.openjpa.jdbc.schema.NameSet
protected
void addName(
String
name, boolean validate)
(Code)
(Java Doc)
public
boolean isNameTaken(
String
name)
(Code)
(Java Doc)
protected
void removeName(
String
name)
(Code)
(Java Doc)
Methods inherited from
java.lang.Object
native
protected
Object
clone() throws
CloneNotSupportedException
(Code)
(Java Doc)
public
boolean equals(
Object
obj)
(Code)
(Java Doc)
protected
void finalize() throws
Throwable
(Code)
(Java Doc)
final native
public
Class
> getClass()
(Code)
(Java Doc)
native
public
int hashCode()
(Code)
(Java Doc)
final native
public
void notify()
(Code)
(Java Doc)
final native
public
void notifyAll()
(Code)
(Java Doc)
public
String
toString()
(Code)
(Java Doc)
final native
public
void wait(long timeout) throws
InterruptedException
(Code)
(Java Doc)
final
public
void wait(long timeout, int nanos) throws
InterruptedException
(Code)
(Java Doc)
final
public
void wait() throws
InterruptedException
(Code)
(Java Doc)
www.java2java.com
|
Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.