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

templates.pdo.PersistenceImplementation.ftl Maven / Gradle / Ivy

There is a newer version: 21.16.1.0
Show newest version

package ${persistenceImplPackage};

import ${pdoPackage}.${pdoInterface};
<#if persistencePackage != persistenceImplPackage>
import ${persistencePackage}.${persistenceInterface};

<#if remoteEnabled == "true">
import ${persistenceImplPackage}.rmi.${pdoInterface}RemoteDelegate;


import java.rmi.RemoteException;
import java.util.ArrayList;
import java.util.Collection;
import java.util.List;
import java.util.Objects;
import java.util.function.Supplier;
import org.tentackle.common.Binary;
import org.tentackle.common.BMoney;
import org.tentackle.common.DMoney;
import org.tentackle.common.Date;
import org.tentackle.common.Freezable;
import org.tentackle.common.Time;
import org.tentackle.common.Timestamp;
import org.tentackle.common.RemoteMethod;
import org.tentackle.dbms.DbObjectClassVariables;
import org.tentackle.dbms.PreparedStatementWrapper;
import org.tentackle.dbms.ResultSetWrapper;
import org.tentackle.dbms.StatementId;
import org.tentackle.misc.IdentifiableMap;
import org.tentackle.misc.TrackedArrayList;
import org.tentackle.misc.TrackedList;
import org.tentackle.persist.AbstractPersistentObject;
import org.tentackle.persist.PersistentObjectClassVariables;
import org.tentackle.pdo.DomainContext;
import org.tentackle.pdo.PersistentObjectService;
import org.tentackle.pdo.Pdo;
import org.tentackle.session.Persistent;
import org.tentackle.session.PersistenceException;
import org.tentackle.session.Session;
import org.tentackle.sql.Backend;
import org.tentackle.sql.JoinType;
import org.tentackle.validate.ValidationResult;
import org.tentackle.validate.ValidationScope;
import org.tentackle.validate.ValidationUtilities;


/**
 * Persistence implementation for ${pdoInterface}.
 */
@PersistentObjectService(${pdoInterface}.class)
<#if pdoInheritance != "NONE">
public class ${persistenceImplementation}, P extends ${persistenceImplementation}>
       extends ${superPersistenceImplementation} implements ${persistenceInterface} {
<#else>
public class ${persistenceImplementation} extends ${superPersistenceImplementation}<${pdoInterface}, ${persistenceImplementation}> implements ${persistenceInterface} {


  /** serial version UID. */
  private static final long serialVersionUID = -1;


  // @wurblet classVariables ClassVariables

  // @wurblet columnNames ColumnNames

  // @wurblet declare Declare


  /**
   * Creates a persistent object for a PDO.
   *
   * @param pdo the persistent domain object
   * @param context the domain context
   */
<#if pdoInheritance != "NONE">
  public ${persistenceImplementation}(T pdo, DomainContext context) {
<#else>
  public ${persistenceImplementation}(${pdoInterface} pdo, DomainContext context) {

    super(pdo, context);
  }

  /**
   * Creates a persistent object for a PDO.
   *
   * @param pdo the persistent domain object
   * @param session the session
   */
<#if pdoInheritance != "NONE">
  public ${persistenceImplementation}(T pdo, Session session) {
<#else>
  public ${persistenceImplementation}(${pdoInterface} pdo, Session session) {

    super(pdo, session);
  }

  /**
   * Creates a persistent object for a PDO.
   *
   * @param pdo the persistent domain object
   */
<#if pdoInheritance != "NONE">
  public ${persistenceImplementation}(T pdo) {
<#else>
  public ${persistenceImplementation}(${pdoInterface} pdo) {

    super(pdo);
  }

  /**
   * Creates a persistent object.
   */
  public ${persistenceImplementation}() {
    super();
  }


  // @wurblet methods MethodsImpl

  // @wurblet relations PdoRelations

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy