Skip to content

Commit d975aaa

Browse files
committed
add object impl and db
1 parent e3621bc commit d975aaa

File tree

15 files changed

+453
-127
lines changed

15 files changed

+453
-127
lines changed

build.gradle

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ buildscript {
55
maven { url "https://plugins.gradle.org/m2/" }
66
}
77
dependencies {
8-
classpath "net.ltgt.gradle:gradle-apt-plugin:0.15"
98
classpath "io.objectbox:objectbox-gradle-plugin:$objectboxVersion"
109
}
1110
}
@@ -14,10 +13,10 @@ plugins {
1413
id 'java'
1514
id 'org.jetbrains.kotlin.jvm' version '1.2.61'
1615
}
17-
apply plugin: 'net.ltgt.apt-idea' // annotation processor plugin
18-
apply plugin: 'io.objectbox'
19-
apply plugin: 'kotlin'
2016

17+
apply plugin: 'kotlin-kapt'
18+
apply plugin: 'application'
19+
apply plugin: 'io.objectbox'
2120

2221
group 'com.longforus'
2322
version '1.0-SNAPSHOT'
@@ -28,14 +27,28 @@ repositories {
2827
mavenCentral()
2928
}
3029

30+
compileKotlin {
31+
kotlinOptions.jvmTarget = "1.8"
32+
}
33+
compileTestKotlin {
34+
kotlinOptions.jvmTarget = "1.8"
35+
}
36+
37+
38+
sourceCompatibility = 1.8
3139

