/** * PUBLIC: * Use this method to generate stored procedures based on the dynamic SQL generated * for your mappings and descriptors. This should be used with caution as it maintenance * will be high. Stored procedures may be generated either directly on the database * or to a file. */ public void generateStoredProceduresAndAmendmentClass(Writer writer, String fullyQualifiedClassName) throws EclipseLinkException { String className = fullyQualifiedClassName.substring(fullyQualifiedClassName.lastIndexOf('.') + 1); String packageName = fullyQualifiedClassName.substring(0, fullyQualifiedClassName.lastIndexOf('.')); StoredProcedureGenerator storedProcedureGenerator = new StoredProcedureGenerator(this); storedProcedureGenerator.generateStoredProcedures(); storedProcedureGenerator.generateAmendmentClass(writer, packageName, className); }
/** * PUBLIC: * Use this method to generate stored procedures based on the dynamic SQL generated * for your mappings and descriptors. This should be used with caution as it maintenance * will be high. Stored procedures may be generated either directly on the database * or to a file. */ public void generateStoredProceduresAndAmendmentClass(Writer writer, String fullyQualifiedClassName) throws EclipseLinkException { String className = fullyQualifiedClassName.substring(fullyQualifiedClassName.lastIndexOf('.') + 1); String packageName = fullyQualifiedClassName.substring(0, fullyQualifiedClassName.lastIndexOf('.')); StoredProcedureGenerator storedProcedureGenerator = new StoredProcedureGenerator(this); storedProcedureGenerator.generateStoredProcedures(); storedProcedureGenerator.generateAmendmentClass(writer, packageName, className); }
/** * PUBLIC: * Use this method to generate stored procedures based on the dynamic SQL generated * for your mappings and descriptors. This should be used with caution as it maintenance * will be high. Stored procedures may be generated either directly on the database * or to a file. */ public void generateStoredProceduresAndAmendmentClass(Writer writer, String fullyQualifiedClassName) throws EclipseLinkException { String className = fullyQualifiedClassName.substring(fullyQualifiedClassName.lastIndexOf('.') + 1); String packageName = fullyQualifiedClassName.substring(0, fullyQualifiedClassName.lastIndexOf('.')); StoredProcedureGenerator storedProcedureGenerator = new StoredProcedureGenerator(this); storedProcedureGenerator.generateStoredProcedures(); storedProcedureGenerator.generateAmendmentClass(writer, packageName, className); }
/** * PUBLIC: * Use this method to generate stored procedures based on the dynamic SQL generated * for your mappings and descriptors. This should be used with caution as it maintenance * will be high. Stored procedures may be generated either directly on the database * or to a file. */ public void generateStoredProceduresAndAmendmentClass(String path, String fullyQualifiedClassName) throws EclipseLinkException { java.io.FileWriter fileWriter = null; try { StoredProcedureGenerator storedProcedureGenerator = new StoredProcedureGenerator(this); if (!(path.endsWith("\\") || path.endsWith("/"))) { path = path + "\\"; } String className = fullyQualifiedClassName.substring(fullyQualifiedClassName.lastIndexOf('.') + 1); String packageName = fullyQualifiedClassName.substring(0, fullyQualifiedClassName.lastIndexOf('.')); String fileName = path + className + ".java"; fileWriter = new java.io.FileWriter(fileName); storedProcedureGenerator.generateStoredProcedures(); storedProcedureGenerator.generateAmendmentClass(fileWriter, packageName, className); fileWriter.close(); } catch (java.io.IOException ioException) { throw ValidationException.fileError(ioException); } finally { Helper.close(fileWriter); } }
/** * PUBLIC: * Use this method to generate stored procedures based on the dynamic SQL generated * for your mappings and descriptors. This should be used with caution as it maintenance * will be high. Stored procedures may be generated either directly on the database * or to a file. */ public void generateStoredProceduresAndAmendmentClass(String path, String fullyQualifiedClassName) throws EclipseLinkException { java.io.FileWriter fileWriter = null; try { StoredProcedureGenerator storedProcedureGenerator = new StoredProcedureGenerator(this); if (!(path.endsWith("\\") || path.endsWith("/"))) { path = path + "\\"; } String className = fullyQualifiedClassName.substring(fullyQualifiedClassName.lastIndexOf('.') + 1); String packageName = fullyQualifiedClassName.substring(0, fullyQualifiedClassName.lastIndexOf('.')); String fileName = path + className + ".java"; fileWriter = new java.io.FileWriter(fileName); storedProcedureGenerator.generateStoredProcedures(); storedProcedureGenerator.generateAmendmentClass(fileWriter, packageName, className); fileWriter.close(); } catch (java.io.IOException ioException) { throw ValidationException.fileError(ioException); } finally { Helper.close(fileWriter); } }
/** * PUBLIC: * Use this method to generate stored procedures based on the dynamic SQL generated * for your mappings and descriptors. This should be used with caution as it maintenance * will be high. Stored procedures may be generated either directly on the database * or to a file. */ public void generateStoredProceduresAndAmendmentClass(String path, String fullyQualifiedClassName) throws EclipseLinkException { java.io.FileWriter fileWriter = null; try { StoredProcedureGenerator storedProcedureGenerator = new StoredProcedureGenerator(this); if (!(path.endsWith("\\") || path.endsWith("/"))) { path = path + "\\"; } String className = fullyQualifiedClassName.substring(fullyQualifiedClassName.lastIndexOf('.') + 1); String packageName = fullyQualifiedClassName.substring(0, fullyQualifiedClassName.lastIndexOf('.')); String fileName = path + className + ".java"; fileWriter = new java.io.FileWriter(fileName); storedProcedureGenerator.generateStoredProcedures(); storedProcedureGenerator.generateAmendmentClass(fileWriter, packageName, className); fileWriter.close(); } catch (java.io.IOException ioException) { throw ValidationException.fileError(ioException); } finally { Helper.close(fileWriter); } }