Stabilization of replication
More stabilization gix the issue when query return not null value Version is not necessary for _Key format reference Link to SF Tracker: http://sourceforge.net/support/tracker.php?aid=879332
This commit is contained in:
parent
17f61308bd
commit
f4598da280
|
@ -114,8 +114,11 @@ public class MEXPFormat extends X_EXP_Format {
|
||||||
if(exp_format != null)
|
if(exp_format != null)
|
||||||
return exp_format;
|
return exp_format;
|
||||||
exp_format = new MEXPFormat(ctx, EXP_Format_ID , trxName);
|
exp_format = new MEXPFormat(ctx, EXP_Format_ID , trxName);
|
||||||
|
if(exp_format!=null)
|
||||||
|
{
|
||||||
exp_format.getFormatLines();
|
exp_format.getFormatLines();
|
||||||
exp_format_by_id_cache.put(EXP_Format_ID, exp_format);
|
exp_format_by_id_cache.put(EXP_Format_ID, exp_format);
|
||||||
|
}
|
||||||
return exp_format;
|
return exp_format;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -133,9 +136,13 @@ public class MEXPFormat extends X_EXP_Format {
|
||||||
|
|
||||||
retValue = (MEXPFormat) new Query(ctx,X_EXP_Format.Table_Name,whereCluse.toString(),trxName)
|
retValue = (MEXPFormat) new Query(ctx,X_EXP_Format.Table_Name,whereCluse.toString(),trxName)
|
||||||
.setParameters(new Object[] {value,AD_Client_ID,version}).first();
|
.setParameters(new Object[] {value,AD_Client_ID,version}).first();
|
||||||
|
|
||||||
|
if(retValue != null)
|
||||||
|
{
|
||||||
retValue.getFormatLines();
|
retValue.getFormatLines();
|
||||||
s_cache.put (key, retValue);
|
s_cache.put (key, retValue);
|
||||||
exp_format_by_id_cache.put(retValue.getEXP_Format_ID(), retValue);
|
exp_format_by_id_cache.put(retValue.getEXP_Format_ID(), retValue);
|
||||||
|
}
|
||||||
|
|
||||||
return retValue;
|
return retValue;
|
||||||
}
|
}
|
||||||
|
@ -156,9 +163,13 @@ public class MEXPFormat extends X_EXP_Format {
|
||||||
retValue = (MEXPFormat) new Query(ctx,X_EXP_Format.Table_Name,whereClause.toString(),trxName)
|
retValue = (MEXPFormat) new Query(ctx,X_EXP_Format.Table_Name,whereClause.toString(),trxName)
|
||||||
.setParameters(new Object[] {AD_Client_ID,AD_Table_ID,version})
|
.setParameters(new Object[] {AD_Client_ID,AD_Table_ID,version})
|
||||||
.first();
|
.first();
|
||||||
|
if(retValue!=null)
|
||||||
|
{
|
||||||
retValue.getFormatLines();
|
retValue.getFormatLines();
|
||||||
s_cache.put (key, retValue);
|
s_cache.put (key, retValue);
|
||||||
exp_format_by_id_cache.put(retValue.getEXP_Format_ID(), retValue);
|
exp_format_by_id_cache.put(retValue.getEXP_Format_ID(), retValue);
|
||||||
|
}
|
||||||
|
|
||||||
return retValue;
|
return retValue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -233,7 +233,6 @@ public class ExportFormatGenerator extends SvrProcess
|
||||||
referenceFormat.setAD_Table_ID(MTable.getTable_ID(m_parent_table));
|
referenceFormat.setAD_Table_ID(MTable.getTable_ID(m_parent_table));
|
||||||
referenceFormat.setDescription(table.getDescription());
|
referenceFormat.setDescription(table.getDescription());
|
||||||
referenceFormat.setHelp(table.getHelp());
|
referenceFormat.setHelp(table.getHelp());
|
||||||
referenceFormat.setVersion(version);
|
|
||||||
referenceFormat.saveEx();
|
referenceFormat.saveEx();
|
||||||
|
|
||||||
int AD_Column_ID=DB.getSQLValue(get_TrxName(), "SELECT AD_Column_ID FROM AD_Column WHERE AD_Table_ID=(SELECT AD_Table_ID FROM AD_Table WHERE TableName=?) AND UPPER(ColumnName)='DOCUMENTNO'",m_parent_table);
|
int AD_Column_ID=DB.getSQLValue(get_TrxName(), "SELECT AD_Column_ID FROM AD_Column WHERE AD_Table_ID=(SELECT AD_Table_ID FROM AD_Table WHERE TableName=?) AND UPPER(ColumnName)='DOCUMENTNO'",m_parent_table);
|
||||||
|
@ -331,11 +330,15 @@ public class ExportFormatGenerator extends SvrProcess
|
||||||
log.info("Table Name:"+tableName);
|
log.info("Table Name:"+tableName);
|
||||||
|
|
||||||
if(tableName==null)
|
if(tableName==null)
|
||||||
|
{
|
||||||
log.info("Table Name: null");
|
log.info("Table Name: null");
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
tabledir = MTable.get(getCtx(), tableName);
|
tabledir = MTable.get(getCtx(), tableName);
|
||||||
if(tabledir==null)
|
if(tabledir==null)
|
||||||
throw new Exception ("Ilegal Table Name");
|
return 0;
|
||||||
|
// throw new Exception ("Ilegal Table Name");
|
||||||
|
|
||||||
formatLine.setValue(tabledir.getTableName()+"_Reference");
|
formatLine.setValue(tabledir.getTableName()+"_Reference");
|
||||||
formatLine.setName("Referenced "+ tabledir.getTableName());
|
formatLine.setName("Referenced "+ tabledir.getTableName());
|
||||||
|
|
Loading…
Reference in New Issue