<!--
  ~ Copyright 2016 Red Hat, Inc. and/or its affiliates
  ~ and other contributors as indicated by the @author tags.
  ~
  ~ Licensed under the Apache License, Version 2.0 (the "License");
  ~ you may not use this file except in compliance with the License.
  ~ You may obtain a copy of the License at
  ~
  ~ http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  -->

<persistence xmlns="http://java.sun.com/xml/ns/persistence"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://java.sun.com/xml/ns/persistence http://java.sun.com/xml/ns/persistence/persistence_1_0.xsd"
    version="1.0">
    <persistence-unit name="keycloak-default" transaction-type="RESOURCE_LOCAL">
        <class>org.keycloak.models.jpa.entities.ClientEntity</class>
        <class>org.keycloak.models.jpa.entities.CredentialEntity</class>
        <class>org.keycloak.models.jpa.entities.CredentialAttributeEntity</class>
        <class>org.keycloak.models.jpa.entities.RealmEntity</class>
        <class>org.keycloak.models.jpa.entities.RealmAttributeEntity</class>
        <class>org.keycloak.models.jpa.entities.RequiredCredentialEntity</class>
        <class>org.keycloak.models.jpa.entities.ComponentConfigEntity</class>
        <class>org.keycloak.models.jpa.entities.ComponentEntity</class>
        <class>org.keycloak.models.jpa.entities.UserFederationProviderEntity</class>
        <class>org.keycloak.models.jpa.entities.UserFederationMapperEntity</class>
        <class>org.keycloak.models.jpa.entities.RoleEntity</class>
        <class>org.keycloak.models.jpa.entities.FederatedIdentityEntity</class>
        <class>org.keycloak.models.jpa.entities.MigrationModelEntity</class>
        <class>org.keycloak.models.jpa.entities.UserEntity</class>
        <class>org.keycloak.models.jpa.entities.UserRequiredActionEntity</class>
        <class>org.keycloak.models.jpa.entities.UserAttributeEntity</class>
        <class>org.keycloak.models.jpa.entities.UserRoleMappingEntity</class>
        <class>org.keycloak.models.jpa.entities.ScopeMappingEntity</class>
        <class>org.keycloak.models.jpa.entities.IdentityProviderEntity</class>
        <class>org.keycloak.models.jpa.entities.IdentityProviderMapperEntity</class>
        <class>org.keycloak.models.jpa.entities.ClientIdentityProviderMappingEntity</class>
        <class>org.keycloak.models.jpa.entities.ProtocolMapperEntity</class>
        <class>org.keycloak.models.jpa.entities.UserConsentEntity</class>
        <class>org.keycloak.models.jpa.entities.UserConsentRoleEntity</class>
        <class>org.keycloak.models.jpa.entities.UserConsentProtocolMapperEntity</class>
        <class>org.keycloak.models.jpa.entities.AuthenticationFlowEntity</class>
        <class>org.keycloak.models.jpa.entities.AuthenticationExecutionEntity</class>
        <class>org.keycloak.models.jpa.entities.AuthenticatorConfigEntity</class>
        <class>org.keycloak.models.jpa.entities.RequiredActionProviderEntity</class>
        <class>org.keycloak.models.jpa.session.PersistentUserSessionEntity</class>
        <class>org.keycloak.models.jpa.session.PersistentClientSessionEntity</class>
        <class>org.keycloak.models.jpa.entities.GroupEntity</class>
        <class>org.keycloak.models.jpa.entities.GroupAttributeEntity</class>
        <class>org.keycloak.models.jpa.entities.GroupRoleMappingEntity</class>
        <class>org.keycloak.models.jpa.entities.UserGroupMembershipEntity</class>
        <class>org.keycloak.models.jpa.entities.ClientTemplateEntity</class>
        <class>org.keycloak.models.jpa.entities.TemplateScopeMappingEntity</class>

        <!-- JpaAuditProviders -->
        <class>org.keycloak.events.jpa.EventEntity</class>
        <class>org.keycloak.events.jpa.AdminEventEntity</class>

        <!-- Authorization -->
        <class>org.keycloak.authorization.jpa.entities.ResourceServerEntity</class>
        <class>org.keycloak.authorization.jpa.entities.ResourceEntity</class>
        <class>org.keycloak.authorization.jpa.entities.ScopeEntity</class>
        <class>org.keycloak.authorization.jpa.entities.PolicyEntity</class>

        <!-- User Federation Storage -->
        <class>org.keycloak.storage.jpa.entity.BrokerLinkEntity</class>
        <class>org.keycloak.storage.jpa.entity.FederatedUserAttributeEntity</class>
        <class>org.keycloak.storage.jpa.entity.FederatedUserConsentEntity</class>
        <class>org.keycloak.storage.jpa.entity.FederatedUserConsentRoleEntity</class>
        <class>org.keycloak.storage.jpa.entity.FederatedUserConsentProtocolMapperEntity</class>
        <class>org.keycloak.storage.jpa.entity.FederatedUserCredentialEntity</class>
        <class>org.keycloak.storage.jpa.entity.FederatedUserCredentialAttributeEntity</class>
        <class>org.keycloak.storage.jpa.entity.FederatedUserGroupMembershipEntity</class>
        <class>org.keycloak.storage.jpa.entity.FederatedUserRequiredActionEntity</class>
        <class>org.keycloak.storage.jpa.entity.FederatedUserRoleMappingEntity</class>
        
        <exclude-unlisted-classes>true</exclude-unlisted-classes>

        <properties>
            <property name="jboss.as.jpa.managed" value="false"/>
        </properties>
    </persistence-unit>
</persistence>
