public static <T> T dtoFromScratch(T entity, DTO dtoTemplate, String proxyClassName) throws HyalineException {
		try {
			return createDTO(entity, dtoTemplate, true, proxyClassName);
		} catch (CannotInstantiateProxyException | DTODefinitionException e) {
			e.printStackTrace();
			throw new HyalineException();
		}
	}
public static < T > T dtoFromScratch ( T entity , DTO dtoTemplate , String proxyClassName ) throws HyalineException { try { return createDTO ( entity , dtoTemplate , true , proxyClassName ) ; } catch ( CannotInstantiateProxyException | DTODefinitionException e ) { e . printStackTrace ( ) ; throw new HyalineException ( ) ; } }
It lets you create a new DTO from scratch. This means that any annotation
for JAXB, Jackson or whatever serialization framework you are using on
your entity T will be ignored. The only annotation-based configuration
that will be used is the one you are defining in this invocation.

@param <T>
the generic type
@param entity
the entity you are going proxy.
@param dtoTemplate
the DTO template passed as an anonymous class.

@param proxyClassName
the name you want to assign to newly generated class


@return a proxy that extends the type of entity, holding the same
instance variables values as entity and configured according to
dtoTemplate

@throws HyalineException
if the dynamic type could be created.