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

mplates.1.2.source-code.PojoService.ftl Maven / Gradle / Ivy

<#assign object = doc.object>
package ${object.@package}.service;

import org.jetbrains.annotations.NotNull;
import ${object.@package}.service.base.${object.@name}ServiceBase;
import redora.service.ServiceBase;
import redora.exceptions.ConnectException;

/**
* Service layer for all database access activities around the ${object.@name} object.
* Redora actually implements everything in ${object.@name}ServiceBase and ${object.@name}Service
* extends it. You can add extra services yourself in this class. Usage:
* 
* ${object.@name}Service service ServiceFactory.${object.@name?uncap_first}Service();
* service.doStuff();
* ServiceFactory.close(service);
* 
* @author Redora (www.redora.net)
*/
public class ${object.@name}Service extends ${object.@name}ServiceBase {
    //Protected to avoid instantiation outside ServiceFactory
    protected ${object.@name}Service() throws ConnectException {
        super();
    }
    /**
    * Instantiate by passing another service object. This ${object.@name}Service
    * will then used passed service object for database connection and transaction management.
    * Typically you use this when a transaction is spawned over several objects.
    * @param chain (Mandatory) Active service.
    */
    public ${object.@name}Service(@NotNull ServiceBase chain) {
        super(chain);
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy