[ 2101466 ] Implement Native Sequence Functionality
http://sourceforge.net/tracker/index.php?func=detail&aid=2101466&group_id=176962&atid=879335 Thinking further, this must be a system wide sequence, not configurable by tenant
This commit is contained in:
parent
461ed0a8a9
commit
b857a97866
|
@ -86,7 +86,7 @@ public class Convert_PostgreSQL extends Convert_SQL92 {
|
||||||
found_next_fuction = sqlStatement.toUpperCase().indexOf("NEXTID(");
|
found_next_fuction = sqlStatement.toUpperCase().indexOf("NEXTID(");
|
||||||
if(found_next_fuction > 0)
|
if(found_next_fuction > 0)
|
||||||
{
|
{
|
||||||
boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue("SYSTEM_NATIVE_SEQUENCE",false,Env.getAD_Client_ID(Env.getCtx()));
|
boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue("SYSTEM_NATIVE_SEQUENCE",false);
|
||||||
boolean adempiereSys = Ini.isPropertyBool(Ini.P_ADEMPIERESYS);
|
boolean adempiereSys = Ini.isPropertyBool(Ini.P_ADEMPIERESYS);
|
||||||
|
|
||||||
if(SYSTEM_NATIVE_SEQUENCE && !adempiereSys)
|
if(SYSTEM_NATIVE_SEQUENCE && !adempiereSys)
|
||||||
|
|
|
@ -938,7 +938,7 @@ public class MSequence extends X_AD_Sequence
|
||||||
*/
|
*/
|
||||||
public static boolean createTableSequence (Properties ctx, String TableName, String trxName)
|
public static boolean createTableSequence (Properties ctx, String TableName, String trxName)
|
||||||
{
|
{
|
||||||
boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue("SYSTEM_NATIVE_SEQUENCE",false,Env.getAD_Client_ID(Env.getCtx()));
|
boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue("SYSTEM_NATIVE_SEQUENCE",false);
|
||||||
|
|
||||||
if(SYSTEM_NATIVE_SEQUENCE)
|
if(SYSTEM_NATIVE_SEQUENCE)
|
||||||
{
|
{
|
||||||
|
|
|
@ -1533,7 +1533,7 @@ public final class DB
|
||||||
*/
|
*/
|
||||||
public static int getNextID (int AD_Client_ID, String TableName, String trxName)
|
public static int getNextID (int AD_Client_ID, String TableName, String trxName)
|
||||||
{
|
{
|
||||||
boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue("SYSTEM_NATIVE_SEQUENCE",false,AD_Client_ID);
|
boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue("SYSTEM_NATIVE_SEQUENCE",false);
|
||||||
boolean adempiereSys = Ini.isPropertyBool(Ini.P_ADEMPIERESYS);
|
boolean adempiereSys = Ini.isPropertyBool(Ini.P_ADEMPIERESYS);
|
||||||
|
|
||||||
if(SYSTEM_NATIVE_SEQUENCE && !adempiereSys)
|
if(SYSTEM_NATIVE_SEQUENCE && !adempiereSys)
|
||||||
|
|
|
@ -50,7 +50,7 @@ public class EnableNativeSequence extends SvrProcess
|
||||||
|
|
||||||
protected String doIt()
|
protected String doIt()
|
||||||
{
|
{
|
||||||
boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue("SYSTEM_NATIVE_SEQUENCE",false,Env.getAD_Client_ID(Env.getCtx()));
|
boolean SYSTEM_NATIVE_SEQUENCE = MSysConfig.getBooleanValue("SYSTEM_NATIVE_SEQUENCE",false);
|
||||||
|
|
||||||
if(SYSTEM_NATIVE_SEQUENCE)
|
if(SYSTEM_NATIVE_SEQUENCE)
|
||||||
throw new AdempiereException("Native Sequence is Actived");
|
throw new AdempiereException("Native Sequence is Actived");
|
||||||
|
|
Loading…
Reference in New Issue