Revision eb0d9f79
Added by Cherian Mathew about 10 years ago
cdmlib-services/src/main/java/eu/etaxonomy/cdm/api/service/IService.java | ||
---|---|---|
124 | 124 |
* that this method makes the hibernate read query with the |
125 | 125 |
* {@link org.hibernate.FlushMode FlushMode} for the session set to 'MANUAL' |
126 | 126 |
* <p> |
127 |
* <b>NOTE:</b>This method should <em>ONLY</em> be used when it is absolutely
|
|
127 |
* <b>WARNING:</b>This method should <em>ONLY</em> be used when it is absolutely
|
|
128 | 128 |
* necessary to ensure that the hibernate session is not flushed before a read |
129 | 129 |
* query. A use case for this is the {@link eu.etaxonomy.cdm.api.cache.CdmCacher CdmCacher}, |
130 | 130 |
* (ticket #4276) where a call to {@link eu.etaxonomy.cdm.api.cache.CdmCacher#load(UUID) load} |
... | ... | |
132 | 132 |
* due to the fact that the {@link #find(UUID) find} method triggers a hibernate session |
133 | 133 |
* flush which eventually could call {@link eu.etaxonomy.cdm.model.name.NonViralName#getNameCache getNameCache}, |
134 | 134 |
* which in turn (in the event that name cahce is null) eventually calls the |
135 |
* {@link eu.etaxonomy.cdm.api.cache.CdmCacher#load(UUID uuid)} again. |
|
135 |
* {@link eu.etaxonomy.cdm.api.cache.CdmCacher#load(UUID uuid) load} again.
|
|
136 | 136 |
* Apart from these kind of exceptional circumstances, the standard {@link #find(UUID) find} |
137 |
* method should be used to ensure that the persistence layer is always in sync with the |
|
138 |
* underlying dtabase. |
|
137 |
* method should always be used to ensure that the persistence layer is always in sync with the
|
|
138 |
* underlying database.
|
|
139 | 139 |
* |
140 | 140 |
* @param uuid |
141 | 141 |
* @return an entity of type <T>, or null if the entity does not exist |
Also available in: Unified diff
updated javadoc