1003322 2Pack enhancement for Extension Development.
This commit is contained in:
parent
350a5d6b26
commit
a6af9e3a6f
|
@ -0,0 +1,41 @@
|
|||
SET SQLBLANKLINES ON
|
||||
SET DEFINE OFF
|
||||
|
||||
-- Oct 9, 2013 4:44:19 PM MYT
|
||||
-- 1003322 2Pack enhancement for Extension Development
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,Created,Updated,CreatedBy,AD_Org_ID,UpdatedBy,IsActive,AD_Client_ID,EntityType) VALUES ('IsExportDictionaryEntity',202618,'Export Dictionary Entity','Export Dictionary Entity','3d4310f3-fec3-4e92-9c4b-c8febabce9e6',TO_DATE('2013-10-09 16:44:16','YYYY-MM-DD HH24:MI:SS'),TO_DATE('2013-10-09 16:44:16','YYYY-MM-DD HH24:MI:SS'),100,0,100,'Y',0,'D')
|
||||
;
|
||||
|
||||
-- Oct 9, 2013 4:44:53 PM MYT
|
||||
-- 1003322 2Pack enhancement for Extension Development
|
||||
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,DefaultValue,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'N',1,50005,210878,'Y','N','N',0,'N',1,'N',20,'N','N','Y','d4142a11-aa11-404f-864c-d6ec13f036c6','Y','IsExportDictionaryEntity','N','Export Dictionary Entity','Y',TO_DATE('2013-10-09 16:44:52','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_DATE('2013-10-09 16:44:52','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202618,'N')
|
||||
;
|
||||
|
||||
-- Oct 9, 2013 4:44:59 PM MYT
|
||||
-- 1003322 2Pack enhancement for Extension Development
|
||||
ALTER TABLE AD_Package_Exp ADD IsExportDictionaryEntity CHAR(1) DEFAULT 'N' CHECK (IsExportDictionaryEntity IN ('Y','N')) NOT NULL
|
||||
;
|
||||
|
||||
-- Oct 9, 2013 4:46:02 PM MYT
|
||||
-- 1003322 2Pack enhancement for Extension Development
|
||||
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES (0,'N',50005,0,'N','N',210878,100,'Y',202525,'N','D','Export Dictionary Entity','1b303e2f-6aad-4a7e-a5e9-61430a74f821','Y','N',100,0,TO_DATE('2013-10-09 16:46:02','YYYY-MM-DD HH24:MI:SS'),100,TO_DATE('2013-10-09 16:46:02','YYYY-MM-DD HH24:MI:SS'),'Y','Y',100,2,'N',0,2,1,'N')
|
||||
;
|
||||
|
||||
-- Oct 9, 2013 4:47:05 PM MYT
|
||||
-- 1003322 2Pack enhancement for Extension Development
|
||||
UPDATE AD_Field SET SeqNo=100, SeqNoGrid=100, XPosition=2,Updated=TO_DATE('2013-10-09 16:47:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50085
|
||||
;
|
||||
|
||||
-- Oct 9, 2013 4:47:22 PM MYT
|
||||
-- 1003322 2Pack enhancement for Extension Development
|
||||
UPDATE AD_Field SET SeqNo=90, SeqNoGrid=90, XPosition=5,Updated=TO_DATE('2013-10-09 16:47:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202525
|
||||
;
|
||||
|
||||
-- Oct 9, 2013 5:59:32 PM MYT
|
||||
-- 1003322 2Pack enhancement for Extension Development
|
||||
UPDATE AD_Field SET DisplayLogic='@AD_Client_ID@=0',Updated=TO_DATE('2013-10-09 17:59:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202525
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201310090926_1003322.sql') FROM dual
|
||||
;
|
||||
|
|
@ -0,0 +1,38 @@
|
|||
-- Oct 9, 2013 4:44:19 PM MYT
|
||||
-- 1003322 2Pack enhancement for Extension Development
|
||||
INSERT INTO AD_Element (ColumnName,AD_Element_ID,Name,PrintName,AD_Element_UU,Created,Updated,CreatedBy,AD_Org_ID,UpdatedBy,IsActive,AD_Client_ID,EntityType) VALUES ('IsExportDictionaryEntity',202618,'Export Dictionary Entity','Export Dictionary Entity','3d4310f3-fec3-4e92-9c4b-c8febabce9e6',TO_TIMESTAMP('2013-10-09 16:44:16','YYYY-MM-DD HH24:MI:SS'),TO_TIMESTAMP('2013-10-09 16:44:16','YYYY-MM-DD HH24:MI:SS'),100,0,100,'Y',0,'D')
|
||||
;
|
||||
|
||||
-- Oct 9, 2013 4:44:53 PM MYT
|
||||
-- 1003322 2Pack enhancement for Extension Development
|
||||
INSERT INTO AD_Column (SeqNoSelection,IsSyncDatabase,Version,AD_Table_ID,AD_Column_ID,IsMandatory,IsTranslated,IsIdentifier,SeqNo,IsParent,FieldLength,IsSelectionColumn,AD_Reference_ID,IsKey,IsAutocomplete,IsAllowLogging,AD_Column_UU,IsUpdateable,ColumnName,DefaultValue,Name,IsAllowCopy,Updated,CreatedBy,AD_Org_ID,IsActive,Created,UpdatedBy,IsToolbarButton,IsAlwaysUpdateable,AD_Client_ID,EntityType,IsEncrypted,AD_Element_ID,IsSecure) VALUES (0,'N',1,50005,210878,'Y','N','N',0,'N',1,'N',20,'N','N','Y','d4142a11-aa11-404f-864c-d6ec13f036c6','Y','IsExportDictionaryEntity','N','Export Dictionary Entity','Y',TO_TIMESTAMP('2013-10-09 16:44:52','YYYY-MM-DD HH24:MI:SS'),100,0,'Y',TO_TIMESTAMP('2013-10-09 16:44:52','YYYY-MM-DD HH24:MI:SS'),100,'N','N',0,'D','N',202618,'N')
|
||||
;
|
||||
|
||||
-- Oct 9, 2013 4:44:59 PM MYT
|
||||
-- 1003322 2Pack enhancement for Extension Development
|
||||
ALTER TABLE AD_Package_Exp ADD COLUMN IsExportDictionaryEntity CHAR(1) DEFAULT 'N' CHECK (IsExportDictionaryEntity IN ('Y','N')) NOT NULL
|
||||
;
|
||||
|
||||
-- Oct 9, 2013 4:46:02 PM MYT
|
||||
-- 1003322 2Pack enhancement for Extension Development
|
||||
INSERT INTO AD_Field (SortNo,IsEncrypted,AD_Tab_ID,DisplayLength,IsSameLine,IsHeading,AD_Column_ID,SeqNo,IsCentrallyMaintained,AD_Field_ID,IsReadOnly,EntityType,Name,AD_Field_UU,IsDisplayed,IsFieldOnly,UpdatedBy,AD_Org_ID,Created,CreatedBy,Updated,IsActive,IsDisplayedGrid,SeqNoGrid,XPosition,IsQuickEntry,AD_Client_ID,ColumnSpan,NumLines,IsAdvancedField) VALUES (0,'N',50005,0,'N','N',210878,100,'Y',202525,'N','D','Export Dictionary Entity','1b303e2f-6aad-4a7e-a5e9-61430a74f821','Y','N',100,0,TO_TIMESTAMP('2013-10-09 16:46:02','YYYY-MM-DD HH24:MI:SS'),100,TO_TIMESTAMP('2013-10-09 16:46:02','YYYY-MM-DD HH24:MI:SS'),'Y','Y',100,2,'N',0,2,1,'N')
|
||||
;
|
||||
|
||||
-- Oct 9, 2013 4:47:05 PM MYT
|
||||
-- 1003322 2Pack enhancement for Extension Development
|
||||
UPDATE AD_Field SET SeqNo=100, SeqNoGrid=100, XPosition=2,Updated=TO_TIMESTAMP('2013-10-09 16:47:05','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=50085
|
||||
;
|
||||
|
||||
-- Oct 9, 2013 4:47:22 PM MYT
|
||||
-- 1003322 2Pack enhancement for Extension Development
|
||||
UPDATE AD_Field SET SeqNo=90, SeqNoGrid=90, XPosition=5,Updated=TO_TIMESTAMP('2013-10-09 16:47:22','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202525
|
||||
;
|
||||
|
||||
-- Oct 9, 2013 5:59:32 PM MYT
|
||||
-- 1003322 2Pack enhancement for Extension Development
|
||||
UPDATE AD_Field SET DisplayLogic='@AD_Client_ID@=0',Updated=TO_TIMESTAMP('2013-10-09 17:59:32','YYYY-MM-DD HH24:MI:SS'),UpdatedBy=100 WHERE AD_Field_ID=202525
|
||||
;
|
||||
|
||||
SELECT register_migration_script('201310090926_1003322.sql') FROM dual
|
||||
;
|
||||
|
|
@ -175,6 +175,15 @@ public interface I_AD_Package_Exp
|
|||
*/
|
||||
public boolean isActive();
|
||||
|
||||
/** Column name IsExportDictionaryEntity */
|
||||
public static final String COLUMNNAME_IsExportDictionaryEntity = "IsExportDictionaryEntity";
|
||||
|
||||
/** Set Export Dictionary Entity */
|
||||
public void setIsExportDictionaryEntity (boolean IsExportDictionaryEntity);
|
||||
|
||||
/** Get Export Dictionary Entity */
|
||||
public boolean isExportDictionaryEntity();
|
||||
|
||||
/** Column name Name */
|
||||
public static final String COLUMNNAME_Name = "Name";
|
||||
|
||||
|
|
|
@ -31,7 +31,7 @@ public class X_AD_Package_Exp extends PO implements I_AD_Package_Exp, I_Persiste
|
|||
/**
|
||||
*
|
||||
*/
|
||||
private static final long serialVersionUID = 20130626L;
|
||||
private static final long serialVersionUID = 20131009L;
|
||||
|
||||
/** Standard Constructor */
|
||||
public X_AD_Package_Exp (Properties ctx, int AD_Package_Exp_ID, String trxName)
|
||||
|
@ -40,6 +40,8 @@ public class X_AD_Package_Exp extends PO implements I_AD_Package_Exp, I_Persiste
|
|||
/** if (AD_Package_Exp_ID == 0)
|
||||
{
|
||||
setAD_Package_Exp_ID (0);
|
||||
setIsExportDictionaryEntity (false);
|
||||
// N
|
||||
setName (null);
|
||||
setPK_Version (null);
|
||||
setProcessing (false);
|
||||
|
@ -210,6 +212,27 @@ public class X_AD_Package_Exp extends PO implements I_AD_Package_Exp, I_Persiste
|
|||
return (String)get_Value(COLUMNNAME_Instructions);
|
||||
}
|
||||
|
||||
/** Set Export Dictionary Entity.
|
||||
@param IsExportDictionaryEntity Export Dictionary Entity */
|
||||
public void setIsExportDictionaryEntity (boolean IsExportDictionaryEntity)
|
||||
{
|
||||
set_Value (COLUMNNAME_IsExportDictionaryEntity, Boolean.valueOf(IsExportDictionaryEntity));
|
||||
}
|
||||
|
||||
/** Get Export Dictionary Entity.
|
||||
@return Export Dictionary Entity */
|
||||
public boolean isExportDictionaryEntity ()
|
||||
{
|
||||
Object oo = get_Value(COLUMNNAME_IsExportDictionaryEntity);
|
||||
if (oo != null)
|
||||
{
|
||||
if (oo instanceof Boolean)
|
||||
return ((Boolean)oo).booleanValue();
|
||||
return "Y".equals(oo);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
/** Set Name.
|
||||
@param Name
|
||||
Alphanumeric identifier of the entity
|
||||
|
|
|
@ -111,11 +111,8 @@ public class AdElementHandler extends AbstractElementHandler {
|
|||
return;
|
||||
|
||||
X_AD_Element mAdElement = new X_AD_Element(ctx.ctx, adElement_id, null);
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (mAdElement.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, mAdElement))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(mAdElement);
|
||||
|
||||
|
|
|
@ -103,11 +103,8 @@ public class AttachmentElementHandler extends AbstractElementHandler {
|
|||
|
||||
MAttachment mAttachment = new MAttachment(ctx.ctx, AD_Attachment_ID, getTrxName(ctx));
|
||||
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (mAttachment.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, mAttachment))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(mAttachment);
|
||||
|
||||
|
|
|
@ -301,11 +301,8 @@ public class ColumnElementHandler extends AbstractElementHandler {
|
|||
X_AD_Column m_Column = new X_AD_Column(ctx.ctx, AD_Column_ID,
|
||||
getTrxName(ctx));
|
||||
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Column.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, m_Column))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(m_Column);
|
||||
|
||||
|
|
|
@ -92,11 +92,8 @@ public class DynValRuleElementHandler extends AbstractElementHandler {
|
|||
return;
|
||||
X_AD_Val_Rule m_ValRule = new X_AD_Val_Rule (ctx.ctx, AD_Val_Rule_ID, null);
|
||||
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_ValRule.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, m_ValRule))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(m_ValRule);
|
||||
|
||||
|
|
|
@ -126,11 +126,8 @@ public class FieldElementHandler extends AbstractElementHandler {
|
|||
throw new SAXException(e);
|
||||
}
|
||||
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Field.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, m_Field))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(m_Field);
|
||||
|
||||
|
|
|
@ -116,11 +116,8 @@ public class FieldGroupElementHandler extends AbstractElementHandler {
|
|||
|
||||
X_AD_FieldGroup fieldGroup = new X_AD_FieldGroup(ctx.ctx, fieldGroup_id, null);
|
||||
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (fieldGroup.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, fieldGroup))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(fieldGroup);
|
||||
|
||||
|
|
|
@ -70,11 +70,8 @@ public class FormAccessElementHandler extends AbstractElementHandler {
|
|||
|
||||
if (po != null) {
|
||||
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, po))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(po);
|
||||
|
||||
|
|
|
@ -94,11 +94,8 @@ public class FormElementHandler extends AbstractElementHandler {
|
|||
|
||||
X_AD_Form m_Form = new X_AD_Form (ctx.ctx, AD_Form_ID, null);
|
||||
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Form.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, m_Form))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(m_Form);
|
||||
|
||||
|
|
|
@ -120,12 +120,7 @@ public class GenericPOElementHandler extends AbstractElementHandler {
|
|||
if (AD_Client_ID != Env.getAD_Client_ID(ctx.ctx))
|
||||
continue;
|
||||
|
||||
boolean createElement = true;
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
createElement = false;
|
||||
}
|
||||
}
|
||||
boolean createElement = isPackOutElement(ctx, po);
|
||||
|
||||
if (createElement) {
|
||||
if (po.get_ID() > 0) {
|
||||
|
@ -177,12 +172,7 @@ public class GenericPOElementHandler extends AbstractElementHandler {
|
|||
if (AD_Client_ID != Env.getAD_Client_ID(ctx.ctx))
|
||||
continue;
|
||||
|
||||
boolean createElement = true;
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
createElement = false;
|
||||
}
|
||||
}
|
||||
boolean createElement = isPackOutElement(ctx, po);
|
||||
if (createElement) {
|
||||
if (po.get_ID() > 0) {
|
||||
ElementHandler handler = ctx.packOut.getHandler(po.get_TableName());
|
||||
|
|
|
@ -97,11 +97,8 @@ public class ImpFormatElementHandler extends AbstractElementHandler {
|
|||
X_AD_ImpFormat m_ImpFormat = new X_AD_ImpFormat(ctx.ctx, import_id, null);
|
||||
|
||||
boolean createElement = true;
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_ImpFormat.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
createElement = false;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, m_ImpFormat))
|
||||
createElement = false;
|
||||
|
||||
if (createElement) {
|
||||
verifyPackOutRequirement(m_ImpFormat);
|
||||
|
|
|
@ -90,11 +90,8 @@ public class ImpFormatRowElementHandler extends AbstractElementHandler {
|
|||
|
||||
X_AD_ImpFormat_Row m_ImpFormat_Row = new X_AD_ImpFormat_Row (ctx.ctx, AD_ImpFormat_Row_ID, getTrxName(ctx));
|
||||
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_ImpFormat_Row.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, m_ImpFormat_Row))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(m_ImpFormat_Row);
|
||||
|
||||
|
|
|
@ -102,11 +102,8 @@ public class MessageElementHandler extends AbstractElementHandler {
|
|||
|
||||
AttributesImpl atts = new AttributesImpl();
|
||||
X_AD_Message m_Message = new X_AD_Message (ctx.ctx, AD_Message_ID, null);
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Message.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, m_Message))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(m_Message);
|
||||
|
||||
|
|
|
@ -94,11 +94,8 @@ public class ModelValidatorElementHandler extends AbstractElementHandler{
|
|||
|
||||
X_AD_ModelValidator validator = new X_AD_ModelValidator(ctx.ctx, ad_modelvalidator_id, null);
|
||||
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (validator.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, validator))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(validator);
|
||||
|
||||
|
|
|
@ -109,11 +109,8 @@ public class ModificationElementHandler extends AbstractElementHandler{
|
|||
|
||||
X_AD_Modification modification = new X_AD_Modification(ctx.ctx, ad_modification_id, null);
|
||||
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (modification.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, modification))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(modification);
|
||||
|
||||
|
|
|
@ -65,11 +65,8 @@ public class OrgRoleElementHandler extends AbstractElementHandler {
|
|||
Query query = new Query(ctx.ctx, "AD_Role_OrgAccess", "AD_Role_ID=? and AD_Org_ID=?", getTrxName(ctx));
|
||||
X_AD_Role_OrgAccess po = query.setParameters(new Object[]{AD_Role_ID, AD_Org_ID}).<X_AD_Role_OrgAccess>first();
|
||||
if (po != null) {
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, po))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(po);
|
||||
|
||||
|
|
|
@ -112,11 +112,8 @@ public class PreferenceElementHandler extends AbstractElementHandler {
|
|||
X_AD_Preference m_Preference = new X_AD_Preference(ctx.ctx,
|
||||
AD_Preference_ID, getTrxName(ctx));
|
||||
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Preference.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, m_Preference))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(m_Preference);
|
||||
|
||||
|
|
|
@ -114,12 +114,7 @@ public class PrintFormatElementHandler extends AbstractElementHandler {
|
|||
}
|
||||
}
|
||||
|
||||
boolean createElement = true;
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Printformat.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
createElement = false;
|
||||
}
|
||||
}
|
||||
boolean createElement = isPackOutElement(ctx, m_Printformat);
|
||||
|
||||
int size = m_Printformat.getItemCount();
|
||||
for(int i = 0; i < size; i++) {
|
||||
|
|
|
@ -96,11 +96,8 @@ public class PrintFormatItemElementHandler extends AbstractElementHandler {
|
|||
X_AD_PrintFormatItem m_PrintFormatItem = new X_AD_PrintFormatItem(ctx.ctx,
|
||||
AD_PrintFormatItem_ID, null);
|
||||
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_PrintFormatItem.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, m_PrintFormatItem))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(m_PrintFormatItem);
|
||||
|
||||
|
|
|
@ -88,11 +88,8 @@ public class PrintPaperElementHandler extends AbstractElementHandler {
|
|||
X_AD_PrintPaper printPaper = new X_AD_PrintPaper(ctx.ctx,
|
||||
AD_PrintPaper_ID, null);
|
||||
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (printPaper.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, printPaper))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(printPaper);
|
||||
|
||||
|
|
|
@ -68,11 +68,8 @@ public class ProcessAccessElementHandler extends AbstractElementHandler {
|
|||
|
||||
if (po != null) {
|
||||
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, po))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(po);
|
||||
|
||||
|
|
|
@ -138,13 +138,7 @@ public class ProcessElementHandler extends AbstractElementHandler {
|
|||
handler.packOut(packOut,document,null,m_Process.getAD_Workflow_ID());
|
||||
}
|
||||
|
||||
boolean createElement = true;
|
||||
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Process.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
createElement = false;
|
||||
}
|
||||
}
|
||||
boolean createElement = isPackOutElement(ctx, m_Process);
|
||||
|
||||
if (createElement) {
|
||||
verifyPackOutRequirement(m_Process);
|
||||
|
|
|
@ -114,11 +114,8 @@ public class ProcessParaElementHandler extends AbstractElementHandler {
|
|||
}
|
||||
}
|
||||
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Processpara.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, m_Processpara))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(m_Processpara);
|
||||
|
||||
|
|
|
@ -114,12 +114,8 @@ public class ReferenceElementHandler extends AbstractElementHandler {
|
|||
|
||||
X_AD_Reference m_Reference = new X_AD_Reference(ctx.ctx, Reference_id, getTrxName(ctx));
|
||||
|
||||
boolean createElement = true;
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Reference.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
createElement = false;
|
||||
}
|
||||
}
|
||||
boolean createElement = isPackOutElement(ctx, m_Reference);
|
||||
|
||||
PackOut packOut = ctx.packOut;
|
||||
packOut.getCtx().ctx.put("Table_Name",X_AD_Reference.Table_Name);
|
||||
if (createElement) {
|
||||
|
|
|
@ -97,11 +97,8 @@ public class ReferenceListElementHandler extends AbstractElementHandler {
|
|||
return;
|
||||
X_AD_Ref_List m_Ref_List = new X_AD_Ref_List(ctx.ctx, AD_Ref_List_ID,
|
||||
getTrxName(ctx));
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Ref_List.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, m_Ref_List))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(m_Ref_List);
|
||||
|
||||
|
|
|
@ -112,11 +112,8 @@ public class ReferenceTableElementHandler extends AbstractElementHandler {
|
|||
rs = pstmt.executeQuery();
|
||||
if (rs.next()) {
|
||||
X_AD_Ref_Table refTable = new X_AD_Ref_Table(ctx.ctx, rs, getTrxName(ctx));
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (refTable.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, refTable))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(refTable);
|
||||
|
||||
|
|
|
@ -94,11 +94,8 @@ public class ReportViewColElementHandler extends AbstractElementHandler {
|
|||
X_AD_ReportView_Col m_Reportview_Col = new X_AD_ReportView_Col(ctx.ctx,
|
||||
AD_ReportView_Col_ID, getTrxName(ctx));
|
||||
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Reportview_Col.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, m_Reportview_Col))
|
||||
return;
|
||||
|
||||
verifyPackOutRequirement(m_Reportview_Col);
|
||||
|
||||
|
|
|
@ -107,12 +107,7 @@ public class ReportViewElementHandler extends AbstractElementHandler {
|
|||
throw new RuntimeException(e);
|
||||
}
|
||||
|
||||
boolean createElement = true;
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Reportview.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
createElement = false;
|
||||
}
|
||||
}
|
||||
boolean createElement = isPackOutElement(ctx, m_Reportview);
|
||||
|
||||
if (createElement) {
|
||||
verifyPackOutRequirement(m_Reportview);
|
||||
|
|
|
@ -107,13 +107,8 @@ public class RoleElementHandler extends AbstractElementHandler {
|
|||
if (ctx.packOut.isExported(X_AD_Package_Exp_Detail.COLUMNNAME_AD_Role_ID+"|"+Role_id))
|
||||
return;
|
||||
|
||||
boolean createElement = true;
|
||||
X_AD_Role m_Role = new X_AD_Role(ctx.ctx, Role_id, null);
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Role.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
createElement = false;
|
||||
}
|
||||
}
|
||||
boolean createElement = isPackOutElement(ctx, m_Role);
|
||||
|
||||
if (createElement) {
|
||||
verifyPackOutRequirement(m_Role);
|
||||
|
|
|
@ -108,13 +108,8 @@ public class TabElementHandler extends AbstractElementHandler {
|
|||
if (ctx.packOut.isExported("AD_Tab_ID"+"|"+AD_Tab_ID))
|
||||
return;
|
||||
|
||||
boolean createElement = true;
|
||||
X_AD_Tab m_Tab = new X_AD_Tab (ctx.ctx, AD_Tab_ID, getTrxName(ctx));
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Tab.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
createElement = false;
|
||||
}
|
||||
}
|
||||
boolean createElement = isPackOutElement(ctx, m_Tab);
|
||||
if (createElement) {
|
||||
verifyPackOutRequirement(m_Tab);
|
||||
AttributesImpl atts = new AttributesImpl();
|
||||
|
|
|
@ -107,13 +107,8 @@ public class TableElementHandler extends AbstractElementHandler {
|
|||
return;
|
||||
PackOut packOut = ctx.packOut;
|
||||
AttributesImpl atts = new AttributesImpl();
|
||||
boolean createElement = true;
|
||||
X_AD_Table m_Table = new X_AD_Table (ctx.ctx, AD_Table_ID, null);
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Table.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
createElement = false;
|
||||
}
|
||||
}
|
||||
boolean createElement = isPackOutElement(ctx, m_Table);
|
||||
if (createElement) {
|
||||
verifyPackOutRequirement(m_Table);
|
||||
addTypeName(atts, "table");
|
||||
|
|
|
@ -64,11 +64,8 @@ public class TaskAccessElementHandler extends AbstractElementHandler {
|
|||
Query query = new Query(ctx.ctx, "AD_Task_Access", "AD_Role_ID=? and AD_Task_ID=?", getTrxName(ctx));
|
||||
X_AD_Task_Access po = query.setParameters(new Object[]{AD_Role_ID, AD_Task_ID}).first();
|
||||
if (po != null) {
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, po))
|
||||
return;
|
||||
verifyPackOutRequirement(po);
|
||||
AttributesImpl atts = new AttributesImpl();
|
||||
addTypeName(atts, "table");
|
||||
|
|
|
@ -95,11 +95,8 @@ public class TaskElementHandler extends AbstractElementHandler {
|
|||
return;
|
||||
|
||||
X_AD_Task m_Task = new X_AD_Task(ctx.ctx, AD_Task_ID, null);
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Task.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, m_Task))
|
||||
return;
|
||||
verifyPackOutRequirement(m_Task);
|
||||
AttributesImpl atts = new AttributesImpl();
|
||||
addTypeName(atts, "table");
|
||||
|
|
|
@ -69,11 +69,8 @@ public class UserRoleElementHandler extends AbstractElementHandler {
|
|||
X_AD_User_Roles po = query.setParameters(
|
||||
new Object[] { AD_User_ID, AD_Role_ID, AD_Org_ID }).first();
|
||||
if (po != null) {
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, po))
|
||||
return;
|
||||
verifyPackOutRequirement(po);
|
||||
AttributesImpl atts = new AttributesImpl();
|
||||
addTypeName(atts, "table");
|
||||
|
|
|
@ -64,11 +64,8 @@ public class WindowAccessElementHandler extends AbstractElementHandler {
|
|||
Query query = new Query(ctx.ctx, "AD_Window_Access", "AD_Role_ID=? and AD_Window_ID=?", getTrxName(ctx));
|
||||
X_AD_Window_Access po = query.setParameters(new Object[]{AD_Role_ID, AD_Window_ID}).first();
|
||||
if (po != null) {
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, po))
|
||||
return;
|
||||
verifyPackOutRequirement(po);
|
||||
AttributesImpl atts = new AttributesImpl();
|
||||
addTypeName(atts, "table");
|
||||
|
|
|
@ -115,13 +115,8 @@ public class WindowElementHandler extends AbstractElementHandler {
|
|||
return;
|
||||
PackOut packOut = ctx.packOut;
|
||||
|
||||
boolean createElement = true;
|
||||
X_AD_Window m_Window = new X_AD_Window(ctx.ctx, AD_Window_ID, null);
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Window.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
createElement = false;
|
||||
}
|
||||
}
|
||||
boolean createElement = isPackOutElement(ctx, m_Window);
|
||||
|
||||
//export color
|
||||
if (m_Window.getAD_Color_ID() > 0) {
|
||||
|
|
|
@ -67,11 +67,8 @@ public class WorkflowAccessElementHandler extends AbstractElementHandler {
|
|||
Query query = new Query(ctx.ctx, "AD_Workflow_Access", "AD_Role_ID=? and AD_Workflow_ID=?", getTrxName(ctx));
|
||||
po = query.setParameters(new Object[]{AD_Role_ID, AD_Workflow_ID}).first();
|
||||
if (po != null) {
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (po.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, po))
|
||||
return;
|
||||
verifyPackOutRequirement(po);
|
||||
AttributesImpl atts = new AttributesImpl();
|
||||
addTypeName(atts, "table");
|
||||
|
|
|
@ -152,15 +152,10 @@ public class WorkflowElementHandler extends AbstractElementHandler {
|
|||
int ad_wf_nodenextcondition_id = 0;
|
||||
AttributesImpl atts = new AttributesImpl();
|
||||
|
||||
boolean creatElement = true;
|
||||
MWorkflow m_Workflow = new MWorkflow(ctx.ctx,
|
||||
AD_Workflow_ID, null);
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_Workflow.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
creatElement = false;
|
||||
}
|
||||
}
|
||||
if (creatElement) {
|
||||
boolean createElement = isPackOutElement(ctx, m_Workflow);
|
||||
if (createElement) {
|
||||
atts.addAttribute("", "", "type", "CDATA", "object");
|
||||
atts.addAttribute("", "", "type-name", "CDATA", "ad.workflow");
|
||||
document.startElement("", "", I_AD_Workflow.Table_Name, atts);
|
||||
|
@ -213,7 +208,7 @@ public class WorkflowElementHandler extends AbstractElementHandler {
|
|||
DB.close(rs, pstmt);
|
||||
DB.close(nodeNextrs, psNodeNext);
|
||||
DB.close(nodeNConditionrs,psNCondition);
|
||||
if (creatElement) {
|
||||
if (createElement) {
|
||||
document.endElement("", "", MWorkflow.Table_Name);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,11 +109,8 @@ public class WorkflowNodeElementHandler extends AbstractElementHandler {
|
|||
AttributesImpl atts = new AttributesImpl();
|
||||
MWFNode m_WF_Node = new MWFNode(ctx.ctx, AD_WF_Node_ID,
|
||||
getTrxName(ctx));
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_WF_Node.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, m_WF_Node))
|
||||
return;
|
||||
verifyPackOutRequirement(m_WF_Node);
|
||||
addTypeName(atts, "table");
|
||||
document.startElement("", "", I_AD_WF_Node.Table_Name, atts);
|
||||
|
|
|
@ -110,11 +110,8 @@ public class WorkflowNodeNextConditionElementHandler extends
|
|||
|
||||
MWFNextCondition m_WF_NodeNextCondition = new MWFNextCondition(
|
||||
ctx.ctx, ad_wf_nodenextcondition_id, null);
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_WF_NodeNextCondition.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, m_WF_NodeNextCondition))
|
||||
return;
|
||||
verifyPackOutRequirement(m_WF_NodeNextCondition);
|
||||
AttributesImpl atts = new AttributesImpl();
|
||||
addTypeName(atts, "table");
|
||||
|
|
|
@ -95,11 +95,8 @@ public class WorkflowNodeNextElementHandler extends AbstractElementHandler {
|
|||
|
||||
MWFNodeNext m_WF_NodeNext = new MWFNodeNext(
|
||||
ctx.ctx, ad_wf_nodenext_id, null);
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (m_WF_NodeNext.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!isPackOutElement(ctx, m_WF_NodeNext))
|
||||
return;
|
||||
verifyPackOutRequirement(m_WF_NodeNext);
|
||||
AttributesImpl atts = new AttributesImpl();
|
||||
addTypeName(atts, "table");
|
||||
|
|
|
@ -33,6 +33,7 @@ import org.compiere.model.MColumn;
|
|||
import org.compiere.model.MTable;
|
||||
import org.compiere.model.PO;
|
||||
import org.compiere.model.POInfo;
|
||||
import org.compiere.model.X_AD_EntityType;
|
||||
import org.compiere.model.X_AD_Package_Imp_Backup;
|
||||
import org.compiere.model.X_AD_Package_Imp_Detail;
|
||||
import org.compiere.util.CLogger;
|
||||
|
@ -509,5 +510,20 @@ public abstract class AbstractElementHandler implements ElementHandler {
|
|||
if (Util.isEmpty((String)po.get_Value(uidColumn)) && (keys == null || keys.length != 1 || po.get_ID() > MTable.MAX_OFFICIAL_ID)) {
|
||||
throw new IllegalStateException("2Pack doesn't work with record without official Id and UUID");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean isPackOutElement(PIPOContext ctx, PO element) {
|
||||
if (ctx.packOut.getFromDate() != null) {
|
||||
if (element.getUpdated().compareTo(ctx.packOut.getFromDate()) < 0) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
if (!ctx.packOut.isExportDictionaryEntity() && element.get_ColumnIndex("EntityType") >= 0) {
|
||||
Object entityType = element.get_Value("EntityType");
|
||||
if (X_AD_EntityType.ENTITYTYPE_Dictionary.equals(entityType)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -109,6 +109,11 @@ public class PackInHandler extends DefaultHandler {
|
|||
// idempiere
|
||||
if (qName.equals("idempiere"))
|
||||
{
|
||||
String updateDictionary = atts.getValue("UpdateDictionary");
|
||||
if (updateDictionary != null && updateDictionary.equalsIgnoreCase("true"))
|
||||
{
|
||||
m_updateDictionary = true;
|
||||
}
|
||||
if (log.isLoggable(Level.INFO)) log.info("idempiere updateMode="+m_updateDictionary);
|
||||
|
||||
//check client
|
||||
|
|
|
@ -81,6 +81,7 @@ public class PackOut
|
|||
private String packoutDirectory;
|
||||
private PIPOContext pipoContext = new PIPOContext();
|
||||
private Timestamp fromDate;
|
||||
private boolean isExportDictionaryEntity = false;
|
||||
|
||||
public static final int MAX_OFFICIAL_ID = MTable.MAX_OFFICIAL_ID;
|
||||
|
||||
|
@ -218,6 +219,7 @@ public class PackOut
|
|||
atts.addAttribute("","","CreatedDate","CDATA",packoutDocument.getCreated().toString());
|
||||
atts.addAttribute("","","UpdatedDate","CDATA",packoutDocument.getUpdated().toString());
|
||||
atts.addAttribute("","","PackOutVersion","CDATA",PackOutVersion);
|
||||
atts.addAttribute("","","UpdateDictionary","CDATA", isExportDictionaryEntity ? "true" : "false");
|
||||
|
||||
MClient client = MClient.get(pipoContext.ctx);
|
||||
StringBuffer sb = new StringBuffer ()
|
||||
|
@ -465,4 +467,11 @@ public class PackOut
|
|||
return false;
|
||||
}
|
||||
|
||||
public boolean isExportDictionaryEntity() {
|
||||
return isExportDictionaryEntity;
|
||||
}
|
||||
|
||||
public void setExportDictionaryEntity(boolean isExportDictionaryEntity) {
|
||||
this.isExportDictionaryEntity = isExportDictionaryEntity;
|
||||
}
|
||||
} // PackOut
|
||||
|
|
|
@ -136,6 +136,7 @@ public class PackOutProcess extends SvrProcess
|
|||
packOut.setFromDate((Timestamp) dateFromValue);
|
||||
}
|
||||
|
||||
packOut.setExportDictionaryEntity(packageExp.isExportDictionaryEntity());
|
||||
packOut.export(packoutDirectory, null, packoutDocument, packoutItems, get_TrxName());
|
||||
processedCount = packOut.getExportCount();
|
||||
exportFile = packOut.getExportFile();
|
||||
|
|
Loading…
Reference in New Issue