View Javadoc
1   package fr.ifremer.dali.service.persistence;
2   
3   /*
4    * #%L
5    * Dali :: Core
6    * $Id:$
7    * $HeadURL:$
8    * %%
9    * Copyright (C) 2014 - 2015 Ifremer
10   * %%
11   * This program is free software: you can redistribute it and/or modify
12   * it under the terms of the GNU Affero General Public License as published by
13   * the Free Software Foundation, either version 3 of the License, or
14   * (at your option) any later version.
15   * 
16   * This program is distributed in the hope that it will be useful,
17   * but WITHOUT ANY WARRANTY; without even the implied warranty of
18   * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19   * GNU General Public License for more details.
20   * 
21   * You should have received a copy of the GNU Affero General Public License
22   * along with this program.  If not, see <http://www.gnu.org/licenses/>.
23   * #L%
24   */
25  
26  import fr.ifremer.quadrige3.core.ProgressionCoreModel;
27  import org.nuiton.version.Version;
28  import org.springframework.beans.factory.InitializingBean;
29  import org.springframework.transaction.annotation.Propagation;
30  import org.springframework.transaction.annotation.Transactional;
31  
32  import java.io.Closeable;
33  
34  /**
35   * <p>PersistenceService interface.</p>
36   *
37   * @author Lionel Touseau <lionel.touseau@e-is.pro>
38   */
39  @Transactional(readOnly = true)
40  public interface PersistenceService extends fr.ifremer.quadrige3.core.service.persistence.PersistenceService, Closeable, InitializingBean {
41  
42      @Override
43      Version getDbVersion();
44  
45      @Override
46      Version getApplicationVersion();
47  
48      /**
49       * <p>updateSchema.</p>
50       */
51      @Transactional()
52      @Override
53      void updateSchema();
54  
55      /**
56       * do a online compact
57       */
58      void compactDb();
59  
60      /**
61       * Clear all caches
62       */
63      void clearAllCaches();
64  
65      /**
66       * Load cache with entities need for Dali
67       *
68       * @param progressionModel a {@link ProgressionCoreModel} object.
69       */
70      void loadDefaultCaches(ProgressionCoreModel progressionModel);
71  
72      @Transactional(propagation = Propagation.SUPPORTS)
73      void enableMassiveUpdate();
74  
75      @Transactional(propagation = Propagation.SUPPORTS)
76      void disableMassiveUpdate();
77  }