01: package simpleorm.quickstart;
02:
03: /**
04: * Interface to convert the database table or column name to your names.<br>
05: * SimpleORMGenerate must be created with an object that instanciates this interface.<p>
06: * Typically you should simple algrothem to return a nice name (like DefaultFormatter),
07: * but the code could be complex as you feel like (like SimpleORMNiceNameFormatter).
08: *
09: *
10: * @author <a href="mailto:richard.schmidt@inform6.com">Richard Schmidt</a>
11: */
12: public interface INiceNameFormatter {
13:
14: /**return a nice name for the database table name.*/
15: String niceNameForTable(String table);
16:
17: /**return a nice name for the column of the table passed as parameters.*/
18: String niceNameForColumn(String table, String column);
19:
20: /**return a nice name for the foreign key that links localTable to ForeignTable.*/
21: String niceNameForForeignKey(String localTable, String foreignTable);
22: }
|