Skip to content
This repository was archived by the owner on Jan 18, 2024. It is now read-only.

Commit cd3cccf

Browse files
Cleanup
1 parent a0f444e commit cd3cccf

10 files changed

+240
-506
lines changed

src/main/java/xdev/db/hsql2/jdbc/HSQL2ConnectionInformation.java

Lines changed: 17 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,8 @@
1818

1919
package xdev.db.hsql2.jdbc;
2020

21-
/*-
22-
* #%L
23-
* HSQL2
24-
* %%
25-
* Copyright (C) 2003 - 2023 XDEV Software
26-
* %%
27-
* This program is free software: you can redistribute it and/or modify
28-
* it under the terms of the GNU Lesser General Public License as
29-
* published by the Free Software Foundation, either version 3 of the
30-
* License, or (at your option) any later version.
31-
*
32-
* This program is distributed in the hope that it will be useful,
33-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
34-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35-
* GNU General Lesser Public License for more details.
36-
*
37-
* You should have received a copy of the GNU General Lesser Public
38-
* License along with this program. If not, see
39-
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
40-
* #L%
41-
*/
42-
4321
import com.xdev.jadoth.sqlengine.dbms.DbmsConnectionInformation;
22+
4423
import xdev.db.ConnectionInformation;
4524

4625

@@ -53,57 +32,52 @@ public class HSQL2ConnectionInformation extends ConnectionInformation<HSQL2Dbms>
5332
/**
5433
* Instantiates a new hsql20 connection information.
5534
*
56-
* @param user
57-
* the user
58-
* @param password
59-
* the password
60-
* @param database
61-
* the database
62-
* @param urlExtension
63-
* the extended url properties
64-
* @param dbmsAdaptor
65-
* the dbms adaptor
35+
* @param user the user
36+
* @param password the password
37+
* @param database the database
38+
* @param urlExtension the extended url properties
39+
* @param dbmsAdaptor the dbms adaptor
6640
*/
67-
public HSQL2ConnectionInformation(final String host, final int port, final String user,
68-
final String password, final String database, final String urlExtension,
69-
final HSQL2Dbms dbmsAdaptor)
41+
public HSQL2ConnectionInformation(
42+
final String host, final int port, final String user,
43+
final String password, final String database, final String urlExtension,
44+
final HSQL2Dbms dbmsAdaptor)
7045
{
71-
super(host,port,user,password,database,urlExtension,dbmsAdaptor);
46+
super(host, port, user, password, database, urlExtension, dbmsAdaptor);
7247
}
7348

74-
7549
// /////////////////////////////////////////////////////////////////////////
7650
// getters //
7751
// ///////////////////
52+
7853
/**
7954
* Gets the database.
80-
*
55+
*
8156
* @return the database
8257
*/
8358
public String getDatabase()
8459
{
8560
return this.getCatalog();
8661
}
8762

88-
8963
// /////////////////////////////////////////////////////////////////////////
9064
// setters //
9165
// ///////////////////
66+
9267
/**
9368
* Sets the database.
94-
*
95-
* @param database
96-
* the database to set
69+
*
70+
* @param database the database to set
9771
*/
9872
public void setDatabase(final String database)
9973
{
10074
this.setCatalog(database);
10175
}
10276

103-
10477
// /////////////////////////////////////////////////////////////////////////
10578
// override methods //
10679
// ///////////////////
80+
10781
/**
10882
* @see DbmsConnectionInformation#createJdbcConnectionUrl()
10983
*/
@@ -114,7 +88,6 @@ public String createJdbcConnectionUrl()
11488
return appendUrlExtension(url);
11589
}
11690

117-
11891
/**
11992
* @see com.xdev.jadoth.sqlengine.dbms.DbmsConnectionInformation#getJdbcDriverClassName()
12093
*/
@@ -123,5 +96,4 @@ public String getJdbcDriverClassName()
12396
{
12497
return "org.hsqldb.jdbc.JDBCDriver";
12598
}
126-
12799
}

src/main/java/xdev/db/hsql2/jdbc/HSQL2DDLMapper.java

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -17,29 +17,6 @@
1717
*/
1818
package xdev.db.hsql2.jdbc;
1919

20-
/*-
21-
* #%L
22-
* HSQL2
23-
* %%
24-
* Copyright (C) 2003 - 2023 XDEV Software
25-
* %%
26-
* This program is free software: you can redistribute it and/or modify
27-
* it under the terms of the GNU Lesser General Public License as
28-
* published by the Free Software Foundation, either version 3 of the
29-
* License, or (at your option) any later version.
30-
*
31-
* This program is distributed in the hope that it will be useful,
32-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
33-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34-
* GNU General Lesser Public License for more details.
35-
*
36-
* You should have received a copy of the GNU General Lesser Public
37-
* License along with this program. If not, see
38-
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
39-
* #L%
40-
*/
41-
42-
4320
import com.xdev.jadoth.sqlengine.dbms.standard.StandardDDLMapper;
4421

