You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@geode.apache.org by ds...@apache.org on 2017/10/25 20:26:53 UTC
[geode] branch feature/GEODE-3781 updated: rat and spotless
This is an automated email from the ASF dual-hosted git repository.
dschneider pushed a commit to branch feature/GEODE-3781
in repository https://gitbox.apache.org/repos/asf/geode.git
The following commit(s) were added to refs/heads/feature/GEODE-3781 by this push:
new 30d8f82 rat and spotless
30d8f82 is described below
commit 30d8f82b867fd99517c9db60f0a5ba1a301fdebf
Author: Darrel Schneider <ds...@pivotal.io>
AuthorDate: Wed Oct 25 13:26:39 2017 -0700
rat and spotless
---
.../geode/connectors/jdbc/JDBCConfiguration.java | 14 ++++++++++
.../apache/geode/connectors/jdbc/JDBCManager.java | 30 ++++++++++++++++------
2 files changed, 36 insertions(+), 8 deletions(-)
diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/JDBCConfiguration.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/JDBCConfiguration.java
index 763bbde..d96b9e8 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/JDBCConfiguration.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/JDBCConfiguration.java
@@ -1,3 +1,17 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
package org.apache.geode.connectors.jdbc;
import java.util.ArrayList;
diff --git a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/JDBCManager.java b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/JDBCManager.java
index 69bf897..fb53710 100644
--- a/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/JDBCManager.java
+++ b/geode-connectors/src/main/java/org/apache/geode/connectors/jdbc/JDBCManager.java
@@ -1,3 +1,17 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more contributor license
+ * agreements. See the NOTICE file distributed with this work for additional information regarding
+ * copyright ownership. The ASF licenses this file to You under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance with the License. You may obtain a
+ * copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software distributed under the License
+ * is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
+ * or implied. See the License for the specific language governing permissions and limitations under
+ * the License.
+ */
package org.apache.geode.connectors.jdbc;
import java.sql.Connection;
@@ -33,7 +47,7 @@ public class JDBCManager {
}
public class ColumnValue {
-
+
final private boolean isKey;
final private String columnName;
final private Object value;
@@ -43,7 +57,7 @@ public class JDBCManager {
this.columnName = columnName;
this.value = value;
}
-
+
public boolean isKey() {
return this.isKey;
}
@@ -51,7 +65,7 @@ public class JDBCManager {
public String getColumnName() {
return this.columnName;
}
-
+
public Object getValue() {
return this.value;
}
@@ -118,20 +132,20 @@ public class JDBCManager {
return null;
}
- private List<ColumnValue> getColumnToValueList(String tableName, Object key, PdxInstance value, Operation operation) {
+ private List<ColumnValue> getColumnToValueList(String tableName, Object key, PdxInstance value,
+ Operation operation) {
Set<String> keyColumnNames = getKeyColumnNames(tableName);
- for (String fieldName: value.getFieldNames()) {
+ for (String fieldName : value.getFieldNames()) {
String columnName = mapFieldNameToColumnName(fieldName, tableName);
boolean isKey = keyColumnNames.contains(columnName);
-
+
if (operation.isDestroy() && !isKey) {
continue;
}
- // TODO: what if isKey and value needs to be the key object?
+ // TODO: what if isKey and columnValue needs to be the key object instead of from PdxInstance?
Object columnValue = value.getField(fieldName);
ColumnValue cv = new ColumnValue(isKey, fieldName, columnValue);
}
- String[] valueColumnNames = getValueColumnNames(tableName, value);
return null;
}
--
To stop receiving notification emails like this one, please contact
['"commits@geode.apache.org" <co...@geode.apache.org>'].