com.subshell.persistence.mapper
Class PropertyPersistenceMapperConfiguration

java.lang.Object
  extended by com.subshell.persistence.mapper.PropertyPersistenceMapperConfiguration
All Implemented Interfaces:
PersistenceMapperConfiguration

public class PropertyPersistenceMapperConfiguration
extends Object
implements PersistenceMapperConfiguration

A persistence mapper configuration constructed from properties.


Constructor Summary
PropertyPersistenceMapperConfiguration(File file)
          Constructs a new persistence mapper configuration from the specified file.
PropertyPersistenceMapperConfiguration(Properties props)
          Constructs a new persistence mapper configuration from the specified properties.
 
Method Summary
<T> Class<PersistenceMapper<T>>
getMapperForClass(Class<T> clazz)
          Returns the PersistenceMapper class configured for the specified class.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyPersistenceMapperConfiguration

public PropertyPersistenceMapperConfiguration(Properties props)
Constructs a new persistence mapper configuration from the specified properties.

Throws:
InitializationException - when constructing the configuration fails

PropertyPersistenceMapperConfiguration

public PropertyPersistenceMapperConfiguration(File file)
                                       throws IOException
Constructs a new persistence mapper configuration from the specified file.

Throws:
InitializationException - when constructing the configuration fails
IOException - when loading the configuration fails
Method Detail

getMapperForClass

public <T> Class<PersistenceMapper<T>> getMapperForClass(Class<T> clazz)
Returns the PersistenceMapper class configured for the specified class.

Specified by:
getMapperForClass in interface PersistenceMapperConfiguration
Parameters:
clazz - class to return a persistence mapper's class for
Returns:
class of the persistence mapper which handles instances of clazz
Throws:
PersistenceMapperNotFoundException - if no mapper is found


Copyright © 2004-2005 subshell GmbH. All Rights Reserved.