= Persistence Layer SPI

:Notice: Licensed to the Apache Software Foundation (ASF) under one or more contributor license agreements. See the NOTICE file distributed with this work for additional information regarding copyright ownership. The ASF licenses this file to you 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.
:page-partial:


The persistence layer SPIs are to control persistence and caching of domain objects.


.Persistence Layer SPI
[cols="2m,4a",options="header"]
|===

|API
|Description


|xref:refguide:applib:index/services/queryresultscache/QueryResultsCacheControl.adoc[QueryResultsCacheControl]
|Controls whether the xref:refguide:applib:index/services/queryresultscache/QueryResultsCache.adoc[QueryResultsCache] is enabled.

|xref:refguide:applib:index/services/bookmark/IdStringifier.adoc[IdStringifier]
|Converts the id (or primary key) of an entity into a string representation (and back again).

This SPI affects the representation of the identity of the domain entity, for example within a xref:refguide:applib:index/services/bookmark/Bookmark.adoc[Bookmark].
This id string also appears in URLs (of Wicket and REST API), and in mementos, for example of xref:refguide:applib:index/services/command/Command.adoc[Command]s and xref:refguide:applib:index/services/iactn/Interaction.adoc[Interaction]s.

The framework provides default implementations for all of the standard value types used for Ids.

Applications should use this SPI to provide persistence of application-defined primary keys.
(An example of this can be found in the xref:userguide:executionlog:about.adoc[Execution Log] extension).

|===



