Loading example-common/repository-api/src/main/java/org/apache/shardingsphere/example/common/entity/Country.java +3 −3 Original line number Diff line number Diff line Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading example-common/repository-jdbc/src/main/java/org/apache/shardingsphere/example/common/jdbc/repository/CountryRepositroyImpl.java +4 −4 Original line number Diff line number Diff line Loading @@ -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)) { Loading @@ -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)) { Loading @@ -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); Loading example-common/repository-jdbc/src/main/java/org/apache/shardingsphere/example/common/jdbc/service/CommonServiceImpl.java +11 −11 Original line number Diff line number Diff line Loading @@ -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; } Loading example-common/repository-jpa/src/main/java/org/apache/shardingsphere/example/common/jpa/entity/CountryEntity.java +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; Loading example-common/repository-jpa/src/main/java/org/apache/shardingsphere/example/common/jpa/entity/OrderEntity.java +0 −1 Original line number Diff line number Diff line Loading @@ -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 Loading
example-common/repository-api/src/main/java/org/apache/shardingsphere/example/common/entity/Country.java +3 −3 Original line number Diff line number Diff line Loading @@ -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; } Loading @@ -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; } Loading @@ -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; } Loading
example-common/repository-jdbc/src/main/java/org/apache/shardingsphere/example/common/jdbc/repository/CountryRepositroyImpl.java +4 −4 Original line number Diff line number Diff line Loading @@ -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)) { Loading @@ -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)) { Loading @@ -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); Loading
example-common/repository-jdbc/src/main/java/org/apache/shardingsphere/example/common/jdbc/service/CommonServiceImpl.java +11 −11 Original line number Diff line number Diff line Loading @@ -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; } Loading
example-common/repository-jpa/src/main/java/org/apache/shardingsphere/example/common/jpa/entity/CountryEntity.java +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; Loading
example-common/repository-jpa/src/main/java/org/apache/shardingsphere/example/common/jpa/entity/OrderEntity.java +0 −1 Original line number Diff line number Diff line Loading @@ -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