FileDocCategorySizeDatePackage
MetadataTable.javaAPI DocGlassfish v2 API5178Tue May 22 16:54:28 BST 2007oracle.toplink.essentials.internal.ejb.cmp3.metadata.tables

MetadataTable

public class MetadataTable extends Object
Object to hold onto table metadata in a TopLink database table.
author
Guy Pelletier
since
TopLink EJB 3.0 Reference Implementation

Fields Summary
protected String
m_name
protected String
m_schema
protected String
m_catalog
protected MetadataLogger
m_logger
protected DatabaseTable
m_databaseTable
Constructors Summary
public MetadataTable(MetadataLogger logger)
INTERNAL:

        m_logger = logger;
        m_databaseTable = new DatabaseTable();
    
public MetadataTable(Table table, MetadataLogger logger)
INTERNAL:

        this(logger);
        
        if (table != null) {
            m_name = table.name();
            m_schema = table.schema();
            m_catalog = table.catalog();
            
            processName();
            processUniqueConstraints(table.uniqueConstraints());        
        }
    
Methods Summary
public java.lang.StringgetCatalog()
INTERNAL:

        return m_catalog;
    
public java.lang.StringgetCatalogContext()
INTERNAL: The context should be overridden by subclasses for more specific logging messages.

        return m_logger.TABLE_CATALOG;
    
public oracle.toplink.essentials.internal.helper.DatabaseTablegetDatabaseTable()
INTERNAL:

        return m_databaseTable;
    
public java.lang.StringgetName()
INTERNAL:

        return m_name;
    
public java.lang.StringgetNameContext()
INTERNAL: The context should be overridden by subclasses for more specific logging messages.

        return m_logger.TABLE_NAME;
    
public java.lang.StringgetSchema()
INTERNAL:

        return m_schema;
    
public java.lang.StringgetSchemaContext()
INTERNAL: The context should be overridden by subclasses for more specific logging messages.

        return m_logger.TABLE_SCHEMA;
    
public booleanloadedFromXML()
INTERNAL:

        return false;
    
protected voidprocessName()
INTERNAL:

        // Don't bother setting the name if name is blank.
        if (! m_name.equals("")) {
            setName(MetadataHelper.getFullyQualifiedTableName(m_name, m_catalog, m_schema));
        }
    
protected voidprocessUniqueConstraints(javax.persistence.UniqueConstraint[] uniqueConstraints)
INTERNAL: Process the unique constraints for the given table.

        for (UniqueConstraint uniqueConstraint : uniqueConstraints) {
            m_databaseTable.addUniqueConstraints(uniqueConstraint.columnNames());
        }
    
public voidsetName(java.lang.String name)
INTERNAL:

        m_databaseTable.setPossiblyQualifiedName(name);