@Test public void testOption8() { Option option = new Option(); option.addNoCacheGroup("abc"); //$NON-NLS-1$ option.addNoCacheGroup("def"); //$NON-NLS-1$ option.addNoCacheGroup("xyz"); //$NON-NLS-1$ helpTest(option, "OPTION NOCACHE abc, def, xyz"); //$NON-NLS-1$ }
static Option mergeOptions(Option parent, Option child) { if (child == null) { return parent; } if (parent != null && parent.isNoCache() && parent != child) { //merge no cache settings if (parent.getNoCacheGroups() == null || parent.getNoCacheGroups().isEmpty()) { if (child.getNoCacheGroups() != null) { child.getNoCacheGroups().clear(); // full no cache } } else if (child.getNoCacheGroups() != null && !child.getNoCacheGroups().isEmpty()) { for (String noCache : parent.getNoCacheGroups()) { child.addNoCacheGroup(noCache); // only groups } } child.setNoCache(true); } return child; }
public void testOptionEquals3() { Option opt1 = new Option(); opt1.addNoCacheGroup("abc"); //$NON-NLS-1$ UnitTestUtil.helpTestEquivalence(0, opt1, opt1); }
static Option mergeOptions(Option parent, Option child) { if (child == null) { return parent; } if (parent != null && parent.isNoCache() && parent != child) { //merge no cache settings if (parent.getNoCacheGroups() == null || parent.getNoCacheGroups().isEmpty()) { if (child.getNoCacheGroups() != null) { child.getNoCacheGroups().clear(); // full no cache } } else if (child.getNoCacheGroups() != null && !child.getNoCacheGroups().isEmpty()) { for (String noCache : parent.getNoCacheGroups()) { child.addNoCacheGroup(noCache); // only groups } } child.setNoCache(true); } return child; }
public void testOptionEqualsFail5() { Option opt1 = new Option(); opt1.addNoCacheGroup("abc"); //$NON-NLS-1$ Option opt2 = new Option(); opt1.addNoCacheGroup("abc.def"); //$NON-NLS-1$ assertTrue("Options should not be equal", ! opt1.equals(opt2)); //$NON-NLS-1$ assertTrue("Options should not be equal", ! opt2.equals(opt1)); //$NON-NLS-1$ }
public void testClone() { Option opt1 = new Option(); opt1.addDependentGroup("abc"); //$NON-NLS-1$ opt1.addNotDependentGroup("xyz"); //$NON-NLS-1$ opt1.addNoCacheGroup("abc"); //$NON-NLS-1$ Option opt2 = (Option) opt1.clone(); UnitTestUtil.helpTestEquivalence(0, opt1, opt2); }
public void testOptionEqualsFail4() { Option opt1 = new Option(); opt1.addNoCacheGroup("abc"); //$NON-NLS-1$ Option opt2 = new Option(); assertTrue("Options should not be equal", ! opt1.equals(opt2)); //$NON-NLS-1$ assertTrue("Options should not be equal", ! opt2.equals(opt1)); //$NON-NLS-1$ }
option.addNoCacheGroup(noCache); // only groups
@Test public void testOptionNoCache2(){ GroupSymbol g = new GroupSymbol("db.g"); //$NON-NLS-1$ From from = new From(); from.addGroup(g); Select select = new Select(); ElementSymbol a = new ElementSymbol("a"); //$NON-NLS-1$ select.addSymbol(a); Option option = new Option(); option.setNoCache(true); option.addNoCacheGroup("a.b.c"); //$NON-NLS-1$ option.addNoCacheGroup("d.e.f"); //$NON-NLS-1$ Query query = new Query(); query.setSelect(select); query.setFrom(from); query.setOption(option); TestParser.helpTest("Select a From db.g Option nocache a.b.c, d.e.f", //$NON-NLS-1$ "SELECT a FROM db.g OPTION NOCACHE a.b.c, d.e.f", //$NON-NLS-1$ query); }
Option option = new Option(); option.setNoCache(true); option.addNoCacheGroup(fullName); proc.setOption(option); StoredProcedure cloneProc = (StoredProcedure)proc.clone();
Option option = new Option(); option.setNoCache(true); option.addNoCacheGroup(fullName); proc.setOption(option); StoredProcedure cloneProc = (StoredProcedure)proc.clone();
Option option = new Option(); option.setNoCache(true); option.addNoCacheGroup(fullName); proc.setOption(option); StoredProcedure cloneProc = (StoredProcedure)proc.clone();
@Test public void testOptionNoCache1(){ GroupSymbol g = new GroupSymbol("db.g"); //$NON-NLS-1$ From from = new From(); from.addGroup(g); Select select = new Select(); ElementSymbol a = new ElementSymbol("a"); //$NON-NLS-1$ select.addSymbol(a); Option option = new Option(); option.setNoCache(true); option.addNoCacheGroup("a.b.c"); //$NON-NLS-1$ Query query = new Query(); query.setSelect(select); query.setFrom(from); query.setOption(option); TestParser.helpTest("Select a From db.g Option nocache a.b.c", //$NON-NLS-1$ "SELECT a FROM db.g OPTION NOCACHE a.b.c", //$NON-NLS-1$ query); }
case ID: id = id(null); option.addNoCacheGroup(id); label_32: while (true) { option.addNoCacheGroup(id);
case ID: id = id(null); option.addNoCacheGroup(id); label_32: while (true) { option.addNoCacheGroup(id);
case ID: id = id(null); option.addNoCacheGroup(id); label_32: while (true) { option.addNoCacheGroup(id);