JasDB 1.1 Release

Published on and last modified on by Renze de Vries.

We have managed to create quite an exciting JasDB 1.1 release which contains a whole lot of bugfixes and new functionality.

Entity Mapper

We are proud to announce that JasDB 1.1 contains a fully fledges entity mapper framework. You now no longer have to map your own entity model onto the JasDB SimpleEntity class. The framework will do this fully for you. Also we have improved JSon parsing and handling allowing more complex data structures to be sent to the database.

DBSession session = sessionFactory.createSession();
        EntityManager entityManager = session.getEntityManager();
        TestEntity entity = new TestEntity(null, "Renze", "de Vries", newArrayList("programming", "model building", "biking"),
                    new ImmutableMap.Builder<String, String>()
                            .put("city", "Amsterdam")
                            .put("street", "Secret passageway 10")
                            .put("zipcode", "0000TT").build());
            String id = entityManager.persist(entity).getInternalId();

How does an entity have to look, see the TestEntity here:

@JasDBEntity(bagName = "TEST_BAG")
public class TestEntity {
    private String id;
    private String firstName;
    private String lastName;

    private List<String> hobbies;

    private Map<String, String> properties;

    @Id
    @JasDBProperty
    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    @JasDBProperty
    public String getFirstName() {
        return firstName;
    }

    public void setFirstName(String firstName) {
        this.firstName = firstName;
    }

    @JasDBProperty
    public String getLastName() {
        return lastName;
    }

    public void setLastName(String lastName) {
        this.lastName = lastName;
    }

    @JasDBProperty(name = "HobbyList")
    public List<String> getHobbies() {
        return hobbies;
    }

    public void setHobbies(List<String> hobbies) {
        this.hobbies = hobbies;
    }

    @JasDBProperty
    public Map<String, String> getProperties() {
        return properties;
    }

    public void setProperties(Map<String, String> addressProperties) {
        this.properties = addressProperties;
    }
}

Fixes:

  • Query engine has improved handling of several queries containing null and empty keys
  • Indexes now support handling of null values
  • Indexes are now properly chosen in case of complex multi key indexes

Maven dependencies

If you want to use the REST client for JasDB add the following dependency to your pom file:

<dependency>
   <groupId>com.oberasoftware</groupId>
   <artifactId>jasdb_restconnector</artifactId>
   <version>1.1.1</version>
</dependency>

When you want to run JasDB inside your application without using REST the following dependency is needed:

<dependency>
   <groupId>com.oberasoftware</groupId>
   <artifactId>jasdb_localservice</artifactId>
   <version>1.1.1</version>
</dependency>

Download

Please pick up the latest version here: JasDB v1.1

All artefacts are also available in Maven Central, see the following page on Maven details: https://github.com/oberasoftware/jasdb-open/wiki