4522

src/main/java/xdev/db/hsql2/jdbc/HSQL2DMLAssembler.java

Lines changed: 0 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -17,28 +17,6 @@
1717
*/
1818
package xdev.db.hsql2.jdbc;
1919

20-
/*-
21-
* #%L
22-
* HSQL2
23-
* %%
24-
* Copyright (C) 2003 - 2023 XDEV Software
25-
* %%
26-
* This program is free software: you can redistribute it and/or modify
27-
* it under the terms of the GNU Lesser General Public License as
28-
* published by the Free Software Foundation, either version 3 of the
29-
* License, or (at your option) any later version.
30-
*
31-
* This program is distributed in the hope that it will be useful,
32-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
33-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34-
* GNU General Lesser Public License for more details.
35-
*
36-
* You should have received a copy of the GNU General Lesser Public
37-
* License along with this program. If not, see
38-
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
39-
* #L%
40-
*/
41-
4220
import com.xdev.jadoth.sqlengine.dbms.standard.StandardDMLAssembler;
4321

4422

src/main/java/xdev/db/hsql2/jdbc/HSQL2Dbms.java

Lines changed: 17 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -18,49 +18,26 @@
1818

1919
package xdev.db.hsql2.jdbc;
2020

21-
/*-
22-
* #%L
23-
* HSQL2
24-
* %%
25-
* Copyright (C) 2003 - 2023 XDEV Software
26-
* %%
27-
* This program is free software: you can redistribute it and/or modify
28-
* it under the terms of the GNU Lesser General Public License as
29-
* published by the Free Software Foundation, either version 3 of the
30-
* License, or (at your option) any later version.
31-
*
32-
* This program is distributed in the hope that it will be useful,
33-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
34-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
35-
* GNU General Lesser Public License for more details.
36-
*
37-
* You should have received a copy of the GNU General Lesser Public
38-
* License along with this program. If not, see
39-
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
40-
* #L%
41-
*/
42-
4321
import com.xdev.jadoth.sqlengine.dbms.DbmsAdaptor;
4422
import com.xdev.jadoth.sqlengine.dbms.SQLExceptionParser;
4523
import com.xdev.jadoth.sqlengine.internal.DatabaseGateway;
4624
import com.xdev.jadoth.sqlengine.internal.tables.SqlTableIdentity;
4725

4826

4927
public class HSQL2Dbms
50-
extends
51-
DbmsAdaptor.Implementation<HSQL2Dbms, HSQL2DMLAssembler, HSQL2DDLMapper, HSQL2RetrospectionAccessor, HSQL2Syntax>
28+
extends
29+
DbmsAdaptor.Implementation<HSQL2Dbms, HSQL2DMLAssembler, HSQL2DDLMapper, HSQL2RetrospectionAccessor, HSQL2Syntax>
5230
{
5331
// /////////////////////////////////////////////////////////////////////////
5432
// constants //
5533
// ///////////////////
5634

57-
/** The Constant MAX_VARCHAR_LENGTH. */
58-
protected static final int MAX_VARCHAR_LENGTH = Integer.MAX_VALUE;
59-
60-
protected static final char IDENTIFIER_DELIMITER = '"';
61-
62-
public static final HSQL2Syntax SYNTAX = new HSQL2Syntax();
63-
35+
public static final HSQL2Syntax SYNTAX = new HSQL2Syntax();
36+
/**
37+
* The Constant MAX_VARCHAR_LENGTH.
38+
*/
39+
protected static final int MAX_VARCHAR_LENGTH = Integer.MAX_VALUE;
40+
protected static final char IDENTIFIER_DELIMITER = '"';
6441

6542
// /////////////////////////////////////////////////////////////////////////
6643
// constructors //
@@ -74,56 +51,48 @@ public HSQL2Dbms()
7451
this(new SQLExceptionParser.Body());
7552
}
7653

77-
7854
/**
7955
* Instantiates a new hsql20 dbms.
80-
*
81-
* @param sqlExceptionParser
82-
* the sql exception parser
56+
*
57+
* @param sqlExceptionParser the sql exception parser
8358
*/
8459
public HSQL2Dbms(final SQLExceptionParser sqlExceptionParser)
8560
{
86-
super(sqlExceptionParser,false);
61+
super(sqlExceptionParser, false);
8762
this.setRetrospectionAccessor(new HSQL2RetrospectionAccessor(this));
8863
this.setDMLAssembler(new HSQL2DMLAssembler(this));
8964
this.setSyntax(SYNTAX);
9065
}
9166

