com.avaje.ebean.config
Class TableName

java.lang.Object
  extended by com.avaje.ebean.config.TableName

public final class TableName
extends Object

TableName holds catalog, schema and table name.

Author:
emcgreal

Constructor Summary
TableName(String qualifiedTableName)
          Construct splitting the qualifiedTableName potentially into catalog, schema and name.
TableName(String catalog, String schema, String name)
          Construct with the given catalog schema and table name.
 
Method Summary
 String getCatalog()
          Gets the catalog.
 String getName()
          Gets the name.
 String getQualifiedName()
          Returns the qualified name in the form catalog.schema.name.
 String getSchema()
          Gets the schema.
 boolean isValid()
          Checks if is table name is valid i.e.
 String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TableName

public TableName(String catalog,
                 String schema,
                 String name)
Construct with the given catalog schema and table name.

Note the catalog and schema can be null.


TableName

public TableName(String qualifiedTableName)
Construct splitting the qualifiedTableName potentially into catalog, schema and name.

The qualifiedTableName can take the form of catalog.schema.tableName and is split on the '.' period character. The catalog and schema are optional.

Parameters:
qualifiedTableName - the fully qualified table name using '.' between schema and table name etc (with catalog and schema optional).
Method Detail

toString

public String toString()
Overrides:
toString in class Object

getCatalog

public String getCatalog()
Gets the catalog.

Returns:
the catalog

getSchema

public String getSchema()
Gets the schema.

Returns:
the schema

getName

public String getName()
Gets the name.

Returns:
the name

getQualifiedName

public String getQualifiedName()
Returns the qualified name in the form catalog.schema.name.

Catalog and schema are optional.

Returns:
the qualified name

isValid

public boolean isValid()
Checks if is table name is valid i.e. it has at least a name.

Returns:
true, if is valid


Copyright © 2010. All Rights Reserved.