Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
为 GitLab 提交贡献
登录/注册
切换导航
H
h2database
项目
项目
详情
活动
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分枝图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
折叠边栏
关闭边栏
活动
分枝图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
Administrator
h2database
Commits
4a053407
提交
4a053407
authored
8月 28, 2011
作者:
Thomas Mueller
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Source code switching using //## has been simplified.
上级
ccabdcb9
显示空白字符变更
内嵌
并排
正在显示
36 个修改的文件
包含
140 行增加
和
307 行删除
+140
-307
Console.java
h2/src/main/org/h2/tools/Console.java
+37
-37
SimpleResultSet.java
h2/src/main/org/h2/tools/SimpleResultSet.java
+102
-102
TestFunctions.java
h2/src/test/org/h2/test/db/TestFunctions.java
+0
-8
AnnotationsTest.java
h2/src/test/org/h2/test/jaqu/AnnotationsTest.java
+0
-4
ComplexObject.java
h2/src/test/org/h2/test/jaqu/ComplexObject.java
+0
-4
Customer.java
h2/src/test/org/h2/test/jaqu/Customer.java
+1
-4
ModelsTest.java
h2/src/test/org/h2/test/jaqu/ModelsTest.java
+0
-4
Order.java
h2/src/test/org/h2/test/jaqu/Order.java
+0
-4
Product.java
h2/src/test/org/h2/test/jaqu/Product.java
+0
-4
ProductAnnotationOnly.java
h2/src/test/org/h2/test/jaqu/ProductAnnotationOnly.java
+0
-3
ProductMixedAnnotation.java
h2/src/test/org/h2/test/jaqu/ProductMixedAnnotation.java
+0
-3
ProductNoCreateTable.java
h2/src/test/org/h2/test/jaqu/ProductNoCreateTable.java
+0
-4
SamplesTest.java
h2/src/test/org/h2/test/jaqu/SamplesTest.java
+0
-14
CompareType.java
h2/src/tools/org/h2/jaqu/CompareType.java
+0
-2
Condition.java
h2/src/tools/org/h2/jaqu/Condition.java
+0
-2
ConditionAndOr.java
h2/src/tools/org/h2/jaqu/ConditionAndOr.java
+0
-2
Db.java
h2/src/tools/org/h2/jaqu/Db.java
+0
-4
Define.java
h2/src/tools/org/h2/jaqu/Define.java
+0
-2
Function.java
h2/src/tools/org/h2/jaqu/Function.java
+0
-4
OrderExpression.java
h2/src/tools/org/h2/jaqu/OrderExpression.java
+0
-2
Query.java
h2/src/tools/org/h2/jaqu/Query.java
+0
-10
QueryCondition.java
h2/src/tools/org/h2/jaqu/QueryCondition.java
+0
-2
QueryJoin.java
h2/src/tools/org/h2/jaqu/QueryJoin.java
+0
-2
QueryJoinCondition.java
h2/src/tools/org/h2/jaqu/QueryJoinCondition.java
+0
-2
QueryWhere.java
h2/src/tools/org/h2/jaqu/QueryWhere.java
+0
-6
SQLStatement.java
h2/src/tools/org/h2/jaqu/SQLStatement.java
+0
-4
SelectColumn.java
h2/src/tools/org/h2/jaqu/SelectColumn.java
+0
-4
SelectTable.java
h2/src/tools/org/h2/jaqu/SelectTable.java
+0
-4
TableDefinition.java
h2/src/tools/org/h2/jaqu/TableDefinition.java
+0
-8
TestCondition.java
h2/src/tools/org/h2/jaqu/TestCondition.java
+0
-2
Token.java
h2/src/tools/org/h2/jaqu/Token.java
+0
-2
UpdateColumn.java
h2/src/tools/org/h2/jaqu/UpdateColumn.java
+0
-2
UpdateColumnIncrement.java
h2/src/tools/org/h2/jaqu/UpdateColumnIncrement.java
+0
-2
UpdateColumnSet.java
h2/src/tools/org/h2/jaqu/UpdateColumnSet.java
+0
-2
ClassUtils.java
h2/src/tools/org/h2/jaqu/util/ClassUtils.java
+0
-38
WeakIdentityHashMap.java
h2/src/tools/org/h2/jaqu/util/WeakIdentityHashMap.java
+0
-4
没有找到文件。
h2/src/main/org/h2/tools/Console.java
浏览文件 @
4a053407
...
...
@@ -6,7 +6,7 @@
*/
package
org
.
h2
.
tools
;
//## AWT
begin
##
//## AWT ##
import
java.awt.Button
;
import
java.awt.Dimension
;
import
java.awt.Font
;
...
...
@@ -44,12 +44,12 @@ import org.h2.util.Utils;
* @author Thomas Mueller, Ridvan Agar
*/
public
class
Console
extends
Tool
implements
//## AWT
begin
##
//## AWT ##
ActionListener
,
MouseListener
,
WindowListener
,
//
## AWT end ##
//
*/
ShutdownHandler
{
//## AWT
begin
##
//## AWT ##
private
Frame
frame
;
private
boolean
trayIconUsed
;
private
Font
font
;
...
...
@@ -57,7 +57,7 @@ ShutdownHandler {
private
TextField
urlText
;
private
Object
tray
;
private
Object
trayIcon
;
//
## AWT end ##
//
*/
private
Server
web
,
tcp
,
pg
;
private
boolean
isWindows
;
private
long
lastOpen
;
...
...
@@ -238,7 +238,7 @@ ShutdownHandler {
}
}
//## AWT
begin
##
//## AWT ##
if
(
toolStart
&&
webRunning
&&
!
GraphicsEnvironment
.
isHeadless
())
{
loadFont
();
try
{
...
...
@@ -249,7 +249,7 @@ ShutdownHandler {
e
.
printStackTrace
();
}
}
//
## AWT end ##
//
*/
// start browser in any case (even if the server is already running)
// because some people don't look at the output,
...
...
@@ -332,7 +332,7 @@ ShutdownHandler {
pg
.
stop
();
pg
=
null
;
}
//## AWT
begin
##
//## AWT ##
if
(
frame
!=
null
)
{
frame
.
dispose
();
frame
=
null
;
...
...
@@ -350,11 +350,11 @@ ShutdownHandler {
}
System
.
gc
();
}
//
## AWT end ##
//
*/
// System.exit(0);
}
//## AWT
begin
##
//## AWT ##
private
void
loadFont
()
{
if
(
isWindows
)
{
font
=
new
Font
(
"Dialog"
,
Font
.
PLAIN
,
11
);
...
...
@@ -519,7 +519,7 @@ ShutdownHandler {
}
}
}
//
## AWT end ##
//
*/
private
void
openBrowser
(
String
url
)
{
try
{
...
...
@@ -532,7 +532,7 @@ ShutdownHandler {
/**
* INTERNAL
*/
//## AWT
begin
##
//## AWT ##
public
void
actionPerformed
(
ActionEvent
e
)
{
String
command
=
e
.
getActionCommand
();
if
(
"exit"
.
equals
(
command
))
{
...
...
@@ -546,59 +546,59 @@ ShutdownHandler {
startBrowser
();
}
}
//
## AWT end ##
//
*/
/**
* INTERNAL
*/
//## AWT
begin
##
//## AWT ##
public
void
mouseClicked
(
MouseEvent
e
)
{
if
(
e
.
getButton
()
==
MouseEvent
.
BUTTON1
)
{
startBrowser
();
}
}
//
## AWT end ##
//
*/
/**
* INTERNAL
*/
//## AWT
begin
##
//## AWT ##
public
void
mouseEntered
(
MouseEvent
e
)
{
// nothing to do
}
//
## AWT end ##
//
*/
/**
* INTERNAL
*/
//## AWT
begin
##
//## AWT ##
public
void
mouseExited
(
MouseEvent
e
)
{
// nothing to do
}
//
## AWT end ##
//
*/
/**
* INTERNAL
*/
//## AWT
begin
##
//## AWT ##
public
void
mousePressed
(
MouseEvent
e
)
{
// nothing to do
}
//
## AWT end ##
//
*/
/**
* INTERNAL
*/
//## AWT
begin
##
//## AWT ##
public
void
mouseReleased
(
MouseEvent
e
)
{
// nothing to do
}
//
## AWT end ##
//
*/
/**
* INTERNAL
*/
//## AWT
begin
##
//## AWT ##
public
void
windowClosing
(
WindowEvent
e
)
{
if
(
trayIconUsed
)
{
frame
.
dispose
();
...
...
@@ -607,60 +607,60 @@ ShutdownHandler {
shutdown
();
}
}
//
## AWT end ##
//
*/
/**
* INTERNAL
*/
//## AWT
begin
##
//## AWT ##
public
void
windowActivated
(
WindowEvent
e
)
{
// nothing to do
}
//
## AWT end ##
//
*/
/**
* INTERNAL
*/
//## AWT
begin
##
//## AWT ##
public
void
windowClosed
(
WindowEvent
e
)
{
// nothing to do
}
//
## AWT end ##
//
*/
/**
* INTERNAL
*/
//## AWT
begin
##
//## AWT ##
public
void
windowDeactivated
(
WindowEvent
e
)
{
// nothing to do
}
//
## AWT end ##
//
*/
/**
* INTERNAL
*/
//## AWT
begin
##
//## AWT ##
public
void
windowDeiconified
(
WindowEvent
e
)
{
// nothing to do
}
//
## AWT end ##
//
*/
/**
* INTERNAL
*/
//## AWT
begin
##
//## AWT ##
public
void
windowIconified
(
WindowEvent
e
)
{
// nothing to do
}
//
## AWT end ##
//
*/
/**
* INTERNAL
*/
//## AWT
begin
##
//## AWT ##
public
void
windowOpened
(
WindowEvent
e
)
{
// nothing to do
}
//
## AWT end ##
//
*/
}
h2/src/main/org/h2/tools/SimpleResultSet.java
浏览文件 @
4a053407
...
...
@@ -30,11 +30,11 @@ import org.h2.constant.ErrorCode;
import
org.h2.message.DbException
;
import
org.h2.util.New
;
//## Java 1.6
begin
##
//## Java 1.6 ##
import
java.sql.NClob
;
import
java.sql.RowId
;
import
java.sql.SQLXML
;
//
## Java 1.6 end ##
//
*/
/**
* This class is a simple result set and meta data implementation.
...
...
@@ -1645,38 +1645,38 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
RowId
getRowId
(
int
columnIndex
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
RowId
getRowId
(
String
columnLabel
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateRowId
(
int
columnIndex
,
RowId
x
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateRowId
(
String
columnLabel
,
RowId
x
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* Returns the current result set holdability.
...
...
@@ -1699,427 +1699,427 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateNString
(
int
columnIndex
,
String
nString
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateNString
(
String
columnLabel
,
String
nString
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateNClob
(
int
columnIndex
,
NClob
nClob
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateNClob
(
String
columnLabel
,
NClob
nClob
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
NClob
getNClob
(
int
columnIndex
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
NClob
getNClob
(
String
columnLabel
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
SQLXML
getSQLXML
(
int
columnIndex
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
SQLXML
getSQLXML
(
String
columnLabel
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateSQLXML
(
int
columnIndex
,
SQLXML
xmlObject
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateSQLXML
(
String
columnLabel
,
SQLXML
xmlObject
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
String
getNString
(
int
columnIndex
)
throws
SQLException
{
return
getString
(
columnIndex
);
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
String
getNString
(
String
columnLabel
)
throws
SQLException
{
return
getString
(
columnLabel
);
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
Reader
getNCharacterStream
(
int
columnIndex
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
Reader
getNCharacterStream
(
String
columnLabel
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
<
T
>
T
unwrap
(
Class
<
T
>
iface
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
boolean
isWrapperFor
(
Class
<?>
iface
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateAsciiStream
(
int
columnIndex
,
InputStream
x
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateAsciiStream
(
String
columnLabel
,
InputStream
x
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateAsciiStream
(
int
columnIndex
,
InputStream
x
,
long
length
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateAsciiStream
(
String
columnLabel
,
InputStream
x
,
long
length
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateBinaryStream
(
int
columnLabel
,
InputStream
x
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateBinaryStream
(
String
columnLabel
,
InputStream
x
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateBinaryStream
(
int
columnIndex
,
InputStream
x
,
long
length
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateBinaryStream
(
String
columnLabel
,
InputStream
x
,
long
length
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateBlob
(
int
columnIndex
,
InputStream
x
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateBlob
(
String
columnLabel
,
InputStream
x
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateBlob
(
int
columnIndex
,
InputStream
x
,
long
length
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateBlob
(
String
columnLabel
,
InputStream
x
,
long
length
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateCharacterStream
(
int
columnIndex
,
Reader
x
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateCharacterStream
(
String
columnLabel
,
Reader
x
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateCharacterStream
(
int
columnIndex
,
Reader
x
,
long
length
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateCharacterStream
(
String
columnLabel
,
Reader
x
,
long
length
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateClob
(
int
columnIndex
,
Reader
x
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateClob
(
String
columnLabel
,
Reader
x
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateClob
(
int
columnIndex
,
Reader
x
,
long
length
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateClob
(
String
columnLabel
,
Reader
x
,
long
length
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateNCharacterStream
(
int
columnIndex
,
Reader
x
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateNCharacterStream
(
String
columnLabel
,
Reader
x
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateNCharacterStream
(
int
columnIndex
,
Reader
x
,
long
length
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateNCharacterStream
(
String
columnLabel
,
Reader
x
,
long
length
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateNClob
(
int
columnIndex
,
Reader
x
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateNClob
(
String
columnLabel
,
Reader
x
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateNClob
(
int
columnIndex
,
Reader
x
,
long
length
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
*/
//## Java 1.6
begin
##
//## Java 1.6 ##
public
void
updateNClob
(
String
columnLabel
,
Reader
x
,
long
length
)
throws
SQLException
{
throw
getUnsupportedException
();
}
//
## Java 1.6 end ##
//
*/
/**
* INTERNAL
...
...
@@ -2127,11 +2127,11 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
* @param columnIndex the column index (1, 2, ...)
* @param type the class of the returned value
*/
/*## Java 1.7
begin
##
/*## Java 1.7 ##
public <T> T getObject(int columnIndex, Class<T> type) {
return null;
}
## Java 1.7 end ##
*/
//
*/
/**
* INTERNAL
...
...
@@ -2139,11 +2139,11 @@ public class SimpleResultSet implements ResultSet, ResultSetMetaData {
* @param columnName the column name
* @param type the class of the returned value
*/
/*## Java 1.7
begin
##
/*## Java 1.7 ##
public <T> T getObject(String columnName, Class<T> type) {
return null;
}
## Java 1.7 end ##
*/
//
*/
/**
* Set the auto-close behavior. If enabled (the default), the result set is
...
...
h2/src/test/org/h2/test/db/TestFunctions.java
浏览文件 @
4a053407
...
...
@@ -372,7 +372,6 @@ public class TestFunctions extends TestBase implements AggregateFunction {
}
private
void
testVarArgs
()
throws
SQLException
{
//## Java 1.5 begin ##
Connection
conn
=
getConnection
(
"functions"
);
Statement
stat
=
conn
.
createStatement
();
stat
.
execute
(
"CREATE ALIAS mean FOR \""
+
...
...
@@ -428,7 +427,6 @@ public class TestFunctions extends TestBase implements AggregateFunction {
assertEquals
(
"BB: 15"
,
rs
.
getString
(
3
));
assertEquals
(
"CCC: 20"
,
rs
.
getString
(
4
));
conn
.
close
();
//## Java 1.5 end ##
}
private
void
testFileRead
()
throws
Exception
{
...
...
@@ -983,7 +981,6 @@ public class TestFunctions extends TestBase implements AggregateFunction {
* @param values the values
* @return the mean value
*/
//## Java 1.5 begin ##
public
static
double
mean
(
double
...
values
)
{
double
sum
=
0
;
for
(
double
x
:
values
)
{
...
...
@@ -991,7 +988,6 @@ public class TestFunctions extends TestBase implements AggregateFunction {
}
return
sum
/
values
.
length
;
}
//## Java 1.5 end ##
/**
* This method is called via reflection from the database.
...
...
@@ -1000,7 +996,6 @@ public class TestFunctions extends TestBase implements AggregateFunction {
* @param values the values
* @return the mean value
*/
//## Java 1.5 begin ##
public
static
double
mean2
(
Connection
conn
,
double
...
values
)
{
conn
.
getClass
();
double
sum
=
0
;
...
...
@@ -1009,7 +1004,6 @@ public class TestFunctions extends TestBase implements AggregateFunction {
}
return
sum
/
values
.
length
;
}
//## Java 1.5 end ##
/**
* This method is called via reflection from the database.
...
...
@@ -1018,7 +1012,6 @@ public class TestFunctions extends TestBase implements AggregateFunction {
* @param values the values
* @return the text
*/
//## Java 1.5 begin ##
public
static
String
printMean
(
String
prefix
,
double
...
values
)
{
double
sum
=
0
;
for
(
double
x
:
values
)
{
...
...
@@ -1026,7 +1019,6 @@ public class TestFunctions extends TestBase implements AggregateFunction {
}
return
prefix
+
": "
+
(
int
)
(
sum
/
values
.
length
);
}
//## Java 1.5 end ##
/**
* This method is called via reflection from the database.
...
...
h2/src/test/org/h2/test/jaqu/AnnotationsTest.java
浏览文件 @
4a053407
...
...
@@ -22,9 +22,7 @@ public class AnnotationsTest extends TestBase {
/**
* This object represents a database (actually a connection to the database).
*/
//## Java 1.5 begin ##
private
Db
db
;
//## Java 1.5 end ##
/**
* This method is called when executing this application from the command
...
...
@@ -37,7 +35,6 @@ public class AnnotationsTest extends TestBase {
}
public
void
test
()
throws
SQLException
{
//## Java 1.5 begin ##
db
=
Db
.
open
(
"jdbc:h2:mem:"
,
"sa"
,
"sa"
);
db
.
insertAll
(
Product
.
getList
());
db
.
insertAll
(
ProductAnnotationOnly
.
getList
());
...
...
@@ -49,7 +46,6 @@ public class AnnotationsTest extends TestBase {
testCreateTableIfRequiredAnnotation
();
testColumnInheritanceAnnotation
();
db
.
close
();
//## Java 1.5 end ##
}
private
void
testIndexCreation
()
throws
SQLException
{
...
...
h2/src/test/org/h2/test/jaqu/ComplexObject.java
浏览文件 @
4a053407
...
...
@@ -6,7 +6,6 @@
*/
package
org
.
h2
.
test
.
jaqu
;
//## Java 1.5 begin ##
import
static
org
.
h2
.
jaqu
.
Define
.*;
import
java.math.BigDecimal
;
...
...
@@ -16,12 +15,10 @@ import java.util.List;
import
java.sql.Time
;
import
java.sql.Timestamp
;
import
org.h2.jaqu.Table
;
//## Java 1.5 end ##
/**
* A table containing all possible data types.
*/
//## Java 1.5 begin ##
public
class
ComplexObject
implements
Table
{
public
Integer
id
;
public
Long
amount
;
...
...
@@ -52,4 +49,3 @@ public class ComplexObject implements Table {
}
}
//## Java 1.5 end ##
h2/src/test/org/h2/test/jaqu/Customer.java
浏览文件 @
4a053407
...
...
@@ -6,10 +6,8 @@
*/
package
org
.
h2
.
test
.
jaqu
;
//## Java 1.5 begin ##
import
java.util.Arrays
;
import
java.util.List
;
//## Java 1.5 end ##
/**
* A table containing customer data.
...
...
@@ -32,7 +30,6 @@ public class Customer {
return
customerId
;
}
//## Java 1.5 begin ##
public
static
List
<
Customer
>
getList
()
{
Customer
[]
list
=
{
new
Customer
(
"ALFKI"
,
"WA"
),
...
...
@@ -40,5 +37,5 @@ public class Customer {
new
Customer
(
"ANTON"
,
"CA"
)
};
return
Arrays
.
asList
(
list
);
}
//## Java 1.5 end ##
}
h2/src/test/org/h2/test/jaqu/ModelsTest.java
浏览文件 @
4a053407
...
...
@@ -25,9 +25,7 @@ public class ModelsTest extends TestBase {
/**
* This object represents a database (actually a connection to the database).
*/
//## Java 1.5 begin ##
private
Db
db
;
//## Java 1.5 end ##
/**
* This method is called when executing this application from the command
...
...
@@ -43,7 +41,6 @@ public class ModelsTest extends TestBase {
}
public
void
test
()
{
//## Java 1.5 begin ##
db
=
Db
.
open
(
"jdbc:h2:mem:"
,
"sa"
,
"sa"
);
db
.
insertAll
(
Product
.
getList
());
db
.
insertAll
(
ProductAnnotationOnly
.
getList
());
...
...
@@ -54,7 +51,6 @@ public class ModelsTest extends TestBase {
testDatabaseUpgrade
();
testTableUpgrade
();
db
.
close
();
//## Java 1.5 end ##
}
private
void
testValidateModels
()
{
...
...
h2/src/test/org/h2/test/jaqu/Order.java
浏览文件 @
4a053407
...
...
@@ -6,7 +6,6 @@
*/
package
org
.
h2
.
test
.
jaqu
;
//## Java 1.5 begin ##
import
static
org
.
h2
.
jaqu
.
Define
.*;
import
java.math.BigDecimal
;
...
...
@@ -15,12 +14,10 @@ import java.util.Date;
import
java.util.List
;
import
org.h2.jaqu.Table
;
//## Java 1.5 end ##
/**
* A table containing order data.
*/
//## Java 1.5 begin ##
public
class
Order
implements
Table
{
public
String
customerId
;
...
...
@@ -59,4 +56,3 @@ public class Order implements Table {
}
}
//## Java 1.5 end ##
h2/src/test/org/h2/test/jaqu/Product.java
浏览文件 @
4a053407
...
...
@@ -6,19 +6,16 @@
*/
package
org
.
h2
.
test
.
jaqu
;
//## Java 1.5 begin ##
import
java.util.Arrays
;
import
java.util.List
;
import
org.h2.jaqu.Table
;
import
static
org
.
h2
.
jaqu
.
Define
.*;
//## Java 1.5 end ##
/**
* A table containing product data.
*/
//## Java 1.5 begin ##
public
class
Product
implements
Table
{
public
Integer
productId
;
...
...
@@ -75,4 +72,3 @@ public class Product implements Table {
}
}
//## Java 1.5 end ##
h2/src/test/org/h2/test/jaqu/ProductAnnotationOnly.java
浏览文件 @
4a053407
...
...
@@ -6,7 +6,6 @@
*/
package
org
.
h2
.
test
.
jaqu
;
//## Java 1.5 begin ##
import
java.util.Arrays
;
import
java.util.List
;
import
org.h2.jaqu.Table.JQColumn
;
...
...
@@ -16,7 +15,6 @@ import org.h2.jaqu.Table.JQTable;
/**
* A table containing product data.
*/
//## Java 1.5 begin ##
@JQTable
(
name
=
"AnnotatedProduct"
,
primaryKey
=
"id"
)
@JQIndex
(
standard
=
"name, cat"
)
public
class
ProductAnnotationOnly
{
...
...
@@ -81,4 +79,3 @@ public class ProductAnnotationOnly {
}
}
//## Java 1.5 end ##
h2/src/test/org/h2/test/jaqu/ProductMixedAnnotation.java
浏览文件 @
4a053407
...
...
@@ -6,7 +6,6 @@
*/
package
org
.
h2
.
test
.
jaqu
;
//## Java 1.5 begin ##
import
java.util.Arrays
;
import
java.util.List
;
import
org.h2.jaqu.Table.JQColumn
;
...
...
@@ -16,7 +15,6 @@ import org.h2.jaqu.Table.JQTable;
/**
* A table containing product data.
*/
//## Java 1.5 begin ##
@JQTable
(
annotationsOnly
=
false
)
@JQIndex
(
standard
=
"name, cat"
)
public
class
ProductMixedAnnotation
{
...
...
@@ -81,4 +79,3 @@ public class ProductMixedAnnotation {
}
}
//## Java 1.5 end ##
h2/src/test/org/h2/test/jaqu/ProductNoCreateTable.java
浏览文件 @
4a053407
...
...
@@ -6,17 +6,14 @@
*/
package
org
.
h2
.
test
.
jaqu
;
//## Java 1.5 begin ##
import
java.util.Arrays
;
import
java.util.List
;
import
org.h2.jaqu.Table.JQColumn
;
import
org.h2.jaqu.Table.JQTable
;
//## Java 1.5 end ##
/**
* A table containing product data.
*/
//## Java 1.5 begin ##
@JQTable
(
createIfRequired
=
false
)
public
class
ProductNoCreateTable
{
...
...
@@ -47,4 +44,3 @@ public class ProductNoCreateTable {
}
}
//## Java 1.5 end ##
h2/src/test/org/h2/test/jaqu/SamplesTest.java
浏览文件 @
4a053407
...
...
@@ -30,9 +30,7 @@ public class SamplesTest extends TestBase {
/**
* This object represents a database (actually a connection to the database).
*/
//## Java 1.5 begin ##
Db
db
;
//## Java 1.5 end ##
/**
* This method is called when executing this application from the command
...
...
@@ -45,7 +43,6 @@ public class SamplesTest extends TestBase {
}
public
void
test
()
{
//## Java 1.5 begin ##
db
=
Db
.
open
(
"jdbc:h2:mem:"
,
"sa"
,
"sa"
);
db
.
insertAll
(
Product
.
getList
());
db
.
insertAll
(
Customer
.
getList
());
...
...
@@ -81,7 +78,6 @@ public class SamplesTest extends TestBase {
testLimitOffset
();
testKeyRetrieval
();
db
.
close
();
//## Java 1.5 end ##
}
/**
...
...
@@ -93,7 +89,6 @@ public class SamplesTest extends TestBase {
public
Integer
id
;
}
//## Java 1.5 begin ##
private
void
testReverseColumns
()
{
db
.
executeUpdate
(
"create table TestReverse(id int, name varchar, additional varchar)"
);
TestReverse
t
=
new
TestReverse
();
...
...
@@ -104,10 +99,8 @@ public class SamplesTest extends TestBase {
assertEquals
(
t
.
name
,
check
.
name
);
assertEquals
(
t
.
id
,
check
.
id
);
}
//## Java 1.5 end ##
//## Java 1.5 begin ##
private
void
testWhereSimple2
()
{
// var soldOutProducts =
...
...
@@ -175,7 +168,6 @@ public class SamplesTest extends TestBase {
assertEquals
(
products
.
get
(
i
).
productName
,
productNames
.
get
(
i
));
}
}
//## Java 1.5 end ##
/**
* A result set class containing the product name and price.
...
...
@@ -186,7 +178,6 @@ public class SamplesTest extends TestBase {
public
Double
price
;
}
//## Java 1.5 begin ##
private
void
testAnonymousTypes3
()
{
// var productInfos =
...
...
@@ -216,7 +207,6 @@ public class SamplesTest extends TestBase {
assertEquals
(
p2
.
unitPrice
,
pr
.
price
);
}
}
//## Java 1.5 end ##
/**
* A result set class containing customer data and the order total.
...
...
@@ -230,7 +220,6 @@ public class SamplesTest extends TestBase {
}
}
//## Java 1.5 begin ##
private
void
testSelectManyCompoundFrom2
()
{
// var orders =
...
...
@@ -407,7 +396,6 @@ public class SamplesTest extends TestBase {
assertTrue
(
"Failed to add key. Duplicate?"
,
uniqueKeys
.
add
(
l
));
}
}
//## Java 1.5 end ##
/**
* A result set class containing product groups.
...
...
@@ -420,7 +408,6 @@ public class SamplesTest extends TestBase {
}
}
//## Java 1.5 begin ##
private
void
testGroup
()
{
// var orderGroups =
...
...
@@ -446,5 +433,4 @@ public class SamplesTest extends TestBase {
list
.
toString
());
}
//## Java 1.5 end ##
}
h2/src/tools/org/h2/jaqu/CompareType.java
浏览文件 @
4a053407
...
...
@@ -9,7 +9,6 @@ package org.h2.jaqu;
/**
* An enumeration of compare operations.
*/
//## Java 1.5 begin ##
enum
CompareType
{
EQUAL
(
"="
,
true
),
BIGGER
(
">"
,
true
),
...
...
@@ -38,5 +37,4 @@ enum CompareType {
}
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/Condition.java
浏览文件 @
4a053407
...
...
@@ -11,7 +11,6 @@ package org.h2.jaqu;
*
* @param <A> the operand type
*/
//## Java 1.5 begin ##
class
Condition
<
A
>
implements
Token
{
CompareType
compareType
;
A
x
,
y
;
...
...
@@ -32,4 +31,3 @@ class Condition<A> implements Token {
}
}
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/ConditionAndOr.java
浏览文件 @
4a053407
...
...
@@ -9,7 +9,6 @@ package org.h2.jaqu;
/**
* An OR or an AND condition.
*/
//## Java 1.5 begin ##
enum
ConditionAndOr
implements
Token
{
AND
(
"AND"
),
OR
(
"OR"
);
...
...
@@ -25,4 +24,3 @@ enum ConditionAndOr implements Token {
}
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/Db.java
浏览文件 @
4a053407
...
...
@@ -6,7 +6,6 @@
*/
package
org
.
h2
.
jaqu
;
//## Java 1.5 begin ##
import
java.sql.Connection
;
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
...
...
@@ -25,7 +24,6 @@ import org.h2.jaqu.SQLDialect.DefaultSQLDialect;
import
org.h2.jaqu.Table.JQDatabase
;
import
org.h2.jaqu.Table.JQTable
;
import
org.h2.jaqu.util.WeakIdentityHashMap
;
//## Java 1.5 end ##
import
org.h2.util.JdbcUtils
;
import
org.h2.util.New
;
import
org.h2.util.StringUtils
;
...
...
@@ -33,7 +31,6 @@ import org.h2.util.StringUtils;
/**
* This class represents a connection to a database.
*/
//## Java 1.5 begin ##
public
class
Db
{
/**
...
...
@@ -349,4 +346,3 @@ public class Db {
// }
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/Define.java
浏览文件 @
4a053407
...
...
@@ -12,7 +12,6 @@ import org.h2.jaqu.Table.IndexType;
* This class provides utility methods to define primary keys, indexes, and set
* the name of the table.
*/
//## Java 1.5 begin ##
public
class
Define
{
private
static
TableDefinition
<?>
currentTableDefinition
;
...
...
@@ -70,4 +69,3 @@ public class Define {
}
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/Function.java
浏览文件 @
4a053407
...
...
@@ -6,15 +6,12 @@
*/
package
org
.
h2
.
jaqu
;
//## Java 1.5 begin ##
import
org.h2.jaqu.util.ClassUtils
;
//## Java 1.5 end ##
/**
* This class provides static methods that represents common SQL functions.
*/
public
class
Function
implements
Token
{
//## Java 1.5 begin ##
// must be a new instance
private
static
final
Long
COUNT_STAR
=
Long
.
valueOf
(
0
);
...
...
@@ -148,5 +145,4 @@ public class Function implements Token {
});
}
//## Java 1.5 end ##
}
h2/src/tools/org/h2/jaqu/OrderExpression.java
浏览文件 @
4a053407
...
...
@@ -11,7 +11,6 @@ package org.h2.jaqu;
*
* @param <T> the query data type
*/
//## Java 1.5 begin ##
class
OrderExpression
<
T
>
{
private
Query
<
T
>
query
;
private
Object
expression
;
...
...
@@ -42,4 +41,3 @@ class OrderExpression<T> {
}
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/Query.java
浏览文件 @
4a053407
...
...
@@ -6,7 +6,6 @@
*/
package
org
.
h2
.
jaqu
;
//## Java 1.5 begin ##
import
java.lang.reflect.Field
;
import
java.sql.Clob
;
import
java.sql.ResultSet
;
...
...
@@ -19,7 +18,6 @@ import java.util.List;
import
org.h2.jaqu.bytecode.ClassReader
;
import
org.h2.jaqu.util.StatementLogger
;
import
org.h2.jaqu.util.ClassUtils
;
//## Java 1.5 end ##
import
org.h2.util.JdbcUtils
;
import
org.h2.util.New
;
...
...
@@ -28,7 +26,6 @@ import org.h2.util.New;
*
* @param <T> the return type
*/
//## Java 1.5 begin ##
public
class
Query
<
T
>
{
private
Db
db
;
...
...
@@ -280,14 +277,12 @@ public class Query<T> {
addConditionToken
(
token
);
return
new
QueryWhere
<
T
>(
this
);
}
//## Java 1.5 end ##
/**
* Sets the Limit and Offset of a query.
*
* @return the query
*/
//## Java 1.5 begin ##
public
Query
<
T
>
limit
(
long
limit
)
{
this
.
limit
=
limit
;
return
this
;
...
...
@@ -297,7 +292,6 @@ public class Query<T> {
this
.
offset
=
offset
;
return
this
;
}
//## Java 1.5 end ##
/**
* Order by a number of columns.
...
...
@@ -305,7 +299,6 @@ public class Query<T> {
* @param expressions the columns
* @return the query
*/
//## Java 1.5 begin ##
public
Query
<
T
>
orderBy
(
Object
...
expressions
)
{
for
(
Object
expr
:
expressions
)
{
OrderExpression
<
T
>
e
=
...
...
@@ -408,7 +401,6 @@ public class Query<T> {
}
StatementLogger
.
select
(
stat
.
getSQL
());
}
//## Java 1.5 end ##
/**
* Join another table.
...
...
@@ -416,7 +408,6 @@ public class Query<T> {
* @param alias an alias for the table to join
* @return the joined query
*/
//## Java 1.5 begin ##
@SuppressWarnings
(
"unchecked"
)
public
<
U
>
QueryJoin
innerJoin
(
U
alias
)
{
TableDefinition
<
T
>
def
=
(
TableDefinition
<
T
>)
db
.
define
(
alias
.
getClass
());
...
...
@@ -443,4 +434,3 @@ public class Query<T> {
}
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/QueryCondition.java
浏览文件 @
4a053407
...
...
@@ -12,7 +12,6 @@ package org.h2.jaqu;
* @param <T> the return type of the query
* @param <A> the incomplete condition data type
*/
//## Java 1.5 begin ##
public
class
QueryCondition
<
T
,
A
>
{
private
Query
<
T
>
query
;
...
...
@@ -60,4 +59,3 @@ public class QueryCondition<T, A> {
}
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/QueryJoin.java
浏览文件 @
4a053407
...
...
@@ -9,7 +9,6 @@ package org.h2.jaqu;
/**
* This class represents a query with a join.
*/
//## Java 1.5 begin ##
public
class
QueryJoin
{
private
Query
<?>
query
;
...
...
@@ -24,4 +23,3 @@ public class QueryJoin {
return
new
QueryJoinCondition
<
A
>(
query
,
join
,
x
);
}
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/QueryJoinCondition.java
浏览文件 @
4a053407
...
...
@@ -11,7 +11,6 @@ package org.h2.jaqu;
*
* @param <A> the incomplete condition data type
*/
//## Java 1.5 begin ##
public
class
QueryJoinCondition
<
A
>
{
private
Query
<?>
query
;
...
...
@@ -29,4 +28,3 @@ public class QueryJoinCondition<A> {
return
query
;
}
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/QueryWhere.java
浏览文件 @
4a053407
...
...
@@ -6,16 +6,13 @@
*/
package
org
.
h2
.
jaqu
;
//## Java 1.5 begin ##
import
java.util.List
;
//## Java 1.5 end ##
/**
* This class represents a query with a condition.
*
* @param <T> the return type
*/
//## Java 1.5 begin ##
public
class
QueryWhere
<
T
>
{
Query
<
T
>
query
;
...
...
@@ -77,7 +74,6 @@ public class QueryWhere<T> {
return
query
.
selectDistinct
();
}
//## Java 1.5 end ##
/**
* Order by a number of columns.
...
...
@@ -85,7 +81,6 @@ public class QueryWhere<T> {
* @param expressions the order by expressions
* @return the query
*/
//## Java 1.5 begin ##
public
QueryWhere
<
T
>
orderBy
(
Object
...
expressions
)
{
for
(
Object
expr
:
expressions
)
{
OrderExpression
<
T
>
e
=
...
...
@@ -143,4 +138,3 @@ public class QueryWhere<T> {
}
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/SQLStatement.java
浏览文件 @
4a053407
...
...
@@ -6,18 +6,15 @@
*/
package
org
.
h2
.
jaqu
;
//## Java 1.5 begin ##
import
java.sql.PreparedStatement
;
import
java.sql.ResultSet
;
import
java.sql.SQLException
;
import
java.util.ArrayList
;
//## Java 1.5 end ##
import
org.h2.util.JdbcUtils
;
/**
* This class represents a parameterized SQL statement.
*/
//## Java 1.5 begin ##
public
class
SQLStatement
{
private
Db
db
;
private
StringBuilder
buff
=
new
StringBuilder
();
...
...
@@ -112,4 +109,3 @@ public class SQLStatement {
}
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/SelectColumn.java
浏览文件 @
4a053407
...
...
@@ -6,16 +6,13 @@
*/
package
org
.
h2
.
jaqu
;
//## Java 1.5 begin ##
import
org.h2.jaqu.TableDefinition.FieldDefinition
;
//## Java 1.5 end ##
/**
* This class represents a column of a table in a query.
*
* @param <T> the table data type
*/
//## Java 1.5 begin ##
class
SelectColumn
<
T
>
{
private
SelectTable
<
T
>
selectTable
;
private
FieldDefinition
fieldDef
;
...
...
@@ -45,4 +42,3 @@ class SelectColumn<T> {
return
fieldDef
.
getValue
(
selectTable
.
getCurrent
());
}
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/SelectTable.java
浏览文件 @
4a053407
...
...
@@ -6,18 +6,15 @@
*/
package
org
.
h2
.
jaqu
;
//## Java 1.5 begin ##
import
java.util.ArrayList
;
import
org.h2.jaqu.util.ClassUtils
;
import
org.h2.util.New
;
//## Java 1.5 end ##
/**
* This class represents a table in a query.
*
* @param <T> the table class
*/
//## Java 1.5 begin ##
class
SelectTable
<
T
>
{
private
static
int
asCounter
;
...
...
@@ -101,4 +98,3 @@ class SelectTable <T> {
}
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/TableDefinition.java
浏览文件 @
4a053407
...
...
@@ -6,7 +6,6 @@
*/
package
org
.
h2
.
jaqu
;
//## Java 1.5 begin ##
import
java.lang.reflect.Field
;
import
java.lang.reflect.Modifier
;
import
java.sql.ResultSet
;
...
...
@@ -23,7 +22,6 @@ import org.h2.jaqu.Table.JQSchema;
import
org.h2.jaqu.Table.JQTable
;
import
org.h2.jaqu.util.StatementLogger
;
import
org.h2.jaqu.util.ClassUtils
;
//## Java 1.5 end ##
import
org.h2.util.New
;
import
org.h2.util.StatementBuilder
;
import
org.h2.util.StringUtils
;
...
...
@@ -34,26 +32,21 @@ import org.h2.util.StringUtils;
*
* @param <T> the table type
*/
//## Java 1.5 begin ##
class
TableDefinition
<
T
>
{
//## Java 1.5 end ##
/**
* The meta data of an index.
*/
//## Java 1.5 begin ##
static
class
IndexDefinition
{
IndexType
type
;
String
indexName
;
List
<
String
>
columnNames
;
}
//## Java 1.5 end ##
/**
* The meta data of a field.
*/
//## Java 1.5 begin ##
static
class
FieldDefinition
{
String
columnName
;
Field
field
;
...
...
@@ -644,4 +637,3 @@ class TableDefinition<T> {
}
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/TestCondition.java
浏览文件 @
4a053407
...
...
@@ -13,7 +13,6 @@ import org.h2.jaqu.util.ClassUtils;
*
* @param <A> the incomplete condition data type
*/
//## Java 1.5 begin ##
public
class
TestCondition
<
A
>
{
private
A
x
;
...
...
@@ -101,4 +100,3 @@ public class TestCondition<A> {
}
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/Token.java
浏览文件 @
4a053407
...
...
@@ -16,7 +16,5 @@ public interface Token {
* @param stat the statement to append the SQL to
* @param query the query to use
*/
//## Java 1.5 begin ##
<
T
>
void
appendSQL
(
SQLStatement
stat
,
Query
<
T
>
query
);
//## Java 1.5 end ##
}
h2/src/tools/org/h2/jaqu/UpdateColumn.java
浏览文件 @
4a053407
...
...
@@ -17,8 +17,6 @@ public interface UpdateColumn {
*
* @param stat the statement to append the SQL to
*/
//## Java 1.5 begin ##
void
appendSQL
(
SQLStatement
stat
);
//## Java 1.5 end ##
}
h2/src/tools/org/h2/jaqu/UpdateColumnIncrement.java
浏览文件 @
4a053407
...
...
@@ -12,7 +12,6 @@ package org.h2.jaqu;
* @param <T> the query type
* @param <A> the new value data type
*/
//## Java 1.5 begin ##
public
class
UpdateColumnIncrement
<
T
,
A
>
implements
UpdateColumn
{
private
Query
<
T
>
query
;
...
...
@@ -40,4 +39,3 @@ public class UpdateColumnIncrement<T, A> implements UpdateColumn {
}
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/UpdateColumnSet.java
浏览文件 @
4a053407
...
...
@@ -12,7 +12,6 @@ package org.h2.jaqu;
* @param <T> the query type
* @param <A> the new value data type
*/
//## Java 1.5 begin ##
public
class
UpdateColumnSet
<
T
,
A
>
implements
UpdateColumn
{
private
Query
<
T
>
query
;
...
...
@@ -37,4 +36,3 @@ public class UpdateColumnSet<T, A> implements UpdateColumn {
}
}
//## Java 1.5 end ##
h2/src/tools/org/h2/jaqu/util/ClassUtils.java
浏览文件 @
4a053407
...
...
@@ -6,63 +6,26 @@
*/
package
org
.
h2
.
jaqu
.
util
;
//## Java 1.5 begin ##
import
java.io.IOException
;
import
java.io.Reader
;
import
java.io.StringWriter
;
import
java.lang.reflect.Constructor
;
import
java.math.BigDecimal
;
import
java.math.BigInteger
;
import
java.sql.Clob
;
import
java.util.ArrayList
;
import
java.util.Collection
;
import
java.util.Collections
;
import
java.util.HashMap
;
import
java.util.HashSet
;
import
java.util.IdentityHashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.atomic.AtomicLong
;
import
org.h2.util.IOUtils
;
//## Java 1.5 end ##
/**
* Generic utility methods.
*/
public
class
ClassUtils
{
//## Java 1.5 begin ##
private
static
final
AtomicLong
COUNTER
=
new
AtomicLong
(
0
);
private
static
final
boolean
MAKE_ACCESSIBLE
=
true
;
private
static
final
int
BUFFER_BLOCK_SIZE
=
4
*
1024
;
// public static <T> ArrayList<T> newArrayList() {
// return new ArrayList<T>();
// }
//
// public static <T> ArrayList<T> newArrayList(Collection<T> c) {
// return new ArrayList<T>(c);
// }
//
// public static <T> HashSet<T> newHashSet() {
// return new HashSet<T>();
// }
// public static <T> HashSet<T> newHashSet(Collection<T> list) {
// return new HashSet<T>(list);
// }
//
// public static <A, B> HashMap<A, B> newHashMap() {
// return new HashMap<A, B>();
// }
//
// public static <A, B> Map<A, B> newSynchronizedHashMap() {
// HashMap<A, B> map = newHashMap();
// return Collections.synchronizedMap(map);
// }
public
static
<
A
,
B
>
IdentityHashMap
<
A
,
B
>
newIdentityHashMap
()
{
return
new
IdentityHashMap
<
A
,
B
>();
}
...
...
@@ -188,5 +151,4 @@ public class ClassUtils {
return
(
Class
<
X
>)
x
.
getClass
();
}
//## Java 1.5 end ##
}
h2/src/tools/org/h2/jaqu/util/WeakIdentityHashMap.java
浏览文件 @
4a053407
...
...
@@ -6,12 +6,10 @@
*/
package
org
.
h2
.
jaqu
.
util
;
//## Java 1.5 begin ##
import
java.lang.ref.WeakReference
;
import
java.util.Collection
;
import
java.util.Map
;
import
java.util.Set
;
//## Java 1.5 end ##
/**
* This hash map uses weak references, so that elements that are no longer
...
...
@@ -22,7 +20,6 @@ import java.util.Set;
* @param <K> the keys
* @param <V> the value
*/
//## Java 1.5 begin ##
public
class
WeakIdentityHashMap
<
K
,
V
>
implements
Map
<
K
,
V
>
{
private
static
final
int
MAX_LOAD
=
90
;
...
...
@@ -229,4 +226,3 @@ public class WeakIdentityHashMap<K, V> implements Map<K, V> {
}
}
//## Java 1.5 end ##
编写
预览
Markdown
格式
0%
重试
或
添加新文件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
请先完成此评论的编辑!
取消
请
注册
或者
登录
后发表评论