templates.operation.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 ${operationPackage}.${operationInterface};
<#if domainPackage != domainImplPackage>
import ${domainPackage}.${domainInterface};
#if>
import org.tentackle.domain.AbstractDomainOperation;
import org.tentackle.operation.DomainException;
import org.tentackle.operation.DomainOperationService;
/**
* Domain implementation for ${operationInterface}.
*/
@DomainOperationService(${operationInterface}.class)
<#if abstractOperation == "true">
public class ${domainImplementation}, D extends ${domainImplementation}>
extends ${superDomainImplementation} implements ${domainInterface} {
<#else>
public class ${domainImplementation} extends ${superDomainImplementation}<${operationInterface}, ${domainImplementation}> implements ${domainInterface} {
#if>
/** serial version UID. */
private static final long serialVersionUID = 1L;
/**
* Creates a domain object for an operation.
*
* @param operation the operation object
*/
<#if abstractOperation == "true">
public ${domainImplementation}(T operation) {
<#else>
public ${domainImplementation}(${operationInterface} operation) {
#if>
super(operation);
}
/**
* Creates a domain object.
*/
public ${domainImplementation}() {
super();
}
}