DataEntry Class
Data Entry class encloses the table class. This is to differentiate the meta data from the actual data of the table. Only the table class can have indexed member variables.
public class AuthorDE extends DataEntry<Author>{
public AuthorDE(Author obj) {
super(obj);
}
public AuthorDE(Create create) throws ClassNotFoundException, JsonProcessingException {
super(create);
}
public AuthorDE() {
}
public AuthorDE(String key) {
super(key);
}
}
DataEntry
public class AuthorDE extends DataEntry<Author>
DataEntry contains metadata definitions and in the case above the Author class contains table data definitions. Metadata is maintained by the NucleoDB database. Modified/Created dates are based on the ledger in the MQS.
Constructors
Constructors are required for internal operations and instantiating a new DataEntry into the database.
Below is used when inserting a new Author table class into the database. This will also generate a new key using UUID.randomUUID().
public AuthorDE(Author obj) {
super(obj);
}
Below is used when a Create is read in from the MQS
public AuthorDE(Create create) throws ClassNotFoundException, JsonProcessingException {
super(create);
}
No Comments