IDEMPIERE-3794 Improvement to Housekeeping
This commit is contained in:
parent
80308d766d
commit
08e622ba6d
|
@ -0,0 +1,95 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- IDEMPIERE-3794 Improvement to Housekeeping
|
||||
-- Sep 27, 2018 4:49:40 PM CEST
|
||||
UPDATE AD_Column SET IsMandatory='N',Updated=TO_DATE('2018-09-27 16:49:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56346
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:49:43 PM CEST
|
||||
ALTER TABLE AD_HouseKeeping MODIFY AD_Table_ID NUMBER(10) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:49:43 PM CEST
|
||||
ALTER TABLE AD_HouseKeeping MODIFY AD_Table_ID NULL
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:51:05 PM CEST
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,MandatoryLogic,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (213696,0,'DB Table Name','Name of the table in the database','The DB Table Name indicates the name of the table in database.',53147,'TableName',40,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_DATE('2018-09-27 16:51:04','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2018-09-27 16:51:04','YYYY-MM-DD HH24:MI:SS'),100,587,'Y','N','D','N','N','@AD_Table_ID@=0','N','Y','60eaa9cd-381b-4385-b4a4-245510ad0718','Y',0,'N','N')
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:51:16 PM CEST
|
||||
UPDATE AD_Column SET MandatoryLogic='@TableName@=''''',Updated=TO_DATE('2018-09-27 16:51:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56346
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:51:23 PM CEST
|
||||
ALTER TABLE AD_HouseKeeping ADD TableName VARCHAR2(40) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:51:59 PM CEST
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (205834,'DB Table Name','Name of the table in the database','The DB Table Name indicates the name of the table in database.',53178,213696,'Y',40,160,'N','N','N','N',0,0,'Y',TO_DATE('2018-09-27 16:51:59','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2018-09-27 16:51:59','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','bbc73a31-615b-4045-92f9-e37a64fc5b6c','Y',160,2)
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_DATE('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205834
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=90, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56367
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56365
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56358
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56354
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56364
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=140, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56361
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56360
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56353
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204515
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56359
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:53:13 PM CEST
|
||||
UPDATE AD_Field SET DisplayLogic='@AD_Table_ID@>0', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-09-27 16:53:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56358
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:53:21 PM CEST
|
||||
UPDATE AD_Field SET DisplayLogic='@IsExportXMLBackup@=Y & @AD_Table_ID@>0', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-09-27 16:53:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56354
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:56:14 PM CEST
|
||||
UPDATE AD_Field SET DisplayLogic='@TableName@=''''', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-09-27 16:56:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56368
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:56:32 PM CEST
|
||||
UPDATE AD_Field SET DisplayLogic='@AD_Table_ID@=0', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_DATE('2018-09-27 16:56:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205834
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201809271702_IDEMPIERE-3794.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,92 @@
|
|||
-- IDEMPIERE-3794 Improvement to Housekeeping
|
||||
-- Sep 27, 2018 4:49:40 PM CEST
|
||||
UPDATE AD_Column SET IsMandatory='N',Updated=TO_TIMESTAMP('2018-09-27 16:49:40','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56346
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:49:43 PM CEST
|
||||
INSERT INTO t_alter_column values('ad_housekeeping','AD_Table_ID','NUMERIC(10)',null,'NULL')
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:49:43 PM CEST
|
||||
INSERT INTO t_alter_column values('ad_housekeeping','AD_Table_ID',null,'NULL',null)
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:51:05 PM CEST
|
||||
INSERT INTO AD_Column (AD_Column_ID,Version,Name,Description,Help,AD_Table_ID,ColumnName,FieldLength,IsKey,IsParent,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsEncrypted,AD_Reference_ID,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,AD_Element_ID,IsUpdateable,IsSelectionColumn,EntityType,IsSyncDatabase,IsAlwaysUpdateable,MandatoryLogic,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsAllowCopy,SeqNoSelection,IsToolbarButton,IsSecure) VALUES (213696,0,'DB Table Name','Name of the table in the database','The DB Table Name indicates the name of the table in database.',53147,'TableName',40,'N','N','N','N','N',0,'N',10,0,0,'Y',TO_TIMESTAMP('2018-09-27 16:51:04','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-09-27 16:51:04','YYYY-MM-DD HH24:MI:SS'),100,587,'Y','N','D','N','N','@AD_Table_ID@=0','N','Y','60eaa9cd-381b-4385-b4a4-245510ad0718','Y',0,'N','N')
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:51:16 PM CEST
|
||||
UPDATE AD_Column SET MandatoryLogic='@TableName@=''''',Updated=TO_TIMESTAMP('2018-09-27 16:51:16','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Column_ID=56346
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:51:23 PM CEST
|
||||
ALTER TABLE AD_HouseKeeping ADD COLUMN TableName VARCHAR(40) DEFAULT NULL
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:51:59 PM CEST
|
||||
INSERT INTO AD_Field (AD_Field_ID,Name,Description,Help,AD_Tab_ID,AD_Column_ID,IsDisplayed,DisplayLength,SeqNo,IsSameLine,IsHeading,IsFieldOnly,IsEncrypted,AD_Client_ID,AD_Org_ID,IsActive,Created,CreatedBy,Updated,UpdatedBy,IsReadOnly,IsCentrallyMaintained,EntityType,AD_Field_UU,IsDisplayedGrid,SeqNoGrid,ColumnSpan) VALUES (205834,'DB Table Name','Name of the table in the database','The DB Table Name indicates the name of the table in database.',53178,213696,'Y',40,160,'N','N','N','N',0,0,'Y',TO_TIMESTAMP('2018-09-27 16:51:59','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2018-09-27 16:51:59','YYYY-MM-DD HH24:MI:SS'),100,'N','Y','D','bbc73a31-615b-4045-92f9-e37a64fc5b6c','Y',160,2)
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET IsDisplayed='Y', SeqNo=80, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, XPosition=4, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205834
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=90, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56367
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=100, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56365
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=110, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56358
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=120, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56354
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=130, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56364
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=140, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56361
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=150, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56360
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=160, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56353
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=204515
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:52:20 PM CEST
|
||||
UPDATE AD_Field SET SeqNo=0, AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-09-27 16:52:20','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56359
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:53:13 PM CEST
|
||||
UPDATE AD_Field SET DisplayLogic='@AD_Table_ID@>0', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-09-27 16:53:13','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56358
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:53:21 PM CEST
|
||||
UPDATE AD_Field SET DisplayLogic='@IsExportXMLBackup@=Y & @AD_Table_ID@>0', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-09-27 16:53:21','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56354
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:56:14 PM CEST
|
||||
UPDATE AD_Field SET DisplayLogic='@TableName@=''''', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-09-27 16:56:14','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=56368
|
||||
;
|
||||
|
||||
-- Sep 27, 2018 4:56:32 PM CEST
|
||||
UPDATE AD_Field SET DisplayLogic='@AD_Table_ID@=0', AD_Reference_Value_ID=NULL, AD_Val_Rule_ID=NULL, IsToolbarButton=NULL,Updated=TO_TIMESTAMP('2018-09-27 16:56:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=205834
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201809271702_IDEMPIERE-3794.sql') FROM dual
|
||||
;
|
||||
|
|
@ -39,8 +39,8 @@ import java.util.Date;
|
|||
import java.util.logging.Level;
|
||||
|
||||
import org.adempiere.model.GenericPO;
|
||||
import org.compiere.model.MHouseKeeping;
|
||||
import org.compiere.model.MTable;
|
||||
import org.compiere.model.X_AD_HouseKeeping;
|
||||
import org.compiere.process.ProcessInfoParameter;
|
||||
import org.compiere.process.SvrProcess;
|
||||
import org.compiere.util.AdempiereSystemError;
|
||||
|
@ -73,10 +73,15 @@ public class HouseKeeping extends SvrProcess{
|
|||
|
||||
protected String doIt() throws Exception {
|
||||
|
||||
X_AD_HouseKeeping houseKeeping = new X_AD_HouseKeeping(getCtx(), p_AD_HouseKeeping_ID,get_TrxName());
|
||||
MHouseKeeping houseKeeping = new MHouseKeeping(getCtx(), p_AD_HouseKeeping_ID,get_TrxName());
|
||||
String tableName = null;
|
||||
int tableID = houseKeeping.getAD_Table_ID();
|
||||
MTable table = new MTable(getCtx(), tableID, get_TrxName());
|
||||
String tableName = table.getTableName();
|
||||
if (tableID > 0) {
|
||||
MTable table = new MTable(getCtx(), tableID, get_TrxName());
|
||||
tableName = table.getTableName();
|
||||
} else {
|
||||
tableName = houseKeeping.getTableName();
|
||||
}
|
||||
String whereClause = houseKeeping.getWhereClause();
|
||||
int noins = 0;
|
||||
int noexp = 0;
|
||||
|
@ -93,7 +98,7 @@ public class HouseKeeping extends SvrProcess{
|
|||
} //saveInHistoric
|
||||
|
||||
Date date = new Date();
|
||||
if (houseKeeping.isExportXMLBackup()){
|
||||
if (houseKeeping.isExportXMLBackup() && houseKeeping.getAD_Table_ID() > 0){
|
||||
String pathFile = houseKeeping.getBackupFolder();
|
||||
SimpleDateFormat dateFormat = new SimpleDateFormat("yyyyMMddHHmmss");
|
||||
String dateString = dateFormat.format(date);
|
||||
|
|
|
@ -221,6 +221,19 @@ public interface I_AD_HouseKeeping
|
|||
/** Get Process Now */
|
||||
public boolean isProcessing();
|
||||
|
||||
/** Column name TableName */
|
||||
public static final String COLUMNNAME_TableName = "TableName";
|
||||
|
||||
/** Set DB Table Name.
|
||||
* Name of the table in the database
|
||||
*/
|
||||
public void setTableName (String TableName);
|
||||
|
||||
/** Get DB Table Name.
|
||||
* Name of the table in the database
|
||||
*/
|
||||
public String getTableName();
|
||||
|
||||
/** Column name Updated */
|
||||
public static final String COLUMNNAME_Updated = "Updated";
|
||||
|
||||
|
|
|
@ -0,0 +1,61 @@
|
|||
/**********************************************************************
|
||||
* This file is part of iDempiere ERP Open Source *
|
||||
* http://www.idempiere.org *
|
||||
* *
|
||||
* Copyright (C) Contributors *
|
||||
* *
|
||||
* This program is free software; you can redistribute it and/or *
|
||||
* modify it under the terms of the GNU General Public License *
|
||||
* as published by the Free Software Foundation; either version 2 *
|
||||
* of the License, or (at your option) any later version. *
|
||||
* *
|
||||
* This program is distributed in the hope that it will be useful, *
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of *
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
|
||||
* GNU General Public License for more details. *
|
||||
* *
|
||||
* You should have received a copy of the GNU General Public License *
|
||||
* along with this program; if not, write to the Free Software *
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, *
|
||||
* MA 02110-1301, USA. *
|
||||
* *
|
||||
* Contributors: *
|
||||
* - TrekGlobal *
|
||||
* - Carlos Ruiz - globalqss *
|
||||
**********************************************************************/
|
||||
package org.compiere.model;
|
||||
|
||||
import java.sql.ResultSet;
|
||||
import java.util.Properties;
|
||||
|
||||
import org.compiere.util.Msg;
|
||||
|
||||
public class MHouseKeeping extends X_AD_HouseKeeping {
|
||||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 6481567026614278994L;
|
||||
|
||||
public MHouseKeeping(Properties ctx, int AD_HouseKeeping_ID, String trxName) {
|
||||
super(ctx, AD_HouseKeeping_ID, trxName);
|
||||
}
|
||||
|
||||
public MHouseKeeping(Properties ctx, ResultSet rs, String trxName) {
|
||||
super(ctx, rs, trxName);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected boolean beforeSave(boolean newRecord) {
|
||||
if (getAD_Table_ID() > 0) {
|
||||
setTableName(null);
|
||||
} else if (getTableName() != null) {
|
||||
setIsExportXMLBackup(false);
|
||||
setBackupFolder(null);
|
||||
} else {
|
||||
log.saveError("SaveError", Msg.parseTranslation(getCtx(), "@FillMandatory@ @AD_Table_ID@ @TableName@"));
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
}
|
|
@ -31,7 +31,7 @@ public class X_AD_HouseKeeping extends PO implements I_AD_HouseKeeping, I_Persis
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20171031L;
|
||||
private static final long serialVersionUID = 20180927L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_AD_HouseKeeping (Properties ctx, int AD_HouseKeeping_ID, String trxName)
|
||||
|
@ -40,7 +40,6 @@ public class X_AD_HouseKeeping extends PO implements I_AD_HouseKeeping, I_Persis
|
|||
/** if (AD_HouseKeeping_ID == 0)
|
||||
{
|
||||
setAD_HouseKeeping_ID (0);
|
||||
setAD_Table_ID (0);
|
||||
setName (null);
|
||||
setValue (null);
|
||||
} */
|
||||
|
@ -306,6 +305,23 @@ public class X_AD_HouseKeeping extends PO implements I_AD_HouseKeeping, I_Persis
|
|||
return false;
|
||||
}
|
||||
|
||||
/** Set DB Table Name.
|
||||
@param TableName
|
||||
Name of the table in the database
|
||||
*/
|
||||
public void setTableName (String TableName)
|
||||
{
|
||||
set_Value (COLUMNNAME_TableName, TableName);
|
||||
}
|
||||
|
||||
/** Get DB Table Name.
|
||||
@return Name of the table in the database
|
||||
*/
|
||||
public String getTableName ()
|
||||
{
|
||||
return (String)get_Value(COLUMNNAME_TableName);
|
||||
}
|
||||
|
||||
/** Set Search Key.
|
||||
@param Value
|
||||
Search key for the record in the format required - must be unique
|
||||
|
|
Loading…
Reference in New Issue