Storm Object Relational Mapping

@aljunggren aljunggren authored on 26 Sep 2020
src Initial commit 6 years ago
.gitignore Initial commit 6 years ago
README.md Updated readme 6 years ago
pom.xml Initial commit 6 years ago
README.md

Storm - Object-Relational Mapper

Interface

    @Connection(context = "H2")
    private interface UserRepository {
        
        @Select(sql = "select * from users order by id")
        public List<User> fetchAll();
        
        @Select(sql = "select * from users where id = ?")
        public User findById(int id);
        
    }

Use

    UserRepository repository = StormRepository.newInstance(UserRepository.class);
    List<User> users = repository.fetchAll();
    User user = repository.findById(12);