|
|
@ -92,6 +92,10 @@ public class RuleUtil {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public static List<RuleModel> getRule(Long id, String key, String type) {
|
|
|
|
public static List<RuleModel> getRule(Long id, String key, String type) {
|
|
|
|
|
|
|
|
return getRule(id, key, type, null);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
public static List<RuleModel> getRule(Long id, String key, String type, String status) {
|
|
|
|
// Define a projection that specifies which columns from the database
|
|
|
|
// Define a projection that specifies which columns from the database
|
|
|
|
// you will actually use after this query.
|
|
|
|
// you will actually use after this query.
|
|
|
|
String[] projection = {
|
|
|
|
String[] projection = {
|
|
|
@ -123,6 +127,11 @@ public class RuleUtil {
|
|
|
|
selectionArgList.add(type);
|
|
|
|
selectionArgList.add(type);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (status != null) {
|
|
|
|
|
|
|
|
selection += " and " + RuleTable.RuleEntry.COLUMN_NAME_STATUS + " = ? ";
|
|
|
|
|
|
|
|
selectionArgList.add(status);
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
if (key != null) {
|
|
|
|
if (key != null) {
|
|
|
|
// Define 'where' part of query.
|
|
|
|
// Define 'where' part of query.
|
|
|
|
if (key.equals("SIM1") || key.equals("SIM2")) {
|
|
|
|
if (key.equals("SIM1") || key.equals("SIM2")) {
|
|
|
|