org.castor.mapping
Class MappingLoaderRegistry

java.lang.Object
  extended by org.castor.mapping.MappingLoaderRegistry

public final class MappingLoaderRegistry
extends java.lang.Object

Version:
$Revision: 5951 $ $Date: 2006-04-25 16:09:10 -0600 (Tue, 25 Apr 2006) $
Author:
Werner Guttmann, Ralf Joachim

Constructor Summary
MappingLoaderRegistry(Configuration config)
          Creates an instance of this registry, loading the mapping loader factories from the castor.properties file.
 
Method Summary
 void clear()
          Deletes all 'cached' mapping loader factories.
 MappingLoader getMappingLoader(java.lang.String sourceType, BindingType bindingType)
          Returns a mapping loader for the suitable source and binding type.
 java.util.Collection getMappingLoaderFactories()
          Returns a list of 'cached' mapping loader factories.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappingLoaderRegistry

public MappingLoaderRegistry(Configuration config)
Creates an instance of this registry, loading the mapping loader factories from the castor.properties file.

Parameters:
config - Configuration.
Method Detail

clear

public void clear()
Deletes all 'cached' mapping loader factories.


getMappingLoader

public MappingLoader getMappingLoader(java.lang.String sourceType,
                                      BindingType bindingType)
                               throws MappingException
Returns a mapping loader for the suitable source and binding type. The engine's specific mapping loader is used to create binding specific descriptors. The mapping loader is cached in memory and returned in subsequent method calls.

Parameters:
sourceType - The type of the mapping source.
bindingType - The binding type to load from mapping.
Returns:
A mapping loader
Throws:
MappingException - A mapping error occured preventing descriptors from being generated from the loaded mapping

getMappingLoaderFactories

public java.util.Collection getMappingLoaderFactories()
Returns a list of 'cached' mapping loader factories.

Returns:
a list of 'cached' mapping loader factories.


Intalio Inc. (C) 1999-2007. All rights reserved http://www.intalio.com