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

MetadataSequenceGenerator

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

Fields Summary
private SequenceGenerator
m_sequenceGenerator
Constructors Summary
protected MetadataSequenceGenerator(String entityClassName)
INTERNAL:

        super(entityClassName);
    
public MetadataSequenceGenerator(SequenceGenerator sequenceGenerator, String entityClassName)
INTERNAL:

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

        if (objectToCompare instanceof MetadataSequenceGenerator) {
            MetadataSequenceGenerator generator = (MetadataSequenceGenerator) objectToCompare;
            
            if (!generator.getName().equals(getName())) { 
                return false;
            }
            
            if (generator.getInitialValue() != getInitialValue()) {
                return false;
            }
            
            if (generator.getAllocationSize() != getAllocationSize()) {
                return false;
            }
            
            return generator.getSequenceName().equals(getSequenceName());
        }
        
        return false;
    
public intgetAllocationSize()
INTERNAL:

        return m_sequenceGenerator.allocationSize();
    
public intgetInitialValue()
INTERNAL:

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

        return m_sequenceGenerator.name();
    
public java.lang.StringgetSequenceName()
INTERNAL:

        return m_sequenceGenerator.sequenceName();