public class ToHelper extends Object
Constructor and Description |
---|
ToHelper() |
Modifier and Type | Method and Description |
---|---|
Class<?> |
getDomainClass(Class<?> toClass)
Get domain class for transfer object.
|
Class<?> |
getToSubType(Class<?> toType,
Object domainObject)
Get the correct transfer object type for the given domain object.
|
boolean |
isTo(Object object)
Is the given object a transfer object?
|
boolean |
isToClass(Class<?> toClass)
Is the given class a transfer object class?
|
void |
setClassReplacer(ClassReplacer classReplacer)
Set the
ClassReplacer which combines the configured class replacers for this jTransfo instance. |
public void setClassReplacer(ClassReplacer classReplacer)
ClassReplacer
which combines the configured class replacers for this jTransfo instance.classReplacer
- class replacerpublic boolean isTo(Object object)
True when there is a DomainClass
annotation on the class.
object
- object to testpublic boolean isToClass(Class<?> toClass)
True when there is a DomainClass
annotation on the class.
toClass
- object class to testpublic Class<?> getDomainClass(Class<?> toClass)
toClass
- transfer object classpublic Class<?> getToSubType(Class<?> toType, Object domainObject)
This searches the DomainClassDelegates (if present) to see of there is a better matching transfer object than the one given as parameter.
toType
- base transfer object typedomainObject
- domain object (instance)Copyright © 2022. All rights reserved.