FileDocCategorySizeDatePackage
MetadataTableGenerator.javaAPI DocGlassfish v2 API5959Tue May 22 16:54:28 BST 2007oracle.toplink.essentials.internal.ejb.cmp3.metadata.sequencing

MetadataTableGenerator

public class MetadataTableGenerator extends MetadataGenerator
A wrapper class to the MetadataTableGenerator that holds onto a
TableGenerator
for its metadata values.
author
Guy Pelletier
since
TopLink EJB 3.0 Reference Implementation

Fields Summary
protected TableGenerator
m_tableGenerator
protected List
m_uniqueConstraints
Constructors Summary
protected MetadataTableGenerator(String entityClassName)
INTERNAL:

        super(entityClassName);
    
public MetadataTableGenerator(TableGenerator tableGenerator, String entityClassName)
INTERNAL:

        super(entityClassName);
        m_tableGenerator = tableGenerator;
    
Methods Summary
public booleanequals(java.lang.Object objectToCompare)
INTERNAL:

        if (objectToCompare instanceof MetadataTableGenerator) {
            MetadataTableGenerator generator = (MetadataTableGenerator) objectToCompare;
            
            if (!generator.getName().equals(getName())) { 
                return false;
            }
            
            if (generator.getInitialValue() != getInitialValue()) {
                return false;
            }
            
            if (generator.getAllocationSize() != getAllocationSize()) {
                return false;
            }
            
            if (!generator.getPkColumnName().equals(getPkColumnName())) {
                return false;
            }
            
            if (!generator.getValueColumnName().equals(getValueColumnName())) {
                return false;
            }
            
            if (!generator.getPkColumnValue().equals(getPkColumnValue())) {
                return false;
            }
            
            if (!generator.getTable().equals(getTable())) {
                return false;
            }
                
            if (!generator.getSchema().equals(getSchema())) {
                return false;
            }
                
            return generator.getCatalog().equals(getCatalog());
        }
        
        return false;
    
public intgetAllocationSize()
INTERNAL:

        return m_tableGenerator.allocationSize();
    
public java.lang.StringgetCatalog()
INTERNAL: WIP - need to take into consideration the global catalog from XML.

        return m_tableGenerator.catalog();
    
public intgetInitialValue()
INTERNAL:

        return m_tableGenerator.initialValue();
    
public java.lang.StringgetName()
INTERNAL:

        return m_tableGenerator.name();
    
public java.lang.StringgetPkColumnName()
INTERNAL:

        return m_tableGenerator.pkColumnName();
    
public java.lang.StringgetPkColumnValue()
INTERNAL:

        return m_tableGenerator.pkColumnValue();
    
public java.lang.StringgetSchema()
INTERNAL: WIP - need to take into consideration the global schema from XML.

        return m_tableGenerator.schema();
    
public java.lang.StringgetTable()
INTERNAL:

        return m_tableGenerator.table();
    
public java.util.ListgetUniqueConstraints()
INTERNAL:

        if (m_uniqueConstraints == null) {
            m_uniqueConstraints = new ArrayList<String[]>();
            
            for (UniqueConstraint uniqueConstraint : m_tableGenerator.uniqueConstraints()) {
                m_uniqueConstraints.add(uniqueConstraint.columnNames());
            }
        }
        
        return m_uniqueConstraints;
    
public java.lang.StringgetValueColumnName()
INTERNAL:

        return m_tableGenerator.valueColumnName();