public class MetaJsonRecordRepository extends JpaRepository<MetaJsonRecord>
| Modifier and Type | Class and Description |
|---|---|
static class |
MetaJsonRecordRepository.MetaJsonRecordQuery |
modelClass| Constructor and Description |
|---|
MetaJsonRecordRepository()
Create new instance of the
MetaJsonRecordRepository. |
| Modifier and Type | Method and Description |
|---|---|
MetaJsonRecordRepository.MetaJsonRecordQuery |
all(String jsonModel)
Create a
Query for the given json model. |
Context |
create(MetaJsonRecord record) |
Context |
create(String jsonModel)
Create a
Context for the given json model to seamlessly work with json fields. |
MetaJsonRecord |
create(String jsonModel,
Map<String,Object> values)
Create a new
MetaJsonRecord for the given json model with given values. |
MetaJsonRecord |
save(Context context)
Save the json record backed by the given context.
|
MetaJsonRecord |
save(MetaJsonRecord entity)
Save the given entity.
|
public MetaJsonRecordRepository()
MetaJsonRecordRepository.public Context create(String jsonModel)
Context for the given json model to seamlessly work with json fields.
For example:
Context person = repo.create("Person");
person.put("name", "Some NAME");
person.put("email", "some.name@gmail.com");
MetaJsonRecord saved = repo.save(person);
jsonModel - the name of the json modelContextpublic Context create(MetaJsonRecord record)
public MetaJsonRecord create(String jsonModel, Map<String,Object> values)
MetaJsonRecord for the given json model with given values.jsonModel - the name of the json modelvalues - the values to setMetaJsonRecordpublic MetaJsonRecord save(Context context)
context - the json record contextMetaJsonRecordpublic MetaJsonRecord save(MetaJsonRecord entity)
RepositoryDepending on the implementation, it may return same entity or a copy of it. For example JPA implementation may return a copy if the given entity can't be managed.
save in interface Repository<MetaJsonRecord>save in class JpaRepository<MetaJsonRecord>entity - the entity object to savepublic MetaJsonRecordRepository.MetaJsonRecordQuery all(String jsonModel)
Query for the given json model.jsonModel - name of the json modelMetaJsonRecordRepository.MetaJsonRecordQuery