How to Declare Minimum Required Properties in Your Data Classes

by on September 1, 2019

In another post, we showed how to update data objects in the persistent storage. In this post, we’ll talk about declaring the minimum required properties needed to update objects.

Our class for the data object from the previous article looked like this:

package com.mbaas.sample;
import java.util.Date;
public class Person
    public int age;
    public String name;
    public Date birthdate;

Notice that the class does not include any fields/properties for the objectId, created, or updated fields. Nevertheless, the call to save the updated object knew that it was already stored in Backendless Database. This is possible because of a feature that lets you declare any field or property your app might need. Also, notice that the class neither implements any special interfaces nor extends any base Backendless classes – a pure data object class.

Leave a Reply