Unverified Commit c5541087 authored by 张亮's avatar 张亮 Committed by GitHub
Browse files

Merge pull request #60 from tristaZero/dev

ReConstruct sharding-examples project
parents 4d329e0d d9a0cc6b
Loading
Loading
Loading
Loading
+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
+2 −2
Original line number Diff line number Diff line
@@ -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;
    
+2 −2
Original line number Diff line number Diff line
@@ -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;
    
+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();
}
+8 −0
Original line number Diff line number Diff line
@@ -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