Package io.dialob.db.jdbc
Class JdbcFormDatabase
- java.lang.Object
-
- io.dialob.db.spi.spring.AbstractDocumentDatabase<T>
-
- io.dialob.db.jdbc.JdbcBackendDatabase<io.dialob.api.form.Form,FormDatabase.FormMetadataRow>
-
- io.dialob.db.jdbc.JdbcFormDatabase
-
- All Implemented Interfaces:
JdbcDatabase,FormDatabase
public class JdbcFormDatabase extends JdbcBackendDatabase<io.dialob.api.form.Form,FormDatabase.FormMetadataRow> implements FormDatabase
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface io.dialob.form.service.api.FormDatabase
FormDatabase.FormMetadataRow
-
-
Field Summary
-
Fields inherited from class io.dialob.db.jdbc.JdbcBackendDatabase
databaseHelper, isAnyTenantPredicate, jdbcTemplate, objectMapper, tableName, transactionTemplate
-
-
Constructor Summary
Constructors Constructor Description JdbcFormDatabase(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, DatabaseHelper databaseHelper, org.springframework.transaction.support.TransactionTemplate transactionTemplate, com.fasterxml.jackson.databind.ObjectMapper objectMapper, String schema, Predicate<String> isAnyTenantPredicate)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfindAllMetadata(String tenantId, io.dialob.api.form.Form.Metadata metadata, Consumer<FormDatabase.FormMetadataRow> consumer)io.dialob.api.form.FormfindOne(String tenantId, String id, String rev)protected StringgetLabel(io.dialob.api.form.Form document)io.dialob.api.form.Formsave(String tenantId, io.dialob.api.form.Form document)protected io.dialob.api.form.FormtoObject(byte[] oid, int objectRev, String tenantId, Timestamp created, Timestamp updated, InputStream inputStream)protected io.dialob.api.form.FormupdatedDocument(io.dialob.api.form.Form form, byte[] oid, Integer revision, Timestamp timestamp, String tenantId)protected io.dialob.api.form.FormupdateDocumentId(io.dialob.api.form.Form document, String id)protected io.dialob.api.form.FormupdateDocumentRev(io.dialob.api.form.Form document, String rev)-
Methods inherited from class io.dialob.db.jdbc.JdbcBackendDatabase
delete, doTransaction, exists, findOne, getDatabaseHelper, getRevision, notAnyTenant, toId
-
Methods inherited from class io.dialob.db.spi.spring.AbstractDocumentDatabase
getDocumentClass, id, rev
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.dialob.form.service.api.FormDatabase
delete, exists, findOne
-
Methods inherited from interface io.dialob.db.jdbc.JdbcDatabase
toJdbcId
-
-
-
-
Constructor Detail
-
JdbcFormDatabase
public JdbcFormDatabase(org.springframework.jdbc.core.JdbcTemplate jdbcTemplate, DatabaseHelper databaseHelper, org.springframework.transaction.support.TransactionTemplate transactionTemplate, com.fasterxml.jackson.databind.ObjectMapper objectMapper, String schema, Predicate<String> isAnyTenantPredicate)
-
-
Method Detail
-
findOne
@NonNull public io.dialob.api.form.Form findOne(String tenantId, @NonNull String id, String rev)
- Specified by:
findOnein interfaceFormDatabase- Specified by:
findOnein classJdbcBackendDatabase<io.dialob.api.form.Form,FormDatabase.FormMetadataRow>
-
save
@NonNull public io.dialob.api.form.Form save(String tenantId, @NonNull io.dialob.api.form.Form document)
- Specified by:
savein interfaceFormDatabase- Specified by:
savein classJdbcBackendDatabase<io.dialob.api.form.Form,FormDatabase.FormMetadataRow>
-
getLabel
protected String getLabel(@NonNull io.dialob.api.form.Form document)
-
toObject
protected io.dialob.api.form.Form toObject(byte[] oid, int objectRev, String tenantId, Timestamp created, Timestamp updated, InputStream inputStream)
-
updatedDocument
@NonNull protected io.dialob.api.form.Form updatedDocument(@NonNull io.dialob.api.form.Form form, @NonNull byte[] oid, @NonNull Integer revision, @NonNull Timestamp timestamp, String tenantId)- Specified by:
updatedDocumentin classJdbcBackendDatabase<io.dialob.api.form.Form,FormDatabase.FormMetadataRow>
-
findAllMetadata
public void findAllMetadata(String tenantId, io.dialob.api.form.Form.Metadata metadata, @NonNull Consumer<FormDatabase.FormMetadataRow> consumer)
- Specified by:
findAllMetadatain interfaceFormDatabase
-
updateDocumentId
@NonNull protected io.dialob.api.form.Form updateDocumentId(@NonNull io.dialob.api.form.Form document, String id)- Specified by:
updateDocumentIdin classAbstractDocumentDatabase<io.dialob.api.form.Form>
-
updateDocumentRev
@NonNull protected io.dialob.api.form.Form updateDocumentRev(@NonNull io.dialob.api.form.Form document, String rev)- Specified by:
updateDocumentRevin classAbstractDocumentDatabase<io.dialob.api.form.Form>
-
-