@@ -557,7 +559,7 @@ public List
@@ -349,7 +351,7 @@ public List
@@ -318,7 +320,7 @@ public List
@@ -436,7 +438,7 @@ public List
@@ -318,7 +320,7 @@ public List
*/
- public WHERE and(WHERE where) {
+ public WHERE
*/
- public WHERE or(WHERE where) {
+ public WHERE
*/
- public WHERE is(Object obj) {
+ public WHERE
*/
- public WHERE isNot(Object obj) {
+ public WHERE
*/
- public WHERE isNull() {
+ public WHERE
*/
- public WHERE isNotNull() {
+ public WHERE
*/
- public WHERE biggerThan(Object obj) {
+ public WHERE
*/
- public WHERE smallerThan(Object obj) {
+ public WHERE
*/
- public WHERE biggerOrEqual(Object obj) {
+ public WHERE
*/
- public WHERE smallerOrEqual(Object obj) {
+ public WHERE
*/
- public WHERE between(Object obj1, Object obj2) {
+ public WHERE
*/
public class PaymentWarning{
-private static java.util.concurrent.atomic.AtomicInteger idCounter = new java.util.concurrent.atomic.AtomicInteger(0);
+public static java.util.concurrent.atomic.AtomicInteger idCounter = new java.util.concurrent.atomic.AtomicInteger(0);
static {
try{
Connection con = Database.getCon();
@@ -140,11 +140,11 @@ public static PaymentWarning get(int id) {
if that statement is null, returns all the contents of this table.
*/
public static List> onResultReceived, Cons
}).start();
}
+public static int count(){ return count(null, null); }
+
public static int count(String where, Object... whereValues) {
String sql = "SELECT COUNT(`id`) AS recordCount FROM `paymentwarning`" +
(where != null ? where : "");
@@ -238,9 +240,9 @@ Searches the provided object in the database (by its id),
@throws Exception when failed to find by id or other SQL issues.
*/
public static void update(PaymentWarning obj) {
+String sql = "UPDATE `paymentwarning` SET `id`=?,`paymentId`=?,`message`=? WHERE id="+obj.id;
Connection con = Database.getCon();
-try (PreparedStatement ps = con.prepareStatement(
- "UPDATE `paymentwarning` SET `id`=?,`paymentId`=?,`message`=? WHERE id="+obj.id)) {
+try (PreparedStatement ps = con.prepareStatement(sql)) {
ps.setInt(1, obj.id);
ps.setInt(2, obj.paymentId);
ps.setString(3, obj.message);
@@ -253,9 +255,9 @@ public static void update(PaymentWarning obj) {
Adds the provided object to the database (note that the id is not checked for duplicates).
*/
public static void add(PaymentWarning obj) {
+String sql = "INSERT INTO `paymentwarning` (`id`,`paymentId`,`message`) VALUES (?,?,?)";
Connection con = Database.getCon();
-try (PreparedStatement ps = con.prepareStatement(
- "INSERT INTO `paymentwarning` (`id`,`paymentId`,`message`) VALUES (?,?,?)")) {
+try (PreparedStatement ps = con.prepareStatement(sql)) {
ps.setInt(1, obj.id);
ps.setInt(2, obj.paymentId);
ps.setString(3, obj.message);
@@ -293,9 +295,9 @@ public static void remove(String where, Object... whereValues) {
}
public static void removeAll() {
- Connection con = Database.getCon();
- try (PreparedStatement ps = con.prepareStatement(
- "DELETE FROM `paymentwarning`")) {
+String sql = "DELETE FROM `paymentwarning`";
+Connection con = Database.getCon();
+ try (PreparedStatement ps = con.prepareStatement(sql)) {
ps.executeUpdate();
}catch(Exception e){throw new RuntimeException(e);}
finally{Database.freeCon(con);}
@@ -307,16 +309,16 @@ public PaymentWarning clone(){
public String toPrintString(){
return ""+"id="+this.id+" "+"paymentId="+this.paymentId+" "+"message="+this.message+" ";
}
-public static WHERE whereId() {
-return new WHERE("`id`");
+public static WHERE
*/
- public WHERE and(WHERE where) {
+ public WHERE
*/
- public WHERE or(WHERE where) {
+ public WHERE
*/
- public WHERE is(Object obj) {
+ public WHERE
*/
- public WHERE isNot(Object obj) {
+ public WHERE
*/
- public WHERE isNull() {
+ public WHERE
*/
- public WHERE isNotNull() {
+ public WHERE
*/
- public WHERE biggerThan(Object obj) {
+ public WHERE
*/
- public WHERE smallerThan(Object obj) {
+ public WHERE
*/
- public WHERE biggerOrEqual(Object obj) {
+ public WHERE
*/
- public WHERE smallerOrEqual(Object obj) {
+ public WHERE
*/
- public WHERE between(Object obj1, Object obj2) {
+ public WHERE
*/
public class PendingPaymentCancel{
-private static java.util.concurrent.atomic.AtomicInteger idCounter = new java.util.concurrent.atomic.AtomicInteger(0);
+public static java.util.concurrent.atomic.AtomicInteger idCounter = new java.util.concurrent.atomic.AtomicInteger(0);
static {
try{
Connection con = Database.getCon();
@@ -109,11 +109,11 @@ public static PendingPaymentCancel get(int id) {
if that statement is null, returns all the contents of this table.
*/
public static List> onResultReceived
}).start();
}
+public static int count(){ return count(null, null); }
+
public static int count(String where, Object... whereValues) {
String sql = "SELECT COUNT(`id`) AS recordCount FROM `pendingpaymentcancel`" +
(where != null ? where : "");
@@ -207,9 +209,9 @@ Searches the provided object in the database (by its id),
@throws Exception when failed to find by id or other SQL issues.
*/
public static void update(PendingPaymentCancel obj) {
+String sql = "UPDATE `pendingpaymentcancel` SET `id`=?,`paymentId`=?,`timestampCancel`=? WHERE id="+obj.id;
Connection con = Database.getCon();
-try (PreparedStatement ps = con.prepareStatement(
- "UPDATE `pendingpaymentcancel` SET `id`=?,`paymentId`=?,`timestampCancel`=? WHERE id="+obj.id)) {
+try (PreparedStatement ps = con.prepareStatement(sql)) {
ps.setInt(1, obj.id);
ps.setInt(2, obj.paymentId);
ps.setLong(3, obj.timestampCancel);
@@ -222,9 +224,9 @@ public static void update(PendingPaymentCancel obj) {
Adds the provided object to the database (note that the id is not checked for duplicates).
*/
public static void add(PendingPaymentCancel obj) {
+String sql = "INSERT INTO `pendingpaymentcancel` (`id`,`paymentId`,`timestampCancel`) VALUES (?,?,?)";
Connection con = Database.getCon();
-try (PreparedStatement ps = con.prepareStatement(
- "INSERT INTO `pendingpaymentcancel` (`id`,`paymentId`,`timestampCancel`) VALUES (?,?,?)")) {
+try (PreparedStatement ps = con.prepareStatement(sql)) {
ps.setInt(1, obj.id);
ps.setInt(2, obj.paymentId);
ps.setLong(3, obj.timestampCancel);
@@ -262,9 +264,9 @@ public static void remove(String where, Object... whereValues) {
}
public static void removeAll() {
- Connection con = Database.getCon();
- try (PreparedStatement ps = con.prepareStatement(
- "DELETE FROM `pendingpaymentcancel`")) {
+String sql = "DELETE FROM `pendingpaymentcancel`";
+Connection con = Database.getCon();
+ try (PreparedStatement ps = con.prepareStatement(sql)) {
ps.executeUpdate();
}catch(Exception e){throw new RuntimeException(e);}
finally{Database.freeCon(con);}
@@ -276,16 +278,16 @@ public PendingPaymentCancel clone(){
public String toPrintString(){
return ""+"id="+this.id+" "+"paymentId="+this.paymentId+" "+"timestampCancel="+this.timestampCancel+" ";
}
-public static WHERE whereId() {
-return new WHERE("`id`");
+public static WHERE
*/
- public WHERE and(WHERE where) {
+ public WHERE
*/
- public WHERE or(WHERE where) {
+ public WHERE
*/
- public WHERE is(Object obj) {
+ public WHERE
*/
- public WHERE isNot(Object obj) {
+ public WHERE
*/
- public WHERE isNull() {
+ public WHERE
*/
- public WHERE isNotNull() {
+ public WHERE
*/
- public WHERE biggerThan(Object obj) {
+ public WHERE
*/
- public WHERE smallerThan(Object obj) {
+ public WHERE
*/
- public WHERE biggerOrEqual(Object obj) {
+ public WHERE
*/
- public WHERE smallerOrEqual(Object obj) {
+ public WHERE
*/
- public WHERE between(Object obj1, Object obj2) {
+ public WHERE
*/
public class Product{
-private static java.util.concurrent.atomic.AtomicInteger idCounter = new java.util.concurrent.atomic.AtomicInteger(0);
+public static java.util.concurrent.atomic.AtomicInteger idCounter = new java.util.concurrent.atomic.AtomicInteger(0);
static {
try{
Connection con = Database.getCon();
@@ -185,11 +185,11 @@ public static Product get(int id) {
if that statement is null, returns all the contents of this table.
*/
public static List> onResultReceived, Consumer
*/
- public WHERE and(WHERE where) {
+ public WHERE
*/
- public WHERE or(WHERE where) {
+ public WHERE
*/
- public WHERE is(Object obj) {
+ public WHERE
*/
- public WHERE isNot(Object obj) {
+ public WHERE
*/
- public WHERE isNull() {
+ public WHERE
*/
- public WHERE isNotNull() {
+ public WHERE
*/
- public WHERE biggerThan(Object obj) {
+ public WHERE
*/
- public WHERE smallerThan(Object obj) {
+ public WHERE
*/
- public WHERE biggerOrEqual(Object obj) {
+ public WHERE
*/
- public WHERE smallerOrEqual(Object obj) {
+ public WHERE
*/
- public WHERE between(Object obj1, Object obj2) {
+ public WHERE
*/
public class WebhookEndpoint{
-private static java.util.concurrent.atomic.AtomicInteger idCounter = new java.util.concurrent.atomic.AtomicInteger(0);
+public static java.util.concurrent.atomic.AtomicInteger idCounter = new java.util.concurrent.atomic.AtomicInteger(0);
static {
try{
Connection con = Database.getCon();
@@ -109,11 +109,11 @@ public static WebhookEndpoint get(int id) {
if that statement is null, returns all the contents of this table.
*/
public static List> onResultReceived, Con
}).start();
}
+public static int count(){ return count(null, null); }
+
public static int count(String where, Object... whereValues) {
String sql = "SELECT COUNT(`id`) AS recordCount FROM `webhookendpoint`" +
(where != null ? where : "");
@@ -207,9 +209,9 @@ Searches the provided object in the database (by its id),
@throws Exception when failed to find by id or other SQL issues.
*/
public static void update(WebhookEndpoint obj) {
+String sql = "UPDATE `webhookendpoint` SET `id`=?,`url`=?,`stripeWebhookSecret`=? WHERE id="+obj.id;
Connection con = Database.getCon();
-try (PreparedStatement ps = con.prepareStatement(
- "UPDATE `webhookendpoint` SET `id`=?,`url`=?,`stripeWebhookSecret`=? WHERE id="+obj.id)) {
+try (PreparedStatement ps = con.prepareStatement(sql)) {
ps.setInt(1, obj.id);
ps.setString(2, obj.url);
ps.setString(3, obj.stripeWebhookSecret);
@@ -222,9 +224,9 @@ public static void update(WebhookEndpoint obj) {
Adds the provided object to the database (note that the id is not checked for duplicates).
*/
public static void add(WebhookEndpoint obj) {
+String sql = "INSERT INTO `webhookendpoint` (`id`,`url`,`stripeWebhookSecret`) VALUES (?,?,?)";
Connection con = Database.getCon();
-try (PreparedStatement ps = con.prepareStatement(
- "INSERT INTO `webhookendpoint` (`id`,`url`,`stripeWebhookSecret`) VALUES (?,?,?)")) {
+try (PreparedStatement ps = con.prepareStatement(sql)) {
ps.setInt(1, obj.id);
ps.setString(2, obj.url);
ps.setString(3, obj.stripeWebhookSecret);
@@ -262,9 +264,9 @@ public static void remove(String where, Object... whereValues) {
}
public static void removeAll() {
- Connection con = Database.getCon();
- try (PreparedStatement ps = con.prepareStatement(
- "DELETE FROM `webhookendpoint`")) {
+String sql = "DELETE FROM `webhookendpoint`";
+Connection con = Database.getCon();
+ try (PreparedStatement ps = con.prepareStatement(sql)) {
ps.executeUpdate();
}catch(Exception e){throw new RuntimeException(e);}
finally{Database.freeCon(con);}
@@ -276,16 +278,16 @@ public WebhookEndpoint clone(){
public String toPrintString(){
return ""+"id="+this.id+" "+"url="+this.url+" "+"stripeWebhookSecret="+this.stripeWebhookSecret+" ";
}
-public static WHERE whereId() {
-return new WHERE("`id`");
+public static WHERE
*/
- public WHERE and(WHERE where) {
+ public WHERE
*/
- public WHERE or(WHERE where) {
+ public WHERE
*/
- public WHERE is(Object obj) {
+ public WHERE
*/
- public WHERE isNot(Object obj) {
+ public WHERE
*/
- public WHERE isNull() {
+ public WHERE
*/
- public WHERE isNotNull() {
+ public WHERE
*/
- public WHERE biggerThan(Object obj) {
+ public WHERE
*/
- public WHERE smallerThan(Object obj) {
+ public WHERE
*/
- public WHERE biggerOrEqual(Object obj) {
+ public WHERE
*/
- public WHERE smallerOrEqual(Object obj) {
+ public WHERE
*/
- public WHERE between(Object obj1, Object obj2) {
+ public WHERE