From dev-return-5928-archive-asf-public=cust-asf.ponee.io@metamodel.apache.org Tue May 22 16:15:14 2018 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by mx-eu-01.ponee.io (Postfix) with SMTP id 1CF6B180638 for ; Tue, 22 May 2018 16:15:13 +0200 (CEST) Received: (qmail 58935 invoked by uid 500); 22 May 2018 14:15:08 -0000 Mailing-List: contact dev-help@metamodel.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@metamodel.apache.org Delivered-To: mailing list dev@metamodel.apache.org Received: (qmail 58721 invoked by uid 99); 22 May 2018 14:15:07 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 May 2018 14:15:07 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 769C2E10D0; Tue, 22 May 2018 14:15:07 +0000 (UTC) From: arjansh To: dev@metamodel.apache.org Reply-To: dev@metamodel.apache.org References: In-Reply-To: Subject: [GitHub] metamodel pull request #179: Feature/neo4j column types Content-Type: text/plain Message-Id: <20180522141507.769C2E10D0@git1-us-west.apache.org> Date: Tue, 22 May 2018 14:15:07 +0000 (UTC) Github user arjansh commented on a diff in the pull request: https://github.com/apache/metamodel/pull/179#discussion_r189915253 --- Diff: neo4j/src/main/java/org/apache/metamodel/neo4j/utils/AbstractColumnTypeHandler.java --- @@ -0,0 +1,33 @@ +/** + * 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.metamodel.neo4j.utils; + +import org.apache.metamodel.schema.ColumnType; +import org.json.JSONObject; + +public abstract class AbstractColumnTypeHandler implements ColumnTypeHandler { + protected ColumnTypeHandler _successor; + + @Override + public void setSuccessor(final ColumnTypeHandler successor) { --- End diff -- In theory this setSuccessor method makes the code very flexible, but in this use case it adds flexibility which is not actually used, because each type of `ColumnTypeHandler` has one successor, which is now non-statically defined in the ColumnTypeResolver#getTypeFromValue(JSONObject, String) method, but which is actually static and could as well be defined within the class's definition. ---