Commit 49e2e8fa authored by liya.cookie's avatar liya.cookie
Browse files

check with checkstyle

parent 5bc57880
Loading
Loading
Loading
Loading
+3 −3
Original line number Diff line number Diff line
@@ -35,7 +35,7 @@ public class Country implements Serializable {
        return id;
    }

    public void setId(long id) {
    public void setId(final long id) {
        this.id = id;
    }

@@ -51,7 +51,7 @@ public class Country implements Serializable {
        return name;
    }

    public void setName(String name) {
    public void setName(final String name) {
        this.name = name;
    }

@@ -59,7 +59,7 @@ public class Country implements Serializable {
        return language;
    }

    public void setLanguage(String language) {
    public void setLanguage(final String language) {
        this.language = language;
    }

+4 −4
Original line number Diff line number Diff line
@@ -68,7 +68,7 @@ public class CountryRepositroyImpl implements CountryRepository {
    }

    @Override
    public Long insert(Country country) {
    public Long insert(final Country country) {
        String sql = "INSERT INTO t_country (name, code, language) VALUES (?, ?, ?)";
        try (Connection connection = dataSource.getConnection();
             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
@@ -86,7 +86,7 @@ public class CountryRepositroyImpl implements CountryRepository {
    }

    @Override
    public void delete(Long id) {
    public void delete(final Long id) {
        String sql = "DELETE FROM t_country WHERE id =?";
        try (Connection connection = dataSource.getConnection();
             PreparedStatement preparedStatement = connection.prepareStatement(sql)) {
@@ -102,7 +102,7 @@ public class CountryRepositroyImpl implements CountryRepository {
        return getCountries(sql);
    }

    private List<Country> getCountries(String sql) {
    private List<Country> getCountries(final String sql) {
        List<Country> result = new LinkedList<>();
        try (Connection connection = dataSource.getConnection();
             PreparedStatement preparedStatement = connection.prepareStatement(sql);
+11 −11
Original line number Diff line number Diff line
@@ -162,7 +162,7 @@ public final class CommonServiceImpl implements CommonService {

        private List<Long> countryIds;

        public InsertResult(List<Long> orderIds, List<Long> countryIds) {
        InsertResult(final List<Long> orderIds, final List<Long> countryIds) {
            this.orderIds = orderIds;
            this.countryIds = countryIds;
        }
+17 −0
Original line number Diff line number Diff line
/*
 * 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.shardingsphere.example.common.jpa.entity;

import org.apache.shardingsphere.example.common.entity.Country;
+0 −1
Original line number Diff line number Diff line
@@ -17,7 +17,6 @@

package org.apache.shardingsphere.example.common.jpa.entity;


import org.apache.shardingsphere.example.common.entity.Order;

import javax.persistence.Column;
Loading