/*
* (c) Copyright 2005-2012 JAXIO, www.jaxio.com
* Source code generated by Celerio, a Jaxio product
* Want to use Celerio within your company? email us at info@jaxio.com
* Follow us on twitter: @springfuse
* Template pack-backend-sd:src/test/java/repository/ModelGenerator.e.vm.java
*/
package com.company.demo.repository;
import org.springframework.stereotype.Service;
import com.company.demo.domain.Legacy;
import com.company.demo.util.ValueGenerator;
/**
* Helper class to create transient entities instance for testing purposes.
* Simple properties are pre-filled with random values.
*/
@Service
public class LegacyGenerator {
/**
* Returns a new Legacy instance filled with random values.
*/
public Legacy getLegacy() {
Legacy legacy = new Legacy();
legacy.setCode(ValueGenerator.getUniqueString(8));
legacy.setDept(ValueGenerator.getUniqueInteger());
legacy.setName(ValueGenerator.getUniqueString(16));
// simple attributes follows
legacy.setExtraInfo("a");
return legacy;
}
}