public class MetadataProject extends Object
Constructor and Description |
---|
MetadataProject(PersistenceUnitInfo puInfo,
AbstractSession session,
boolean enableLazyForOneToOne)
INTERNAL:
|
Modifier and Type | Method and Description |
---|---|
void |
addDefaultListeners(NodeList nodes,
XMLHelper helper)
INTERNAL:
|
void |
addDescriptor(MetadataDescriptor descriptor)
INTERNAL:
This method will add the descriptor to the actual TopLink project as
well if it has not already been added.
|
void |
addEmbeddable(Class embeddable,
Node node,
XMLHelper helper)
INTERNAL:
Add an embeddable that we found in an XML document.
|
void |
addGeneratedValue(MetadataGeneratedValue metadatageneratedvalue,
Class entityClass)
INTERNAL:
|
void |
addMappedSuperclass(Class mappedSuperclass,
Node node,
XMLHelper helper)
INTERNAL:
Add a mapped-superclass that we found in an XML document.
|
void |
addNamedNativeQuery(MetadataNamedNativeQuery namedNativeQuery)
INTERNAL:
|
void |
addNamedQuery(MetadataNamedQuery namedQuery)
INTERNAL:
|
void |
addRelationshipDescriptor(MetadataDescriptor descriptor)
INTERNAL:
|
void |
addSequenceGenerator(MetadataSequenceGenerator sequenceGenerator)
INTERNAL:
|
void |
addTableGenerator(MetadataTableGenerator tableGenerator)
INTERNAL:
|
void |
cleanup()
INTERNAL:
This method frees up resources acquired by this object.
|
boolean |
containsDescriptor(Class cls)
INTERNAL:
|
boolean |
enableLazyForOneToOne()
INTERNAL:
|
HashMap<XMLHelper,NodeList> |
getDefaultListeners()
INTERNAL:
|
MetadataDescriptor |
getDescriptor(Class cls)
INTERNAL:
|
Collection<MetadataDescriptor> |
getDescriptors()
INTERNAL:
|
XMLHelper |
getEmbeddableHelper(Class cls)
INTERNAL:
|
Node |
getEmbeddableNode(Class cls)
INTERNAL:
|
Collection<String> |
getEntityNames()
INTERNAL:
|
XMLHelper |
getMappedSuperclassHelper(Class cls)
INTERNAL:
|
Node |
getMappedSuperclassNode(Class cls)
INTERNAL:
|
Map<URL,Document> |
getMappingFiles()
INTERNAL:
|
MetadataNamedNativeQuery |
getNamedNativeQuery(String name)
INTERNAL:
|
MetadataNamedQuery |
getNamedQuery(String name)
INTERNAL:
|
MetadataPersistenceUnit |
getPersistenceUnit()
INTERNAL:
Set the classes for processing.
|
PersistenceUnitInfo |
getPUInfo()
INTERNAL:
|
HashSet<MetadataDescriptor> |
getRelationshipDescriptors()
INTERNAL:
|
MetadataSequenceGenerator |
getSequenceGenerator(String name)
INTERNAL:
|
Collection<MetadataSequenceGenerator> |
getSequenceGenerators()
INTERNAL:
|
AbstractSession |
getSession()
INTERNAL:
|
MetadataTableGenerator |
getTableGenerator(String name)
INTERNAL:
|
Collection<MetadataTableGenerator> |
getTableGenerators()
INTERNAL:
|
boolean |
hasConflictingSequenceGenerator(MetadataSequenceGenerator sequenceGenerator)
INTERNAL:
|
boolean |
hasConflictingTableGenerator(MetadataTableGenerator tableGenerator)
INTERNAL:
|
boolean |
hasDescriptors()
INTERNAL:
|
boolean |
hasEmbeddable(Class cls)
INTERNAL:
|
boolean |
hasMappedSuperclass(Class cls)
INTERNAL:
|
boolean |
hasNamedNativeQuery(String name)
INTERNAL:
|
boolean |
hasNamedQuery(String name)
INTERNAL:
|
boolean |
hasPersistenceUnit()
INTERNAL:
Set the classes for processing.
|
boolean |
hasSequenceGenerator(String name)
INTERNAL:
|
boolean |
hasTableGenerator(String name)
INTERNAL:
|
void |
process()
INTERNAL:
Stage 2 processing.
|
void |
processNamedNativeQueries(ClassLoader loader)
INTERNAL:
Process the named native queries we found and add them to the given
session.
|
void |
processNamedQueries(MetadataValidator validator)
INTERNAL:
Process the named queries we found and add them to the given session.
|
protected HashMap<String,String> |
processQueryHints(List<MetadataQueryHint> hints,
String queryName)
INTERNAL:
Process a list of MetadataQueryHint.
|
protected void |
processRelationshipDescriptors()
INTERNAL:
Process the related descriptors.
|
protected void |
processSequencing()
INTERNAL:
Process the sequencing information.
|
void |
setEntityNames(Collection<String> entityNames)
INTERNAL:
|
void |
setMappingFiles(Map<URL,Document> mappingFiles)
INTERNAL:
|
void |
setPersistenceUnit(MetadataPersistenceUnit persistenceUnit)
INTERNAL:
Set the classes for processing.
|
protected PersistenceUnitInfo m_PUInfo
protected Collection<String> m_entityNames
protected AbstractSession m_session
protected boolean m_enableLazyForOneToOne
protected MetadataPersistenceUnit m_persistenceUnit
protected HashMap<String,MetadataDescriptor> m_allDescriptors
protected HashSet<MetadataDescriptor> m_descriptorsWithRelationships
protected HashMap<String,MetadataNamedQuery> m_namedQueries
protected HashMap<String,MetadataNamedNativeQuery> m_namedNativeQueries
protected HashMap<Class,MetadataGeneratedValue> m_generatedValues
protected HashMap<String,MetadataTableGenerator> m_tableGenerators
protected HashMap<String,MetadataSequenceGenerator> m_sequenceGenerators
public MetadataProject(PersistenceUnitInfo puInfo, AbstractSession session, boolean enableLazyForOneToOne)
public void addDescriptor(MetadataDescriptor descriptor)
public void addGeneratedValue(MetadataGeneratedValue metadatageneratedvalue, Class entityClass)
public void addMappedSuperclass(Class mappedSuperclass, Node node, XMLHelper helper)
public void addEmbeddable(Class embeddable, Node node, XMLHelper helper)
public void addNamedNativeQuery(MetadataNamedNativeQuery namedNativeQuery)
public void addNamedQuery(MetadataNamedQuery namedQuery)
public void addRelationshipDescriptor(MetadataDescriptor descriptor)
public void addSequenceGenerator(MetadataSequenceGenerator sequenceGenerator)
public void addTableGenerator(MetadataTableGenerator tableGenerator)
public void cleanup()
public boolean containsDescriptor(Class cls)
public boolean enableLazyForOneToOne()
public MetadataDescriptor getDescriptor(Class cls)
public Collection<MetadataDescriptor> getDescriptors()
public Collection<String> getEntityNames()
public MetadataNamedNativeQuery getNamedNativeQuery(String name)
public MetadataNamedQuery getNamedQuery(String name)
public MetadataPersistenceUnit getPersistenceUnit()
public PersistenceUnitInfo getPUInfo()
public HashSet<MetadataDescriptor> getRelationshipDescriptors()
public MetadataSequenceGenerator getSequenceGenerator(String name)
public Collection<MetadataSequenceGenerator> getSequenceGenerators()
public AbstractSession getSession()
public MetadataTableGenerator getTableGenerator(String name)
public Collection<MetadataTableGenerator> getTableGenerators()
public boolean hasConflictingSequenceGenerator(MetadataSequenceGenerator sequenceGenerator)
public boolean hasConflictingTableGenerator(MetadataTableGenerator tableGenerator)
public boolean hasDescriptors()
public boolean hasMappedSuperclass(Class cls)
public boolean hasEmbeddable(Class cls)
public boolean hasNamedNativeQuery(String name)
public boolean hasNamedQuery(String name)
public boolean hasPersistenceUnit()
public boolean hasSequenceGenerator(String name)
public boolean hasTableGenerator(String name)
public void process()
public void processNamedNativeQueries(ClassLoader loader)
public void processNamedQueries(MetadataValidator validator)
protected HashMap<String,String> processQueryHints(List<MetadataQueryHint> hints, String queryName)
protected void processRelationshipDescriptors()
protected void processSequencing()
public void setEntityNames(Collection<String> entityNames)
public void setPersistenceUnit(MetadataPersistenceUnit persistenceUnit)
Copyright © 2024. All rights reserved.