<?xml version="1.0" encoding="UTF-8"?>
<xsd:schema xmlns="http://www.springframework.org/schema/integration/jpa"
			xmlns:xsd="http://www.w3.org/2001/XMLSchema"
			xmlns:tool="http://www.springframework.org/schema/tool"
			xmlns:integration="http://www.springframework.org/schema/integration"
			targetNamespace="http://www.springframework.org/schema/integration/jpa"
			elementFormDefault="qualified">

	<xsd:import namespace="http://www.springframework.org/schema/beans"/>
	<xsd:import namespace="http://www.springframework.org/schema/tool"/>
	<xsd:import namespace="http://www.springframework.org/schema/integration"
				schemaLocation="https://www.springframework.org/schema/integration/spring-integration.xsd"/>

	<xsd:annotation>
		<xsd:documentation><![CDATA[
			Defines the configuration elements for Spring Integration's JPA Adapter.
		]]></xsd:documentation>
	</xsd:annotation>

	<xsd:element name="inbound-channel-adapter">
		<xsd:annotation>
			<xsd:documentation>
				Defines a Polling Channel Adapter for the
				'org.springframework.integration.jpa.inbound.JpaPollingChannelAdapter'
				that poll data from the database via JPA specification.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="integration:poller" minOccurs="0" maxOccurs="1"/>
			</xsd:sequence>
			<xsd:attributeGroup ref="coreJpaComponentAttributes"/>
			<xsd:attribute name="channel" type="xsd:string">
				<xsd:annotation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.messaging.MessageChannel"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="parameter-source" type="xsd:string">
				<xsd:annotation>
					<xsd:appinfo>
						<tool:annotation kind="ref">
							<tool:expected-type
									type="org.springframework.integration.jpa.support.parametersource.ParameterSource"/>
						</tool:annotation>
					</xsd:appinfo>
					<xsd:documentation>
						specifies the parameter source that would be used to
						provide additional parameters.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attributeGroup ref="commonRetrievingJpaAttributes"/>
			<xsd:attribute name="send-timeout" type="xsd:string" default="30000">
				<xsd:annotation>
					<xsd:documentation><![CDATA[
						Allows you to specify how long this inbound-channel-adapter
						will wait for the message (containing the retrieved entities)
						to be sent successfully to the message channel, before throwing
						an exception.

						Keep in mind that when sending to a DirectChannel, the
						invocation will occur in the sender's thread so the failing
						of the send operation may be caused by other components
						further downstream. The value is specified in milliseconds.
					]]>
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="outbound-channel-adapter">
		<xsd:annotation>
			<xsd:documentation>
				Configures a Consumer Endpoint for the
				'org.springframework.integration.jpa.outbound.JpaOutboundGatewayFactoryBean' (one-way)
				updating a database using the Java Persistence API (JPA).
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="integration:poller" minOccurs="0" maxOccurs="1"/>
				<xsd:element name="transactional" type="integration:transactionalType" minOccurs="0" maxOccurs="1"/>
				<xsd:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="parameterSubElementType">
					<xsd:annotation>
						<xsd:documentation>
							<![CDATA[
								Provides a mechanism to configure
								parameters for the queries that are either based
								on the Java Persistence Query Language (JPQL) or
								native SQL queries.

								Parameters can also be provided for Named Queries.
								Mutually exclusive with the 'parameter-source-factory' attribute.
								]]>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="request-handler-advice-chain" type="integration:handlerAdviceChainType" minOccurs="0"
							 maxOccurs="1"/>
			</xsd:sequence>
			<xsd:attributeGroup ref="coreJpaComponentAttributes"/>
			<xsd:attributeGroup ref="commonUpdatingJpaAttributes"/>
			<xsd:attribute name="use-payload-as-parameter-source">
				<xsd:annotation>
					<xsd:documentation>
						<![CDATA[
						If set to 'true', the payload of the Message will be used
						as a source for providing parameters. If false the entire
						Message will be available as a source for parameters.

						If no JPA Parameters are passed in, this property
						will default to 'true'. This means that using a default
						BeanPropertyParameterSourceFactory, the bean properties
						of the payload will be used as a source for parameter
						values for the to-be-executed JPA query.

						However, if JPA Parameters are passed in, then this
						property will by default evaluate to 'false'. JPA Parameters
						allow for SpEL Expressions to be provided and therefore
						it is highly beneficial to have access to the entire Message.
						]]>
					</xsd:documentation>
				</xsd:annotation>
				<xsd:simpleType>
					<xsd:union memberTypes="xsd:boolean xsd:string"/>
				</xsd:simpleType>
			</xsd:attribute>
			<xsd:attribute name="parameter-source-factory" type="xsd:string">
				<xsd:annotation>
					<xsd:appinfo>
						<xsd:documentation>
							Reference to a ParameterSourceFactory.
							Mutually exclusive with the 'parameter' sub-element(s).
						</xsd:documentation>
						<tool:annotation kind="ref">
							<tool:expected-type
									type="org.springframework.integration.jpa.support.parametersource.ParameterSourceFactory"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="channel" type="xsd:string">
				<xsd:annotation>
					<xsd:appinfo>
						<xsd:documentation>
							Channel from which messages will be output.
							When a message is sent to this channel it will
							cause the query
							to be executed.
						</xsd:documentation>
						<tool:annotation kind="ref">
							<tool:expected-type type="org.springframework.messaging.MessageChannel"/>
						</tool:annotation>
					</xsd:appinfo>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="order">
				<xsd:annotation>
					<xsd:documentation>
						Specifies the order for invocation when this endpoint is connected as a
						subscriber to a SubscribableChannel.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="updating-outbound-gateway">
		<xsd:annotation>
			<xsd:documentation>
				Configures a Consumer Endpoint for the
				'org.springframework.integration.jpa.outbound.JpaOutboundGatewayFactoryBean'
				to update a database using JPA and produce the updating results.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="integration:poller" minOccurs="0" maxOccurs="1"/>
				<xsd:element name="transactional" type="integration:transactionalType" minOccurs="0" maxOccurs="1"/>
				<xsd:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="parameterSubElementType">
					<xsd:annotation>
						<xsd:documentation>
							<![CDATA[
							Provides a mechanism to provide
							parameters for the queries that are either based
							on the Java Persistence Query Language (JPQL) or
							native SQL queries.
							Parameters can also be provided for Named Queries.
							Mutually exclusive with the 'parameter-source-factory' attribute.
							]]>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="request-handler-advice-chain" type="integration:handlerAdviceChainType" minOccurs="0"
							 maxOccurs="1"/>
			</xsd:sequence>
			<xsd:attributeGroup ref="coreJpaComponentAttributes"/>
			<xsd:attributeGroup ref="commonUpdatingJpaAttributes"/>
			<xsd:attributeGroup ref="commonJpaOutboundGatewayAttributes"/>
		</xsd:complexType>
	</xsd:element>

	<xsd:element name="retrieving-outbound-gateway">
		<xsd:annotation>
			<xsd:documentation>
				Configures a Consumer Endpoint for the
				'org.springframework.integration.jpa.outbound.JpaOutboundGatewayFactoryBean'
				to read database via JPA.
			</xsd:documentation>
		</xsd:annotation>
		<xsd:complexType>
			<xsd:sequence>
				<xsd:element ref="integration:poller" minOccurs="0" maxOccurs="1"/>
				<xsd:element name="transactional" type="integration:transactionalType" minOccurs="0" maxOccurs="1"/>
				<xsd:element name="parameter" minOccurs="0" maxOccurs="unbounded" type="parameterSubElementType">
					<xsd:annotation>
						<xsd:documentation>
							<![CDATA[
							Provides a mechanism to provide
							parameters for the queries that are either based
							on the Java Persistence Query Language (JPQL) or
							native SQL queries.
							Parameters can also be provided for Named Queries.
							Mutually exclusive with the 'parameter-source-factory' attribute.
							]]>
						</xsd:documentation>
					</xsd:annotation>
				</xsd:element>
				<xsd:element name="request-handler-advice-chain" type="integration:handlerAdviceChainType" minOccurs="0"
							 maxOccurs="1"/>
			</xsd:sequence>
			<xsd:attribute name="first-result" type="xsd:integer">
				<xsd:annotation>
					<xsd:documentation>
						The attribute that is used to set the first result marker while executing the
						results. A negative value will retrieve from first record in the result set.
						It is a way for the application to use the gateway to paginate the results in
						combination with the max-results attribute. This attribute is mutually
						exclusive to first-result-expression attribute
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="first-result-expression">
				<xsd:annotation>
					<xsd:documentation>
						The attribute that is used to set the first result expression that would
						be evaluated to get the first record while executing the JPA query for result
						A negative value will retrieve from first record in the result set.
						It is a way for the application to use the gateway to paginate the results in
						combination with the max-results attribute. This attribute is mutually
						exclusive to first-result attribute
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attribute name="id-expression">
				<xsd:annotation>
					<xsd:documentation>
						A SpEL expression to determine the 'primaryKey' value for
						'EntityManager.find(Class entityClass, Object primaryKey)' using
						the request Message as the root object of evaluation context.
						The 'entityClass' argument is determined from the 'entity-class' attribute,
						if present, otherwise the 'payload' class is used. All other attributes
						(except 'delete-after-poll' and 'flush-after-delete') are disallowed
						when specifying an 'id-expression'.
					</xsd:documentation>
				</xsd:annotation>
			</xsd:attribute>
			<xsd:attributeGroup ref="coreJpaComponentAttributes"/>
			<xsd:attributeGroup ref="commonJpaOutboundGatewayAttributes"/>
			<xsd:attributeGroup ref="commonRetrievingJpaAttributes"/>
		</xsd:complexType>
	</xsd:element>

	<xsd:complexType name="parameterSubElementType">
		<xsd:attribute name="name" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
					The name of Jpa parameter. This parameter can also be used for
					native SQL query parameters. The name attribute is optional.
					If the name is not provided, this parameter will act as a positional
					parameters, in which case the order of the parameter sub-element
					matters.
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="value" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
					The value of the parameter. Either this or the 'expression'
					attribute must be provided.
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="type" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
					The type of the value used. If nothing is provided this attribute
					will default to java.lang.String. This attribute is not used
					when the 'expression' attribute is used instead.
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="expression" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
					Expression to be evaluated to produce a parameter value.
					Either this or the 'value' attribute must be provided.
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:complexType>

	<xsd:attributeGroup name="commonJpaOutboundGatewayAttributes">
		<xsd:attribute name="use-payload-as-parameter-source">
			<xsd:annotation>
				<xsd:documentation>
					<![CDATA[
				If set to 'true', the payload of the Message will be used
				as a source for providing parameters. If false the entire
				Message will be available as a source for parameters.

				If no JPA Parameters are passed in, this property
				will default to 'true'. This means that using a default
				BeanPropertyParameterSourceFactory, the bean properties
				of the payload will be used as a source for parameter
				values for the to-be-executed JPA query.

				However, if JPA Parameters are passed in, then this
				property will by default evaluate to 'false'. JPA Parameters
				allow for SpEL Expressions to be provided and therefore
				it is highly beneficial to have access to the entire Message.
				]]>
				</xsd:documentation>
			</xsd:annotation>
			<xsd:simpleType>
				<xsd:union memberTypes="xsd:boolean xsd:string"/>
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="request-channel" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>
					The receiving Message Channel of this endpoint.
				</xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref">
						<tool:expected-type type="org.springframework.messaging.MessageChannel"/>
					</tool:annotation>
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="reply-channel" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>
					Message Channel to which replies should be
					sent, after receiving the database response.
				</xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref">
						<tool:expected-type type="org.springframework.messaging.MessageChannel"/>
					</tool:annotation>
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="reply-timeout" type="xsd:string" default="30000">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
					Allows you to specify how long this gateway will wait for
					the reply message to be sent successfully to the reply channel
					before throwing an exception. This attribute only applies when the
					channel might block, for example when using a bounded queue channel that
					is currently full.

					Also, keep in mind that when sending to a DirectChannel, the
					invocation will occur in the sender's thread. Therefore,
					the failing of the send operation may be caused by other
					components further downstream.

					The "reply-timeout" attribute maps to the "sendTimeout" property of the
					underlying 'MessagingTemplate' instance (org.springframework.integration.core.MessagingTemplate).

					The value is specified in milliseconds.
				]]></xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="parameter-source-factory" type="xsd:string">
			<xsd:annotation>
				<xsd:appinfo>
					<tool:annotation kind="ref">
						<tool:expected-type
								type="org.springframework.integration.jpa.support.parametersource.ParameterSourceFactory"/>
					</tool:annotation>
				</xsd:appinfo>
				<xsd:documentation>
					The parameter source factory that would be used for evaluating the
					parameters of the response JPA QL that would be evaluated JPA outbound gateway.
					Mutually exclusive with the 'parameter' sub-element(s).
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="order">
			<xsd:annotation>
				<xsd:documentation>
					Specifies the order for invocation when this endpoint is connected as a
					subscriber to a SubscribableChannel.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="requires-reply" type="xsd:string" use="optional" default="true">
			<xsd:annotation>
				<xsd:documentation>
					Specifies whether this outbound gateway must return a non-null value. This value is
					'true' by default, and a ReplyRequiredException will be thrown when
					the underlying service returns a null value.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:attributeGroup>

	<xsd:attributeGroup name="commonUpdatingJpaAttributes">
		<xsd:attribute name="persist-mode" use="optional" default="MERGE">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
					Defines the persistence mode which is used when solely using
					the entity-class. This attribute instructs to either Merge
					entities, to Persist them. Furthermore and entity can also
					be deleted. By Default 'MERGE' is used.
				]]></xsd:documentation>
			</xsd:annotation>
			<xsd:simpleType>
				<xsd:union memberTypes="persistMode xsd:string"/>
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="flush" type="xsd:string" default="false">
			<xsd:annotation>
				<xsd:documentation>
					Specifies whether EntityManager.flush() should be called after performing persistence operations.
					If 'flush-size' is configured to a value greater than '0' this attribute will be ignored.
					Defaults to 'false'.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="flush-size" type="xsd:string" default="0">
			<xsd:annotation>
				<xsd:documentation>
					Specifies the number of entities after which to call EntityManager.flush()
					when performing persistence operations.
					This attribute is applicable for payload instances of "java.lang.Iterable".
					Defaults to '0' - 'flush' won't be called.
					This attribute has precedence over the 'flush' attribute,
					if it is configured to a value greater than '0'.
					If the entity to persist is not an instance of "java.lang.Iterable"
					and 'flush-size' is greater than '0',
					then the entity will be flushed as if the 'flush' attribute was set to 'true'.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="clear-on-flush" type="xsd:string" default="false">
			<xsd:annotation>
				<xsd:documentation>
					Specifies whether EntityManager.clear() should be called after EntityManager.flush().
					Applies only if 'flush-size > 0' or 'flush = true'.
					Defaults to 'false'.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:attributeGroup>

	<xsd:attributeGroup name="commonRetrievingJpaAttributes">
		<xsd:attribute name="max-results">
			<xsd:annotation>
				<xsd:documentation>
					Specifies the maximum number of entities that shall be returned
					by a JPA Operation. Using this attribute sets
					the 'maxResults' property of the JPA Query object. This attribute is mutually
					exclusive with 'max-results-expression' attribute.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="max-results-expression">
			<xsd:annotation>
				<xsd:documentation>
					Specifies the expression for the maximum number of entities that shall be returned
					by a JPA Operation. Using this attribute sets
					the 'maxResults' property of the JPA Query object. This attribute is mutually
					exclusive with the 'max-results' attribute.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="expect-single-result">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
					This parameter indicates that only one result object shall be
					returned as a result from the executed JPA operation.

					If set to 'true' and the result list from the JPA operations
					contains only 1 element, then that 1 element is extracted
					and returned as payload.

					If the result map contains more than 1 element and
					'expect-single-result' is true, then a 'MessagingException'
					is thrown.

					If set to 'false', the complete result list is returned
					as the payload.
					]]>
				</xsd:documentation>
			</xsd:annotation>
			<xsd:simpleType>
				<xsd:union memberTypes="xsd:boolean xsd:string"/>
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="delete-after-poll" use="optional">
			<xsd:annotation>
				<xsd:documentation>
					Once entities have been retrieved from the database, shall
					they be removed from the database?

					If instead of deleting the retrieved entities, you would
					rather like to updated them, e.g. setting a flag in a
					column marking the record as retrieved, please consider
					using a subsequent Outbound Gateway (coupled with a payload enricher).
				</xsd:documentation>
			</xsd:annotation>
			<xsd:simpleType>
				<xsd:union memberTypes="xsd:boolean xsd:string"/>
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="delete-in-batch" use="optional">
			<xsd:annotation>
				<xsd:documentation>
					If you want to automatically remove retrieved entities from
					the database you can also specify using the 'delete-in-batch'
					attribute, whether the list of retrieved objects shall be
					deleted on a 'per-object-basis (false) or whether the objects
					shall be removed using a batch operation (true). The
					attribute defaults to 'false'.
				</xsd:documentation>
			</xsd:annotation>
			<xsd:simpleType>
				<xsd:union memberTypes="xsd:boolean xsd:string"/>
			</xsd:simpleType>
		</xsd:attribute>
		<xsd:attribute name="flush-after-delete" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>
					Specifies whether EntityManager.flush() should be called after performing 'deletes' for retrieved
					entities.
					Applies only if 'delete-after-poll = true'.
					Defaults to 'false'.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
	</xsd:attributeGroup>

	<xsd:attributeGroup name="coreJpaComponentAttributes">
		<xsd:attribute name="id" type="xsd:string" use="optional">
			<xsd:annotation>
				<xsd:documentation>
					Identifies the underlying Spring bean definition, which is an
					instance of either 'EventDrivenConsumer' or 'PollingConsumer',
					depending on whether the component's input channel is a
					'SubscribableChannel' or 'PollableChannel'.
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="entity-manager-factory" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>
					<![CDATA[
					The reference to the JPA Entity Manager Factory
					that will be used by the adapter to create the EntityManager.
					Either this attribute or the 'entity-manager' attribute or the
					'jpa-operations' attribute must be provided.
					]]>
				</xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref">
						<tool:expected-type type="jakarta.persistence.EntityManagerFactory"/>
					</tool:annotation>
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="entity-manager" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>
					<![CDATA[
					The reference to the JPA Entity Manager that will be used by
					the adapter. Either this attribute or the 'entity-manager-factory'
					attribute or the 'jpa-operations' attribute must be provided.
					]]>
				</xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref">
						<tool:expected-type type="jakarta.persistence.EntityManager"/>
					</tool:annotation>
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="jpa-operations" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>
					<![CDATA[
					Reference to a bean implementing the JpaOperations interface.

					In rare cases it might be advisable to provide your own implementation
					of the JpaOperations interface, instead of relying on the
					default implementation. As JpaOperations wraps the necessary
					datasource; the JPA Entity Manager or JPA Entity Manager Factory
					must not be provided if the 'jpa-operations' attribute is used.
					]]>
				</xsd:documentation>
				<xsd:appinfo>
					<tool:annotation kind="ref">
						<tool:expected-type type="org.springframework.integration.jpa.core.JpaOperations"/>
					</tool:annotation>
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="entity-class">
			<xsd:annotation>
				<xsd:documentation>
					<![CDATA[
					The reference to the JPA Persistence Entity. If not specified the
					entity class will be retrieved from the Message's payload (for
					operation that involve an entityClass).
					]]>
				</xsd:documentation>
				<xsd:appinfo>
					<tool:annotation>
						<tool:expected-type type="java.lang.Class"/>
					</tool:annotation>
				</xsd:appinfo>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="jpa-query" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>
					<![CDATA[
					Defines the JPA query (Java Persistence Query Language) to be used.
					]]>
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="native-query" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation><![CDATA[
					Defines the native SQL query to be used.
					]]>
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attribute name="named-query" type="xsd:string">
			<xsd:annotation>
				<xsd:documentation>
					<![CDATA[
					This attribute refers to a named query. A named query can be
					either be defined in Native SQL or JPAQL but the underlying JPA
					persistence provider handles that distinction internally.
					]]>
				</xsd:documentation>
			</xsd:annotation>
		</xsd:attribute>
		<xsd:attributeGroup ref="integration:smartLifeCycleAttributeGroup"/>
	</xsd:attributeGroup>

	<xsd:simpleType name="persistMode">
		<xsd:restriction base="xsd:token">
			<xsd:enumeration value="DELETE"/>
			<xsd:enumeration value="MERGE"/>
			<xsd:enumeration value="PERSIST"/>
		</xsd:restriction>
	</xsd:simpleType>

</xsd:schema>
