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

testdata_builder.ObjectBuilder_fillMandatoryFields.ftl Maven / Gradle / Ivy

There is a newer version: 2.4.3
Show newest version
<#include '/makros.ftl'>
package ${variables.rootPackage}.common.builders;

/**
 * Test data builder for ${pojo.name} generated with cobigen.
 */
public class ${pojo.name}Builder {

	/**
	 * Fills all mandatory fields by default. (will be overwritten on re-generation)
	 */
    private void fillMandatoryFields() {
	    <#list pojo.methodAccessibleFields as attr>		
		<#if (attr.annotations.javax_validation_constraints_NotNull)?has_content
		  || ((attr.annotations.javax_persistence_Column.nullable)?has_content
		   && attr.annotations.javax_persistence_Column.nullable == "false")>
		<@callNotNullPropertyWithDefaultValue attr=attr/>	
		
	    
    }
    
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy