| | |
| | | /* |
| | | * BaseLink - Generic object relational mapping |
| | | * Copyright (C) 2011 Ulrich Hilger, http://uhilger.de |
| | | * Copyright (C) 2011-2020 Ulrich Hilger, http://uhilger.de |
| | | * |
| | | * This program is free software: you can redistribute it and/or modify |
| | | * it under the terms of the GNU General Public License as published by |
| | |
| | | public static final boolean DONT_INCLUDE_BLOBS = false; |
| | | |
| | | /** |
| | | * Generate a database access object (DAO) for a table |
| | | * Generate a database transfer object (DTO) for a table |
| | | * |
| | | * @param pm an object to be used for database access |
| | | * @param schemaName name of database schema that contains the table |
| | | * @param tableName name of table to create DAO for |
| | | * @return java source code of DAO |
| | | */ |
| | | public String generateDAO(PersistenceManager pm, String schemaName, String tableName) { |
| | | public String generateDTO(PersistenceManager pm, String schemaName, String tableName) { |
| | | String indentation = " "; |
| | | //String indent = ""; |
| | | StringBuilder code = new StringBuilder(); |
| | |
| | | } |
| | | |
| | | /** |
| | | * Generate a database transfer object (DTO) for a table |
| | | * |
| | | * This method is kept for compatibility reasons, it maps to |
| | | * <code>generateDTO</code>. |
| | | * |
| | | * @param pm an object to be used for database access |
| | | * @param schemaName name of database schema that contains the table |
| | | * @param tableName name of table to create DAO for |
| | | * @return java source code of DAO |
| | | */ |
| | | public String generateDAO(PersistenceManager pm, String schemaName, String tableName) { |
| | | return generateDTO(pm, schemaName, tableName); |
| | | } |
| | | |
| | | /** |
| | | * Get a description of the columns of a database table |
| | | * |
| | | * @param pm an object to be used for database access |