FileDocCategorySizeDatePackage
MetadataPersistenceUnit.javaAPI DocGlassfish v2 API5270Tue May 22 16:54:24 BST 2007oracle.toplink.essentials.internal.ejb.cmp3.metadata

MetadataPersistenceUnit

public class MetadataPersistenceUnit extends Object
Metadata object to hold persistence unit information.
author
Guy Pelletier
since
TopLink EJB 3.0 Reference Implementation

Fields Summary
protected String
m_access
protected String
m_schema
protected String
m_catalog
protected String
m_conflict
protected boolean
m_isCascadePersist
protected boolean
m_isMetadataComplete
Constructors Summary
public MetadataPersistenceUnit()
INTERNAL:

        m_access = "";
        m_schema = "";
        m_catalog = "";
        m_isCascadePersist = false;
        m_isMetadataComplete = false;
    
Methods Summary
public booleanequals(java.lang.Object objectToCompare)
INTERNAL: If equals returns false, call getConflict() for a finer grain reason why.

        MetadataPersistenceUnit persistenceUnit = (MetadataPersistenceUnit) objectToCompare;
            
        if (! persistenceUnit.getAccess().equals(getAccess())) {
            m_conflict = XMLConstants.ACCESS;
            return false;
        }
            
        if (! persistenceUnit.getCatalog().equals(getCatalog())) {
            m_conflict = XMLConstants.CATALOG;
            return false;
        }
            
        if (! persistenceUnit.getSchema().equals(getSchema())) {
            m_conflict = XMLConstants.SCHEMA;
            return false;
        }
            
        if (persistenceUnit.isCascadePersist() != isCascadePersist()) {
            m_conflict = XMLConstants.CASCADE_PERSIST;
            return false;
        }
                
        if (persistenceUnit.isMetadataComplete() != isMetadataComplete()) {
            m_conflict = XMLConstants.METADATA_COMPLETE;
            return false;
        }
        
        return true;
    
public java.lang.StringgetAccess()
INTERNAL:

       return m_access; 
    
public java.lang.StringgetCatalog()
INTERNAL:

       return m_catalog; 
    
public java.lang.StringgetConflict()
INTERNAL: Calling this method after an equals call that returns false will give you the conflicting metadata.

       return m_conflict;
    
public java.lang.StringgetSchema()
INTERNAL:

       return m_schema; 
    
public booleanisCascadePersist()
INTERNAL:

        return m_isCascadePersist;
    
public booleanisMetadataComplete()
INTERNAL:

        return m_isMetadataComplete;
    
public voidsetAccess(java.lang.String access)
INTERNAL:

       m_access = access; 
    
public voidsetCatalog(java.lang.String catalog)
INTERNAL:

       m_catalog = catalog;
    
public voidsetIsCascadePersist(boolean isCascadePersist)
INTERNAL:

        m_isCascadePersist = isCascadePersist;
    
public voidsetIsMetadataComplete(boolean isMetadataComplete)
INTERNAL:

        m_isMetadataComplete = isMetadataComplete;
    
public voidsetSchema(java.lang.String schema)
INTERNAL:

       m_schema = schema;