Simple Attachment Storage implementation using Requery/H2 database

This commit is contained in:
Karel Hajek
2017-02-15 18:32:23 +00:00
committed by Mike Hearn
parent 0600bfa061
commit 1e78d6a3a7
16 changed files with 343 additions and 117 deletions

View File

@ -0,0 +1,18 @@
package net.corda.node.services.persistence.schemas
import io.requery.*
import net.corda.core.crypto.SecureHash
import net.corda.core.schemas.requery.converters.BlobConverter
@Table(name = "attachments")
@Entity(model = "persistence")
interface Attachment : Persistable {
@get:Key
@get:Column(name = "att_id", index = true)
var attId: SecureHash
@get:Column(name = "content")
@get:Convert(BlobConverter::class)
var content: ByteArray
}