Skip to content

Commit 176b6ee

Browse files
author
synapticloop
committed
bumped version for dependencies
1 parent 9cfe99a commit 176b6ee

File tree

11 files changed

+114
-32
lines changed

11 files changed

+114
-32
lines changed

build.gradle

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ plugins {
2121
group = 'synapticloop'
2222
archivesBaseName = 'h2zero'
2323
description = """lightweight ORM generator for mysql/sqlite, java with extensions for taglibs and routemaster"""
24-
version = '4.1.9'
24+
version = '4.1.11'
2525

2626
tasks.withType(Javadoc).all { enabled = false }
2727

@@ -48,13 +48,13 @@ configurations {
4848
}
4949

5050
dependencies {
51-
implementation 'synapticloop:templar:1.5.0'
52-
implementation 'org.json:json:20180130'
53-
implementation 'com.mchange:c3p0:0.9.5.4'
54-
implementation 'commons-validator:commons-validator:1.6'
55-
implementation 'org.slf4j:slf4j-api:1.7.25'
56-
implementation 'javax.mail:javax.mail-api:1.6.2'
57-
implementation 'org.apache.ant:ant:1.10.6'
51+
compile 'synapticloop:templar:1.5.0'
52+
compile 'org.json:json:20180130'
53+
compile 'com.mchange:c3p0:0.9.5.4'
54+
compile 'commons-validator:commons-validator:1.6'
55+
compile 'org.slf4j:slf4j-api:1.7.25'
56+
compile 'javax.mail:javax.mail-api:1.6.2'
57+
compile 'org.apache.ant:ant:1.10.6'
5858

5959
compileOnly gradleApi()
6060
compileOnly 'synapticloop:templar:1.5.0'

build.h2zero.mysql.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ buildscript {
99
}
1010

1111
dependencies {
12-
classpath 'synapticloop:h2zero:4.1.5'
12+
classpath 'synapticloop:h2zero:4.1.10'
1313
// classpath 'synapticloop:h2zero-extension-taglibs:1.0.0'
1414
}
1515
}

build.mysql.sh

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#!/bin/bash
2+
3+
./gradlew --no-daemon assemble pTML -b build.gradle
4+
./gradlew --no-daemon -b build.h2zero.mysql.gradle h2zero
5+

src/test/java/synapticloop/sample/h2zero/mysql/finder/UserUserTypeViewFinder.java

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@
2424

2525
import synapticloop.sample.h2zero.mysql.view.UserUserType;
2626

27-
import synapticloop.sample.h2zero.mysql.view.UserUserType;
2827

2928
public class UserUserTypeViewFinder {
3029
// the binder is unused in code, but will generate compile problems if this

src/test/java/synapticloop/sample/h2zero/mysql/model/Pet.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class Pet extends ModelBase {
3535
private static final String SQL_DELETE = "delete from pet where " + PRIMARY_KEY_FIELD + " = ?";
3636
private static final String SQL_ENSURE = "select " + PRIMARY_KEY_FIELD + " from pet where nm_pet = ? and num_age = ? and flt_weight = ? and dt_birthday = ? and img_photo = ?";
3737

38+
private static final String SQL_SELECT_HYDRATE = "select from pet where " + PRIMARY_KEY_FIELD + " = ?";
3839

3940
// Static lookups for fields in the hit counter.
4041
public static final int HIT_TOTAL = 0;
@@ -51,6 +52,8 @@ public class Pet extends ModelBase {
5152
private static final String[] HIT_FIELDS = { "TOTAL", "id_pet", "nm_pet", "num_age", "flt_weight", "dt_birthday", "img_photo" };
5253
// the number of read-hits for a particular field
5354
private static int[] HIT_COUNTS = { 0, 0, 0, 0, 0, 0, 0 };
55+
private boolean isHydrated = true;
56+
5457

5558
private Long idPet = null;
5659
private String nmPet = null;
@@ -227,4 +230,20 @@ public String toJsonString() {
227230
public String getJsonString() {
228231
return(toJsonString());
229232
}
233+
234+
public static String getHitCountJson() {
235+
StringBuilder stringBuilder = new StringBuilder();
236+
stringBuilder.append("{\n");
237+
stringBuilder.append(" \"type\": \"pet\",\n");
238+
stringBuilder.append(" \"total\": " + HIT_COUNTS[0] + ", \n");
239+
stringBuilder.append(" \"id_pet\": " + HIT_COUNTS[1] + ", \n");
240+
stringBuilder.append(" \"nm_pet\": " + HIT_COUNTS[2] + ", \n");
241+
stringBuilder.append(" \"num_age\": " + HIT_COUNTS[3] + ", \n");
242+
stringBuilder.append(" \"flt_weight\": " + HIT_COUNTS[4] + ", \n");
243+
stringBuilder.append(" \"dt_birthday\": " + HIT_COUNTS[5] + ", \n");
244+
stringBuilder.append(" \"img_photo\": " + HIT_COUNTS[6] + "\n");
245+
stringBuilder.append("}\n");
246+
return(stringBuilder.toString());
247+
}
248+
230249
}

src/test/java/synapticloop/sample/h2zero/mysql/model/User.java

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ public class User extends ModelBase {
3434
private static final String SQL_DELETE = "delete from user where " + PRIMARY_KEY_FIELD + " = ?";
3535
private static final String SQL_ENSURE = "select " + PRIMARY_KEY_FIELD + " from user where id_user_type = ? and fl_is_alive = ? and num_age = ? and nm_username = ? and txt_address_email = ? and txt_password = ? and dtm_signup = ?";
3636

37+
private static final String SQL_SELECT_HYDRATE = "select from user where " + PRIMARY_KEY_FIELD + " = ?";
3738

3839
// Static lookups for fields in the hit counter.
3940
public static final int HIT_TOTAL = 0;
@@ -52,6 +53,8 @@ public class User extends ModelBase {
5253
private static final String[] HIT_FIELDS = { "TOTAL", "id_user", "id_user_type", "fl_is_alive", "num_age", "nm_username", "txt_address_email", "txt_password", "dtm_signup" };
5354
// the number of read-hits for a particular field
5455
private static int[] HIT_COUNTS = { 0, 0, 0, 0, 0, 0, 0, 0, 0 };
56+
private boolean isHydrated = true;
57+
5558

5659
private Long idUser = null;
5760
private Long idUserType = null;
@@ -254,4 +257,22 @@ public String toJsonString() {
254257
public String getJsonString() {
255258
return(toJsonString());
256259
}
260+
261+
public static String getHitCountJson() {
262+
StringBuilder stringBuilder = new StringBuilder();
263+
stringBuilder.append("{\n");
264+
stringBuilder.append(" \"type\": \"user\",\n");
265+
stringBuilder.append(" \"total\": " + HIT_COUNTS[0] + ", \n");
266+
stringBuilder.append(" \"id_user\": " + HIT_COUNTS[1] + ", \n");
267+
stringBuilder.append(" \"id_user_type\": " + HIT_COUNTS[2] + ", \n");
268+
stringBuilder.append(" \"fl_is_alive\": " + HIT_COUNTS[3] + ", \n");
269+
stringBuilder.append(" \"num_age\": " + HIT_COUNTS[4] + ", \n");
270+
stringBuilder.append(" \"nm_username\": " + HIT_COUNTS[5] + ", \n");
271+
stringBuilder.append(" \"txt_address_email\": " + HIT_COUNTS[6] + ", \n");
272+
stringBuilder.append(" \"txt_password\": " + HIT_COUNTS[7] + ", \n");
273+
stringBuilder.append(" \"dtm_signup\": " + HIT_COUNTS[8] + "\n");
274+
stringBuilder.append("}\n");
275+
return(stringBuilder.toString());
276+
}
277+
257278
}

src/test/java/synapticloop/sample/h2zero/mysql/model/UserPet.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@ public class UserPet extends ModelBase {
3535
private static final String SQL_DELETE = "delete from user_pet where " + PRIMARY_KEY_FIELD + " = ?";
3636
private static final String SQL_ENSURE = "select " + PRIMARY_KEY_FIELD + " from user_pet where id_user = ? and id_pet = ?";
3737

38+
private static final String SQL_SELECT_HYDRATE = "select from user_pet where " + PRIMARY_KEY_FIELD + " = ?";
3839

3940
// Static lookups for fields in the hit counter.
4041
public static final int HIT_TOTAL = 0;
@@ -48,6 +49,8 @@ public class UserPet extends ModelBase {
4849
private static final String[] HIT_FIELDS = { "TOTAL", "id_user_pet", "id_user", "id_pet" };
4950
// the number of read-hits for a particular field
5051
private static int[] HIT_COUNTS = { 0, 0, 0, 0 };
52+
private boolean isHydrated = true;
53+
5154
private User User = null;
5255
private Pet Pet = null;
5356

@@ -203,4 +206,17 @@ public String toJsonString() {
203206
public String getJsonString() {
204207
return(toJsonString());
205208
}
209+
210+
public static String getHitCountJson() {
211+
StringBuilder stringBuilder = new StringBuilder();
212+
stringBuilder.append("{\n");
213+
stringBuilder.append(" \"type\": \"user_pet\",\n");
214+
stringBuilder.append(" \"total\": " + HIT_COUNTS[0] + ", \n");
215+
stringBuilder.append(" \"id_user_pet\": " + HIT_COUNTS[1] + ", \n");
216+
stringBuilder.append(" \"id_user\": " + HIT_COUNTS[2] + ", \n");
217+
stringBuilder.append(" \"id_pet\": " + HIT_COUNTS[3] + "\n");
218+
stringBuilder.append("}\n");
219+
return(stringBuilder.toString());
220+
}
221+
206222
}

src/test/java/synapticloop/sample/h2zero/mysql/model/UserTitle.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,28 @@ public class UserTitle {
1818
@SuppressWarnings("unused")
1919
private static final String BINDER = Constants.USER_TITLE_BINDER;
2020

21-
public static final UserTitle MR = new UserTitle(new Long(1), "Mr.", new Integer(1));
22-
public static final UserTitle MRS = new UserTitle(new Long(2), "Mrs.", new Integer(2));
23-
public static final UserTitle MISS = new UserTitle(new Long(3), "Miss", new Integer(3));
24-
public static final UserTitle DR = new UserTitle(new Long(4), "Dr.", new Integer(4));
21+
public static final UserTitle MR = new UserTitle(Long.valueOf(1), "Mr.", Integer.valueOf(1));
22+
public static final UserTitle MRS = new UserTitle(Long.valueOf(2), "Mrs.", Integer.valueOf(2));
23+
public static final UserTitle MISS = new UserTitle(Long.valueOf(3), "Miss", Integer.valueOf(3));
24+
public static final UserTitle DR = new UserTitle(Long.valueOf(4), "Dr.", Integer.valueOf(4));
2525

2626
public static final UserTitle[] ALL = {
2727
UserTitle.MR, UserTitle.MRS, UserTitle.MISS, UserTitle.DR
2828
};
2929

30-
public static final Map<Long, UserTitle> ALL_LOOKUP = new HashMap<Long, UserTitle>();
30+
public static final Map<Long, UserTitle> ALL_LOOKUP = new HashMap<>();
3131
static{
32-
ALL_LOOKUP.put(new Long(1), UserTitle.MR);
33-
ALL_LOOKUP.put(new Long(2), UserTitle.MRS);
34-
ALL_LOOKUP.put(new Long(3), UserTitle.MISS);
35-
ALL_LOOKUP.put(new Long(4), UserTitle.DR);
32+
ALL_LOOKUP.put(Long.valueOf(1), UserTitle.MR);
33+
ALL_LOOKUP.put(Long.valueOf(2), UserTitle.MRS);
34+
ALL_LOOKUP.put(Long.valueOf(3), UserTitle.MISS);
35+
ALL_LOOKUP.put(Long.valueOf(4), UserTitle.DR);
3636

3737
};
3838

3939
public static final String PRIMARY_KEY_FIELD = "id_user_title";
4040

4141

42+
4243
private Long idUserTitle = null;
4344
private String nmUserTitle = null;
4445
private Integer numOrderBy = null;

src/test/java/synapticloop/sample/h2zero/mysql/model/UserType.java

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -18,27 +18,28 @@ public class UserType {
1818
@SuppressWarnings("unused")
1919
private static final String BINDER = Constants.USER_TYPE_BINDER;
2020

21-
public static final UserType NORMAL = new UserType(new Long(1), "normal");
22-
public static final UserType SPECIAL = new UserType(new Long(2), "special");
23-
public static final UserType ADMIN = new UserType(new Long(3), "admin");
24-
public static final UserType SUPER_ADMIN = new UserType(new Long(4), "super admin");
21+
public static final UserType NORMAL = new UserType(Long.valueOf(1), "normal");
22+
public static final UserType SPECIAL = new UserType(Long.valueOf(2), "special");
23+
public static final UserType ADMIN = new UserType(Long.valueOf(3), "admin");
24+
public static final UserType SUPER_ADMIN = new UserType(Long.valueOf(4), "super admin");
2525

2626
public static final UserType[] ALL = {
2727
UserType.NORMAL, UserType.SPECIAL, UserType.ADMIN, UserType.SUPER_ADMIN
2828
};
2929

30-
public static final Map<Long, UserType> ALL_LOOKUP = new HashMap<Long, UserType>();
30+
public static final Map<Long, UserType> ALL_LOOKUP = new HashMap<>();
3131
static{
32-
ALL_LOOKUP.put(new Long(1), UserType.NORMAL);
33-
ALL_LOOKUP.put(new Long(2), UserType.SPECIAL);
34-
ALL_LOOKUP.put(new Long(3), UserType.ADMIN);
35-
ALL_LOOKUP.put(new Long(4), UserType.SUPER_ADMIN);
32+
ALL_LOOKUP.put(Long.valueOf(1), UserType.NORMAL);
33+
ALL_LOOKUP.put(Long.valueOf(2), UserType.SPECIAL);
34+
ALL_LOOKUP.put(Long.valueOf(3), UserType.ADMIN);
35+
ALL_LOOKUP.put(Long.valueOf(4), UserType.SUPER_ADMIN);
3636

3737
};
3838

3939
public static final String PRIMARY_KEY_FIELD = "id_user_type";
4040

4141

42+
4243
private Long idUserType = null;
4344
private String nmUserType = null;
4445

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package synapticloop.sample.h2zero.mysql.model.util;
2+
3+
// - - - - thoughtfully generated by synapticloop h2zero - - - -
4+
// with the use of synapticloop templar templating language
5+
// (java-create-model-statistics.templar)
6+
7+
import synapticloop.sample.h2zero.mysql.model.User;
8+
import synapticloop.sample.h2zero.mysql.model.Pet;
9+
import synapticloop.sample.h2zero.mysql.model.UserPet;
10+
11+
import java.lang.StringBuilder;
12+
13+
public class Statistics {
14+
public static final String getHitCountJson() {
15+
StringBuilder stringBuilder = new StringBuilder("[");
16+
stringBuilder.append(User.getHitCountJson());
17+
stringBuilder.append(", ");
18+
stringBuilder.append(Pet.getHitCountJson());
19+
stringBuilder.append(", ");
20+
stringBuilder.append(UserPet.getHitCountJson());
21+
stringBuilder.append("]");
22+
return(stringBuilder.toString());
23+
}
24+
}

0 commit comments

Comments
 (0)