92-
9367
/**
9468
* @see DbmsAdaptor#createConnectionInformation(String, int, String, String, String, String)
9569
*/
9670
@Override
97-
public HSQL2ConnectionInformation createConnectionInformation(final String host,
98-
final int port, final String user, final String password, final String catalog, final String properties)
71+
public HSQL2ConnectionInformation createConnectionInformation(
72+
final String host,
73+
final int port, final String user, final String password, final String catalog, final String properties)
9974
{
100-
return new HSQL2ConnectionInformation(host,port,user,password,catalog,properties, this);
75+
return new HSQL2ConnectionInformation(host, port, user, password, catalog, properties, this);
10176
}
10277

103-
10478
/**
105-
* HSQL does not support any means of calculating table columns selectivity
106-
* as far as it is known.
107-
*
79+
* HSQL does not support any means of calculating table columns selectivity as far as it is known.
10880
*/
10981
@Override
11082
public Object updateSelectivity(final SqlTableIdentity table)
11183
{
11284
return null;
11385
}
11486

115-
11687
/**
117-
* @see DbmsAdaptor#assembleTransformBytes(byte[],
118-
* java.lang.StringBuilder)
88+
* @see DbmsAdaptor#assembleTransformBytes(byte[], java.lang.StringBuilder)
11989
*/
12090
@Override
12191
public StringBuilder assembleTransformBytes(final byte[] bytes, final StringBuilder sb)
12292
{
12393
return null;
12494
}
12595

126-
12796
/**
12897
* @see DbmsAdaptor.Implementation#getRetrospectionAccessor()
12998
*/
@@ -133,7 +102,6 @@ public HSQL2RetrospectionAccessor getRetrospectionAccessor()
133102
throw new RuntimeException("HSQL Retrospection not implemented yet!");
134103
}
135104

136-
137105
/**
138106
* @see DbmsAdaptor#initialize(DatabaseGateway)
139107
*/
@@ -142,7 +110,6 @@ public void initialize(final DatabaseGateway<HSQL2Dbms> dbc)
142110
{
143111
}
144112

145-
146113
/**
147114
* @see DbmsAdaptor#rebuildAllIndices(String)
148115
*/
@@ -152,14 +119,12 @@ public Object rebuildAllIndices(final String fullQualifiedTableName)
152119
return null;
153120
}
154121

155-
156122
@Override
157123
public boolean supportsOFFSET_ROWS()
158124
{
159125
return true;
160126
}
161127

162-
163128
/**
164129
* @see DbmsAdaptor#getMaxVARCHARlength()
165130
*/
@@ -169,7 +134,6 @@ public int getMaxVARCHARlength()
169134
return MAX_VARCHAR_LENGTH;
170135
}
171136

172-
173137
@Override
174138
public char getIdentifierDelimiter()
175139
{

src/main/java/xdev/db/hsql2/jdbc/HSQL2ExceptionParser.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -17,42 +17,17 @@
1717
*/
1818
package xdev.db.hsql2.jdbc;
1919

20-
/*-
21-
* #%L
22-
* HSQL2
23-
* %%
24-
* Copyright (C) 2003 - 2023 XDEV Software
25-
* %%
26-
* This program is free software: you can redistribute it and/or modify
27-
* it under the terms of the GNU Lesser General Public License as
28-
* published by the Free Software Foundation, either version 3 of the
29-
* License, or (at your option) any later version.
30-
*
31-
* This program is distributed in the hope that it will be useful,
32-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
33-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
34-
* GNU General Lesser Public License for more details.
35-
*
36-
* You should have received a copy of the GNU General Lesser Public
37-
* License along with this program. If not, see
38-
* <http://www.gnu.org/licenses/lgpl-3.0.html>.
39-
* #L%
40-
*/
41-
42-
4320
import java.sql.SQLException;
4421

4522
import com.xdev.jadoth.sqlengine.dbms.SQLExceptionParser;
4623
import com.xdev.jadoth.sqlengine.exceptions.SQLEngineException;
4724

4825

49-
5026
public class HSQL2ExceptionParser implements SQLExceptionParser
5127
{
5228
@Override
5329
public SQLEngineException parseSQLException(SQLException e)
5430
{
5531
return new SQLEngineException(e);
5632
}
57-
5833
}

0 commit comments

Comments
 (0)