Coverage Report - org.kuali.rice.kns.dao.jdbc.PostDataLoadEncryptionDaoJdbc
 
Classes in this File Line Coverage Branch Coverage Complexity
PostDataLoadEncryptionDaoJdbc
0%
0/14
N/A
1
 
 1  
 /*
 2  
  * Copyright 2007 The Kuali Foundation
 3  
  * 
 4  
  * Licensed under the Educational Community License, Version 2.0 (the "License"); you may not use this file except in
 5  
  * compliance with the License. You may obtain a copy of the License at
 6  
  * 
 7  
  * http://www.opensource.org/licenses/ecl2.php
 8  
  * 
 9  
  * Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS
 10  
  * IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific
 11  
  * language governing permissions and limitations under the License.
 12  
  */
 13  
 package org.kuali.rice.kns.dao.jdbc;
 14  
 
 15  
 import org.apache.log4j.Logger;
 16  
 import org.kuali.rice.kns.dao.PostDataLoadEncryptionDao;
 17  
 
 18  0
 public class PostDataLoadEncryptionDaoJdbc extends PlatformAwareDaoBaseJdbc implements PostDataLoadEncryptionDao {
 19  0
     private static final Logger LOG = Logger.getLogger(PostDataLoadEncryptionDaoJdbc.class);
 20  
 
 21  
     private void executeSql(String sql) {
 22  0
         LOG.info("Executing sql: " + sql);
 23  0
         getJdbcTemplate().execute(sql);
 24  0
     }
 25  
 
 26  
     public void createBackupTable(String tableName) {
 27  0
         executeSql(getDbPlatform().getCreateTableFromTableSql(tableName + "_bak", tableName));
 28  0
     }
 29  
 
 30  
     public void truncateTable(String tableName) {
 31  0
         executeSql(getDbPlatform().getTruncateTableSql(tableName));
 32  0
     }
 33  
 
 34  
     public void restoreTableFromBackup(String tableName) {
 35  0
         truncateTable(tableName);
 36  0
         executeSql(getDbPlatform().getInsertDataFromTableSql(tableName, tableName + "_bak"));
 37  0
     }
 38  
 
 39  
     public void dropBackupTable(String tableName) {
 40  0
         executeSql(getDbPlatform().getDropTableSql(tableName + "_bak"));
 41  0
     }
 42  
 }