-
-
Notifications
You must be signed in to change notification settings - Fork 4k
/
11-generate-entities.sh
executable file
·162 lines (137 loc) · 5.12 KB
/
11-generate-entities.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
#!/bin/bash
set -e
if [[ -a $(dirname $0)/00-init-env.sh ]]; then
source $(dirname $0)/00-init-env.sh
else
echo "*** 00-init-env.sh not found"
fi
#-------------------------------------------------------------------------------
# Functions
#-------------------------------------------------------------------------------
moveEntity() {
local entity="$1"
cp "$JHI_SAMPLES"/.jhipster/"$entity".json "$JHI_FOLDER_APP"/.jhipster/
}
prepareFolder() {
rm -rf "$JHI_FOLDER_APP"
mkdir -p "$JHI_FOLDER_APP"/.jhipster/
}
#-------------------------------------------------------------------------------
# Copy entities json
#-------------------------------------------------------------------------------
if [[ $JHI_REPO != "" ]]; then
prepareFolder
fi
if [[ ("$JHI_ENTITY" == "mongodb") || ("$JHI_ENTITY" == "couchbase") ]]; then
moveEntity DocumentBankAccount
moveEntity EmbeddedOperation
moveEntity Place
moveEntity Division
moveEntity FieldTestEntity
moveEntity FieldTestMapstructAndServiceClassEntity
moveEntity FieldTestServiceClassAndJpaFilteringEntity
moveEntity FieldTestServiceImplEntity
moveEntity FieldTestInfiniteScrollEntity
moveEntity FieldTestPaginationEntity
moveEntity EntityWithDTO
moveEntity EntityWithPaginationAndDTO
moveEntity EntityWithServiceClassAndPagination
moveEntity EntityWithServiceClassPaginationAndDTO
moveEntity EntityWithServiceImplAndDTO
moveEntity EntityWithServiceImplAndPagination
moveEntity EntityWithServiceImplPaginationAndDTO
elif [[ "$JHI_ENTITY" == "neo4j" ]]; then
moveEntity Album
moveEntity Track
moveEntity Genre
moveEntity Artist
elif [[ "$JHI_ENTITY" == "cassandra" ]]; then
moveEntity CassBankAccount
moveEntity CassTestEntity
moveEntity CassTestMapstructEntity
moveEntity CassTestServiceClassEntity
moveEntity CassTestServiceImplEntity
elif [[ "$JHI_ENTITY" == "micro" ]]; then
moveEntity MicroserviceBankAccount
moveEntity MicroserviceOperation
moveEntity MicroserviceLabel
moveEntity FieldTestEntity
moveEntity FieldTestMapstructAndServiceClassEntity
moveEntity FieldTestServiceClassAndJpaFilteringEntity
moveEntity FieldTestServiceImplEntity
moveEntity FieldTestInfiniteScrollEntity
moveEntity FieldTestPaginationEntity
elif [[ "$JHI_ENTITY" == "uaa" ]]; then
moveEntity FieldTestEntity
moveEntity FieldTestMapstructAndServiceClassEntity
moveEntity FieldTestServiceClassAndJpaFilteringEntity
moveEntity FieldTestServiceImplEntity
moveEntity FieldTestInfiniteScrollEntity
moveEntity FieldTestPaginationEntity
elif [[ "$JHI_ENTITY" == "sqllight" ]]; then
moveEntity BankAccount
moveEntity Label
moveEntity Operation
elif [[ "$JHI_ENTITY" == "sqlfull" ]]; then
moveEntity BankAccount
moveEntity Label
moveEntity Operation
moveEntity Place
moveEntity Division
moveEntity FieldTestEntity
moveEntity FieldTestMapstructAndServiceClassEntity
moveEntity FieldTestServiceClassAndJpaFilteringEntity
moveEntity FieldTestServiceImplEntity
moveEntity FieldTestInfiniteScrollEntity
moveEntity FieldTestPaginationEntity
moveEntity FieldTestEnumWithValue
moveEntity TestEntity
moveEntity TestMapstruct
moveEntity TestServiceClass
moveEntity TestServiceImpl
moveEntity TestInfiniteScroll
moveEntity TestPagination
moveEntity TestManyToOne
moveEntity TestManyToMany
moveEntity TestManyRelPaginDTO
moveEntity TestOneToOne
moveEntity TestCustomTableName
moveEntity TestTwoRelationshipsSameEntity
moveEntity SuperMegaLargeTestEntity
moveEntity EntityWithDTO
moveEntity EntityWithPaginationAndDTO
moveEntity EntityWithServiceClassAndPagination
moveEntity EntityWithServiceClassPaginationAndDTO
moveEntity EntityWithServiceImplAndDTO
moveEntity EntityWithServiceImplAndPagination
moveEntity EntityWithServiceImplPaginationAndDTO
moveEntity MapsIdParentEntityWithoutDTO
moveEntity MapsIdChildEntityWithoutDTO
moveEntity MapsIdParentEntityWithDTO
moveEntity MapsIdChildEntityWithDTO
moveEntity MapsIdUserProfileWithDTO
elif [[ "$JHI_ENTITY" == "sql" ]]; then
moveEntity BankAccount
moveEntity Label
moveEntity Operation
moveEntity FieldTestEntity
moveEntity FieldTestMapstructAndServiceClassEntity
moveEntity FieldTestServiceClassAndJpaFilteringEntity
moveEntity FieldTestServiceImplEntity
moveEntity FieldTestInfiniteScrollEntity
moveEntity FieldTestPaginationEntity
moveEntity FieldTestEnumWithValue
moveEntity EntityWithDTO
moveEntity EntityWithPaginationAndDTO
moveEntity EntityWithServiceClassAndPagination
moveEntity EntityWithServiceClassPaginationAndDTO
moveEntity EntityWithServiceImplAndDTO
moveEntity EntityWithServiceImplAndPagination
moveEntity EntityWithServiceImplPaginationAndDTO
moveEntity MapsIdUserProfileWithDTO
fi
#-------------------------------------------------------------------------------
# Copy entities json
#-------------------------------------------------------------------------------
echo "*** Entities:"
ls -al "$JHI_FOLDER_APP"/.jhipster/