Skip to content

Commit b4d547e

Browse files
author
Pap Lőrinc
committed
Renamed getWholeColumnName and getWholeTableName to getFullyQualifiedName;
1 parent d1e7185 commit b4d547e

File tree

19 files changed

+109
-109
lines changed

19 files changed

+109
-109
lines changed

src/main/java/net/sf/jsqlparser/schema/Column.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
* Copyright (C) 2004 - 2013 JSQLParser
66
* %%
77
* This program is free software: you can redistribute it and/or modify
8-
* it under the terms of the GNU Lesser General Public License as
9-
* published by the Free Software Foundation, either version 2.1 of the
8+
* it under the terms of the GNU Lesser General Public License as
9+
* published by the Free Software Foundation, either version 2.1 of the
1010
* License, or (at your option) any later version.
11-
*
11+
*
1212
* This program is distributed in the hope that it will be useful,
1313
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
* GNU General Lesser Public License for more details.
16-
*
17-
* You should have received a copy of the GNU General Lesser Public
16+
*
17+
* You should have received a copy of the GNU General Lesser Public
1818
* License along with this program. If not, see
1919
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
2020
* #L%
@@ -63,13 +63,13 @@ public void setTable(Table table) {
6363
/**
6464
* @return the name of the column, prefixed with 'tableName' and '.'
6565
*/
66-
public String getWholeColumnName() {
66+
public String getFullyQualifiedName() {
6767

6868
String columnWholeName;
6969
String tableWholeName = null;
7070

7171
if (table != null) {
72-
tableWholeName = table.getWholeTableName();
72+
tableWholeName = table.getFullyQualifiedName();
7373
}
7474
if (tableWholeName != null && tableWholeName.length() != 0) {
7575
columnWholeName = tableWholeName + "." + columnName;
@@ -88,6 +88,6 @@ public void accept(ExpressionVisitor expressionVisitor) {
8888

8989
@Override
9090
public String toString() {
91-
return getWholeColumnName();
91+
return getFullyQualifiedName();
9292
}
9393
}

src/main/java/net/sf/jsqlparser/schema/Table.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
* Copyright (C) 2004 - 2013 JSQLParser
66
* %%
77
* This program is free software: you can redistribute it and/or modify
8-
* it under the terms of the GNU Lesser General Public License as
9-
* published by the Free Software Foundation, either version 2.1 of the
8+
* it under the terms of the GNU Lesser General Public License as
9+
* published by the Free Software Foundation, either version 2.1 of the
1010
* License, or (at your option) any later version.
11-
*
11+
*
1212
* This program is distributed in the hope that it will be useful,
1313
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
* GNU General Lesser Public License for more details.
16-
*
17-
* You should have received a copy of the GNU General Lesser Public
16+
*
17+
* You should have received a copy of the GNU General Lesser Public
1818
* License along with this program. If not, see
1919
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
2020
* #L%
@@ -75,7 +75,7 @@ public void setAlias(Alias alias) {
7575
this.alias = alias;
7676
}
7777

78-
public String getWholeTableName() {
78+
public String getFullyQualifiedName() {
7979

8080
String tableWholeName = null;
8181
if (name == null) {
@@ -112,7 +112,7 @@ public void setPivot(Pivot pivot) {
112112

113113
@Override
114114
public String toString() {
115-
return getWholeTableName()
115+
return getFullyQualifiedName()
116116
+ ((pivot != null) ? " " + pivot : "")
117117
+ ((alias != null) ? alias.toString() : "");
118118
}

src/main/java/net/sf/jsqlparser/statement/alter/Alter.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
* Copyright (C) 2004 - 2013 JSQLParser
66
* %%
77
* This program is free software: you can redistribute it and/or modify
8-
* it under the terms of the GNU Lesser General Public License as
9-
* published by the Free Software Foundation, either version 2.1 of the
8+
* it under the terms of the GNU Lesser General Public License as
9+
* published by the Free Software Foundation, either version 2.1 of the
1010
* License, or (at your option) any later version.
11-
*
11+
*
1212
* This program is distributed in the hope that it will be useful,
1313
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
* GNU General Lesser Public License for more details.
16-
*
17-
* You should have received a copy of the GNU General Lesser Public
16+
*
17+
* You should have received a copy of the GNU General Lesser Public
1818
* License along with this program. If not, see
1919
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
2020
* #L%
@@ -82,9 +82,9 @@ public void setDataType(ColDataType dataType) {
8282
public void accept(StatementVisitor statementVisitor) {
8383
statementVisitor.visit(this);
8484
}
85-
85+
8686
@Override
8787
public String toString() {
88-
return "ALTER TABLE " + table.getWholeTableName() + " ADD COLUMN " + columnName + " " + dataType.toString();
88+
return "ALTER TABLE " + table.getFullyQualifiedName() + " ADD COLUMN " + columnName + " " + dataType.toString();
8989
}
9090
}

src/main/java/net/sf/jsqlparser/statement/create/index/CreateIndex.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
* Copyright (C) 2004 - 2013 JSQLParser
66
* %%
77
* This program is free software: you can redistribute it and/or modify
8-
* it under the terms of the GNU Lesser General Public License as
9-
* published by the Free Software Foundation, either version 2.1 of the
8+
* it under the terms of the GNU Lesser General Public License as
9+
* published by the Free Software Foundation, either version 2.1 of the
1010
* License, or (at your option) any later version.
11-
*
11+
*
1212
* This program is distributed in the hope that it will be useful,
1313
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
* GNU General Lesser Public License for more details.
16-
*
17-
* You should have received a copy of the GNU General Lesser Public
16+
*
17+
* You should have received a copy of the GNU General Lesser Public
1818
* License along with this program. If not, see
1919
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
2020
* #L%
@@ -79,7 +79,7 @@ public String toString() {
7979
buffer.append("INDEX ");
8080
buffer.append(index.getName());
8181
buffer.append(" ON ");
82-
buffer.append(table.getWholeTableName());
82+
buffer.append(table.getFullyQualifiedName());
8383

8484
if (index.getColumnsNames() != null) {
8585
buffer.append(" (");

src/main/java/net/sf/jsqlparser/util/TablesNamesFinder.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -174,7 +174,7 @@ public void visit(PlainSelect plainSelect) {
174174

175175
@Override
176176
public void visit(Table tableName) {
177-
String tableWholeName = tableName.getWholeTableName();
177+
String tableWholeName = tableName.getFullyQualifiedName();
178178
if (!otherItemNames.contains(tableWholeName.toLowerCase())
179179
&& !tables.contains(tableWholeName)) {
180180
tables.add(tableWholeName);

src/main/java/net/sf/jsqlparser/util/deparser/CreateIndexDeParser.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
* Copyright (C) 2004 - 2013 JSQLParser
66
* %%
77
* This program is free software: you can redistribute it and/or modify
8-
* it under the terms of the GNU Lesser General Public License as
9-
* published by the Free Software Foundation, either version 2.1 of the
8+
* it under the terms of the GNU Lesser General Public License as
9+
* published by the Free Software Foundation, either version 2.1 of the
1010
* License, or (at your option) any later version.
11-
*
11+
*
1212
* This program is distributed in the hope that it will be useful,
1313
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
* GNU General Lesser Public License for more details.
16-
*
17-
* You should have received a copy of the GNU General Lesser Public
16+
*
17+
* You should have received a copy of the GNU General Lesser Public
1818
* License along with this program. If not, see
1919
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
2020
* #L%
@@ -56,7 +56,7 @@ public void deParse(CreateIndex createIndex) {
5656
buffer.append("INDEX ");
5757
buffer.append(index.getName());
5858
buffer.append(" ON ");
59-
buffer.append(createIndex.getTable().getWholeTableName());
59+
buffer.append(createIndex.getTable().getFullyQualifiedName());
6060

6161
if (index.getColumnsNames() != null) {
6262
buffer.append(" (");

src/main/java/net/sf/jsqlparser/util/deparser/CreateTableDeParser.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
* Copyright (C) 2004 - 2013 JSQLParser
66
* %%
77
* This program is free software: you can redistribute it and/or modify
8-
* it under the terms of the GNU Lesser General Public License as
9-
* published by the Free Software Foundation, either version 2.1 of the
8+
* it under the terms of the GNU Lesser General Public License as
9+
* published by the Free Software Foundation, either version 2.1 of the
1010
* License, or (at your option) any later version.
11-
*
11+
*
1212
* This program is distributed in the hope that it will be useful,
1313
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
* GNU General Lesser Public License for more details.
16-
*
17-
* You should have received a copy of the GNU General Lesser Public
16+
*
17+
* You should have received a copy of the GNU General Lesser Public
1818
* License along with this program. If not, see
1919
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
2020
* #L%
@@ -43,7 +43,7 @@ public CreateTableDeParser(StringBuilder buffer) {
4343
}
4444

4545
public void deParse(CreateTable createTable) {
46-
buffer.append("CREATE TABLE ").append(createTable.getTable().getWholeTableName());
46+
buffer.append("CREATE TABLE ").append(createTable.getTable().getFullyQualifiedName());
4747
if (createTable.getColumnDefinitions() != null) {
4848
buffer.append(" (");
4949
for (Iterator<ColumnDefinition> iter = createTable.getColumnDefinitions().iterator(); iter.hasNext();) {

src/main/java/net/sf/jsqlparser/util/deparser/CreateViewDeParser.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
* Copyright (C) 2004 - 2013 JSQLParser
66
* %%
77
* This program is free software: you can redistribute it and/or modify
8-
* it under the terms of the GNU Lesser General Public License as
9-
* published by the Free Software Foundation, either version 2.1 of the
8+
* it under the terms of the GNU Lesser General Public License as
9+
* published by the Free Software Foundation, either version 2.1 of the
1010
* License, or (at your option) any later version.
11-
*
11+
*
1212
* This program is distributed in the hope that it will be useful,
1313
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
* GNU General Lesser Public License for more details.
16-
*
17-
* You should have received a copy of the GNU General Lesser Public
16+
*
17+
* You should have received a copy of the GNU General Lesser Public
1818
* License along with this program. If not, see
1919
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
2020
* #L%
@@ -47,7 +47,7 @@ public void deParse(CreateView createView) {
4747
if (createView.isMaterialized()) {
4848
buffer.append("MATERIALIZED ");
4949
}
50-
buffer.append("VIEW ").append(createView.getView().getWholeTableName());
50+
buffer.append("VIEW ").append(createView.getView().getFullyQualifiedName());
5151
if (createView.getColumnNames() != null) {
5252
buffer.append(PlainSelect.getStringList(createView.getColumnNames(), true, true));
5353
}

src/main/java/net/sf/jsqlparser/util/deparser/DeleteDeParser.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -5,16 +5,16 @@
55
* Copyright (C) 2004 - 2013 JSQLParser
66
* %%
77
* This program is free software: you can redistribute it and/or modify
8-
* it under the terms of the GNU Lesser General Public License as
9-
* published by the Free Software Foundation, either version 2.1 of the
8+
* it under the terms of the GNU Lesser General Public License as
9+
* published by the Free Software Foundation, either version 2.1 of the
1010
* License, or (at your option) any later version.
11-
*
11+
*
1212
* This program is distributed in the hope that it will be useful,
1313
* but WITHOUT ANY WARRANTY; without even the implied warranty of
1414
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
1515
* GNU General Lesser Public License for more details.
16-
*
17-
* You should have received a copy of the GNU General Lesser Public
16+
*
17+
* You should have received a copy of the GNU General Lesser Public
1818
* License along with this program. If not, see
1919
* <http://www.gnu.org/licenses/lgpl-2.1.html>.
2020
* #L%
@@ -53,7 +53,7 @@ public void setBuffer(StringBuilder buffer) {
5353
}
5454

5555
public void deParse(Delete delete) {
56-
buffer.append("DELETE FROM ").append(delete.getTable().getWholeTableName());
56+
buffer.append("DELETE FROM ").append(delete.getTable().getFullyQualifiedName());
5757
if (delete.getWhere() != null) {
5858
buffer.append(" WHERE ");
5959
delete.getWhere().accept(expressionVisitor);

src/main/java/net/sf/jsqlparser/util/deparser/ExpressionDeParser.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -289,7 +289,7 @@ public void visit(Column tableColumn) {
289289
if (alias != null) {
290290
tableName = alias.getName();
291291
} else if (tableName == null) {
292-
tableName = tableColumn.getTable().getWholeTableName();
292+
tableName = tableColumn.getTable().getFullyQualifiedName();
293293
}
294294
if (tableName != null) {
295295
buffer.append(tableName).append(".");

0 commit comments

Comments
 (0)