org.apache.cayenne.configuration
Class DefaultConfigurationNameMapper

java.lang.Object
  extended by org.apache.cayenne.configuration.DefaultConfigurationNameMapper
All Implemented Interfaces:
ConfigurationNameMapper

public class DefaultConfigurationNameMapper
extends java.lang.Object
implements ConfigurationNameMapper

Since:
3.1

Field Summary
protected  ConfigurationNodeVisitor<java.lang.String> nameMapper
           
 
Constructor Summary
DefaultConfigurationNameMapper()
           
 
Method Summary
 java.lang.String configurationLocation(java.lang.Class<? extends ConfigurationNode> type, java.lang.String name)
          Returns the name of a configuration resource based on a naming convention for a given node type.
 java.lang.String configurationLocation(ConfigurationNode node)
          Returns the name of a configuration resource based on a naming convention for a given node type.
 java.lang.String configurationNodeName(java.lang.Class<? extends ConfigurationNode> type, Resource resource)
          Returns a node name for a given configuration type and a configuration resource.
protected  java.lang.String getDataChannelName(java.lang.String name)
           
protected  java.lang.String getDataMapName(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nameMapper

protected ConfigurationNodeVisitor<java.lang.String> nameMapper
Constructor Detail

DefaultConfigurationNameMapper

public DefaultConfigurationNameMapper()
Method Detail

configurationLocation

public java.lang.String configurationLocation(ConfigurationNode node)
Description copied from interface: ConfigurationNameMapper
Returns the name of a configuration resource based on a naming convention for a given node type.

Specified by:
configurationLocation in interface ConfigurationNameMapper

configurationLocation

public java.lang.String configurationLocation(java.lang.Class<? extends ConfigurationNode> type,
                                              java.lang.String name)
Description copied from interface: ConfigurationNameMapper
Returns the name of a configuration resource based on a naming convention for a given node type.

Specified by:
configurationLocation in interface ConfigurationNameMapper

configurationNodeName

public java.lang.String configurationNodeName(java.lang.Class<? extends ConfigurationNode> type,
                                              Resource resource)
Description copied from interface: ConfigurationNameMapper
Returns a node name for a given configuration type and a configuration resource. This operation is the opposite of the ConfigurationNameMapper.configurationLocation(Class, String) . May return null if the resource name is not following the expected naming format.

Specified by:
configurationNodeName in interface ConfigurationNameMapper

getDataChannelName

protected java.lang.String getDataChannelName(java.lang.String name)

getDataMapName

protected java.lang.String getDataMapName(java.lang.String name)


Copyright © 2001-2012 Apache Cayenne. All Rights Reserved.