1 /* 2 * (C) Copyright 1989-2012 Trend Micro, Inc. 3 * All Rights Reserved. 4 * 5 * This program is an unpublished copyrighted work which is proprietary 6 * to Trend Micro, Inc. and contains confidential information that is not 7 * to be reproduced or disclosed to any other person or entity without 8 * prior written consent from Trend Micro, Inc. in each and every instance. 9 * 10 * WARNING: Unauthorized reproduction of this program as well as 11 * unauthorized preparation of derivative works based upon the 12 * program or distribution of copies by sale, rental, lease or 13 * lending are violations of federal copyright laws and state trade 14 * secret laws, punishable by civil and criminal penalties. 15 */ 16 17 package com.trendmicro.grid.acl.ds.jpa; 18 19 import javax.persistence.QueryHint; 20 21 /** 22 * Small collection of query hint keys and values to be used with {@link QueryHint}. 23 * 24 * @author juergen_kellerer, 2012-07-31 25 */ 26 public interface QueryHints { 27 /** 28 * Key; Controls whether the query cache is read by the query that has the query hint. 29 */ 30 String CACHE_RETRIEVE_MODE = "javax.persistence.cache.retrieveMode"; 31 32 /** 33 * Key; Controls whether the query cache is written by the query that has the query hint. 34 */ 35 String CACHE_STORE_MODE = "javax.persistence.cache.storeMode"; 36 37 /** 38 * Key; Controls whether the query cache is enabled. 39 */ 40 String CACHEABLE = "org.hibernate.cacheable"; 41 42 43 /** 44 * Hint value for {@link #CACHEABLE}. 45 */ 46 String V_YES = "true"; 47 48 /** 49 * Hint value for {@link #CACHE_RETRIEVE_MODE} and {@link #CACHE_STORE_MODE} 50 */ 51 String V_USE = "use"; 52 }