<?xml version="1.0" encoding="UTF-8" ?>
<persistence xmlns="http://xmlns.jcp.org/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://xmlns.jcp.org/xml/ns/persistence
          http://xmlns.jcp.org/xml/ns/persistence/persistence_2_2.xsd"
    version="2.2">
  <persistence-unit name="nomulus" transaction-type="RESOURCE_LOCAL">
    <description>
      Persistence unit for the Nomulus Cloud SQL database.
    </description>
    <provider>org.hibernate.jpa.HibernatePersistenceProvider</provider>

    <!--
      All JPA entities must be enumerated here. JPA does not support auto detection.

      Note that Hibernate's auto detection functionality (hibernate.archive.autodection)
      does not meet our needs. It only scans archives, not the 'classes' folders. So we
      are left with two options:
      *  Move tests to another (sub)project. This is not a big problem, but feels unnatural.
      *  Use Hibernate's ServiceRegistry for bootstrapping (not JPA-compliant)
    -->
    <class>google.registry.model.domain.DomainBase</class>
    <class>google.registry.schema.domain.RegistryLock</class>
    <class>google.registry.schema.tmch.ClaimsList</class>
    <class>google.registry.schema.cursor.Cursor</class>
    <class>google.registry.model.transfer.BaseTransferObject</class>
    <class>google.registry.schema.tld.PremiumList</class>
    <class>google.registry.schema.tld.PremiumEntry</class>
    <class>google.registry.schema.tld.ReservedList</class>
    <class>google.registry.model.domain.secdns.DelegationSignerData</class>
    <class>google.registry.model.domain.DesignatedContact</class>
    <class>google.registry.model.domain.DomainBase</class>
    <class>google.registry.model.domain.GracePeriod</class>
    <class>org.joda.time.Period</class>
    <class>google.registry.model.transfer.TransferData</class>
    <class>google.registry.model.eppcommon.Trid</class>

    <!-- Customized type converters -->
    <class>google.registry.persistence.BloomFilterConverter</class>
    <class>google.registry.persistence.CreateAutoTimestampConverter</class>
    <class>google.registry.persistence.CurrencyUnitConverter</class>
    <class>google.registry.persistence.DateTimeConverter</class>
    <class>google.registry.persistence.UpdateAutoTimestampConverter</class>
    <class>google.registry.persistence.ZonedDateTimeConverter</class>

    <!-- TODO(weiminyu): check out application-layer validation. -->
    <validation-mode>NONE</validation-mode>
  </persistence-unit>
</persistence>
