Coverage Report - org.paneris.bibliomania.poem.dbms.Postgresql
 
Classes in this File Line Coverage Branch Coverage Complexity
Postgresql
100%
9/9
100%
6/6
4
 
 1  
 package org.paneris.bibliomania.poem.dbms;
 2  
 
 3  
 /**
 4  
  * POEM no longer lowercases the names of tables defined in the 
 5  
  * DSD. 
 6  
  * Bibliomania was written against a version of POEM which did. 
 7  
  * This driver enables backward compatibility with the existing database. 
 8  
  * 
 9  
  * Note this is a hack, it works because all the field names are 
 10  
  * lowercase and the mixed case table names have a mapping in 
 11  
  * database.getTableIgnoringCase(name)
 12  
  * 
 13  
  * @author timp
 14  
  * @since 2013-07-19
 15  
  */
 16  1
 public class Postgresql extends org.melati.poem.dbms.Postgresql {
 17  
 
 18  
   @Override
 19  
   public String unreservedName(String name) {
 20  3916
     if (name.equals("ISBN"))
 21  6
       return super.unreservedName(name);
 22  3910
     if (name.equals("amountUK"))
 23  12
       return super.unreservedName(name);
 24  3898
     if (name.equals("deliveryUK"))
 25  12
       return super.unreservedName(name);
 26  3886
     return super.unreservedName(name).toLowerCase();
 27  
   }
 28  
 
 29  
   @Override
 30  
   public String melatiName(String name) {
 31  1102
     return super.melatiName(name);
 32  
   }
 33  
 
 34  
 }