templates.pdo.DomainImplementation.ftl Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of tentackle-wizard-maven-plugin Show documentation
Show all versions of tentackle-wizard-maven-plugin Show documentation
Maven Plugin for Tentackle Wizards
package ${domainImplPackage};
import ${pdoPackage}.${pdoInterface};
<#if domainPackage != domainImplPackage>
import ${domainPackage}.${domainInterface};
#if>
import org.tentackle.domain.AbstractDomainObject;
import org.tentackle.pdo.DomainException;
import org.tentackle.pdo.DomainObjectService;
/**
* Domain implementation for ${pdoInterface}.
*/
@DomainObjectService(${pdoInterface}.class)
<#if pdoInheritance != "NONE">
public class ${domainImplementation}, D extends ${domainImplementation}>
extends ${superDomainImplementation} implements ${domainInterface} {
<#else>
public class ${domainImplementation} extends ${superDomainImplementation}<${pdoInterface}, ${domainImplementation}> implements ${domainInterface} {
#if>
/** serial version UID. */
private static final long serialVersionUID = 1L;
/**
* Creates a domain object for a PDO.
*
* @param pdo the persistent domain object
*/
<#if pdoInheritance != "NONE">
public ${domainImplementation}(T pdo) {
<#else>
public ${domainImplementation}(${pdoInterface} pdo) {
#if>
super(pdo);
}
/**
* Creates a domain object.
*/
public ${domainImplementation}() {
super();
}
// @wurblet domainMethods DomainMethods
}