This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.idempiere.process; | |
import java.util.ArrayList; | |
import java.util.List; | |
import org.adempiere.util.Callback; | |
import org.adempiere.webui.apps.AEnv; | |
import org.adempiere.webui.window.FDialog; | |
import org.compiere.model.MColumn; | |
import org.compiere.model.MLookup; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* iDempiere NOTE: | |
Use this script to enable uuid generation JUST on postgresql versions prior to 9.1 | |
For Postgresql 9.1, run the CREATE EXTENSION "uuid-ossp" sql command instead of using this script | |
*/ | |
/* $PostgreSQL: pgsql/contrib/uuid-ossp/uuid-ossp.sql.in,v 1.6 2007/11/13 04:24:29 momjian Exp $ */ | |
-- Adjust this setting to control where the objects get created. | |
SET search_path = adempiere; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// http://www.adempiere.com/ADempiere_Best_Practices#How_to_use_PreparedStatement.2FResultSet_.3F | |
// How to use PreparedStatement/ResultSet ? | |
final String sql = "''your SQL SELECT code''"; | |
PreparedStatement pstmt = null; | |
ResultSet rs = null; | |
try | |
{ | |
pstmt = DB.prepareStatement(sql, trxName); | |
DB.setParameters(pstmt, new Object[]{...''parameters''...}); | |
rs = pstmt.executeQuery(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
select table_name, pg_relation_size(quote_ident(table_name)) | |
from information_schema.tables | |
where table_schema = 'adempiere' | |
order by 2 desc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--Before executing this query, you have to REVOKE the CONNECT privileges to avoid new connections: | |
REVOKE CONNECT ON DATABASE dbname FROM PUBLIC, username; | |
--PostgreSQL 9.2 and above: | |
SELECT | |
pg_terminate_backend(pid) | |
FROM | |
pg_stat_activity | |
WHERE | |
-- don't kill my own connection! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package org.adempiere.webui.window; | |
import java.io.File; | |
import java.io.FileOutputStream; | |
import java.util.logging.Level; | |
import javax.servlet.http.HttpServletRequest; | |
import net.sf.jasperreports.engine.JRExporterParameter; | |
import net.sf.jasperreports.engine.JasperExportManager; |