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?
|
public 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 © 2017. All rights reserved.