Skip to content

Package: JOPAPersistenceProperties

JOPAPersistenceProperties

nameinstructionbranchcomplexitylinemethod
JOPAPersistenceProperties()
M: 6 C: 0
0%
M: 0 C: 0
100%
M: 1 C: 0
0%
M: 2 C: 0
0%
M: 1 C: 0
0%

Coverage

1: /*
2: * JOPA
3: * Copyright (C) 2024 Czech Technical University in Prague
4: *
5: * This library is free software; you can redistribute it and/or
6: * modify it under the terms of the GNU Lesser General Public
7: * License as published by the Free Software Foundation; either
8: * version 3.0 of the License, or (at your option) any later version.
9: *
10: * This library is distributed in the hope that it will be useful,
11: * but WITHOUT ANY WARRANTY; without even the implied warranty of
12: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13: * Lesser General Public License for more details.
14: *
15: * You should have received a copy of the GNU Lesser General Public
16: * License along with this library.
17: */
18: package cz.cvut.kbss.jopa.model;
19:
20: public final class JOPAPersistenceProperties extends PersistenceProperties {
21:
22: /**
23: * Logical URI of the underlying ontology.
24: */
25: public static final String ONTOLOGY_URI_KEY = "cz.cvut.jopa.ontology.logicalUri";
26:
27: /**
28: * Physical location of the underlying ontology storage.
29: */
30: public static final String ONTOLOGY_PHYSICAL_URI_KEY = "cz.cvut.jopa.ontology.physicalURI";
31:
32: /**
33: * Class name of the OntoDriver implementation.
34: */
35: public static final String DATA_SOURCE_CLASS = "cz.cvut.jopa.dataSource.class";
36:
37: /**
38: * Ontology language.
39: */
40: public static final String LANG = "cz.cvut.jopa.lang";
41:
42: /**
43: * Whether a second level cache should be used.
44: */
45: public static final String CACHE_ENABLED = "cz.cvut.jopa.cache.enable";
46:
47: /**
48: * Where the entity classes are located.
49: */
50: public static final String SCAN_PACKAGE = "cz.cvut.jopa.scanPackage";
51:
52: /**
53: * Cached entity time to live. In seconds.
54: */
55: public static final String CACHE_TTL = "cz.cvut.jopa.cache.ttl";
56:
57: /**
58: * How often should the cache be swept for dead entities. In seconds.
59: */
60: public static final String CACHE_SWEEP_RATE = "cz.cvut.jopa.cache.sweepRate";
61:
62: /**
63: * Type of the second level cache. Currently supported are {@literal ttl} and {@literal lru}.
64: */
65: public static final String CACHE_TYPE = "cz.cvut.jopa.cache.type";
66:
67: /**
68: * Capacity of the LRU second level cache.
69: */
70: public static final String LRU_CACHE_CAPACITY = "cz.cvut.jopa.cache.lru.capacity";
71:
72: /**
73: * Disable integrity constraints validation on entity/field load.
74: */
75: public static final String DISABLE_IC_VALIDATION_ON_LOAD = "cz.cvut.jopa.ic.validation.disableOnLoad";
76:
77: /**
78: * Indicates whether JOPA should prefer {@link MultilingualString} over {@link String} when target type is unclear
79: * from context.
80: * <p>
81: * For example, when a field is of type {@link Object} and the value is language-tagged string, this setting will
82: * influence the actual type set on the field.
83: */
84: public static final String PREFER_MULTILINGUAL_STRING = "cz.cvut.jopa.preferMultilingualString";
85:
86: /**
87: * Name of a custom {@link cz.cvut.kbss.jopa.loaders.ClasspathScanner} implementation used to discover entity
88: * classes.
89: * <p>
90: * The specified class must have a public no-arg constructor.
91: */
92: public static final String CLASSPATH_SCANNER_CLASS = "cz.cvut.jopa.classpathScanner";
93:
94: /**
95: * Path to a directory to which classes dynamically generated by JOPA should be output.
96: * <p>
97: * If not configured, generated classes are not output anywhere.
98: */
99: public static final String CLASS_GENERATOR_OUTPUT_DIR = "cz.cvut.jopa.classGeneratorOutputDir";
100:
101: /**
102: * Ignores removal of inferred values when entity state is merged into the persistence context.
103: * <p>
104: * Normally, attempts to remove inferred values lead to an
105: * {@link cz.cvut.kbss.jopa.exceptions.InferredAttributeModifiedException}. But when an entity is merged into the
106: * persistence context, it may be merged without inferred attribute values because they were not accessible to the
107: * client application. Instead of requiring the application to reconstruct them, this configuration allows to ignore
108: * such changes completely.
109: */
110: public static final String IGNORE_INFERRED_VALUE_REMOVAL_ON_MERGE = "cz.cvut.kbss.jopa.ignoreInferredValueRemovalOnMerge";
111:
112: /**
113: * Configures change tracking mode.
114: */
115: public static final String CHANGE_TRACKING_MODE = "cz.cvut.kbss.jopa.changeTrackingMode";
116:
117: private JOPAPersistenceProperties() {
118: throw new AssertionError();
119: }
120: }