org.jboss.webbeans.persistence
Class DefaultEntityDiscovery

java.lang.Object
  extended by org.jboss.webbeans.persistence.DefaultEntityDiscovery
All Implemented Interfaces:
Service, EntityDiscovery

public class DefaultEntityDiscovery
extends java.lang.Object
implements EntityDiscovery

Author:
Pete Muir

Constructor Summary
DefaultEntityDiscovery(ServiceRegistry serviceRegistry)
           
 
Method Summary
 java.util.Collection<java.lang.Class<?>> discoverEntitiesFromAnnotations()
          Discover any entities defined using annotations
 java.util.Collection<java.lang.Class<?>> discoverEntitiesFromPersistenceUnits()
          Discover any extra entities defined using persistence unit configuration
 java.util.Collection<java.lang.Class<?>> discoverEntitiesFromXml()
          Discover any entities defined using XML
static org.dom4j.Element getRootElementSafely(java.net.URL url)
          Parses an XML document safely, as to not resolve any external DTDs
 void initialize()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultEntityDiscovery

public DefaultEntityDiscovery(ServiceRegistry serviceRegistry)
Method Detail

initialize

public void initialize()

discoverEntitiesFromAnnotations

public java.util.Collection<java.lang.Class<?>> discoverEntitiesFromAnnotations()
Description copied from interface: EntityDiscovery
Discover any entities defined using annotations

Specified by:
discoverEntitiesFromAnnotations in interface EntityDiscovery
Returns:
an iteration of the entity classes found

discoverEntitiesFromPersistenceUnits

public java.util.Collection<java.lang.Class<?>> discoverEntitiesFromPersistenceUnits()
Description copied from interface: EntityDiscovery
Discover any extra entities defined using persistence unit configuration

Specified by:
discoverEntitiesFromPersistenceUnits in interface EntityDiscovery
Returns:
an iteration of the entity classes found

discoverEntitiesFromXml

public java.util.Collection<java.lang.Class<?>> discoverEntitiesFromXml()
Description copied from interface: EntityDiscovery
Discover any entities defined using XML

Specified by:
discoverEntitiesFromXml in interface EntityDiscovery
Returns:
an iteration of the entity classes found

getRootElementSafely

public static org.dom4j.Element getRootElementSafely(java.net.URL url)
                                              throws org.dom4j.DocumentException,
                                                     java.io.IOException
Parses an XML document safely, as to not resolve any external DTDs

Throws:
java.io.IOException
org.dom4j.DocumentException


Copyright © 2011. All Rights Reserved.