All Downloads are FREE. Search and download functionalities are using the official Maven repository.

generate.dto.dto.ftl Maven / Gradle / Ivy

There is a newer version: 1.0.1-RELEASE
Show newest version
package ${packageName};

import ${entityPackageName};
<#list dtoImportSet as importName>
import ${importName};


public class ${entityName}Dto {

	<#list fieldList as field>
	<#if field.timeType??>
	@JsonFormat(pattern = "${field.getTimeFormat()}")
	
	public ${field.classType} ${field.name};
	
	
	public static ${entityName}Dto copy(${entityName} ${entitySimpleName}) {
		${entityName}Dto dto = new ${entityName}Dto();
		<#list fieldList as field>
		<#if field.manyToOne>
		dto.${field.name} = ${entitySimpleName}.get${field.manyToOneName}().getId();
		
		<#if !field.manyToOne>
		dto.${field.name} = ${entitySimpleName}.get${field.getNameCapital()}();
		
		
		return dto;
	}
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy