01: /**
02: * Copyright (C) 2006, 2007 David Bulmore, Software Sensation Inc.
03: * All Rights Reserved.
04: *
05: * This file is part of JPersist.
06: *
07: * JPersist is free software; you can redistribute it and/or modify it under
08: * the terms of the GNU General Public License (Version 2) as published by
09: * the Free Software Foundation.
10: *
11: * JPersist is distributed in the hope that it will be useful, but WITHOUT
12: * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13: * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14: * for more details.
15: *
16: * You should have received a copy of the GNU General Public License
17: * along with JPersist; if not, write to the Free Software Foundation,
18: * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19: */package jpersist.interfaces;
20:
21: /**
22: * This interface is optionally implemented to provide overriding mapping
23: * between classes and tables and is only needed when a match can't be
24: * made due to a vast difference in naming and/or a collision will occur.
25: */
26:
27: public interface TableMapping {
28: /**
29: * Method returns the mapped name.
30: *
31: * @param name the lowercase name that is being mapped
32: *
33: * @return the lowercase mapped name
34: */
35:
36: String getDatabaseTableName(String name);
37: /*
38: public static class TableInfo
39: {
40: private String schemaName, catalogName, tableName;
41:
42: public TableInfo(String schemaName, String catalogName, String tableName)
43: {
44: this.schemaName = schemaName;
45: this.catalogName = catalogName;
46: this.tableName = tableName;
47: }
48:
49: public String getSchemaName() { return schemaName; }
50: public String getCatalogName() { return catalogName; }
51: public String getTableName() { return tableName; }
52: }
53: */
54: }
|