org.eclipse.jpt.jpa.db
Interface DatabaseObject

All Known Subinterfaces:
Catalog, Column, ConnectionProfile, Database, ForeignKey, Schema, SchemaContainer, Sequence, Table

public interface DatabaseObject

Behavior common to all database objects.

Provisional API: This interface is part of an interim API that is still under development and expected to change significantly before reaching stability. It is available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.


Field Summary
static java.util.Comparator<DatabaseObject> DEFAULT_COMPARATOR
          Sort by name.
static org.eclipse.jpt.common.utility.internal.Transformer<DatabaseObject,java.lang.String> IDENTIFIER_TRANSFORMER
           
static org.eclipse.jpt.common.utility.internal.Transformer<DatabaseObject,java.lang.String> NAME_TRANSFORMER
           
 
Method Summary
 ConnectionProfile getConnectionProfile()
          Return the database object's connection profile.
 Database getDatabase()
          Return the database object's database.
 java.lang.String getIdentifier()
          Return the database object's identifier, which is the object's name modified so it can be used in an SQL statement (e.g.
 java.lang.String getIdentifier(java.lang.String defaultName)
          Return the database object's identifier, which is the object's name modified so it can be used in an SQL statement (e.g.
 java.lang.String getName()
          Return the database object's name.
 

Field Detail

DEFAULT_COMPARATOR

static final java.util.Comparator<DatabaseObject> DEFAULT_COMPARATOR
Sort by name.


NAME_TRANSFORMER

static final org.eclipse.jpt.common.utility.internal.Transformer<DatabaseObject,java.lang.String> NAME_TRANSFORMER

IDENTIFIER_TRANSFORMER

static final org.eclipse.jpt.common.utility.internal.Transformer<DatabaseObject,java.lang.String> IDENTIFIER_TRANSFORMER
Method Detail

getName

java.lang.String getName()
Return the database object's name.


getIdentifier

java.lang.String getIdentifier()
Return the database object's identifier, which is the object's name modified so it can be used in an SQL statement (e.g. if the name contains special characters or is mixed case, it will be delimited, typically by double-quotes).


getIdentifier

java.lang.String getIdentifier(java.lang.String defaultName)
Return the database object's identifier, which is the object's name modified so it can be used in an SQL statement (e.g. if the name contains special characters or is mixed case, it will be delimited, typically by double-quotes). Return null if the database object's identifier matches the specified default name.

This is used by the Dali entity generation code to determine whether a generated annotation must explicitly identify a database object (e.g. a table) or the default (as specified here) adequately identifies the database object (taking into consideration case-sensitivity, special characters, etc.).


getDatabase

Database getDatabase()
Return the database object's database.


getConnectionProfile

ConnectionProfile getConnectionProfile()
Return the database object's connection profile.