From 16093fb33cba9144d695cb283a4baecb4966211b Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Wed, 2 May 2018 13:07:18 +0200 Subject: [PATCH] IDEMPIERE-1906 Use postgresql SIMILAR TO instead of LIKE --- .../compiere/model/I_AD_UserPreference.java | 9 ++++++++ .../compiere/model/X_AD_UserPreference.java | 23 ++++++++++++++++++- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/org.adempiere.base/src/org/compiere/model/I_AD_UserPreference.java b/org.adempiere.base/src/org/compiere/model/I_AD_UserPreference.java index 482759b96b..f1d278eae9 100644 --- a/org.adempiere.base/src/org/compiere/model/I_AD_UserPreference.java +++ b/org.adempiere.base/src/org/compiere/model/I_AD_UserPreference.java @@ -164,6 +164,15 @@ public interface I_AD_UserPreference /** Get Detailed Zoom Across */ public boolean isDetailedZoomAcross(); + /** Column name IsUseSimilarTo */ + public static final String COLUMNNAME_IsUseSimilarTo = "IsUseSimilarTo"; + + /** Set Use Similar To */ + public void setIsUseSimilarTo (boolean IsUseSimilarTo); + + /** Get Use Similar To */ + public boolean isUseSimilarTo(); + /** Column name ToggleOnDoubleClick */ public static final String COLUMNNAME_ToggleOnDoubleClick = "ToggleOnDoubleClick"; diff --git a/org.adempiere.base/src/org/compiere/model/X_AD_UserPreference.java b/org.adempiere.base/src/org/compiere/model/X_AD_UserPreference.java index 654f4d55c1..ce2825bbb9 100644 --- a/org.adempiere.base/src/org/compiere/model/X_AD_UserPreference.java +++ b/org.adempiere.base/src/org/compiere/model/X_AD_UserPreference.java @@ -29,7 +29,7 @@ public class X_AD_UserPreference extends PO implements I_AD_UserPreference, I_Pe /** * */ - private static final long serialVersionUID = 20180119L; + private static final long serialVersionUID = 20180502L; /** Standard Constructor */ public X_AD_UserPreference (Properties ctx, int AD_UserPreference_ID, String trxName) @@ -215,6 +215,27 @@ public class X_AD_UserPreference extends PO implements I_AD_UserPreference, I_Pe return false; } + /** Set Use Similar To. + @param IsUseSimilarTo Use Similar To */ + public void setIsUseSimilarTo (boolean IsUseSimilarTo) + { + set_Value (COLUMNNAME_IsUseSimilarTo, Boolean.valueOf(IsUseSimilarTo)); + } + + /** Get Use Similar To. + @return Use Similar To */ + public boolean isUseSimilarTo () + { + Object oo = get_Value(COLUMNNAME_IsUseSimilarTo); + if (oo != null) + { + if (oo instanceof Boolean) + return ((Boolean)oo).booleanValue(); + return "Y".equals(oo); + } + return false; + } + /** Set Toggle on Double Click. @param ToggleOnDoubleClick Defines if double click in a field on grid mode switch to form view