Loading common-repository/api-repository/pom.xml 0 → 100644 +12 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <artifactId>common-repository</artifactId> <groupId>io.shardingsphere</groupId> <version>3.0.0.M5-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>api-repository</artifactId> </project> No newline at end of file common-repository/mybatis-repository/src/main/java/io/shardingsphere/example/repository/mybatis/entity/Order.java→common-repository/api-repository/src/main/java/io/shardingsphere/example/repository/api/entity/Order.java +2 −2 Original line number Diff line number Diff line Loading @@ -15,9 +15,9 @@ * </p> */ package io.shardingsphere.example.repository.mybatis.entity; package io.shardingsphere.example.repository.api.entity; public final class Order { public class Order { private long orderId; Loading common-repository/mybatis-repository/src/main/java/io/shardingsphere/example/repository/mybatis/entity/OrderItem.java→common-repository/api-repository/src/main/java/io/shardingsphere/example/repository/api/entity/OrderItem.java +2 −2 Original line number Diff line number Diff line Loading @@ -15,9 +15,9 @@ * </p> */ package io.shardingsphere.example.repository.mybatis.entity; package io.shardingsphere.example.repository.api.entity; public final class OrderItem { public class OrderItem { private long orderItemId; Loading common-repository/api-repository/src/main/java/io/shardingsphere/example/repository/api/repository/Repository.java 0 → 100644 +35 −0 Original line number Diff line number Diff line /* * Copyright 2016-2018 shardingsphere.io. * <p> * Licensed 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. * </p> */ package io.shardingsphere.example.repository.api.repository; import java.util.List; public interface Repository<T> { void createIfNotExistsTable(); void truncateTable(); void dropTable(); Long insert(T model); void delete(Long id); List<T> selectAll(); } common-repository/jdbc-repository/pom.xml +8 −0 Original line number Diff line number Diff line Loading @@ -9,4 +9,12 @@ </parent> <modelVersion>4.0.0</modelVersion> <artifactId>jdbc-repository</artifactId> <dependencies> <dependency> <groupId>io.shardingsphere</groupId> <artifactId>api-repository</artifactId> <version>${project.version}</version> </dependency> </dependencies> </project> Loading
common-repository/api-repository/pom.xml 0 → 100644 +12 −0 Original line number Diff line number Diff line <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> <parent> <artifactId>common-repository</artifactId> <groupId>io.shardingsphere</groupId> <version>3.0.0.M5-SNAPSHOT</version> </parent> <modelVersion>4.0.0</modelVersion> <artifactId>api-repository</artifactId> </project> No newline at end of file
common-repository/mybatis-repository/src/main/java/io/shardingsphere/example/repository/mybatis/entity/Order.java→common-repository/api-repository/src/main/java/io/shardingsphere/example/repository/api/entity/Order.java +2 −2 Original line number Diff line number Diff line Loading @@ -15,9 +15,9 @@ * </p> */ package io.shardingsphere.example.repository.mybatis.entity; package io.shardingsphere.example.repository.api.entity; public final class Order { public class Order { private long orderId; Loading
common-repository/mybatis-repository/src/main/java/io/shardingsphere/example/repository/mybatis/entity/OrderItem.java→common-repository/api-repository/src/main/java/io/shardingsphere/example/repository/api/entity/OrderItem.java +2 −2 Original line number Diff line number Diff line Loading @@ -15,9 +15,9 @@ * </p> */ package io.shardingsphere.example.repository.mybatis.entity; package io.shardingsphere.example.repository.api.entity; public final class OrderItem { public class OrderItem { private long orderItemId; Loading
common-repository/api-repository/src/main/java/io/shardingsphere/example/repository/api/repository/Repository.java 0 → 100644 +35 −0 Original line number Diff line number Diff line /* * Copyright 2016-2018 shardingsphere.io. * <p> * Licensed 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. * </p> */ package io.shardingsphere.example.repository.api.repository; import java.util.List; public interface Repository<T> { void createIfNotExistsTable(); void truncateTable(); void dropTable(); Long insert(T model); void delete(Long id); List<T> selectAll(); }
common-repository/jdbc-repository/pom.xml +8 −0 Original line number Diff line number Diff line Loading @@ -9,4 +9,12 @@ </parent> <modelVersion>4.0.0</modelVersion> <artifactId>jdbc-repository</artifactId> <dependencies> <dependency> <groupId>io.shardingsphere</groupId> <artifactId>api-repository</artifactId> <version>${project.version}</version> </dependency> </dependencies> </project>