-
Notifications
You must be signed in to change notification settings - Fork 15
Extended Configuration
Martin Ledvinka edited this page May 27, 2024
·
3 revisions
Besides the basic required configuration, JOPA provides additional configuration parameters that can be used to customize the library behavior. Most of the parameters can be found in the JOPAPersistenceProperties
class.
Property | Description |
---|---|
cz.cvut.jopa.lang |
Default language for saving/loading strings. If not set, String attribute values are stored as RDF simple literals, i.e., strings without language tag. |
cz.cvut.jopa.cache.enable |
Whether the second level cache should be used. Defaults to true . |
cz.cvut.jopa.scanPackage |
Where the entity classes are located. |
cz.cvut.jopa.cache.ttl |
Cached entity time to live for the TTL cache implementation. In seconds. |
cz.cvut.jopa.cache.sweepRate |
How often should the cache be swept for dead entities. In seconds. |
cz.cvut.jopa.cache.type |
Type of the second level cache. Currently supported are ttl (Time-to-live) and lru (least-recently-used). Defaults to LRU. |
cz.cvut.jopa.cache.lru.capacity |
Capacity of the LRU second level cache. |
cz.cvut.jopa.ic.validation.disableOnLoad |
Disable integrity constraints validation on entity/field load. Useful for working with legacy/external data. |
cz.cvut.jopa.preferMultilingualString |
Indicates whether JOPA should prefer MultilingualString over String when target type is unclear from context. For example, when a field is of type Object and the value is language-tagged string, this setting will influence the actual type set on the field. |
cz.cvut.jopa.classpathScanner |
Name of a custom cz.cvut.kbss.jopa.loaders.ClasspathScanner implementation used to discover entity classes. The specified class must have a public no-arg constructor. |
cz.cvut.kbss.jopa.ignoreInferredValueRemovalOnMerge |
Ignores removal of inferred values when entity state is merged into the persistence context. Normally, attempts to remove inferred values lead to an cz.cvut.kbss.jopa.exceptions.InferredAttributeModifiedException . But when an entity is merged into the persistence context, it may be merged without inferred attribute values because they were not accessible to the client application. Instead of requiring the application to reconstruct them, this configuration allows to ignore such changes completely. |
cz.cvut.kbss.jopa.changeTrackingMode |
Whether changes to entities are to be registered immediately (IMMEDIATE ) or calculated on commit (ON_COMMIT ). Calculating changes immediately requires JOPA to use generated proxy classes. The on-commit change tracking is the default for the RDF4J driver, immediate is the default for Jena and OWLAPI driver. See the change tracking wiki entry for details. |