KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > oracle > toplink > essentials > internal > helper > JDKPlatform


1 /*
2  * The contents of this file are subject to the terms
3  * of the Common Development and Distribution License
4  * (the "License"). You may not use this file except
5  * in compliance with the License.
6  *
7  * You can obtain a copy of the license at
8  * glassfish/bootstrap/legal/CDDLv1.0.txt or
9  * https://glassfish.dev.java.net/public/CDDLv1.0.html.
10  * See the License for the specific language governing
11  * permissions and limitations under the License.
12  *
13  * When distributing Covered Code, include this CDDL
14  * HEADER in each file and include the License file at
15  * glassfish/bootstrap/legal/CDDLv1.0.txt. If applicable,
16  * add the following below this CDDL HEADER, with the
17  * fields enclosed by brackets "[]" replaced with your
18  * own identifying information: Portions Copyright [yyyy]
19  * [name of copyright owner]
20  */

21 // Copyright (c) 1998, 2005, Oracle. All rights reserved.
22
package oracle.toplink.essentials.internal.helper;
23
24
25 /**
26  * INTERNAL:
27  * Interface which abstracts the version of the JDK we are on.
28  * This should only implement methods that are dependant on JDK version
29  * The implementers should implement the minimum amount of functionality required to
30  * allow support of multiple versions of the JDK.
31  * @see JDK13Platform
32  * @see JDK14Platform
33  * @see JDK15Platform
34  * @see JavaPlatform
35  * @author Tom Ware
36  */

37 public interface JDKPlatform {
38
39     /**
40      * Conforming queries with LIKE will act differently in different JDKs.
41      */

42     public int conformLike(Object JavaDoc left, Object JavaDoc right);
43
44     /**
45      * Get the milliseconds from a Calendar. JDK 1.4 offers a more efficient way of doing this.
46      */

47     public long getTimeInMillis(java.util.Calendar JavaDoc calendar);
48
49     /**
50      * Set the milliseconds for a Calendar. JDK 1.4 offers a more efficient way of doing this.
51      */

52     public void setTimeInMillis(java.util.Calendar JavaDoc calendar, long millis);
53
54     /**
55      * Get the Map to store the query cache in
56      */

57     public java.util.Map JavaDoc getQueryCacheMap();
58
59     /**
60      * JDK 1.4 offers the option of setting the cause of an exception
61      */

62     public void setExceptionCause(Throwable JavaDoc exception, Throwable JavaDoc cause);
63
64     /**
65      * Return a boolean which determines where TopLink should include the TopLink-stored
66      * Internal exception in it's stack trace. For JDK 1.4 VMs with exception chaining
67      * the Internal exception can be redundant and confusing.
68      */

69     public boolean shouldPrintInternalException();
70 }
71
Popular Tags