diff --git a/.hgignore b/.hgignore
index af10198715..43f03aaa7b 100644
--- a/.hgignore
+++ b/.hgignore
@@ -59,6 +59,7 @@ syntax: regexp
^lib/plugins$
^plugins/.*\.class$
^adempiere-local\.properties$
+^org.adempiere.extend/test.properties$
^org\.adempiere\.ui/.*\.class$
^org\.adempiere\.ui/bin/.*\.css$
^org\.adempiere\.pipo.handlers/.*\.class$
diff --git a/migration/360lts-release/oracle/927_IDEMPIERE-388.sql b/migration/360lts-release/oracle/927_IDEMPIERE-388.sql
new file mode 100644
index 0000000000..28c14e9664
--- /dev/null
+++ b/migration/360lts-release/oracle/927_IDEMPIERE-388.sql
@@ -0,0 +1,66 @@
+-- IDEMPIERE-388 Enable port and TLS configuration for email
+-- Oct 3, 2012 10:55:41 AM COT
+INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,Description,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('SMTPPort',200170,'D','SMTP Port','SMTP Port Number','SMTP Port','20c841ef-0f1c-4482-87a7-0e882ae1e0de',0,TO_DATE('2012-10-03 10:55:39','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-10-03 10:55:39','YYYY-MM-DD HH24:MI:SS'),0,0,0,'Y')
+;
+
+-- Oct 3, 2012 10:55:41 AM COT
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200170 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
+;
+
+-- Oct 3, 2012 10:58:59 AM COT
+INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,112,200580,'D','N','N','N',0,'N',10,'N',11,'N','N',200170,'N','Y','e463ed28-f6d5-4150-b7bd-49cdc6e7e03b','N','Y','N','SMTPPort','SMTP Port Number','SMTP Port','Y',0,TO_DATE('2012-10-03 10:58:58','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-03 10:58:58','YYYY-MM-DD HH24:MI:SS'),0,0,0)
+;
+
+-- Oct 3, 2012 10:58:59 AM COT
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200580 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
+;
+
+-- Oct 3, 2012 11:00:50 AM COT
+INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,Description,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('IsSecureSMTP',200171,'D','SMTP SSL/TLS','Use SSL/TLS for SMTP','SMTP SSL/TLS','08c7ca81-950d-4f5f-b0fd-99da440cd1e2',0,TO_DATE('2012-10-03 11:00:49','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2012-10-03 11:00:49','YYYY-MM-DD HH24:MI:SS'),0,0,0,'Y')
+;
+
+-- Oct 3, 2012 11:00:50 AM COT
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200171 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
+;
+
+-- Oct 3, 2012 11:02:40 AM COT
+INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,DefaultValue,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,112,200581,'D','N','N','N',0,'N',1,'N',20,'N','N',200171,'N','Y','1bf7924e-8543-481d-972d-32ac400ce786','N','Y','N','IsSecureSMTP','Use SSL/TLS for SMTP','N','SMTP SSL/TLS','Y',0,TO_DATE('2012-10-03 11:02:39','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_DATE('2012-10-03 11:02:39','YYYY-MM-DD HH24:MI:SS'),0,0,0)
+;
+
+-- Oct 3, 2012 11:02:40 AM COT
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200581 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
+;
+
+-- Oct 3, 2012 11:24:52 AM COT
+INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,AD_FieldGroup_ID,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines) VALUES (0,'N',145,0,'N','N',200580,113,'Y',200594,'N',119,'D','SMTP Port Number','SMTP Port','Y','N','e54979c8-39fc-4ac5-8fd0-5232834a070c',0,0,TO_DATE('2012-10-03 11:24:52','YYYY-MM-DD HH24:MI:SS'),0,0,TO_DATE('2012-10-03 11:24:52','YYYY-MM-DD HH24:MI:SS'),'Y','Y',113,1,1,1)
+;
+
+-- Oct 3, 2012 11:24:52 AM COT
+INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200594 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
+;
+
+-- Oct 3, 2012 11:27:59 AM COT
+INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,AD_FieldGroup_ID,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines) VALUES (0,'N',145,0,'Y','N',200581,115,'Y',200595,'N',119,'D','Use SSL/TLS for SMTP','SMTP SSL/TLS','Y','N','dbef5a74-3dfa-4246-8b76-04b924ec869c',0,0,TO_DATE('2012-10-03 11:27:58','YYYY-MM-DD HH24:MI:SS'),0,0,TO_DATE('2012-10-03 11:27:58','YYYY-MM-DD HH24:MI:SS'),'Y','Y',115,5,2,1)
+;
+
+-- Oct 3, 2012 11:27:59 AM COT
+INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200595 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
+;
+
+-- Oct 8, 2012 10:15:49 PM COT
+-- IDEMPIERE-388 Enable port and TLS configuration for email
+UPDATE AD_Column SET IsMandatory='Y',Updated=TO_DATE('2012-10-08 22:15:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200581
+;
+
+-- Oct 8, 2012 10:15:51 PM COT
+-- IDEMPIERE-388 Enable port and TLS configuration for email
+ALTER TABLE AD_Client ADD IsSecureSMTP CHAR(1) DEFAULT 'N' CHECK (IsSecureSMTP IN ('Y','N')) NOT NULL
+;
+
+-- Oct 8, 2012 10:16:24 PM COT
+-- IDEMPIERE-388 Enable port and TLS configuration for email
+ALTER TABLE AD_Client ADD SMTPPort NUMBER(10) DEFAULT NULL
+;
+
+SELECT register_migration_script('927_IDEMPIERE-388.sql') FROM dual
+;
diff --git a/migration/360lts-release/oracle/929_IDEMPIERE-458.sql b/migration/360lts-release/oracle/929_IDEMPIERE-458.sql
new file mode 100644
index 0000000000..aedf4700cf
--- /dev/null
+++ b/migration/360lts-release/oracle/929_IDEMPIERE-458.sql
@@ -0,0 +1,13 @@
+-- IDEMPIERE-458 Invalid indirect foreign keys on GardenWorld
+delete from ad_treenode where ad_tree_id=102 and node_id not in (select m_product_id from m_product)
+;
+
+delete from ad_treenode where ad_tree_id=103 and node_id not in (select c_bpartner_id from c_bpartner)
+;
+
+delete from ad_treenode where ad_tree_id=101 and node_id not in (select c_elementvalue_id from c_elementvalue)
+;
+
+SELECT register_migration_script('929_IDEMPIERE-458.sql') FROM dual
+;
+
diff --git a/migration/360lts-release/postgresql/927_IDEMPIERE-388.sql b/migration/360lts-release/postgresql/927_IDEMPIERE-388.sql
new file mode 100644
index 0000000000..1d2f0167ad
--- /dev/null
+++ b/migration/360lts-release/postgresql/927_IDEMPIERE-388.sql
@@ -0,0 +1,66 @@
+-- IDEMPIERE-388 Enable port and TLS configuration for email
+-- Oct 3, 2012 10:55:41 AM COT
+INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,Description,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('SMTPPort',200170,'D','SMTP Port','SMTP Port Number','SMTP Port','20c841ef-0f1c-4482-87a7-0e882ae1e0de',0,TO_TIMESTAMP('2012-10-03 10:55:39','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-10-03 10:55:39','YYYY-MM-DD HH24:MI:SS'),0,0,0,'Y')
+;
+
+-- Oct 3, 2012 10:55:41 AM COT
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200170 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
+;
+
+-- Oct 3, 2012 10:58:59 AM COT
+INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,112,200580,'D','N','N','N',0,'N',10,'N',11,'N','N',200170,'N','Y','e463ed28-f6d5-4150-b7bd-49cdc6e7e03b','N','Y','N','SMTPPort','SMTP Port Number','SMTP Port','Y',0,TO_TIMESTAMP('2012-10-03 10:58:58','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-03 10:58:58','YYYY-MM-DD HH24:MI:SS'),0,0,0)
+;
+
+-- Oct 3, 2012 10:58:59 AM COT
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200580 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
+;
+
+-- Oct 3, 2012 11:00:50 AM COT
+INSERT INTO AD_Element (ColumnName,AD_Element_ID,EntityType,Name,Description,PrintName,AD_Element_UU,AD_Client_ID,Created,Updated,AD_Org_ID,CreatedBy,UpdatedBy,IsActive) VALUES ('IsSecureSMTP',200171,'D','SMTP SSL/TLS','Use SSL/TLS for SMTP','SMTP SSL/TLS','08c7ca81-950d-4f5f-b0fd-99da440cd1e2',0,TO_TIMESTAMP('2012-10-03 11:00:49','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2012-10-03 11:00:49','YYYY-MM-DD HH24:MI:SS'),0,0,0,'Y')
+;
+
+-- Oct 3, 2012 11:00:50 AM COT
+INSERT INTO AD_Element_Trl (AD_Language,AD_Element_ID, Help,PO_Description,PO_Help,Name,Description,PrintName,PO_Name,PO_PrintName, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Element_Trl_UU ) SELECT l.AD_Language,t.AD_Element_ID, t.Help,t.PO_Description,t.PO_Help,t.Name,t.Description,t.PrintName,t.PO_Name,t.PO_PrintName, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Element t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Element_ID=200171 AND NOT EXISTS (SELECT * FROM AD_Element_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Element_ID=t.AD_Element_ID)
+;
+
+-- Oct 3, 2012 11:02:40 AM COT
+INSERT INTO AD_Column (Version,AD_Table_ID,AD_Column_ID,EntityType,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsSyncDatabase,IsKey,AD_Element_ID,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsEncrypted,IsUpdateable,IsAlwaysUpdateable,ColumnName,Description,DefaultValue,Name,IsAllowCopy,CreatedBy,Updated,AD_Org_ID,IsActive,Created,UpdatedBy,AD_Client_ID,SeqNoSelection) VALUES (0,112,200581,'D','N','N','N',0,'N',1,'N',20,'N','N',200171,'N','Y','1bf7924e-8543-481d-972d-32ac400ce786','N','Y','N','IsSecureSMTP','Use SSL/TLS for SMTP','N','SMTP SSL/TLS','Y',0,TO_TIMESTAMP('2012-10-03 11:02:39','YYYY-MM-DD HH24:MI:SS'),0,'Y',TO_TIMESTAMP('2012-10-03 11:02:39','YYYY-MM-DD HH24:MI:SS'),0,0,0)
+;
+
+-- Oct 3, 2012 11:02:40 AM COT
+INSERT INTO AD_Column_Trl (AD_Language,AD_Column_ID, Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Column_Trl_UU ) SELECT l.AD_Language,t.AD_Column_ID, t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Column t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Column_ID=200581 AND NOT EXISTS (SELECT * FROM AD_Column_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Column_ID=t.AD_Column_ID)
+;
+
+-- Oct 3, 2012 11:24:52 AM COT
+INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,AD_FieldGroup_ID,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines) VALUES (0,'N',145,0,'N','N',200580,113,'Y',200594,'N',119,'D','SMTP Port Number','SMTP Port','Y','N','e54979c8-39fc-4ac5-8fd0-5232834a070c',0,0,TO_TIMESTAMP('2012-10-03 11:24:52','YYYY-MM-DD HH24:MI:SS'),0,0,TO_TIMESTAMP('2012-10-03 11:24:52','YYYY-MM-DD HH24:MI:SS'),'Y','Y',113,1,1,1)
+;
+
+-- Oct 3, 2012 11:24:52 AM COT
+INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200594 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
+;
+
+-- Oct 3, 2012 11:27:59 AM COT
+INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,AD_FieldGroup_ID,EntityType,Description,Name,IsDisplayed,IsFieldOnly,AD_Field_UU,UpdatedBy,AD_Org_ID,Created,AD_Client_ID,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,ColumnSpan,NumLines) VALUES (0,'N',145,0,'Y','N',200581,115,'Y',200595,'N',119,'D','Use SSL/TLS for SMTP','SMTP SSL/TLS','Y','N','dbef5a74-3dfa-4246-8b76-04b924ec869c',0,0,TO_TIMESTAMP('2012-10-03 11:27:58','YYYY-MM-DD HH24:MI:SS'),0,0,TO_TIMESTAMP('2012-10-03 11:27:58','YYYY-MM-DD HH24:MI:SS'),'Y','Y',115,5,2,1)
+;
+
+-- Oct 3, 2012 11:27:59 AM COT
+INSERT INTO AD_Field_Trl (AD_Language,AD_Field_ID, Help,Description,Name, IsTranslated,AD_Client_ID,AD_Org_ID,Created,Createdby,Updated,UpdatedBy,AD_Field_Trl_UU ) SELECT l.AD_Language,t.AD_Field_ID, t.Help,t.Description,t.Name, 'N',t.AD_Client_ID,t.AD_Org_ID,t.Created,t.Createdby,t.Updated,t.UpdatedBy,Generate_UUID() FROM AD_Language l, AD_Field t WHERE l.IsActive='Y' AND l.IsSystemLanguage='Y' AND l.IsBaseLanguage='N' AND t.AD_Field_ID=200595 AND NOT EXISTS (SELECT * FROM AD_Field_Trl tt WHERE tt.AD_Language=l.AD_Language AND tt.AD_Field_ID=t.AD_Field_ID)
+;
+
+-- Oct 8, 2012 10:15:49 PM COT
+-- IDEMPIERE-388 Enable port and TLS configuration for email
+UPDATE AD_Column SET IsMandatory='Y',Updated=TO_TIMESTAMP('2012-10-08 22:15:49','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=200581
+;
+
+-- Oct 8, 2012 10:15:51 PM COT
+-- IDEMPIERE-388 Enable port and TLS configuration for email
+ALTER TABLE AD_Client ADD COLUMN IsSecureSMTP CHAR(1) DEFAULT 'N' CHECK (IsSecureSMTP IN ('Y','N')) NOT NULL
+;
+
+-- Oct 8, 2012 10:16:24 PM COT
+-- IDEMPIERE-388 Enable port and TLS configuration for email
+ALTER TABLE AD_Client ADD COLUMN SMTPPort NUMERIC(10) DEFAULT NULL
+;
+
+SELECT register_migration_script('927_IDEMPIERE-388.sql') FROM dual
+;
diff --git a/migration/360lts-release/postgresql/929_IDEMPIERE-458.sql b/migration/360lts-release/postgresql/929_IDEMPIERE-458.sql
new file mode 100644
index 0000000000..aedf4700cf
--- /dev/null
+++ b/migration/360lts-release/postgresql/929_IDEMPIERE-458.sql
@@ -0,0 +1,13 @@
+-- IDEMPIERE-458 Invalid indirect foreign keys on GardenWorld
+delete from ad_treenode where ad_tree_id=102 and node_id not in (select m_product_id from m_product)
+;
+
+delete from ad_treenode where ad_tree_id=103 and node_id not in (select c_bpartner_id from c_bpartner)
+;
+
+delete from ad_treenode where ad_tree_id=101 and node_id not in (select c_elementvalue_id from c_elementvalue)
+;
+
+SELECT register_migration_script('929_IDEMPIERE-458.sql') FROM dual
+;
+
diff --git a/org.adempiere.base.callout/src/org/compiere/model/CalloutAssignment.java b/org.adempiere.base.callout/src/org/compiere/model/CalloutAssignment.java
index 071743bc89..943f3ee846 100644
--- a/org.adempiere.base.callout/src/org/compiere/model/CalloutAssignment.java
+++ b/org.adempiere.base.callout/src/org/compiere/model/CalloutAssignment.java
@@ -57,7 +57,7 @@ public class CalloutAssignment extends CalloutEngine
return "";
int M_Product_ID = 0;
- StringBuilder Name = null;
+ String Name = null;
String Description = null;
BigDecimal Qty = null;
String sql = "SELECT p.M_Product_ID, ra.Name, ra.Description, ra.Qty "
@@ -74,7 +74,7 @@ public class CalloutAssignment extends CalloutEngine
if (rs.next())
{
M_Product_ID = rs.getInt (1);
- Name = new StringBuilder(rs.getString(2));
+ Name = rs.getString(2);
Description = rs.getString(3);
Qty = rs.getBigDecimal(4);
}
@@ -94,9 +94,9 @@ public class CalloutAssignment extends CalloutEngine
{
mTab.setValue ("M_Product_ID", new Integer (M_Product_ID));
if (Description != null)
- Name.append(" (").append(Description).append(")");
- if (!".".equals(Name.toString()))
- mTab.setValue("Description", Name.toString());
+ Name += " (" + Description + ")";
+ if (!".".equals(Name))
+ mTab.setValue("Description", Name);
//
String variable = "Qty"; // TimeExpenseLine
if (mTab.getTableName().startsWith("C_Order"))
diff --git a/org.adempiere.base.process/src/org/adempiere/process/ClientAcctProcessor.java b/org.adempiere.base.process/src/org/adempiere/process/ClientAcctProcessor.java
index 7fac5486a6..e81874265a 100644
--- a/org.adempiere.base.process/src/org/adempiere/process/ClientAcctProcessor.java
+++ b/org.adempiere.base.process/src/org/adempiere/process/ClientAcctProcessor.java
@@ -264,12 +264,12 @@ public class ClientAcctProcessor extends SvrProcess
if (countError[i] > 0)
m_summary.append("(Errors=").append(countError[i]).append(")");
m_summary.append(" - ");
- StringBuilder msglog = new StringBuilder(getName()).append(": ").append(m_summary.toString());
+ StringBuilder msglog = new StringBuilder().append(getName()).append(": ").append(m_summary.toString());
log.finer(msglog.toString());
}
else
{
- StringBuilder msglog = new StringBuilder(getName()).append(": ").append(TableName).append(" - no work");
+ StringBuilder msglog = new StringBuilder().append(getName()).append(": ").append(TableName).append(" - no work");
log.finer(msglog.toString());
}
}
diff --git a/org.adempiere.base.process/src/org/adempiere/process/HouseKeeping.java b/org.adempiere.base.process/src/org/adempiere/process/HouseKeeping.java
index 3f2ca7bfd1..bd4c028de0 100644
--- a/org.adempiere.base.process/src/org/adempiere/process/HouseKeeping.java
+++ b/org.adempiere.base.process/src/org/adempiere/process/HouseKeeping.java
@@ -141,7 +141,7 @@ public class HouseKeeping extends SvrProcess{
houseKeeping.setLastDeleted(nodel);
houseKeeping.saveEx();
addLog("@Deleted@ " + nodel);
- StringBuilder msg = new StringBuilder(Msg.getElement(getCtx(), tableName + "_ID")).append(" #").append(nodel);
+ StringBuilder msg = new StringBuilder().append(Msg.getElement(getCtx(), tableName + "_ID")).append(" #").append(nodel);
return msg.toString();
}//doIt
}
diff --git a/org.adempiere.base.process/src/org/adempiere/process/InOutGenerateRMA.java b/org.adempiere.base.process/src/org/adempiere/process/InOutGenerateRMA.java
index 7ed7e7dc8c..a72f5811c3 100644
--- a/org.adempiere.base.process/src/org/adempiere/process/InOutGenerateRMA.java
+++ b/org.adempiere.base.process/src/org/adempiere/process/InOutGenerateRMA.java
@@ -126,7 +126,8 @@ public class InOutGenerateRMA extends SvrProcess
}
}
- return "@Created@ = " + m_created;
+ StringBuilder msgreturn = new StringBuilder("@Created@ = ").append(m_created);
+ return msgreturn.toString();
}
private int getShipmentDocTypeId(int M_RMA_ID)
@@ -241,7 +242,7 @@ public class InOutGenerateRMA extends SvrProcess
log.log(Level.WARNING, msglog.toString());
}
- StringBuffer processMsg = new StringBuffer(shipment.getDocumentNo());
+ StringBuffer processMsg = new StringBuffer().append(shipment.getDocumentNo());
if (!shipment.processIt(p_docAction))
{
diff --git a/org.adempiere.base.process/src/org/adempiere/process/InvoiceGenerateRMA.java b/org.adempiere.base.process/src/org/adempiere/process/InvoiceGenerateRMA.java
index 693fc6b8ca..6d5b7d53fc 100644
--- a/org.adempiere.base.process/src/org/adempiere/process/InvoiceGenerateRMA.java
+++ b/org.adempiere.base.process/src/org/adempiere/process/InvoiceGenerateRMA.java
@@ -120,7 +120,8 @@ public class InvoiceGenerateRMA extends SvrProcess
log.log(Level.SEVERE, "Could not close prepared statement");
}
}
- return "@Created@ = " + m_created;
+ StringBuilder msgreturn = new StringBuilder("@Created@ = ").append(m_created);
+ return msgreturn.toString();
}
private int getInvoiceDocTypeId(int M_RMA_ID)
@@ -203,7 +204,7 @@ public class InvoiceGenerateRMA extends SvrProcess
log.log(Level.WARNING, msglog.toString());
}
- StringBuilder processMsg = new StringBuilder(invoice.getDocumentNo());
+ StringBuilder processMsg = new StringBuilder().append(invoice.getDocumentNo());
if (!invoice.processIt(p_docAction))
{
diff --git a/org.adempiere.base.process/src/org/adempiere/process/PrepareMigrationScripts.java b/org.adempiere.base.process/src/org/adempiere/process/PrepareMigrationScripts.java
index 5cda31c6c8..bf0d65afc8 100644
--- a/org.adempiere.base.process/src/org/adempiere/process/PrepareMigrationScripts.java
+++ b/org.adempiere.base.process/src/org/adempiere/process/PrepareMigrationScripts.java
@@ -160,7 +160,7 @@ public class PrepareMigrationScripts extends SvrProcess {
}
}
if (blBody) {
- body.append(line + '\n');
+ body.append(line).append('\n');
}
if (line.equals("--BEGINHEADER--")) {
blHeader = true;
@@ -173,7 +173,7 @@ public class PrepareMigrationScripts extends SvrProcess {
} else {
if (!isFirstLine)
line = scanner.nextLine();
- body.append(line + '\n');
+ body.append(line).append('\n');
}
isFirstLine = false;
}
diff --git a/org.adempiere.base.process/src/org/compiere/process/AD_PrintPaper_Default.java b/org.adempiere.base.process/src/org/compiere/process/AD_PrintPaper_Default.java
index ae5cae8077..ef4a07bd8b 100644
--- a/org.adempiere.base.process/src/org/compiere/process/AD_PrintPaper_Default.java
+++ b/org.adempiere.base.process/src/org/compiere/process/AD_PrintPaper_Default.java
@@ -87,7 +87,8 @@ public class AD_PrintPaper_Default extends SvrProcess
log.log(Level.SEVERE, "set print format", e);
}
- return "@Copied@=" + cnt;
+ StringBuilder msgreturn = new StringBuilder("@Copied@=").append(cnt);
+ return msgreturn.toString();
} // doIt
} // AD_PrintPaper_Default
diff --git a/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java b/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java
index 4b6432d7a9..90a8ad565c 100644
--- a/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java
+++ b/org.adempiere.base.process/src/org/compiere/process/AcctSchemaDefaultCopy.java
@@ -76,7 +76,7 @@ public class AcctSchemaDefaultCopy extends SvrProcess
if (acct == null || acct.get_ID() == 0)
throw new AdempiereSystemError("Default Not Found - C_AcctSchema_ID=" + p_C_AcctSchema_ID);
- StringBuilder sql;
+ StringBuilder sql = null;
int updated = 0;
int created = 0;
int updatedTotal = 0;
diff --git a/org.adempiere.base.process/src/org/compiere/process/AllocationReset.java b/org.adempiere.base.process/src/org/compiere/process/AllocationReset.java
index 02381cea71..41233d26c1 100644
--- a/org.adempiere.base.process/src/org/compiere/process/AllocationReset.java
+++ b/org.adempiere.base.process/src/org/compiere/process/AllocationReset.java
@@ -111,7 +111,8 @@ public class AllocationReset extends SvrProcess
if (delete(hdr))
count++;
m_trx.close();
- return "@Deleted@ #" + count;
+ StringBuilder msgreturn = new StringBuilder("@Deleted@ #").append(count);
+ return msgreturn.toString();
}
// Selection
@@ -171,7 +172,8 @@ public class AllocationReset extends SvrProcess
rs = null; pstmt = null;
}
m_trx.close();
- return "@Deleted@ #" + count;
+ StringBuilder msgreturn = new StringBuilder("@Deleted@ #").append(count);
+ return msgreturn.toString();
} // doIt
diff --git a/org.adempiere.base.process/src/org/compiere/process/AssetDelivery.java b/org.adempiere.base.process/src/org/compiere/process/AssetDelivery.java
index 3c6393d7ed..ec77dafab0 100644
--- a/org.adempiere.base.process/src/org/compiere/process/AssetDelivery.java
+++ b/org.adempiere.base.process/src/org/compiere/process/AssetDelivery.java
@@ -181,7 +181,8 @@ public class AssetDelivery extends SvrProcess
log.info("Count=" + count + ", Errors=" + errors + ", Reminder=" + reminders
+ " - " + (System.currentTimeMillis()-start) + "ms");
- return "@Sent@=" + count + " - @Errors@=" + errors;
+ StringBuilder msgreturn = new StringBuilder("@Sent@=").append(count).append(" - @Errors@=").append(errors);
+ return msgreturn.toString();
} // doIt
@@ -218,8 +219,10 @@ public class AssetDelivery extends SvrProcess
}
String msg = email.send();
new MUserMail(m_MailText, asset.getAD_User_ID(), email).saveEx();
- if (!EMail.SENT_OK.equals(msg))
- return "** Not delivered: " + user.getEMail() + " - " + msg;
+ if (!EMail.SENT_OK.equals(msg)){
+ StringBuilder msgreturn = new StringBuilder("** Not delivered: ").append(user.getEMail()).append(" - ").append(msg);
+ return msgreturn.toString();
+ }
//
return user.getEMail();
} // sendNoGuaranteeMail
@@ -285,8 +288,10 @@ public class AssetDelivery extends SvrProcess
}
String msg = email.send();
new MUserMail(m_MailText, asset.getAD_User_ID(), email).saveEx();
- if (!EMail.SENT_OK.equals(msg))
- return "** Not delivered: " + user.getEMail() + " - " + msg;
+ if (!EMail.SENT_OK.equals(msg)){
+ StringBuilder msgreturn = new StringBuilder("** Not delivered: ").append(user.getEMail()).append(" - ").append(msg);
+ return msgreturn.toString();
+ }
MAssetDelivery ad = asset.confirmDelivery(email, user.getAD_User_ID());
ad.saveEx();
@@ -294,7 +299,8 @@ public class AssetDelivery extends SvrProcess
//
log.fine((System.currentTimeMillis()-start) + " ms");
// success
- return user.getEMail() + " - " + asset.getProductVersionNo();
+ StringBuilder msgreturn = new StringBuilder().append(user.getEMail()).append(" - ").append(asset.getProductVersionNo());
+ return msgreturn.toString();
} // deliverIt
} // AssetDelivery
diff --git a/org.adempiere.base.process/src/org/compiere/process/BOMFlagValidate.java b/org.adempiere.base.process/src/org/compiere/process/BOMFlagValidate.java
index 9d2ab983e3..79ead59e46 100644
--- a/org.adempiere.base.process/src/org/compiere/process/BOMFlagValidate.java
+++ b/org.adempiere.base.process/src/org/compiere/process/BOMFlagValidate.java
@@ -63,7 +63,7 @@ public class BOMFlagValidate extends SvrProcess {
while (rs.next())
{
- StringBuilder msglog=new StringBuilder(rs.getString(1)).append(" BOM without BOM lines");
+ StringBuilder msglog=new StringBuilder().append(rs.getString(1)).append(" BOM without BOM lines");
addLog(0, null, null, msglog.toString(), MProduct.Table_ID, rs.getInt(2));
}
} catch (SQLException e) {
@@ -119,7 +119,7 @@ public class BOMFlagValidate extends SvrProcess {
while (rs.next())
{
- StringBuilder msglog = new StringBuilder(rs.getString(1)).append(" not BOM with BOM lines");
+ StringBuilder msglog = new StringBuilder().append(rs.getString(1)).append(" not BOM with BOM lines");
addLog(0, null, null, msglog.toString(), MProduct.Table_ID, rs.getInt(2));
}
} catch (SQLException e) {
diff --git a/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java b/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java
index f96fb2aeb5..4afa418c94 100644
--- a/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java
+++ b/org.adempiere.base.process/src/org/compiere/process/ChangeLogProcess.java
@@ -391,7 +391,7 @@ public class ChangeLogProcess extends SvrProcess
.append (" FROM ").append(tableName)
.append (" WHERE EntityType IN ('D','C'))");
int no = DB.executeUpdate(update.toString(), get_TrxName());
- StringBuilder msglog = new StringBuilder(table.getTableName()).append(" = ").append(no);
+ StringBuilder msglog = new StringBuilder().append(table.getTableName()).append(" = ").append(no);
log.config(msglog.toString());
updateNo += no;
@@ -406,8 +406,8 @@ public class ChangeLogProcess extends SvrProcess
DB.close(rs, pstmt);
rs = null; pstmt = null;
}
-
- return "@Reset@: " + resetNo + " - @Updated@: " + updateNo;
+ StringBuilder msgreturn = new StringBuilder("@Reset@: ").append(resetNo).append(" - @Updated@: ").append(updateNo);
+ return msgreturn.toString();
} // setCustomization
} // ChangeLogProcess
diff --git a/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java b/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java
index ab927ecfec..0823509493 100644
--- a/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java
+++ b/org.adempiere.base.process/src/org/compiere/process/ColumnEncryption.java
@@ -125,7 +125,8 @@ public class ColumnEncryption extends SvrProcess {
column.setIsEncrypted(false);
column.saveEx();
}
- return columnName + ": cannot be encrypted";
+ StringBuilder msgreturn = new StringBuilder().append(columnName).append(": cannot be encrypted");
+ return msgreturn.toString();
}
// Start
@@ -257,7 +258,8 @@ public class ColumnEncryption extends SvrProcess {
}
}
- return "Encryption=" + column.isEncrypted();
+ StringBuilder msgreturn = new StringBuilder("Encryption=").append(column.isEncrypted());
+ return msgreturn.toString();
} // doIt
/**
@@ -346,7 +348,7 @@ public class ColumnEncryption extends SvrProcess {
for (int i = 0; i < colLength; i++) {
str.append("1");
}
- str = new StringBuilder(SecureEngine.encrypt(str.toString()));
+ str = new StringBuilder().append(SecureEngine.encrypt(str.toString()));
return str.length();
} // encryptedColumnLength
@@ -372,14 +374,14 @@ public class ColumnEncryption extends SvrProcess {
selectSql.append(" WHERE AD_Column_ID=?");
// Alter SQL
- StringBuffer alterSql = new StringBuffer();
+ StringBuilder alterSql = new StringBuilder();
alterSql.append("ALTER TABLE ").append(tableName);
alterSql.append(" MODIFY ").append(columnName);
alterSql.append(" NVARCHAR2(");
alterSql.append(length).append(") ");
// Update SQL
- StringBuffer updateSql = new StringBuffer();
+ StringBuilder updateSql = new StringBuilder();
updateSql.append("UPDATE AD_Column");
updateSql.append(" SET FieldLength=").append(length);
updateSql.append(" WHERE AD_Column_ID=").append(columnID);
diff --git a/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java b/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java
index 424c3b8977..f9f1dd639e 100644
--- a/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java
+++ b/org.adempiere.base.process/src/org/compiere/process/CommissionCalc.java
@@ -89,7 +89,7 @@ public class CommissionCalc extends SvrProcess
comRun.setStartDate(p_StartDate);
// 01-Jan-2000 - 31-Jan-2001 - USD
SimpleDateFormat format = DisplayType.getDateFormat(DisplayType.Date);
- StringBuilder description = new StringBuilder(format.format(p_StartDate))
+ StringBuilder description = new StringBuilder().append(format.format(p_StartDate))
.append(" - ").append(format.format(m_EndDate))
.append(" - ").append(MCurrency.getISO_Code(getCtx(), m_com.getC_Currency_ID()));
comRun.setDescription(description.toString());
diff --git a/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java b/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java
index ee4b3485d7..6618d606ed 100644
--- a/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java
+++ b/org.adempiere.base.process/src/org/compiere/process/CopyOrder.java
@@ -112,7 +112,7 @@ public class CopyOrder extends SvrProcess
//
// Env.setSOTrx(getCtx(), newOrder.isSOTrx());
// return "@C_Order_ID@ " + newOrder.getDocumentNo();
- StringBuilder msgreturn = new StringBuilder(dt.getName()).append(": ").append(newOrder.getDocumentNo());
+ StringBuilder msgreturn = new StringBuilder().append(dt.getName()).append(": ").append(newOrder.getDocumentNo());
return msgreturn.toString();
} // doIt
diff --git a/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java b/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java
index 176056b6b8..b591e99288 100644
--- a/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java
+++ b/org.adempiere.base.process/src/org/compiere/process/DistributionRun.java
@@ -208,7 +208,8 @@ public class DistributionRun extends SvrProcess
createOrders();
}
- return "@Created@ #" + m_counter;
+ StringBuilder msgreturn = new StringBuilder("@Created@ #").append(m_counter);
+ return msgreturn.toString();
} // doIt
@@ -547,7 +548,7 @@ public class DistributionRun extends SvrProcess
product = MProduct.get (getCtx(), detail.getM_Product_ID());
if (p_IsTest)
{
- StringBuilder msglog = new StringBuilder(bp.getName()).append(" - ").append(product.getName());
+ StringBuilder msglog = new StringBuilder().append(bp.getName()).append(" - ").append(product.getName());
addLog(0,null, detail.getActualAllocation(), msglog.toString());
continue;
}
@@ -571,7 +572,7 @@ public class DistributionRun extends SvrProcess
log.log(Level.SEVERE, "OrderLine not saved");
return false;
}
- StringBuilder msglog = new StringBuilder(order.getDocumentNo()).append(": ").append(bp.getName()).append(" - ").append(product.getName());
+ StringBuilder msglog = new StringBuilder().append(order.getDocumentNo()).append(": ").append(bp.getName()).append(" - ").append(product.getName());
addLog(0,null, detail.getActualAllocation(), msglog.toString());
}
// finish order
@@ -997,7 +998,7 @@ public class DistributionRun extends SvrProcess
product = MProduct.get (getCtx(), detail.getM_Product_ID());
if (p_IsTest)
{
- StringBuilder msglog = new StringBuilder(bp.getName()).append(" - ").append(product.getName());
+ StringBuilder msglog = new StringBuilder().append(bp.getName()).append(" - ").append(product.getName());
addLog(0,null, detail.getActualAllocation(), msglog.toString());
continue;
}
@@ -1082,7 +1083,7 @@ public class DistributionRun extends SvrProcess
line.saveEx();
}
- StringBuilder msglog = new StringBuilder(order.getDocumentNo())
+ StringBuilder msglog = new StringBuilder().append(order.getDocumentNo())
.append(": ").append(bp.getName()).append(" - ").append(product.getName());
addLog(0,null, detail.getActualAllocation(), msglog.toString());
}
diff --git a/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java b/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java
index d801c80cc9..2ce7c03734 100644
--- a/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java
+++ b/org.adempiere.base.process/src/org/compiere/process/DunningPrint.java
@@ -167,7 +167,7 @@ public class DunningPrint extends SvrProcess
MDunningRunEntry.Table_ID,
entry.getC_DunningRunEntry_ID(),
entry.getC_BPartner_ID());
- StringBuilder msginfo = new StringBuilder(bp.getName()).append(", Amt=").append(entry.getAmt());
+ StringBuilder msginfo = new StringBuilder().append(bp.getName()).append(", Amt=").append(entry.getAmt());
info.setDescription(msginfo.toString());
ReportEngine re = null;
if (format != null)
@@ -198,7 +198,7 @@ public class DunningPrint extends SvrProcess
//
if (re != null) {
File attachment = re.getPDF(File.createTempFile("Dunning", ".pdf"));
- StringBuilder msglog = new StringBuilder(to.toString()).append(" - ").append(attachment);
+ StringBuilder msglog = new StringBuilder().append(to.toString()).append(" - ").append(attachment);
log.fine(msglog.toString());
email.addAttachment(attachment);
}
@@ -208,15 +208,15 @@ public class DunningPrint extends SvrProcess
um.saveEx();
if (msg.equals(EMail.SENT_OK))
{
- StringBuilder msglog = new StringBuilder(
- bp.getName()).append(" @RequestActionEMailOK@");
+ StringBuilder msglog = new StringBuilder()
+ .append(bp.getName()).append(" @RequestActionEMailOK@");
addLog (entry.get_ID(), null, null,msglog.toString());
count++;
printed = true;
}
else
{
- StringBuilder msglog = new StringBuilder(bp.getName()).append(" @RequestActionEMailError@ ").append(msg);
+ StringBuilder msglog = new StringBuilder().append(bp.getName()).append(" @RequestActionEMailError@ ").append(msg);
addLog (entry.get_ID(), null, null,msglog.toString() );
errors++;
}
@@ -244,7 +244,8 @@ public class DunningPrint extends SvrProcess
StringBuilder msgreturn = new StringBuilder("@Sent@=").append(count).append(" - @Errors@=").append(errors);
return msgreturn.toString();
}
- return "@Printed@=" + count;
+ StringBuilder msgreturn = new StringBuilder("@Printed@=").append(count);
+ return msgreturn.toString();
} // doIt
} // DunningPrint
diff --git a/org.adempiere.base.process/src/org/compiere/process/DunningRunCreate.java b/org.adempiere.base.process/src/org/compiere/process/DunningRunCreate.java
index 8635da3c13..2276400c76 100644
--- a/org.adempiere.base.process/src/org/compiere/process/DunningRunCreate.java
+++ b/org.adempiere.base.process/src/org/compiere/process/DunningRunCreate.java
@@ -123,7 +123,8 @@ public class DunningRunCreate extends SvrProcess
int entries = DB.getSQLValue(get_TrxName(), "SELECT COUNT(*) FROM C_DunningRunEntry WHERE C_DunningRun_ID=?", m_run.get_ID());
- return "@C_DunningRunEntry_ID@ #" + entries;
+ StringBuilder msgreturn = new StringBuilder("@C_DunningRunEntry_ID@ #").append(entries);
+ return msgreturn.toString();
} // doIt
diff --git a/org.adempiere.base.process/src/org/compiere/process/EMailTest.java b/org.adempiere.base.process/src/org/compiere/process/EMailTest.java
index ea2c6b6612..f62b97ad58 100644
--- a/org.adempiere.base.process/src/org/compiere/process/EMailTest.java
+++ b/org.adempiere.base.process/src/org/compiere/process/EMailTest.java
@@ -55,7 +55,7 @@ public class EMailTest extends SvrProcess
// Test Client Mail
String clientTest = client.testEMail();
- StringBuilder msglog = new StringBuilder(client.getName()).append(": ").append(clientTest);
+ StringBuilder msglog = new StringBuilder().append(client.getName()).append(": ").append(clientTest);
addLog(0, null, null, msglog.toString());
// Test Client DocumentDir
@@ -76,7 +76,7 @@ public class EMailTest extends SvrProcess
{
MStore store = wstores[i];
String test = store.testEMail();
- msglog = new StringBuilder(store.getName()).append(": ").append(test);
+ msglog = new StringBuilder().append(store.getName()).append(": ").append(test);
addLog(0, null, null, msglog.toString());
}
diff --git a/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java b/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java
index 491dbabf9b..00eb9b7034 100644
--- a/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java
+++ b/org.adempiere.base.process/src/org/compiere/process/ExpenseAPInvoice.java
@@ -137,7 +137,7 @@ public class ExpenseAPInvoice extends SvrProcess
}
invoice.setM_PriceList_ID(te.getM_PriceList_ID());
invoice.setSalesRep_ID(te.getDoc_User_ID());
- StringBuilder descr = new StringBuilder(Msg.translate(getCtx(), "S_TimeExpense_ID"))
+ StringBuilder descr = new StringBuilder().append(Msg.translate(getCtx(), "S_TimeExpense_ID"))
.append(": ").append(te.getDocumentNo()).append(" " )
.append(DisplayType.getDateFormat(DisplayType.Date).format(te.getDateReport()));
invoice.setDescription(descr.toString());
diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportDelete.java b/org.adempiere.base.process/src/org/compiere/process/ImportDelete.java
index 24e794990a..04ff010163 100644
--- a/org.adempiere.base.process/src/org/compiere/process/ImportDelete.java
+++ b/org.adempiere.base.process/src/org/compiere/process/ImportDelete.java
@@ -75,7 +75,7 @@ public class ImportDelete extends SvrProcess
// Delete
StringBuilder sql = new StringBuilder("DELETE FROM ").append(tableName).append(" WHERE AD_Client_ID=").append(getAD_Client_ID());
int no = DB.executeUpdate(sql.toString(), get_TrxName());
- StringBuilder msg = new StringBuilder(Msg.translate(getCtx(), tableName + "_ID")).append(" #").append(no);
+ StringBuilder msg = new StringBuilder().append(Msg.translate(getCtx(), tableName + "_ID")).append(" #").append(no);
return msg.toString();
} // ImportDelete
diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java b/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java
index 2c4a8e25cd..78c7535f43 100644
--- a/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java
+++ b/org.adempiere.base.process/src/org/compiere/process/ImportGLJournal.java
@@ -580,8 +580,8 @@ public class ImportGLJournal extends SvrProcess
commitEx();
// Count Errors
- int errors = DB.getSQLValue(get_TrxName(),
- "SELECT COUNT(*) FROM I_GLJournal WHERE I_IsImported NOT IN ('Y','N')" + clientCheck);
+ StringBuilder msgdb = new StringBuilder("SELECT COUNT(*) FROM I_GLJournal WHERE I_IsImported NOT IN ('Y','N')").append(clientCheck);
+ int errors = DB.getSQLValue(get_TrxName(), msgdb.toString());
if (errors != 0)
{
@@ -652,11 +652,11 @@ public class ImportGLJournal extends SvrProcess
batch.setDocumentNo (imp.getBatchDocumentNo());
batch.setC_DocType_ID(imp.getC_DocType_ID());
batch.setPostingType(imp.getPostingType());
- StringBuilder description = new StringBuilder(imp.getBatchDescription());
- if (description == null || description.length() == 0)
+ StringBuilder description;
+ if (imp.getBatchDescription() == null || imp.getBatchDescription().toString().length() == 0)
description = new StringBuilder("*Import-");
else
- description.append(" *Import-");
+ description = new StringBuilder(imp.getBatchDescription()).append(" *Import-");
description.append(new Timestamp(System.currentTimeMillis()));
batch.setDescription(description.toString());
if (!batch.save())
diff --git a/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java b/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java
index d14a362c84..2064eac3d9 100644
--- a/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java
+++ b/org.adempiere.base.process/src/org/compiere/process/ImportPayment.java
@@ -92,7 +92,7 @@ public class ImportPayment extends SvrProcess
StringBuilder sql = null;
int no = 0;
- String clientCheck = " AND AD_Client_ID=" + ba.getAD_Client_ID();
+ StringBuilder clientCheck = new StringBuilder(" AND AD_Client_ID=").append(ba.getAD_Client_ID());
// **** Prepare ****
diff --git a/org.adempiere.base.process/src/org/compiere/process/InvoiceGenerate.java b/org.adempiere.base.process/src/org/compiere/process/InvoiceGenerate.java
index ba12b6e370..4dc4dc6838 100644
--- a/org.adempiere.base.process/src/org/compiere/process/InvoiceGenerate.java
+++ b/org.adempiere.base.process/src/org/compiere/process/InvoiceGenerate.java
@@ -402,7 +402,7 @@ public class InvoiceGenerate extends SvrProcess
AD_Language = Language.getBaseAD_Language();
java.text.SimpleDateFormat format = DisplayType.getDateFormat
(DisplayType.Date, Language.getLanguage(AD_Language));
- StringBuilder reference = new StringBuilder(dt.getPrintName(m_bp.getAD_Language()))
+ StringBuilder reference = new StringBuilder().append(dt.getPrintName(m_bp.getAD_Language()))
.append(": ").append(ship.getDocumentNo())
.append(" - ").append(format.format(ship.getMovementDate()));
m_ship = ship;
diff --git a/org.adempiere.base.process/src/org/compiere/process/OrderRePrice.java b/org.adempiere.base.process/src/org/compiere/process/OrderRePrice.java
index 4ecab034c5..acb414438f 100644
--- a/org.adempiere.base.process/src/org/compiere/process/OrderRePrice.java
+++ b/org.adempiere.base.process/src/org/compiere/process/OrderRePrice.java
@@ -82,7 +82,7 @@ public class OrderRePrice extends SvrProcess
}
order = new MOrder (getCtx(), p_C_Order_ID, get_TrxName());
BigDecimal newPrice = order.getGrandTotal();
- retValue = new StringBuilder(order.getDocumentNo()).append(": ").append(oldPrice).append(" -> ").append(newPrice);
+ retValue = new StringBuilder().append(order.getDocumentNo()).append(": ").append(oldPrice).append(" -> ").append(newPrice);
}
if (p_C_Invoice_ID != 0)
{
diff --git a/org.adempiere.base.process/src/org/compiere/process/ProjectLinePricing.java b/org.adempiere.base.process/src/org/compiere/process/ProjectLinePricing.java
index 4b452e9495..965c36e2be 100644
--- a/org.adempiere.base.process/src/org/compiere/process/ProjectLinePricing.java
+++ b/org.adempiere.base.process/src/org/compiere/process/ProjectLinePricing.java
@@ -80,7 +80,7 @@ public class ProjectLinePricing extends SvrProcess
projectLine.setPlannedMarginAmt(pp.getPriceStd().subtract(pp.getPriceLimit()));
projectLine.saveEx();
//
- StringBuilder retValue = new StringBuilder(Msg.getElement(getCtx(), "PriceList")).append(pp.getPriceList()).append(" - ")
+ StringBuilder retValue = new StringBuilder().append(Msg.getElement(getCtx(), "PriceList")).append(pp.getPriceList()).append(" - ")
.append(Msg.getElement(getCtx(), "PriceStd")).append(pp.getPriceStd()).append(" - ")
.append(Msg.getElement(getCtx(), "PriceLimit")).append(pp.getPriceLimit());
return retValue.toString();
diff --git a/org.adempiere.base.process/src/org/compiere/process/RegisterSystem.java b/org.adempiere.base.process/src/org/compiere/process/RegisterSystem.java
index 0ee1f58acd..cdbc94f307 100644
--- a/org.adempiere.base.process/src/org/compiere/process/RegisterSystem.java
+++ b/org.adempiere.base.process/src/org/compiere/process/RegisterSystem.java
@@ -131,7 +131,7 @@ public class RegisterSystem extends SvrProcess
// Send it
URL url = new URL (urlString.toString());
- StringBuffer sb = new StringBuffer();
+ StringBuilder sb = new StringBuilder();
try
{
URLConnection uc = url.openConnection();
diff --git a/org.adempiere.base.process/src/org/compiere/process/RequisitionPOCreate.java b/org.adempiere.base.process/src/org/compiere/process/RequisitionPOCreate.java
index f1bc07b3b3..903db22504 100644
--- a/org.adempiere.base.process/src/org/compiere/process/RequisitionPOCreate.java
+++ b/org.adempiere.base.process/src/org/compiere/process/RequisitionPOCreate.java
@@ -243,7 +243,7 @@ public class RequisitionPOCreate extends SvrProcess
whereClause.append(")"); // End Requisition Header
//
// ORDER BY clause
- StringBuffer orderClause = new StringBuffer();
+ StringBuilder orderClause = new StringBuilder();
if (!p_ConsolidateDocument)
{
orderClause.append("M_Requisition_ID, ");
@@ -355,7 +355,7 @@ public class RequisitionPOCreate extends SvrProcess
// default po document type
if (!p_ConsolidateDocument)
{
- StringBuilder msgsd= new StringBuilder(Msg.getElement(getCtx(), "M_Requisition_ID"))
+ StringBuilder msgsd= new StringBuilder().append(Msg.getElement(getCtx(), "M_Requisition_ID"))
.append(": ").append(rLine.getParent().getDocumentNo());
m_order.setDescription(msgsd.toString());
}
diff --git a/org.adempiere.base.process/src/org/compiere/process/TableCreateColumns.java b/org.adempiere.base.process/src/org/compiere/process/TableCreateColumns.java
index a1a161ac56..267610dc35 100644
--- a/org.adempiere.base.process/src/org/compiere/process/TableCreateColumns.java
+++ b/org.adempiere.base.process/src/org/compiere/process/TableCreateColumns.java
@@ -369,7 +369,7 @@ public class TableCreateColumns extends SvrProcess
// Done
if (column.save ())
{
- StringBuilder msglog = new StringBuilder(table.getTableName()).append(".").append(column.getColumnName());
+ StringBuilder msglog = new StringBuilder().append(table.getTableName()).append(".").append(column.getColumnName());
addLog (0, null, null, msglog.toString());
m_count++;
}
diff --git a/org.adempiere.base.process/src/org/compiere/process/TreeMaintenance.java b/org.adempiere.base.process/src/org/compiere/process/TreeMaintenance.java
index 30559f6661..2fe0112ba9 100644
--- a/org.adempiere.base.process/src/org/compiere/process/TreeMaintenance.java
+++ b/org.adempiere.base.process/src/org/compiere/process/TreeMaintenance.java
@@ -112,7 +112,7 @@ public class TreeMaintenance extends SvrProcess
int deletes = DB.executeUpdate(sql.toString(), get_TrxName());
addLog(0,null, new BigDecimal(deletes), tree.getName()+ " Deleted");
if (!tree.isAllNodes()){
- StringBuilder msgreturn = new StringBuilder(tree.getName()).append(" OK");
+ StringBuilder msgreturn = new StringBuilder().append(tree.getName()).append(" OK");
return msgreturn.toString();
}
// Insert new
@@ -176,9 +176,9 @@ public class TreeMaintenance extends SvrProcess
{
pstmt = null;
}
- StringBuilder msglog = new StringBuilder(tree.getName()).append(" Inserted");
+ StringBuilder msglog = new StringBuilder().append(tree.getName()).append(" Inserted");
addLog(0,null, new BigDecimal(inserts), msglog.toString());
- StringBuilder msgreturn = new StringBuilder(tree.getName()).append((ok ? " OK" : " Error"));
+ StringBuilder msgreturn = new StringBuilder().append(tree.getName()).append((ok ? " OK" : " Error"));
return msgreturn.toString();
} // verifyTree
diff --git a/org.adempiere.base/.classpath b/org.adempiere.base/.classpath
index dcf6057cbc..7422ec0fd6 100644
--- a/org.adempiere.base/.classpath
+++ b/org.adempiere.base/.classpath
@@ -11,6 +11,7 @@
+
diff --git a/org.adempiere.base/META-INF/MANIFEST.MF b/org.adempiere.base/META-INF/MANIFEST.MF
index 0878765dfd..fabf71bca5 100644
--- a/org.adempiere.base/META-INF/MANIFEST.MF
+++ b/org.adempiere.base/META-INF/MANIFEST.MF
@@ -17,7 +17,8 @@ Bundle-ClassPath: base.jar,
jnlp.jar,
groovy-all-1.7.5.jar,
vt-dictionary-3.0.jar,
- vt-password-3.1.1.jar
+ vt-password-3.1.1.jar,
+ super-csv-2.0.0-beta-1.jar
Export-Package: bsh,
bsh.classpath,
bsh.collection,
@@ -237,7 +238,14 @@ Export-Package: bsh,
org.jfree.ui.about.resources,
org.jfree.ui.action,
org.jfree.ui.tabbedui,
- org.jfree.util
+ org.jfree.util,
+ org.supercsv.cellprocessor,
+ org.supercsv.cellprocessor.constraint,
+ org.supercsv.cellprocessor.ift,
+ org.supercsv.exception,
+ org.supercsv.io,
+ org.supercsv.prefs,
+ org.supercsv.util
Bundle-RequiredExecutionEnvironment: JavaSE-1.6
Import-Package: com.sun.mail.smtp;version="1.4.0",
javax.jms;version="1.1.0",
diff --git a/org.adempiere.base/build.properties b/org.adempiere.base/build.properties
index e463d35f12..b6a4bb78c8 100644
--- a/org.adempiere.base/build.properties
+++ b/org.adempiere.base/build.properties
@@ -15,7 +15,8 @@ bin.includes = META-INF/,\
OSGI-INF/,\
groovy-all-1.7.5.jar,\
vt-dictionary-3.0.jar,\
- vt-password-3.1.1.jar
+ vt-password-3.1.1.jar,\
+ super-csv-2.0.0-beta-1.jar
output.base.jar = build/
source.base.jar = src/
src.includes = schema/
diff --git a/org.adempiere.base/plugin.xml b/org.adempiere.base/plugin.xml
index 41d31e82ee..79aa4c8727 100644
--- a/org.adempiere.base/plugin.xml
+++ b/org.adempiere.base/plugin.xml
@@ -42,6 +42,15 @@
priority="0">
+
+
+
+
childs, boolean currentRowOnly, File file) {
+
+ ICsvMapWriter mapWriter = null;
+ try {
+ mapWriter = new CsvMapWriter(new FileWriter(file), CsvPreference.STANDARD_PREFERENCE);
+ GridTable gt = gridTab.getTableModel();
+ GridField[] gridFields = getFields(gridTab);
+ List headArray = new ArrayList();
+ List colsArray = new ArrayList();
+ List procArray = new ArrayList();
+ MTable table = MTable.get(Env.getCtx(), gridTab.getTableName());
+ for (int idxfld = 0; idxfld < gridFields.length; idxfld++) {
+ GridField field = gridFields[idxfld];
+ colsArray.add(field.getColumnName());
+ MColumn column = MColumn.get(Env.getCtx(), field.getAD_Column_ID());
+ String headName = resolveColumnName(table, column);
+ headArray.add(headName);
+ if (DisplayType.Date == column.getAD_Reference_ID()) {
+ procArray.add(new Optional(new FmtDate(DisplayType.DEFAULT_DATE_FORMAT)));
+ } else if (DisplayType.DateTime == column.getAD_Reference_ID()) {
+ procArray.add(new Optional(new FmtDate(DisplayType.DEFAULT_TIMESTAMP_FORMAT)));
+ } else if (DisplayType.Time == column.getAD_Reference_ID()) {
+ procArray.add(new Optional(new FmtDate("DisplayType.DEFAULT_TIME_FORMAT")));
+ } else if (DisplayType.Integer == column.getAD_Reference_ID() || DisplayType.isNumeric(column.getAD_Reference_ID())) {
+ procArray.add(new Optional(new FmtNumber(DisplayType.getNumberFormat(column.getAD_Reference_ID()))));
+ } else if (DisplayType.YesNo == column.getAD_Reference_ID()) {
+ procArray.add(new Optional(new FmtBool("Y", "N")));
+ } else { // lookups and text
+ procArray.add(null);
+ }
+ }
+ // the header elements are used to map the bean values to each column (names must match)
+ String[] header = headArray.toArray(new String[headArray.size()]);
+ CellProcessor[] processors = procArray.toArray(new CellProcessor[procArray.size()]);
+ // write the header
+ mapWriter.writeHeader(header);
+ // write the beans
+ int start = 0;
+ int end = 0;
+ if (currentRowOnly) {
+ start = gridTab.getCurrentRow();
+ end = start + 1;
+ } else {
+ end = gt.getRowCount();
+ }
+ for (int idxrow = start; idxrow < end; idxrow++) {
+ Map row = new HashMap();
+ for (int idxfld = 0; idxfld < header.length; idxfld++) {
+ GridField field = gridFields[idxfld];
+ MColumn column = MColumn.get(Env.getCtx(), field.getAD_Column_ID());
+ String headName = header[idxfld];
+ Object value = resolveValue(gridTab, table, column, idxrow, headName);
+ row.put(headName, value);
+ }
+ mapWriter.write(row, header, processors);
+ }
+ } catch (IOException e) {
+ e.printStackTrace();
+ } finally {
+ if (mapWriter != null) {
+ try {
+ mapWriter.close();
+ } catch (IOException e) {
+ e.printStackTrace();
+ }
+ }
+ }
+
+ }
+
+ private Object resolveValue(GridTab gridTab, MTable table, MColumn column, int i, String headName) {
+ Object value = null;
+ if (headName.contains("[") && headName.endsWith("]")) {
+ String foreignTable = column.getReferenceTableName();
+ Object idO = gridTab.getValue(i, column.getColumnName());
+ if (idO != null) {
+ if (foreignTable.equals("AD_Ref_List")) {
+ String ref = (String) idO;
+ value = MRefList.getListName(Env.getCtx(), column.getAD_Reference_Value_ID(), ref);
+ } else {
+ int id = (Integer) idO;
+ int start = headName.indexOf("[")+1;
+ int end = headName.length()-1;
+ String foreignColumn = headName.substring(start, end);
+ StringBuilder select = new StringBuilder("SELECT ")
+ .append(foreignColumn).append(" FROM ")
+ .append(foreignTable).append(" WHERE ")
+ .append(foreignTable).append("_ID=?");
+ value = DB.getSQLValueStringEx(null, select.toString(), id);
+ }
+ }
+ } else {
+ value = gridTab.getValue(i, headName);
+ }
+ return value;
+ }
+
+ private String resolveColumnName(MTable table, MColumn column) {
+ StringBuilder name = new StringBuilder(column.getColumnName());
+ if (DisplayType.isLookup(column.getAD_Reference_ID())) {
+ // resolve to identifier - search for value first, if not search for name - if not use the ID
+ String foreignTable = column.getReferenceTableName();
+ if ( ! ("AD_Language".equals(foreignTable) || "AD_EntityType".equals(foreignTable))) {
+ MTable fTable = MTable.get(Env.getCtx(), foreignTable);
+ // Hardcoded / do not check for Value on AD_Org and AD_User, must use name for these two tables
+ if (! ("AD_Org".equals(foreignTable) || "AD_User".equals(foreignTable))
+ && fTable.getColumn("Value") != null) {
+ name.append("[Value]"); // fully qualified
+ } else if (fTable.getColumn("Name") != null) {
+ name.append("[Name]");
+ }
+ }
+ }
+ return name.toString();
+ }
+
+ @Override
+ public String getFileExtension() {
+ return "csv";
+ }
+
+ @Override
+ public String getFileExtensionLabel() {
+ return Msg.getMsg(Env.getCtx(), "FileCSV");
+ }
+
+ @Override
+ public String getContentType() {
+ return "application/csv";
+ }
+
+ private GridField[] getFields (GridTab gridTab) {
+ GridTable tableModel = gridTab.getTableModel();
+ GridField[] tmpFields = tableModel.getFields();
+ MTabCustomization tabCustomization = MTabCustomization.get(Env.getCtx(), Env.getAD_User_ID(Env.getCtx()), gridTab.getAD_Tab_ID(), null);
+ GridField[] gridFields = null;
+ if (tabCustomization != null
+ && tabCustomization.getAD_Tab_Customization_ID() > 0
+ && !Util.isEmpty(tabCustomization.getCustom(), true))
+ {
+ String custom = tabCustomization.getCustom().trim();
+ String[] customComponent = custom.split(";");
+ String[] fieldIds = customComponent[0].split("[,]");
+ List fieldList = new ArrayList();
+ for(String fieldIdStr : fieldIds)
+ {
+ fieldIdStr = fieldIdStr.trim();
+ if (fieldIdStr.length() == 0) continue;
+ int AD_Field_ID = Integer.parseInt(fieldIdStr);
+ for(GridField gridField : tmpFields)
+ {
+ if (gridField.getAD_Field_ID() == AD_Field_ID)
+ {
+ if(gridField.isDisplayedGrid())
+ fieldList.add(gridField);
+
+ break;
+ }
+ }
+ }
+ gridFields = fieldList.toArray(new GridField[0]);
+ }
+ else
+ {
+ ArrayList gridFieldList = new ArrayList();
+
+ for(GridField field:tmpFields)
+ {
+ if(field.isDisplayedGrid())
+ gridFieldList.add(field);
+ }
+
+ Collections.sort(gridFieldList, new Comparator() {
+ @Override
+ public int compare(GridField o1, GridField o2) {
+ return o1.getSeqNoGrid()-o2.getSeqNoGrid();
+ }
+ });
+
+ gridFields = new GridField[gridFieldList.size()];
+ gridFieldList.toArray(gridFields);
+ }
+ return gridFields;
+ }
+
+ public boolean isColumnPrinted(GridTab tab, int col)
+ {
+ GridField field = tab.getField(col);
+ // field not displayed
+ if (!field.isDisplayed())
+ return false;
+ // field encrypted
+ if (field.isEncrypted())
+ return false;
+ // button without a reference value
+ if (field.getDisplayType() == DisplayType.Button && field.getAD_Reference_Value_ID() == 0)
+ return false;
+ return true;
+ }
+
+}
diff --git a/org.adempiere.base/src/org/adempiere/model/MRelationType.java b/org.adempiere.base/src/org/adempiere/model/MRelationType.java
index 3bd4cf3001..1428f42ae8 100644
--- a/org.adempiere.base/src/org/adempiere/model/MRelationType.java
+++ b/org.adempiere.base/src/org/adempiere/model/MRelationType.java
@@ -414,8 +414,8 @@ public class MRelationType extends X_AD_RelationType implements IZoomProvider {
private static void evaluateQuery(final MQuery query) {
- final String sqlCommon = " FROM " + query.getZoomTableName()
- + " WHERE " + query.getWhereClause(false);
+ StringBuilder sqlCommon = new StringBuilder(" FROM ").append(query.getZoomTableName())
+ .append(" WHERE ").append(query.getWhereClause(false));
final String sqlCount = "SELECT COUNT(*) " + sqlCommon;
@@ -424,10 +424,10 @@ public class MRelationType extends X_AD_RelationType implements IZoomProvider {
if (count > 0) {
- final String sqlFirstKey = "SELECT " + query.getZoomColumnName()
- + sqlCommon;
+ StringBuilder sqlFirstKey = new StringBuilder("SELECT ").append(query.getZoomColumnName())
+ .append(sqlCommon);
- final int firstKey = DB.getSQLValueEx(null, sqlFirstKey);
+ final int firstKey = DB.getSQLValueEx(null, sqlFirstKey.toString());
query.setZoomValue(firstKey);
}
}
@@ -462,7 +462,7 @@ public class MRelationType extends X_AD_RelationType implements IZoomProvider {
@Override
public String toString() {
- final StringBuffer sb = new StringBuffer("MRelationType[");
+ StringBuilder sb = new StringBuilder("MRelationType[");
//
sb.append(get_ID());
sb.append(", Name=").append(getName());
diff --git a/org.adempiere.base/src/org/adempiere/process/ResetLockedAccount.java b/org.adempiere.base/src/org/adempiere/process/ResetLockedAccount.java
index 13321d8dff..5da31e4698 100644
--- a/org.adempiere.base/src/org/adempiere/process/ResetLockedAccount.java
+++ b/org.adempiere.base/src/org/adempiere/process/ResetLockedAccount.java
@@ -55,7 +55,8 @@ public class ResetLockedAccount extends SvrProcess {
if (no < 0)
throw new AdempiereException("Could not unlock user account" + user.toString());
- return "@OK@ - The user '" + user.getName() + "' has been unlocked";
+ StringBuilder msgreturn = new StringBuilder("@OK@ - The user '").append(user.getName()).append("' has been unlocked");
+ return msgreturn.toString();
}
else
{
@@ -84,7 +85,8 @@ public class ResetLockedAccount extends SvrProcess {
int no = DB.executeUpdate(sql.toString(), p_AD_Client_ID, get_TrxName());
if (no < 0)
throw new AdempiereException("Could not unlock user account");
- return no + " locked account has been reset";
+ StringBuilder msgreturn = new StringBuilder().append(no).append(" locked account has been reset");
+ return msgreturn.toString();
}
}
}
\ No newline at end of file
diff --git a/org.adempiere.base/src/org/adempiere/process/UUIDGenerator.java b/org.adempiere.base/src/org/adempiere/process/UUIDGenerator.java
index 30a95be6ce..1931a52e08 100644
--- a/org.adempiere.base/src/org/adempiere/process/UUIDGenerator.java
+++ b/org.adempiere.base/src/org/adempiere/process/UUIDGenerator.java
@@ -127,7 +127,8 @@ public class UUIDGenerator extends SvrProcess {
} finally {
DB.close(rs,stmt);
}
- return count + " table altered";
+ StringBuilder msgreturn = new StringBuilder().append(count).append(" table altered");
+ return msgreturn.toString();
}
public static void updateUUID(MColumn column, String trxName) {
@@ -241,13 +242,13 @@ public class UUIDGenerator extends SvrProcess {
while (rs.next())
{
noColumns++;
- StringBuilder columnName = new StringBuilder(rs.getString ("COLUMN_NAME"));
+ StringBuilder columnName = new StringBuilder().append(rs.getString ("COLUMN_NAME"));
if (!columnName.toString().equalsIgnoreCase(column.getColumnName()))
continue;
// update existing column
boolean notNull = DatabaseMetaData.columnNoNulls == rs.getInt("NULLABLE");
- sql = new StringBuilder(column.getSQLModify(table, column.isMandatory() != notNull));
+ sql = new StringBuilder().append(column.getSQLModify(table, column.isMandatory() != notNull));
break;
}
}
@@ -282,10 +283,10 @@ public class UUIDGenerator extends SvrProcess {
if (no != -1)
{
- StringBuilder indexName = new StringBuilder(column.getColumnName()).append("_idx");
+ StringBuilder indexName = new StringBuilder().append(column.getColumnName()).append("_idx");
if (indexName.length() > 30) {
int i = indexName.length() - 31;
- indexName = new StringBuilder(column.getColumnName().substring(0, column.getColumnName().length() - i));
+ indexName = new StringBuilder().append(column.getColumnName().substring(0, column.getColumnName().length() - i));
indexName.append("_uu_idx");
}
StringBuilder indexSql = new StringBuilder("CREATE UNIQUE INDEX ").append(indexName).append(" ON ").append(tableName)
diff --git a/org.adempiere.base/src/org/adempiere/util/AbstractDocumentSearch.java b/org.adempiere.base/src/org/adempiere/util/AbstractDocumentSearch.java
index 3e203157a1..2c21c936bb 100644
--- a/org.adempiere.base/src/org/adempiere/util/AbstractDocumentSearch.java
+++ b/org.adempiere.base/src/org/adempiere/util/AbstractDocumentSearch.java
@@ -176,7 +176,7 @@ public abstract class AbstractDocumentSearch {
}
// SearchDefinition with a special query
} else if (msd.getSearchType().equals(MSearchDefinition.SEARCHTYPE_QUERY)) {
- sqlSO = new StringBuilder(msd.getQuery());
+ sqlSO = new StringBuilder().append(msd.getQuery());
pstmtSO = DB.prepareStatement(sqlSO.toString(), null);
// count '?' in statement
int count = 1;
diff --git a/org.adempiere.base/src/org/adempiere/util/ModelClassGenerator.java b/org.adempiere.base/src/org/adempiere/util/ModelClassGenerator.java
index 728f1c3585..895fd5a055 100644
--- a/org.adempiere.base/src/org/adempiere/util/ModelClassGenerator.java
+++ b/org.adempiere.base/src/org/adempiere/util/ModelClassGenerator.java
@@ -135,22 +135,22 @@ public class ModelClassGenerator
if (tableName == null)
throw new RuntimeException ("TableName not found for ID=" + AD_Table_ID);
//
- String accessLevelInfo = accessLevel + " ";
+ StringBuilder accessLevelInfo = new StringBuilder().append(accessLevel).append(" ");
if (accessLevel >= 4 )
- accessLevelInfo += "- System ";
+ accessLevelInfo.append("- System ");
if (accessLevel == 2 || accessLevel == 3 || accessLevel == 6 || accessLevel == 7)
- accessLevelInfo += "- Client ";
+ accessLevelInfo.append("- Client ");
if (accessLevel == 1 || accessLevel == 3 || accessLevel == 5 || accessLevel == 7)
- accessLevelInfo += "- Org ";
+ accessLevelInfo.append("- Org ");
//
- String keyColumn = tableName + "_ID";
- String className = "X_" + tableName;
+ StringBuilder keyColumn = new StringBuilder().append(tableName).append("_ID");
+ StringBuilder className = new StringBuilder("X_").append(tableName);
//
StringBuilder start = new StringBuilder()
.append (ModelInterfaceGenerator.COPY)
.append ("/** Generated Model - DO NOT CHANGE */").append(NL)
- .append("package " + packageName + ";").append(NL)
+ .append("package ").append(packageName).append(";").append(NL)
.append(NL)
;
@@ -248,12 +248,12 @@ public class ModelClassGenerator
.append(" }").append(NL)
;
- StringBuilder end = new StringBuilder ("}");
+ String end = "}";
//
sb.insert(0, start);
sb.append(end);
- return className;
+ return className.toString();
}
/**
@@ -398,10 +398,10 @@ public class ModelClassGenerator
if (fieldName != null && referenceClassName != null)
{
sb.append(NL)
- .append("\tpublic "+referenceClassName+" get").append(fieldName).append("() throws RuntimeException").append(NL)
+ .append("\tpublic ").append(referenceClassName).append(" get").append(fieldName).append("() throws RuntimeException").append(NL)
.append(" {").append(NL)
- .append("\t\treturn ("+referenceClassName+")MTable.get(getCtx(), "+referenceClassName+".Table_Name)").append(NL)
- .append("\t\t\t.getPO(get"+columnName+"(), get_TrxName());")
+ .append("\t\treturn (").append(referenceClassName).append(")MTable.get(getCtx(), ").append(referenceClassName).append(".Table_Name)").append(NL)
+ .append("\t\t\t.getPO(get").append(columnName).append("(), get_TrxName());")
/**/
.append("\t}").append(NL)
;
@@ -701,9 +701,9 @@ public class ModelClassGenerator
*/
private StringBuilder createKeyNamePair (String columnName, int displayType)
{
- String method = "get" + columnName + "()";
+ StringBuilder method = new StringBuilder("get").append(columnName).append("()");
if (displayType != DisplayType.String)
- method = "String.valueOf(" + method + ")";
+ method = new StringBuilder("String.valueOf(").append(method).append(")");
StringBuilder sb = new StringBuilder(NL)
.append(" /** Get Record ID/ColumnName").append(NL)
@@ -757,7 +757,8 @@ public class ModelClassGenerator
fw.close ();
float size = out.length();
size /= 1024;
- System.out.println(out.getAbsolutePath() + " - " + size + " kB");
+ StringBuilder msgout = new StringBuilder().append(out.getAbsolutePath()).append(" - ").append(size).append(" kB");
+ System.out.println(msgout.toString());
}
catch (Exception ex)
{
@@ -837,9 +838,9 @@ public class ModelClassGenerator
if (tableName == null || tableName.trim().length() == 0)
throw new IllegalArgumentException("Must specify table name");
- String tableLike = tableName.trim();
- if (!tableLike.startsWith("'") || !tableLike.endsWith("'"))
- tableLike = "'" + tableLike + "'";
+ StringBuilder tableLike = new StringBuilder().append(tableName.trim());
+ if (!tableLike.toString().startsWith("'") || !tableLike.toString().endsWith("'"))
+ tableLike = new StringBuilder("'").append(tableLike).append("'");
StringBuilder entityTypeFilter = new StringBuilder();
if (entityType != null && entityType.trim().length() > 0)
@@ -848,9 +849,9 @@ public class ModelClassGenerator
StringTokenizer tokenizer = new StringTokenizer(entityType, ",");
int i = 0;
while(tokenizer.hasMoreTokens()) {
- String token = tokenizer.nextToken().trim();
- if (!token.startsWith("'") || !token.endsWith("'"))
- token = "'" + token + "'";
+ StringBuilder token = new StringBuilder().append(tokenizer.nextToken().trim());
+ if (!token.toString().startsWith("'") || !token.toString().endsWith("'"))
+ token = new StringBuilder("'").append(token).append("'");
if (i > 0)
entityTypeFilter.append(",");
entityTypeFilter.append(token);
@@ -863,18 +864,18 @@ public class ModelClassGenerator
entityTypeFilter.append("EntityType IN ('U','A')");
}
- String directory = sourceFolder.trim();
+ StringBuilder directory = new StringBuilder().append(sourceFolder.trim());
String packagePath = packageName.replace(".", File.separator);
- if (!(directory.endsWith("/") || directory.endsWith("\\")))
+ if (!(directory.toString().endsWith("/") || directory.toString().endsWith("\\")))
{
- directory = directory + File.separator;
+ directory.append(File.separator);
}
if (File.separator.equals("/"))
- directory = directory.replaceAll("[\\\\]", File.separator);
+ directory = new StringBuilder(directory.toString().replaceAll("[\\\\]", File.separator));
else
- directory = directory.replaceAll("[/]", File.separator);
- directory = directory + packagePath;
- file = new File(directory);
+ directory = new StringBuilder(directory.toString().replaceAll("[/]", File.separator));
+ directory.append(packagePath);
+ file = new File(directory.toString());
if (!file.exists())
file.mkdirs();
@@ -899,7 +900,7 @@ public class ModelClassGenerator
rs = pstmt.executeQuery();
while (rs.next())
{
- new ModelClassGenerator(rs.getInt(1), directory, packageName);
+ new ModelClassGenerator(rs.getInt(1), directory.toString(), packageName);
count++;
}
}
diff --git a/org.adempiere.base/src/org/adempiere/util/ModelInterfaceGenerator.java b/org.adempiere.base/src/org/adempiere/util/ModelInterfaceGenerator.java
index 00732354c8..ad079ddcb1 100644
--- a/org.adempiere.base/src/org/adempiere/util/ModelInterfaceGenerator.java
+++ b/org.adempiere.base/src/org/adempiere/util/ModelInterfaceGenerator.java
@@ -171,7 +171,7 @@ public class ModelInterfaceGenerator
accessLevelInfo.append("- Org ");
//
- String className = "I_" + tableName;
+ StringBuilder className = new StringBuilder("I_").append(tableName);
//
StringBuilder start = new StringBuilder()
.append (COPY)
@@ -216,12 +216,12 @@ public class ModelInterfaceGenerator
//.append(" POInfo initPO (Properties ctx);") // INFO - Should this be here???
;
- StringBuilder end = new StringBuilder("}");
+ String end = "}";
//
sb.insert(0, start);
sb.append(end);
- return className;
+ return className.toString();
}
/**
@@ -418,7 +418,8 @@ public class ModelInterfaceGenerator
fw.close();
float size = out.length();
size /= 1024;
- System.out.println(out.getAbsolutePath() + " - " + size + " kB");
+ StringBuilder msgout = new StringBuilder().append(out.getAbsolutePath()).append(" - ").append(size).append(" kB");
+ System.out.println(msgout.toString());
} catch (Exception ex) {
log.log(Level.SEVERE, fileName, ex);
throw new RuntimeException(ex);
@@ -634,13 +635,13 @@ public class ModelInterfaceGenerator
public static String getReferenceClassName(int AD_Table_ID, String columnName, int displayType, int AD_Reference_ID)
{
- StringBuilder referenceClassName = null;
+ String referenceClassName = null;
//
if (displayType == DisplayType.TableDir
|| (displayType == DisplayType.Search && AD_Reference_ID == 0))
{
String refTableName = MQuery.getZoomTableName(columnName); // teo_sarca: BF [ 1817768 ] Isolate hardcoded table direct columns
- referenceClassName = new StringBuilder("I_").append(refTableName);
+ referenceClassName = "I_"+refTableName;
MTable table = MTable.get(Env.getCtx(), refTableName);
if (table != null)
@@ -649,7 +650,7 @@ public class ModelInterfaceGenerator
String modelpackage = getModelPackage(entityType) ;
if (modelpackage != null)
{
- referenceClassName = new StringBuilder(modelpackage).append(".").append(referenceClassName);
+ referenceClassName = modelpackage+"."+referenceClassName;
}
if (!isGenerateModelGetterForEntity(AD_Table_ID, entityType))
{
@@ -691,11 +692,11 @@ public class ModelInterfaceGenerator
final int refDisplayType = rs.getInt(3);
if (refDisplayType == DisplayType.ID)
{
- referenceClassName = new StringBuilder("I_").append(refTableName);
+ referenceClassName = "I_"+refTableName;
String modelpackage = getModelPackage(entityType);
if (modelpackage != null)
{
- referenceClassName = new StringBuilder(modelpackage).append(".").append(referenceClassName);
+ referenceClassName = modelpackage+"."+referenceClassName;
}
if (!isGenerateModelGetterForEntity(AD_Table_ID, entityType))
{
@@ -716,19 +717,19 @@ public class ModelInterfaceGenerator
}
else if (displayType == DisplayType.Location)
{
- referenceClassName = new StringBuilder("I_C_Location");
+ referenceClassName = "I_C_Location";
}
else if (displayType == DisplayType.Locator)
{
- referenceClassName = new StringBuilder("I_M_Locator");
+ referenceClassName = "I_M_Locator";
}
else if (displayType == DisplayType.Account)
{
- referenceClassName = new StringBuilder("I_C_ValidCombination");
+ referenceClassName = "I_C_ValidCombination";
}
else if (displayType == DisplayType.PAttribute)
{
- referenceClassName = new StringBuilder("I_M_AttributeSetInstance");
+ referenceClassName = "I_M_AttributeSetInstance";
}
else
{
@@ -736,7 +737,7 @@ public class ModelInterfaceGenerator
//sb.append("\tpublic I_"+columnName+" getI_").append(columnName).append("(){return null; };");
}
//
- return referenceClassName.toString();
+ return referenceClassName;
}
@@ -797,7 +798,7 @@ public class ModelInterfaceGenerator
entityTypeFilter.append("EntityType IN ('U','A')");
}
- StringBuilder directory = new StringBuilder(sourceFolder.trim());
+ StringBuilder directory = new StringBuilder().append(sourceFolder.trim());
String packagePath = packageName.replace(".", File.separator);
if (!(directory.toString().endsWith("/") || directory.toString().endsWith("\\")))
{
diff --git a/org.adempiere.base/src/org/compiere/acct/Doc.java b/org.adempiere.base/src/org/compiere/acct/Doc.java
index 6516c0ac10..3c741700f2 100644
--- a/org.adempiere.base/src/org/compiere/acct/Doc.java
+++ b/org.adempiere.base/src/org/compiere/acct/Doc.java
@@ -426,22 +426,24 @@ public abstract class Doc
|| m_DocStatus.equals(DocumentEngine.STATUS_Voided)
|| m_DocStatus.equals(DocumentEngine.STATUS_Reversed))
;
- else
- return "Invalid DocStatus='" + m_DocStatus + "' for DocumentNo=" + getDocumentNo();
+ else{
+ StringBuilder msgreturn = new StringBuilder("Invalid DocStatus='").append(m_DocStatus).append("' for DocumentNo=").append(getDocumentNo());
+ return msgreturn.toString();
+ }
//
if (p_po.getAD_Client_ID() != m_as.getAD_Client_ID())
{
- String error = "AD_Client_ID Conflict - Document=" + p_po.getAD_Client_ID()
- + ", AcctSchema=" + m_as.getAD_Client_ID();
- log.severe(error);
- return error;
+ StringBuilder error = new StringBuilder("AD_Client_ID Conflict - Document=").append(p_po.getAD_Client_ID())
+ .append(", AcctSchema=").append(m_as.getAD_Client_ID());
+ log.severe(error.toString());
+ return error.toString();
}
// Lock Record ----
String trxName = null; // outside trx if on server
if (! m_manageLocalTrx)
trxName = getTrxName(); // on trx if it's in client
- StringBuffer sql = new StringBuffer ("UPDATE ");
+ StringBuilder sql = new StringBuilder ("UPDATE ");
sql.append(get_TableName()).append( " SET Processing='Y' WHERE ")
.append(get_TableName()).append("_ID=").append(get_ID())
.append(" AND Processed='Y' AND IsActive='Y'");
@@ -565,7 +567,7 @@ public abstract class Doc
// Reference
note.setReference(toString()); // Document
// Text
- StringBuffer Text = new StringBuffer (Msg.getMsg(Env.getCtx(), AD_MessageValue));
+ StringBuilder Text = new StringBuilder (Msg.getMsg(Env.getCtx(), AD_MessageValue));
if (p_Error != null)
Text.append(" (").append(p_Error).append(")");
String cn = getClass().getName();
@@ -603,7 +605,7 @@ public abstract class Doc
*/
protected int deleteAcct()
{
- StringBuffer sql = new StringBuffer ("DELETE Fact_Acct WHERE AD_Table_ID=")
+ StringBuilder sql = new StringBuilder ("DELETE Fact_Acct WHERE AD_Table_ID=")
.append(get_Table_ID())
.append(" AND Record_ID=").append(p_po.get_ID())
.append(" AND C_AcctSchema_ID=").append(m_as.getC_AcctSchema_ID());
@@ -776,7 +778,7 @@ public abstract class Doc
String trxName = null; // outside trx if on server
if (! m_manageLocalTrx)
trxName = getTrxName(); // on trx if it's in client
- StringBuffer sql = new StringBuffer ("UPDATE ");
+ StringBuilder sql = new StringBuilder ("UPDATE ");
sql.append(get_TableName()).append( " SET Processing='N' WHERE ")
.append(get_TableName()).append("_ID=").append(p_po.get_ID());
DB.executeUpdate(sql.toString(), trxName);
diff --git a/org.adempiere.base/src/org/compiere/acct/DocLine_Allocation.java b/org.adempiere.base/src/org/compiere/acct/DocLine_Allocation.java
index a70746a68e..e511d6fc0e 100644
--- a/org.adempiere.base/src/org/compiere/acct/DocLine_Allocation.java
+++ b/org.adempiere.base/src/org/compiere/acct/DocLine_Allocation.java
@@ -84,7 +84,7 @@ public class DocLine_Allocation extends DocLine
*/
public String toString ()
{
- StringBuffer sb = new StringBuffer ("DocLine_Allocation[");
+ StringBuilder sb = new StringBuilder ("DocLine_Allocation[");
sb.append(get_ID())
.append(",Amt=").append(getAmtSource())
.append(",Discount=").append(getDiscountAmt())
diff --git a/org.adempiere.base/src/org/compiere/acct/DocManager.java b/org.adempiere.base/src/org/compiere/acct/DocManager.java
index 97b83de957..b89fae8fc3 100644
--- a/org.adempiere.base/src/org/compiere/acct/DocManager.java
+++ b/org.adempiere.base/src/org/compiere/acct/DocManager.java
@@ -227,10 +227,11 @@ public class DocManager {
if (tableName == null)
{
s_log.severe("Table not a financial document. AD_Table_ID=" + AD_Table_ID);
- return "Table not a financial document. AD_Table_ID="+AD_Table_ID;
+ StringBuilder msgreturn = new StringBuilder("Table not a financial document. AD_Table_ID=").append(AD_Table_ID);
+ return msgreturn.toString();
}
- StringBuffer sql = new StringBuffer("SELECT * FROM ")
+ StringBuilder sql = new StringBuilder("SELECT * FROM ")
.append(tableName)
.append(" WHERE ").append(tableName).append("_ID=? AND Processed='Y'");
PreparedStatement pstmt = null;
@@ -366,7 +367,7 @@ public class DocManager {
private final static boolean save (String trxName, int AD_Table_ID, int Record_ID, String status)
{
MTable table = MTable.get(Env.getCtx(), AD_Table_ID);
- StringBuffer sql = new StringBuffer("UPDATE ");
+ StringBuilder sql = new StringBuilder("UPDATE ");
sql.append(table.getTableName()).append(" SET Posted='").append(status)
.append("',Processing='N' ")
.append("WHERE ")
diff --git a/org.adempiere.base/src/org/compiere/acct/DocTax.java b/org.adempiere.base/src/org/compiere/acct/DocTax.java
index 9dbe5f21d5..13a4f9309c 100644
--- a/org.adempiere.base/src/org/compiere/acct/DocTax.java
+++ b/org.adempiere.base/src/org/compiere/acct/DocTax.java
@@ -170,7 +170,8 @@ public final class DocTax
*/
public String getDescription()
{
- return m_name + " " + m_taxBaseAmt.toString();
+ StringBuilder msgreturn = new StringBuilder().append(m_name).append(" ").append(m_taxBaseAmt.toString());
+ return msgreturn.toString();
} // getDescription
/**
@@ -236,7 +237,7 @@ public final class DocTax
*/
public String toString()
{
- StringBuffer sb = new StringBuffer("Tax=(");
+ StringBuilder sb = new StringBuilder("Tax=(");
sb.append(m_name);
sb.append(" Amt=").append(m_amount);
sb.append(")");
diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java b/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java
index d0e8a10dd5..ff23a40b62 100644
--- a/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java
+++ b/org.adempiere.base/src/org/compiere/acct/Doc_AllocationHdr.java
@@ -747,9 +747,9 @@ public class Doc_AllocationHdr extends Doc
if (invoiceSource == null || invoiceAccounted == null)
return "Gain/Loss - Invoice not posted yet";
//
- String description = "Invoice=(" + invoice.getC_Currency_ID() + ")" + invoiceSource + "/" + invoiceAccounted
- + " - Allocation=(" + getC_Currency_ID() + ")" + allocationSource + "/" + allocationAccounted;
- log.fine(description);
+ StringBuilder description = new StringBuilder("Invoice=(").append(invoice.getC_Currency_ID()).append(")").append(invoiceSource).append("/").append(invoiceAccounted)
+ .append(" - Allocation=(").append(getC_Currency_ID()).append(")").append(allocationSource).append("/").append(allocationAccounted);
+ log.fine(description.toString());
// Allocation not Invoice Currency
if (getC_Currency_ID() != invoice.getC_Currency_ID())
{
@@ -759,10 +759,10 @@ public class Doc_AllocationHdr extends Doc
invoice.getC_ConversionType_ID(), invoice.getAD_Client_ID(), invoice.getAD_Org_ID());
if (allocationSourceNew == null)
return "Gain/Loss - No Conversion from Allocation->Invoice";
- String d2 = "Allocation=(" + getC_Currency_ID() + ")" + allocationSource
- + "->(" + invoice.getC_Currency_ID() + ")" + allocationSourceNew;
- log.fine(d2);
- description += " - " + d2;
+ StringBuilder d2 = new StringBuilder("Allocation=(").append(getC_Currency_ID()).append(")").append(allocationSource)
+ .append("->(").append(invoice.getC_Currency_ID()).append(")").append(allocationSourceNew);
+ log.fine(d2.toString());
+ description.append(" - ").append(d2);
allocationSource = allocationSourceNew;
}
@@ -771,9 +771,9 @@ public class Doc_AllocationHdr extends Doc
if (allocationSource.compareTo(invoiceSource) == 0)
{
acctDifference = invoiceAccounted.subtract(allocationAccounted); // gain is negative
- String d2 = "(full) = " + acctDifference;
- log.fine(d2);
- description += " - " + d2;
+ StringBuilder d2 = new StringBuilder("(full) = ").append(acctDifference);
+ log.fine(d2.toString());
+ description.append(" - ").append(d2);
}
else // partial or MC
{
@@ -790,9 +790,9 @@ public class Doc_AllocationHdr extends Doc
int precision = as.getStdPrecision();
if (acctDifference.scale() > precision)
acctDifference = acctDifference.setScale(precision, BigDecimal.ROUND_HALF_UP);
- String d2 = "(partial) = " + acctDifference + " - Multiplier=" + multiplier;
- log.fine(d2);
- description += " - " + d2;
+ StringBuilder d2 = new StringBuilder("(partial) = ").append(acctDifference).append(" - Multiplier=").append(multiplier);
+ log.fine(d2.toString());
+ description.append(" - ").append(d2);
}
if (acctDifference.signum() == 0)
@@ -808,10 +808,10 @@ public class Doc_AllocationHdr extends Doc
{
FactLine fl = fact.createLine (line, loss, gain,
as.getC_Currency_ID(), acctDifference);
- fl.setDescription(description);
+ fl.setDescription(description.toString());
fact.createLine (line, acct,
as.getC_Currency_ID(), acctDifference.negate());
- fl.setDescription(description);
+ fl.setDescription(description.toString());
}
else
{
diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java b/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java
index 270bd8eeac..c79c86ecf0 100644
--- a/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java
+++ b/org.adempiere.base/src/org/compiere/acct/Doc_Invoice.java
@@ -245,7 +245,7 @@ public class Doc_Invoice extends Doc
public BigDecimal getBalance()
{
BigDecimal retValue = Env.ZERO;
- StringBuffer sb = new StringBuffer (" [");
+ StringBuilder sb = new StringBuilder (" [");
// Total
retValue = retValue.add(getAmount(Doc.AMTTYPE_Gross));
sb.append(getAmount(Doc.AMTTYPE_Gross));
@@ -900,19 +900,19 @@ public class Doc_Invoice extends Doc
}
else
{
- sql.append(" AND il.C_InvoiceLine_ID = (SELECT MIN(il1.C_InvoiceLine_ID) "
- + "FROM C_Invoice i1, C_InvoiceLine il1 "
- + "WHERE i1.C_Invoice_ID=il1.C_Invoice_ID"
- + " AND po.M_Product_ID=il1.M_Product_ID AND po.C_BPartner_ID=i1.C_BPartner_ID")
+ sql.append(" AND il.C_InvoiceLine_ID = (SELECT MIN(il1.C_InvoiceLine_ID) ")
+ .append("FROM C_Invoice i1, C_InvoiceLine il1 ")
+ .append("WHERE i1.C_Invoice_ID=il1.C_Invoice_ID")
+ .append(" AND po.M_Product_ID=il1.M_Product_ID AND po.C_BPartner_ID=i1.C_BPartner_ID")
.append(" AND i1.C_Invoice_ID=").append(get_ID()).append(") ");
}
sql.append(" AND i.C_Invoice_ID=").append(get_ID()).append(") ")
// update
- .append("WHERE EXISTS (SELECT * "
- + "FROM C_Invoice i, C_InvoiceLine il "
- + "WHERE i.C_Invoice_ID=il.C_Invoice_ID"
- + " AND po.M_Product_ID=il.M_Product_ID AND po.C_BPartner_ID=i.C_BPartner_ID"
- + " AND i.C_Invoice_ID=").append(get_ID()).append(")");
+ .append("WHERE EXISTS (SELECT * ")
+ .append("FROM C_Invoice i, C_InvoiceLine il ")
+ .append("WHERE i.C_Invoice_ID=il.C_Invoice_ID")
+ .append(" AND po.M_Product_ID=il.M_Product_ID AND po.C_BPartner_ID=i.C_BPartner_ID")
+ .append(" AND i.C_Invoice_ID=").append(get_ID()).append(")");
int no = DB.executeUpdate(sql.toString(), getTrxName());
log.fine("Updated=" + no);
} // updateProductPO
diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_Order.java b/org.adempiere.base/src/org/compiere/acct/Doc_Order.java
index 919324a1bf..d6e9269101 100644
--- a/org.adempiere.base/src/org/compiere/acct/Doc_Order.java
+++ b/org.adempiere.base/src/org/compiere/acct/Doc_Order.java
@@ -282,7 +282,7 @@ public class Doc_Order extends Doc
public BigDecimal getBalance()
{
BigDecimal retValue = Env.ZERO;
- StringBuffer sb = new StringBuffer (" [");
+ StringBuilder sb = new StringBuilder (" [");
// Total
retValue = retValue.add(getAmount(Doc.AMTTYPE_Gross));
sb.append(getAmount(Doc.AMTTYPE_Gross));
@@ -461,7 +461,7 @@ public class Doc_Order extends Doc
if (ci.getC_AcctSchema1_ID() != as.getC_AcctSchema_ID())
return;
- StringBuffer sql = new StringBuffer (
+ StringBuilder sql = new StringBuilder (
"UPDATE M_Product_PO po ")
.append("SET PriceLastPO = (SELECT currencyConvert(ol.PriceActual,ol.C_Currency_ID,po.C_Currency_ID,o.DateOrdered,o.C_ConversionType_ID,o.AD_Client_ID,o.AD_Org_ID) ")
.append("FROM C_Order o, C_OrderLine ol ")
@@ -479,11 +479,11 @@ public class Doc_Order extends Doc
.append(" AND po.M_Product_ID=ol1.M_Product_ID AND po.C_BPartner_ID=o1.C_BPartner_ID")
.append(" AND o1.C_Order_ID=").append(get_ID()).append(") ");
sql.append(" AND o.C_Order_ID=").append(get_ID()).append(") ")
- .append("WHERE EXISTS (SELECT * "
- + "FROM C_Order o, C_OrderLine ol "
- + "WHERE o.C_Order_ID=ol.C_Order_ID"
- + " AND po.M_Product_ID=ol.M_Product_ID AND po.C_BPartner_ID=o.C_BPartner_ID"
- + " AND o.C_Order_ID=").append(get_ID()).append(")");
+ .append("WHERE EXISTS (SELECT * ")
+ .append("FROM C_Order o, C_OrderLine ol ")
+ .append("WHERE o.C_Order_ID=ol.C_Order_ID")
+ .append(" AND po.M_Product_ID=ol.M_Product_ID AND po.C_BPartner_ID=o.C_BPartner_ID")
+ .append(" AND o.C_Order_ID=").append(get_ID()).append(")");
int no = DB.executeUpdate(sql.toString(), getTrxName());
log.fine("Updated=" + no);
} // updateProductPO
diff --git a/org.adempiere.base/src/org/compiere/acct/Doc_ProjectIssue.java b/org.adempiere.base/src/org/compiere/acct/Doc_ProjectIssue.java
index 21abf38069..11ce108a20 100644
--- a/org.adempiere.base/src/org/compiere/acct/Doc_ProjectIssue.java
+++ b/org.adempiere.base/src/org/compiere/acct/Doc_ProjectIssue.java
@@ -86,9 +86,12 @@ public class Doc_ProjectIssue extends Doc
public String getDocumentNo ()
{
MProject p = m_issue.getParent();
- if (p != null)
- return p.getValue() + " #" + m_issue.getLine();
- return "(" + m_issue.get_ID() + ")";
+ if (p != null){
+ StringBuilder msgreturn = new StringBuilder().append(p.getValue()).append(" #").append(m_issue.getLine());
+ return msgreturn.toString();
+ }
+ StringBuilder msgreturn = new StringBuilder("(").append(m_issue.get_ID()).append(")");
+ return msgreturn.toString();
} // getDocumentNo
/**
diff --git a/org.adempiere.base/src/org/compiere/acct/FactLine.java b/org.adempiere.base/src/org/compiere/acct/FactLine.java
index bdaac5aebc..276ed52563 100644
--- a/org.adempiere.base/src/org/compiere/acct/FactLine.java
+++ b/org.adempiere.base/src/org/compiere/acct/FactLine.java
@@ -351,7 +351,7 @@ public final class FactLine extends X_Fact_Acct
if (m_docLine != null)
setC_Tax_ID (m_docLine.getC_Tax_ID());
// Description
- StringBuffer description = new StringBuffer(m_doc.getDocumentNo());
+ StringBuilder description = new StringBuilder().append(m_doc.getDocumentNo());
if (m_docLine != null)
{
description.append(" #").append(m_docLine.getLine());
@@ -458,8 +458,10 @@ public final class FactLine extends X_Fact_Acct
String original = getDescription();
if (original == null || original.trim().length() == 0)
super.setDescription(description);
- else
- super.setDescription(original + " - " + description);
+ else{
+ StringBuilder msgd = new StringBuilder(original).append(" - ").append(description);
+ super.setDescription(msgd.toString());
+ }
} // addDescription
/**
@@ -729,7 +731,7 @@ public final class FactLine extends X_Fact_Acct
*/
public String toString()
{
- StringBuffer sb = new StringBuffer("FactLine=[");
+ StringBuilder sb = new StringBuilder("FactLine=[");
sb.append(getAD_Table_ID()).append(":").append(getRecord_ID())
.append(",").append(m_acct)
.append(",Cur=").append(getC_Currency_ID())
@@ -1104,7 +1106,7 @@ public final class FactLine extends X_Fact_Acct
// end Bayu Sistematika
//
success = true;
- log.fine(new StringBuffer("(Table=").append(AD_Table_ID)
+ log.fine(new StringBuilder("(Table=").append(AD_Table_ID)
.append(",Record_ID=").append(Record_ID)
.append(",Line=").append(Record_ID)
.append(", Account=").append(m_acct)
@@ -1132,7 +1134,7 @@ public final class FactLine extends X_Fact_Acct
setAD_Org_ID (fact.getAD_Org_ID());
}
else
- log.warning(new StringBuffer("Not Found (try later) ")
+ log.warning(new StringBuilder("Not Found (try later) ")
.append(",C_AcctSchema_ID=").append(getC_AcctSchema_ID())
.append(", AD_Table_ID=").append(AD_Table_ID)
.append(",Record_ID=").append(Record_ID)
diff --git a/org.adempiere.base/src/org/compiere/acct/Matcher.java b/org.adempiere.base/src/org/compiere/acct/Matcher.java
index 3f520e1b00..dd1245e57d 100644
--- a/org.adempiere.base/src/org/compiere/acct/Matcher.java
+++ b/org.adempiere.base/src/org/compiere/acct/Matcher.java
@@ -157,12 +157,12 @@ public class Matcher
// MMatchInv inv = new MMatchInv ();
int M_MatchInv_ID = DB.getNextID (AD_Client_ID, "M_MatchInv", m_trxName);
//
- StringBuffer sql = new StringBuffer("INSERT INTO M_MatchInv ("
- + "M_MatchInv_ID, "
- + "AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy, "
- + "M_InOutLine_ID,C_InvoiceLine_ID, "
- + "M_Product_ID,DateTrx,Qty, "
- + "Processing,Processed,Posted) VALUES (")
+ StringBuilder sql = new StringBuilder("INSERT INTO M_MatchInv (")
+ .append("M_MatchInv_ID, ")
+ .append("AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy, ")
+ .append("M_InOutLine_ID,C_InvoiceLine_ID, ")
+ .append("M_Product_ID,DateTrx,Qty, ")
+ .append("Processing,Processed,Posted) VALUES (")
.append(M_MatchInv_ID).append(", ")
.append(AD_Client_ID).append(",").append(AD_Org_ID).append(",'Y',SysDate,0,SysDate,0, ")
.append(M_InOutLine_ID).append(",").append(C_InvoiceLine_ID).append(", ")
diff --git a/org.adempiere.base/src/org/compiere/acct/ProductInfo.java b/org.adempiere.base/src/org/compiere/acct/ProductInfo.java
index 10711c6b66..c29b883d2f 100644
--- a/org.adempiere.base/src/org/compiere/acct/ProductInfo.java
+++ b/org.adempiere.base/src/org/compiere/acct/ProductInfo.java
@@ -236,12 +236,12 @@ public class ProductInfo
*/
private BigDecimal getPriceList (MAcctSchema as, boolean onlyPOPriceList)
{
- StringBuffer sql = new StringBuffer (
- "SELECT pl.C_Currency_ID, pp.PriceList, pp.PriceStd, pp.PriceLimit "
- + "FROM M_PriceList pl, M_PriceList_Version plv, M_ProductPrice pp "
- + "WHERE pl.M_PriceList_ID = plv.M_PriceList_ID"
- + " AND plv.M_PriceList_Version_ID = pp.M_PriceList_Version_ID"
- + " AND pp.M_Product_ID=?");
+ StringBuilder sql = new StringBuilder (
+ "SELECT pl.C_Currency_ID, pp.PriceList, pp.PriceStd, pp.PriceLimit ")
+ .append("FROM M_PriceList pl, M_PriceList_Version plv, M_ProductPrice pp ")
+ .append("WHERE pl.M_PriceList_ID = plv.M_PriceList_ID")
+ .append(" AND plv.M_PriceList_Version_ID = pp.M_PriceList_Version_ID")
+ .append(" AND pp.M_Product_ID=?");
if (onlyPOPriceList)
sql.append(" AND pl.IsSOPriceList='N'");
sql.append(" ORDER BY pl.IsSOPriceList ASC, plv.ValidFrom DESC");
diff --git a/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java b/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java
index 65e2d79620..c0f785dadc 100644
--- a/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java
+++ b/org.adempiere.base/src/org/compiere/impexp/ImpFormat.java
@@ -350,7 +350,7 @@ public final class ImpFormat
for (int i = 0; i < m_rows.size(); i++)
{
ImpFormatRow row = (ImpFormatRow)m_rows.get(i);
- StringBuffer entry = new StringBuffer ();
+ StringBuilder entry = new StringBuilder ();
// Label-Start
if (withLabel)
{
@@ -439,7 +439,7 @@ public final class ImpFormat
int length = line.length();
for (int field = 1; field <= fieldNo && pos < length; field++)
{
- StringBuffer content = new StringBuffer();
+ StringBuilder content = new StringBuilder();
// two delimiter directly after each other
if (line.charAt(pos) == delimiter)
{
@@ -518,7 +518,7 @@ public final class ImpFormat
// Check if the record is already there ------------------------------
- StringBuffer sql = new StringBuffer ("SELECT COUNT(*), MAX(")
+ StringBuilder sql = new StringBuilder ("SELECT COUNT(*), MAX(")
.append(m_tablePK).append(") FROM ").append(m_tableName)
.append(" WHERE AD_Client_ID=").append(AD_Client_ID).append(" AND (");
//
@@ -541,7 +541,7 @@ public final class ImpFormat
whereParentChild += " AND " + nodes[i];
}
}
- StringBuffer find = new StringBuffer();
+ StringBuilder find = new StringBuilder();
if (where1 != null)
find.append(where1);
if (where2 != null)
@@ -587,7 +587,7 @@ public final class ImpFormat
if (ID == 0)
{
ID = DB.getNextID(ctx, m_tableName, null); // get ID
- sql = new StringBuffer("INSERT INTO ")
+ sql = new StringBuilder("INSERT INTO ")
.append(m_tableName).append("(").append(m_tablePK).append(",")
.append("AD_Client_ID,AD_Org_ID,Created,CreatedBy,Updated,UpdatedBy,IsActive") // StdFields
.append(") VALUES (").append(ID).append(",")
@@ -607,7 +607,7 @@ public final class ImpFormat
log.finer("Old ID=" + ID + " " + find);
// Update Info -------------------------------------------------------
- sql = new StringBuffer ("UPDATE ")
+ sql = new StringBuilder ("UPDATE ")
.append(m_tableName).append(" SET ");
for (int i = 0; i < nodes.length; i++)
sql.append(nodes[i]).append(","); // column=value
diff --git a/org.adempiere.base/src/org/compiere/impexp/OFXBankStatementHandler.java b/org.adempiere.base/src/org/compiere/impexp/OFXBankStatementHandler.java
index a5e6e858c2..a9d70e2e82 100644
--- a/org.adempiere.base/src/org/compiere/impexp/OFXBankStatementHandler.java
+++ b/org.adempiere.base/src/org/compiere/impexp/OFXBankStatementHandler.java
@@ -731,7 +731,7 @@ public abstract class OFXBankStatementHandler extends DefaultHandler
{
if (!m_controller.saveLine())
{
- m_errorMessage = new StringBuffer(m_controller.getErrorMessage());
+ m_errorMessage = new StringBuffer().append(m_controller.getErrorMessage());
m_errorDescription = new StringBuffer(m_controller.getErrorDescription());
throw new SAXException(m_errorMessage.toString());
}
diff --git a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java
index eee5e23723..eff9ee2293 100644
--- a/org.adempiere.base/src/org/compiere/model/GridFieldVO.java
+++ b/org.adempiere.base/src/org/compiere/model/GridFieldVO.java
@@ -676,7 +676,7 @@ public class GridFieldVO implements Serializable
*/
public String toString ()
{
- StringBuffer sb = new StringBuffer ("MFieldVO[");
+ StringBuilder sb = new StringBuilder ("MFieldVO[");
sb.append(AD_Column_ID).append("-").append(ColumnName)
.append ("]");
return sb.toString ();
diff --git a/org.adempiere.base/src/org/compiere/model/GridTable.java b/org.adempiere.base/src/org/compiere/model/GridTable.java
index cf5258adf3..0bfa30cfe1 100644
--- a/org.adempiere.base/src/org/compiere/model/GridTable.java
+++ b/org.adempiere.base/src/org/compiere/model/GridTable.java
@@ -537,7 +537,7 @@ public class GridTable extends AbstractTableModel
} // getColumn
/**
- * Return Columns with Indentifier (ColumnName)
+ * Return Columns with Identifier (ColumnName)
* @param identifier column name
* @return MField
*/
diff --git a/org.adempiere.base/src/org/compiere/model/GridWindow.java b/org.adempiere.base/src/org/compiere/model/GridWindow.java
index bc961938d5..4aa05fef47 100644
--- a/org.adempiere.base/src/org/compiere/model/GridWindow.java
+++ b/org.adempiere.base/src/org/compiere/model/GridWindow.java
@@ -413,7 +413,8 @@ public class GridWindow implements Serializable
*/
public String toString()
{
- return "MWindow[" + m_vo.WindowNo + "," + m_vo.Name + " (" + m_vo.AD_Window_ID + ")]";
+ StringBuilder msgreturn = new StringBuilder("MWindow[").append(m_vo.WindowNo).append(",").append(m_vo.Name).append(" (").append(m_vo.AD_Window_ID).append(")]");
+ return msgreturn.toString();
} // toString
/**
@@ -423,15 +424,15 @@ public class GridWindow implements Serializable
*/
public WebDoc getHelpDoc (boolean javaClient)
{
- String title = Msg.getMsg(Env.getCtx(), "Window") + ": " + getName();
+ StringBuilder title = new StringBuilder(Msg.getMsg(Env.getCtx(), "Window")).append(": ").append(getName());
WebDoc doc = null;
if (javaClient)
{
- doc = WebDoc.create (false, title, javaClient);
+ doc = WebDoc.create (false, title.toString(), javaClient);
}
else // HTML
{
- doc = WebDoc.createPopup (title);
+ doc = WebDoc.createPopup (title.toString());
doc.addPopupClose(Env.getCtx());
}
diff --git a/org.adempiere.base/src/org/compiere/model/I_AD_Client.java b/org.adempiere.base/src/org/compiere/model/I_AD_Client.java
index 01892ebf3d..37e4467921 100644
--- a/org.adempiere.base/src/org/compiere/model/I_AD_Client.java
+++ b/org.adempiere.base/src/org/compiere/model/I_AD_Client.java
@@ -87,10 +87,10 @@ public interface I_AD_Client
/** Column name AD_PasswordRule_ID */
public static final String COLUMNNAME_AD_PasswordRule_ID = "AD_PasswordRule_ID";
- /** Set AD_PasswordRule */
+ /** Set Password Policies */
public void setAD_PasswordRule_ID (int AD_PasswordRule_ID);
- /** Get AD_PasswordRule */
+ /** Get Password Policies */
public int getAD_PasswordRule_ID();
public org.compiere.model.I_AD_PasswordRule getAD_PasswordRule() throws RuntimeException;
@@ -217,6 +217,19 @@ public interface I_AD_Client
*/
public boolean isPostImmediate();
+ /** Column name IsSecureSMTP */
+ public static final String COLUMNNAME_IsSecureSMTP = "IsSecureSMTP";
+
+ /** Set SMTP SSL/TLS.
+ * Use SSL/TLS for SMTP
+ */
+ public void setIsSecureSMTP (boolean IsSecureSMTP);
+
+ /** Get SMTP SSL/TLS.
+ * Use SSL/TLS for SMTP
+ */
+ public boolean isSecureSMTP();
+
/** Column name IsServerEMail */
public static final String COLUMNNAME_IsServerEMail = "IsServerEMail";
@@ -373,6 +386,19 @@ public interface I_AD_Client
*/
public String getSMTPHost();
+ /** Column name SMTPPort */
+ public static final String COLUMNNAME_SMTPPort = "SMTPPort";
+
+ /** Set SMTP Port.
+ * SMTP Port Number
+ */
+ public void setSMTPPort (int SMTPPort);
+
+ /** Get SMTP Port.
+ * SMTP Port Number
+ */
+ public int getSMTPPort();
+
/** Column name StoreArchiveOnFileSystem */
public static final String COLUMNNAME_StoreArchiveOnFileSystem = "StoreArchiveOnFileSystem";
diff --git a/org.adempiere.base/src/org/compiere/model/MAccount.java b/org.adempiere.base/src/org/compiere/model/MAccount.java
index 7739a61a1b..75895fc10c 100644
--- a/org.adempiere.base/src/org/compiere/model/MAccount.java
+++ b/org.adempiere.base/src/org/compiere/model/MAccount.java
@@ -83,10 +83,10 @@ public class MAccount extends X_C_ValidCombination
ArrayList