mirror of
https://github.com/corda/corda.git
synced 2025-04-14 22:46:57 +00:00
Added all generated files and added a buildKapt task to actually build kapt.
This commit is contained in:
parent
4c74de5237
commit
d69a12dc15
node-schemas
build.gradle
generated/source/kapt/main/net/corda/node/services/persistence/schemas
@ -34,12 +34,16 @@ dependencies {
|
||||
testCompile "com.h2database:h2:1.4.193"
|
||||
}
|
||||
|
||||
task copyGenerated(type: Copy, dependsOn: [kaptKotlin]) {
|
||||
// Generated files will be removed by gradle clean. Since we aren't running kapt every time we must preserve these files
|
||||
// Note: The lines that actually invoke kapt are those in the project.afterEvaluate block.
|
||||
task buildKapt(type: Copy) {
|
||||
from "${buildDir}/generated"
|
||||
into "${projectDir}/generated"
|
||||
}
|
||||
|
||||
// Remove the dependency on compile in kapt to avoid automatic kapt running - run :node-schemas:kaptKotlin explicitly.
|
||||
project.afterEvaluate {
|
||||
compileKotlin.dependsOn.remove(kaptKotlin)
|
||||
compileKotlin.dependsOn.remove kaptKotlin
|
||||
buildKapt.dependsOn kaptKotlin
|
||||
buildKapt.mustRunAfter kaptKotlin
|
||||
}
|
153
node-schemas/generated/source/kapt/main/net/corda/node/services/persistence/schemas/AttachmentEntity.java
Normal file
153
node-schemas/generated/source/kapt/main/net/corda/node/services/persistence/schemas/AttachmentEntity.java
Normal file
@ -0,0 +1,153 @@
|
||||
// Generated file do not edit, generated by io.requery.processor.EntityProcessor
|
||||
package net.corda.node.services.persistence.schemas;
|
||||
|
||||
import io.requery.Persistable;
|
||||
import io.requery.meta.AttributeBuilder;
|
||||
import io.requery.meta.AttributeDelegate;
|
||||
import io.requery.meta.Type;
|
||||
import io.requery.meta.TypeBuilder;
|
||||
import io.requery.proxy.EntityProxy;
|
||||
import io.requery.proxy.Property;
|
||||
import io.requery.proxy.PropertyState;
|
||||
import io.requery.util.function.Function;
|
||||
import io.requery.util.function.Supplier;
|
||||
import java.lang.Object;
|
||||
import java.lang.Override;
|
||||
import java.lang.String;
|
||||
import javax.annotation.Generated;
|
||||
import net.corda.core.crypto.SecureHash;
|
||||
|
||||
@Generated("io.requery.processor.EntityProcessor")
|
||||
public class AttachmentEntity implements Attachment, Persistable {
|
||||
public static final AttributeDelegate<AttachmentEntity, SecureHash> ATT_ID = new AttributeDelegate(
|
||||
new AttributeBuilder<AttachmentEntity, SecureHash>("att_id", SecureHash.class)
|
||||
.setProperty(new Property<AttachmentEntity, SecureHash>() {
|
||||
@Override
|
||||
public SecureHash get(AttachmentEntity entity) {
|
||||
return entity.attId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void set(AttachmentEntity entity, SecureHash value) {
|
||||
entity.attId = value;
|
||||
}
|
||||
})
|
||||
.setPropertyName("getAttId")
|
||||
.setPropertyState(new Property<AttachmentEntity, PropertyState>() {
|
||||
@Override
|
||||
public PropertyState get(AttachmentEntity entity) {
|
||||
return entity.$attId_state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void set(AttachmentEntity entity, PropertyState value) {
|
||||
entity.$attId_state = value;
|
||||
}
|
||||
})
|
||||
.setKey(true)
|
||||
.setGenerated(false)
|
||||
.setLazy(false)
|
||||
.setNullable(true)
|
||||
.setUnique(false)
|
||||
.build());
|
||||
|
||||
public static final AttributeDelegate<AttachmentEntity, byte[]> CONTENT = new AttributeDelegate(
|
||||
new AttributeBuilder<AttachmentEntity, byte[]>("content", byte[].class)
|
||||
.setProperty(new Property<AttachmentEntity, byte[]>() {
|
||||
@Override
|
||||
public byte[] get(AttachmentEntity entity) {
|
||||
return entity.content;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void set(AttachmentEntity entity, byte[] value) {
|
||||
entity.content = value;
|
||||
}
|
||||
})
|
||||
.setPropertyName("getContent")
|
||||
.setPropertyState(new Property<AttachmentEntity, PropertyState>() {
|
||||
@Override
|
||||
public PropertyState get(AttachmentEntity entity) {
|
||||
return entity.$content_state;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void set(AttachmentEntity entity, PropertyState value) {
|
||||
entity.$content_state = value;
|
||||
}
|
||||
})
|
||||
.setGenerated(false)
|
||||
.setLazy(false)
|
||||
.setNullable(true)
|
||||
.setUnique(false)
|
||||
.setConverter(new net.corda.core.schemas.requery.converters.BlobConverter())
|
||||
.build());
|
||||
|
||||
public static final Type<AttachmentEntity> $TYPE = new TypeBuilder<AttachmentEntity>(AttachmentEntity.class, "attachments")
|
||||
.setBaseType(Attachment.class)
|
||||
.setCacheable(true)
|
||||
.setImmutable(false)
|
||||
.setReadOnly(false)
|
||||
.setStateless(false)
|
||||
.setFactory(new Supplier<AttachmentEntity>() {
|
||||
@Override
|
||||
public AttachmentEntity get() {
|
||||
return new AttachmentEntity();
|
||||
}
|
||||
})
|
||||
.setProxyProvider(new Function<AttachmentEntity, EntityProxy<AttachmentEntity>>() {
|
||||
@Override
|
||||
public EntityProxy<AttachmentEntity> apply(AttachmentEntity entity) {
|
||||
return entity.$proxy;
|
||||
}
|
||||
})
|
||||
.addAttribute(ATT_ID)
|
||||
.addAttribute(CONTENT)
|
||||
.build();
|
||||
|
||||
private PropertyState $attId_state;
|
||||
|
||||
private PropertyState $content_state;
|
||||
|
||||
private SecureHash attId;
|
||||
|
||||
private byte[] content;
|
||||
|
||||
private final transient EntityProxy<AttachmentEntity> $proxy = new EntityProxy<AttachmentEntity>(this, $TYPE);
|
||||
|
||||
public AttachmentEntity() {
|
||||
}
|
||||
|
||||
@Override
|
||||
public SecureHash getAttId() {
|
||||
return $proxy.get(ATT_ID);
|
||||
}
|
||||
|
||||
public void setAttId(SecureHash attId) {
|
||||
$proxy.set(ATT_ID, attId);
|
||||
}
|
||||
|
||||
@Override
|
||||
public byte[] getContent() {
|
||||
return $proxy.get(CONTENT);
|
||||
}
|
||||
|
||||
public void setContent(byte[] content) {
|
||||
$proxy.set(CONTENT, content);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object obj) {
|
||||
return obj instanceof AttachmentEntity && ((AttachmentEntity)obj).$proxy.equals(this.$proxy);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
return $proxy.hashCode();
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return $proxy.toString();
|
||||
}
|
||||
}
|
16
node-schemas/generated/source/kapt/main/net/corda/node/services/persistence/schemas/Models.java
Normal file
16
node-schemas/generated/source/kapt/main/net/corda/node/services/persistence/schemas/Models.java
Normal file
@ -0,0 +1,16 @@
|
||||
// Generated file do not edit, generated by io.requery.processor.EntityProcessor
|
||||
package net.corda.node.services.persistence.schemas;
|
||||
|
||||
import io.requery.meta.EntityModel;
|
||||
import io.requery.meta.EntityModelBuilder;
|
||||
import javax.annotation.Generated;
|
||||
|
||||
@Generated("io.requery.processor.EntityProcessor")
|
||||
public class Models {
|
||||
public static final EntityModel PERSISTENCE = new EntityModelBuilder("persistence")
|
||||
.addType(AttachmentEntity.$TYPE)
|
||||
.build();
|
||||
|
||||
private Models() {
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user