40+
41+
mainClassName = "com.longforus.apidebugger.MainKt"
3242
dependencies {
43+
implementation fileTree(include: ['*.jar'], dir: 'lib')
3344
compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8"
3445
// Optional: include all native libraries for distribution
3546
implementation "io.objectbox:objectbox-kotlin:$objectboxVersion"
3647
implementation "io.objectbox:objectbox-linux:$objectboxVersion"
3748
implementation "io.objectbox:objectbox-macos:$objectboxVersion"
3849
implementation "io.objectbox:objectbox-windows:$objectboxVersion"
50+
implementation "io.objectbox:objectbox-java:$objectboxVersion"
51+
kapt "io.objectbox:objectbox-processor:$objectboxVersion"
3952
// compile 'org.hamcrest:hamcrest-core:1.3'
4053
implementation 'com.google.code.gson:gson:2.8.5'
4154
implementation 'org.apache.commons:commons-lang3:3.8'
@@ -44,15 +57,6 @@ dependencies {
4457
implementation 'com.jgoodies:jgoodies-forms:1.9.0'
4558
}
4659

47-
compileKotlin {
48-
kotlinOptions.jvmTarget = "1.8"
49-
}
50-
compileTestKotlin {
51-
kotlinOptions.jvmTarget = "1.8"
52-
}
53-
54-
55-
sourceCompatibility = 1.8
5660

5761

5862
// enable debug output for plugin
@@ -62,4 +66,5 @@ objectbox {
6266
// enable debug output for annotation processor
6367
tasks.withType(JavaCompile) {
6468
options.compilerArgs += [ "-Aobjectbox.debug=true" ]
69+
options.compilerArgs += [ "-Aobjectbox.modelPath=$projectDir/schemas/objectbox.json" ]
6570
}

objectbox-models/default.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
{
2+
"_note1": "KEEP THIS FILE! Check it into a version control system (VCS) like git.",
3+
"_note2": "ObjectBox manages crucial IDs for your object model. See docs for details.",
4+
"_note3": "If you have VCS merge conflicts, you must resolve them according to ObjectBox docs.",
5+
"entities": [
6+
{
7+
"id": "1:5106563832689104204",
8+
"lastPropertyId": "6:289187461763749700",
9+
"name": "ApiBean",
10+
"properties": [
11+
{
12+
"id": "1:7111733236036987178",
13+
"name": "id"
14+
},
15+
{
16+
"id": "2:5476738677424130682",
17+
"name": "method"
18+
},
19+
{
20+
"id": "3:4426015197720182937",
21+
"indexId": "1:6428961294737086977",
22+
"name": "url"
23+
},
24+
{
25+
"id": "4:384325182237240164",
26+
"name": "parameMap"
27+
},
28+
{
29+
"id": "5:8679731387982128062",
30+
"name": "encryptType"
31+
},
32+
{
33+
"id": "6:289187461763749700",
34+
"indexId": "2:8874929421314312625",
35+
"name": "projectId"
36+
}
37+
],
38+
"relations": []
39+
},
40+
{
41+
"id": "2:2818616999448140139",
42+
"lastPropertyId": "3:1844758545186169842",
43+
"name": "ProjectBean",
44+
"properties": [
45+
{
46+
"id": "1:7849693985632742549",
47+
"name": "id"
48+
},
49+
{
50+
"id": "2:3979305607409224008",
51+
"indexId": "3:3289518476068271070",
52+
"name": "name"
53+
},
54+
{
55+
"id": "3:1844758545186169842",
56+
"name": "baseUrlList"
57+
}
58+
],
59+
"relations": []
60+
}
61+
],
62+
"lastEntityId": "2:2818616999448140139",
63+
"lastIndexId": "3:3289518476068271070",
64+
"lastRelationId": "0:0",
65+
"lastSequenceId": "0:0",
66+
"modelVersion": 4,
67+
"modelVersionParserMinimum": 4,
68+
"retiredEntityUids": [],
69+
"retiredIndexUids": [],
70+
"retiredPropertyUids": [],
71+
"retiredRelationUids": [],
72+
"version": 1
73+
}

objectbox-windows-x64.dll

684 KB
Binary file not shown.

src/main/java/com/longforus/apidebugger/ui/MainPanel.form

Lines changed: 32 additions & 59 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
<form xmlns="http://www.intellij.com/uidesigner/form/" version="1" bind-to-class="com.longforus.apidebugger.ui.MainPanel">
33
<grid id="27dc6" binding="baseP" layout-manager="FormLayout">
44
<rowspec value="center:d:noGrow"/>
5-
<rowspec value="top:4dlu:noGrow"/>
65
<rowspec value="center:max(d;4px):noGrow"/>
76
<rowspec value="top:4dlu:noGrow"/>
87
<rowspec value="center:max(d;4px):noGrow"/>
@@ -32,53 +31,9 @@
3231
<size top="1" left="1" bottom="1" right="1"/>
3332
</border>
3433
<children>
35-
<component id="69e20" class="javax.swing.JLabel">
36-
<constraints>
37-
<grid row="0" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
38-
<forms/>
39-
</constraints>
40-
<properties>
41-
<text value="Project:"/>
42-
</properties>
43-
</component>
44-
<component id="a3e21" class="javax.swing.JComboBox" binding="mCbProject">
45-
<constraints>
46-
<grid row="0" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
47-
<forms/>
48-
</constraints>
49-
<properties>
50-
<editable value="true"/>
51-
<name value="Project"/>
52-
</properties>
53-
</component>
54-
<component id="83b25" class="javax.swing.JButton" binding="mBtnSaveProject">
55-
<constraints>
56-
<grid row="0" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
57-
<forms/>
58-
</constraints>
59-
<properties>
60-
<text value="Save"/>
61-
</properties>
62-
</component>
63-
<component id="4ba05" class="javax.swing.JLabel">
64-
<constraints>
65-
<grid row="0" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
66-
<forms/>
67-
</constraints>
68-
<properties>
69-
<text value="Encryption:"/>
70-
</properties>
71-
</component>
72-
<component id="a1a29" class="javax.swing.JComboBox" binding="mCbEncrypt">
73-
<constraints>
74-
<grid row="0" column="8" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
75-
<forms/>
76-
</constraints>
77-
<properties/>
78-
</component>
7934
<component id="c88ef" class="javax.swing.JLabel">
8035
<constraints>
81-
<grid row="2" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
36+
<grid row="1" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
8237
<forms/>
8338
</constraints>
8439
<properties>
@@ -87,7 +42,7 @@
8742
</component>
8843
<component id="fcf33" class="javax.swing.JComboBox" binding="mCbBaseUrl">
8944
<constraints>
90-
<grid row="2" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
45+
<grid row="1" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
9146
<forms/>
9247
</constraints>
9348
<properties>
@@ -96,7 +51,7 @@
9651
</component>
9752
<component id="46c6e" class="javax.swing.JButton" binding="mBtnSaveBaseUrl">
9853
<constraints>
99-
<grid row="2" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
54+
<grid row="1" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
10055
<forms/>
10156
</constraints>
10257
<properties>
@@ -105,7 +60,7 @@
10560
</component>
10661
<component id="a35e1" class="javax.swing.JLabel">
10762
<constraints>
108-
<grid row="4" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
63+
<grid row="3" column="0" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
10964
<forms/>
11065
</constraints>
11166
<properties>
@@ -114,7 +69,7 @@
11469
</component>
11570
<component id="48771" class="javax.swing.JComboBox" binding="mCbApiUrl">
11671
<constraints>
117-
<grid row="4" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
72+
<grid row="3" column="2" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
11873
<forms/>
11974
</constraints>
12075
<properties>
@@ -123,7 +78,7 @@
12378
</component>
12479
<component id="998ff" class="javax.swing.JButton" binding="mBtnSend">
12580
<constraints>
126-
<grid row="4" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
81+
<grid row="3" column="4" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
12782
<forms/>
12883
</constraints>
12984
<properties>
@@ -132,21 +87,23 @@
13287
</component>
13388
<scrollpane id="13be7">
13489
<constraints>
135-
<grid row="6" column="0" row-span="1" col-span="9" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
90+
<grid row="5" column="0" row-span="1" col-span="9" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
13691
<forms defaultalign-horz="false" defaultalign-vert="false"/>
13792
</constraints>
13893
<properties/>
13994
<border type="none" title="Request Parameter"/>
14095
<children>
14196
<component id="f744b" class="javax.swing.JTable" binding="mTbParame">
14297
<constraints/>
143-
<properties/>
98+
<properties>
99+
<rowHeight value="25"/>
100+
</properties>
144101
</component>
145102
</children>
146103
</scrollpane>
147104
<scrollpane id="86e31">
148105
<constraints>
149-
<grid row="8" column="0" row-span="1" col-span="9" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
106+
<grid row="7" column="0" row-span="1" col-span="9" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
150107
<forms defaultalign-horz="false" defaultalign-vert="false"/>
151108
</constraints>
152109
<properties/>
@@ -162,7 +119,7 @@
162119
</scrollpane>
163120
<component id="8b0f0" class="javax.swing.JLabel" binding="lbStatus">
164121
<constraints>
165-
<grid row="9" column="0" row-span="1" col-span="9" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
122+
<grid row="8" column="0" row-span="1" col-span="9" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
166123
<forms/>
167124
</constraints>
168125
<properties>
@@ -171,7 +128,7 @@
171128
</component>
172129
<scrollpane id="c35dd">
173130
<constraints>
174-
<grid row="0" column="10" row-span="6" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
131+
<grid row="0" column="10" row-span="5" col-span="1" vsize-policy="7" hsize-policy="7" anchor="0" fill="3" indent="0" use-parent-layout="false"/>
175132
<forms defaultalign-horz="false" defaultalign-vert="false"/>
176133
</constraints>
177134
<properties/>
@@ -187,7 +144,7 @@
187144
<rowspec value="center:d:grow"/>
188145
<colspec value="fill:d:grow"/>
189146
<constraints>
190-
<grid row="6" column="10" row-span="3" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
147+
<grid row="5" column="10" row-span="3" col-span="1" vsize-policy="3" hsize-policy="3" anchor="0" fill="0" indent="0" use-parent-layout="false"/>
191148
<forms/>
192149
</constraints>
193150
<properties/>
@@ -196,7 +153,7 @@
196153
</grid>
197154
<component id="1e7e4" class="javax.swing.JButton" binding="mBtnSaveApi">
198155
<constraints>
199-
<grid row="4" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
156+
<grid row="3" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
200157
<forms/>
201158
</constraints>
202159
<properties>
@@ -205,13 +162,29 @@
205162
</component>
206163
<component id="bbb13" class="javax.swing.JButton" binding="mBtnNewApi">
207164
<constraints>
208-
<grid row="4" column="8" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
165+
<grid row="3" column="8" row-span="1" col-span="1" vsize-policy="0" hsize-policy="3" anchor="0" fill="1" indent="0" use-parent-layout="false"/>
209166
<forms/>
210167
</constraints>
211168
<properties>
212169
<text value="Copy New"/>
213170
</properties>
214171
</component>
172+
<component id="4ba05" class="javax.swing.JLabel">
173+
<constraints>
174+
<grid row="1" column="6" row-span="1" col-span="1" vsize-policy="0" hsize-policy="0" anchor="8" fill="0" indent="0" use-parent-layout="false"/>
175+
<forms/>
176+
</constraints>
177+
<properties>
178+
<text value="Encryption:"/>
179+
</properties>
180+
</component>
181+
<component id="a1a29" class="javax.swing.JComboBox" binding="mCbEncrypt">
182+
<constraints>
183+
<grid row="1" column="8" row-span="1" col-span="1" vsize-policy="0" hsize-policy="2" anchor="8" fill="1" indent="0" use-parent-layout="false"/>
184+
<forms/>
185+
</constraints>
186+
<properties/>
187+
</component>
215188
</children>
216189
</grid>
217190
</form>

0 commit comments

Comments
 (0)