Skip to content

objectquery/persistence-engine

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 

Repository files navigation

persistence-engine

The Persistence engine is an attempt to define a new way to persist java object.

Concepts

  • Only one instance per entity per VM.
  • Linear entity navigation and query.

Coding

Define entities

public interface Library {

  void setAddress(String address);
  String getAddress();

  Iterable<Book> getBooks();
  void addToBooks(Book book);
  boolean removeFromBooks(Book book);
  int countBooks();
  boolean hasInBooks(Book book);
  
  default Iterable<Book> getBooksByAuthor(String author) {
    return filter(getBooks()).has(book -> book.getAuthor(),author).iterable();
  }
}
public interface Book {

  void setTitle(String title);
  String getTitle();

  void setAuthor(String author);
  String getAuthor();

}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages