com.atlassian.crowd.openid.server.util
Class MappingResources
java.lang.Object
com.atlassian.crowd.openid.server.util.MappingResources
- All Implemented Interfaces:
- org.springframework.beans.factory.InitializingBean
public class MappingResources
- extends Object
- implements org.springframework.beans.factory.InitializingBean
Stores a collection of hbm.xml mapping files.
You can either set a list of mappings (hbm.xml file locations)
OR a configLocation (a hibernate.cfg.xml).
This class relies on a wrapped Hibernate Configuration object
(TransparentConfiguration) to do the parsing work.
If you set both, the configLocation overrides mappings.
This code has been migrated from bucket.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MappingResources
public MappingResources()
setMappings
public void setMappings(List mappings)
addMapping
public void addMapping(String mapping)
getMappings
public List getMappings()
getConfigLocation
public org.springframework.core.io.Resource getConfigLocation()
setConfigLocation
public void setConfigLocation(org.springframework.core.io.Resource configLocation)
getMappingsAsArray
public String[] getMappingsAsArray()
getTableNames
public List getTableNames()
- Retrieves the table names using a transparent
configuration object built from the hbm.xml mappings.
- Returns:
- List table names.
afterPropertiesSet
public void afterPropertiesSet()
throws Exception
- Invoked by a BeanFactory after it has set all bean properties supplied
(and satisfied BeanFactoryAware and ApplicationContextAware).
This method allows the bean instance to perform initialization only
possible when all bean properties have been set and to throw an
exception in the event of misconfiguration.
- Specified by:
afterPropertiesSet
in interface org.springframework.beans.factory.InitializingBean
- Throws:
Exception
- in the event of misconfiguration (such
as failure to set an essential property) or if initialization fails.
Copyright © 2012 Atlassian. All Rights Reserved.