Dali Provisional API
Release 3.2

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.


Nested Class Summary
static class DatabaseObject.DefaultComparator
           
static class DatabaseObject.IdentifierTransformer
           
static class DatabaseObject.NameTransformer
           
 
Field Summary
static Comparator<DatabaseObject> DEFAULT_COMPARATOR
          Sort by name.
static org.eclipse.jpt.common.utility.transformer.Transformer<DatabaseObject,String> IDENTIFIER_TRANSFORMER
           
static org.eclipse.jpt.common.utility.transformer.Transformer<DatabaseObject,String> NAME_TRANSFORMER
           
 
Method Summary
 ConnectionProfile getConnectionProfile()
          Return the database object's connection profile.
 Database getDatabase()
          Return the database object's database.
 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).
 String getIdentifier(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).
 String getName()
          Return the database object's name.
 void refresh()
          Refresh the database object's state from the underlying database server, if appropriate.
 

Field Detail

NAME_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<DatabaseObject,String> NAME_TRANSFORMER

IDENTIFIER_TRANSFORMER

static final org.eclipse.jpt.common.utility.transformer.Transformer<DatabaseObject,String> IDENTIFIER_TRANSFORMER

DEFAULT_COMPARATOR

static final Comparator<DatabaseObject> DEFAULT_COMPARATOR
Sort by name.

Method Detail

getName

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


getIdentifier

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

String getIdentifier(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.


refresh

void refresh()
Refresh the database object's state from the underlying database server, if appropriate.


Dali Provisional API
Release 3.2

Copyright (c) 2012 Oracle. All rights reserved.