Package org.apache.openjpa.jdbc.kernel

Examples of org.apache.openjpa.jdbc.kernel.PreparedQueryImpl


 
  protected void setUp() throws Exception {
    super.setUp();
    cache = new PreparedQueryCacheImpl();
    for (int i = 0; i < keys.length; i++) {
            PreparedQuery p = new PreparedQueryImpl(keys[i], values[i], null);
      cache.cache(p);
    }
  }
View Full Code Here


 
  public void testAddExclusionPatternDisallowsCacheing() {
    int EXCLUDED = 1;
    cache.addExclusionPattern(keys[EXCLUDED]);
   
        PreparedQuery p = new PreparedQueryImpl(keys[EXCLUDED],
                values[EXCLUDED], null);
        assertFalse("Must not cache excluded key " + keys[EXCLUDED],
                cache.cache(p));
  }
View Full Code Here

 
  public void testRemoveExclusionPatternAllowsCacheing() {
    int EXCLUDED = 1;
    cache.addExclusionPattern(keys[EXCLUDED]);
   
        PreparedQuery p = new PreparedQueryImpl(keys[EXCLUDED],
                values[EXCLUDED], null);
        assertFalse("Must not cache excluded key " + keys[EXCLUDED],
                cache.cache(p));
   
    cache.removeExclusionPattern(keys[EXCLUDED]);
View Full Code Here

  public void testRemoveExclusionPatternDoesNotRemoveUserProhbitedKeys() {
    String USER_MARKED_UNCACHABLE = "[user prohibited]";
    cache.markUncachable(USER_MARKED_UNCACHABLE,
            new PreparedQueryCacheImpl.StrongExclusion(USER_MARKED_UNCACHABLE,"for testing"));
   
        PreparedQuery p = new PreparedQueryImpl(USER_MARKED_UNCACHABLE, "xyz",
                null);
    assertFalse("Must not cache user-prohibited key " +
        USER_MARKED_UNCACHABLE, cache.cache(p));
   
    cache.removeExclusionPattern(USER_MARKED_UNCACHABLE);
View Full Code Here

TOP

Related Classes of org.apache.openjpa.jdbc.kernel.PreparedQueryImpl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.