View Javadoc

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  public class Postgresql extends org.melati.poem.dbms.Postgresql {
17  
18    @Override
19    public String unreservedName(String name) {
20      if (name.equals("ISBN"))
21        return super.unreservedName(name);
22      if (name.equals("amountUK"))
23        return super.unreservedName(name);
24      if (name.equals("deliveryUK"))
25        return super.unreservedName(name);
26      return super.unreservedName(name).toLowerCase();
27    }
28  
29    @Override
30    public String melatiName(String name) {
31      return super.melatiName(name);
32    }
33  
34  }