net.sf.hibernate4gwt.core.beanlib.mapper
Class MultiDirectoryClassMapper

java.lang.Object
  extended by net.sf.hibernate4gwt.core.beanlib.mapper.MultiDirectoryClassMapper
All Implemented Interfaces:
IClassMapper

public class MultiDirectoryClassMapper
extends java.lang.Object
implements IClassMapper

Class mapper based on package hierarchy (Domain and DTO must have the same name and placed in identified packages). This class mapper accepts multiple distinct domain and dto packages.

Author:
Olaf Kock, Florian Siebert

Constructor Summary
MultiDirectoryClassMapper()
          Constructor
 
Method Summary
 void addMapping(java.lang.Package source, java.lang.Package target)
          associate a source package (hibernated domain classes) with a target package (gwt serializeable classes)
 java.lang.Class getSourceClass(java.lang.Class targetClass)
           
 java.lang.Class getTargetClass(java.lang.Class sourceClass)
           
 java.lang.String getTargetSuffix()
           
 void setTargetSuffix(java.lang.String suffix)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MultiDirectoryClassMapper

public MultiDirectoryClassMapper()
Constructor

Method Detail

getTargetSuffix

public java.lang.String getTargetSuffix()
Returns:
the suffix of all target classes

setTargetSuffix

public void setTargetSuffix(java.lang.String suffix)
Parameters:
suffix - the suffix of all target classes (e.g. "DTO")

addMapping

public void addMapping(java.lang.Package source,
                       java.lang.Package target)
associate a source package (hibernated domain classes) with a target package (gwt serializeable classes)

Parameters:
source - the package containing the domain classes
target - the package containing the gwt serializeable classes

getTargetClass

public java.lang.Class getTargetClass(java.lang.Class sourceClass)
Specified by:
getTargetClass in interface IClassMapper
Returns:
the mapped class for the argument class

getSourceClass

public java.lang.Class getSourceClass(java.lang.Class targetClass)
Specified by:
getSourceClass in interface IClassMapper
Returns:
the mapped class for the argument class