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 methods and table columns, 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 ColumnMapping {
28: /**
29: * Method returns the lowercase mapped name and should return names for every
30: * method/column mapping and every column/method mapping (inverse), even if that
31: * simply means returning the value passed in.
32: *
33: * @param name the lowercase name that is being mapped
34: *
35: * @return the lowercase mapped name
36: */
37:
38: String getTableColumnName(String name);
39: }
|