-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added in generated source files for simple project
- Loading branch information
synapticloop
committed
Aug 17, 2015
1 parent
a23231c
commit 726c0cc
Showing
113 changed files
with
35,331 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,7 +2,7 @@ | |
build-eclipse/ | ||
build/ | ||
CVS | ||
generate/* | ||
|
||
cobertura.ser | ||
.DS_Store | ||
src/test/java/insityou.h2zero | ||
|
Binary file not shown.
Binary file not shown.
25 changes: 25 additions & 0 deletions
25
generate/src/main/java/synapticloop/sample/h2zero/bean/FindGroupNumAgeBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package synapticloop.sample.h2zero.bean; | ||
|
||
// - - - - thoughtfully generated by synapticloop h2zero - - - - | ||
// with the use of synapticloop templar templating language | ||
// (java-create-select-clause-bean.templar) | ||
|
||
import java.sql.Date; | ||
import java.sql.Timestamp; | ||
|
||
|
||
|
||
public class FindGroupNumAgeBean { | ||
private Integer numCount = null; | ||
private Integer numAge = null; | ||
|
||
public FindGroupNumAgeBean(Integer numCount, Integer numAge) { | ||
this.numCount = numCount; | ||
this.numAge = numAge; | ||
} | ||
|
||
public Integer getNumCount() { return(this.numCount); } | ||
public void setNumCount(Integer numCount) { this.numCount = numCount; } | ||
public Integer getNumAge() { return(this.numAge); } | ||
public void setNumAge(Integer numAge) { this.numAge = numAge; } | ||
} |
25 changes: 25 additions & 0 deletions
25
generate/src/main/java/synapticloop/sample/h2zero/bean/FindNmUserDtmSignupBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
package synapticloop.sample.h2zero.bean; | ||
|
||
// - - - - thoughtfully generated by synapticloop h2zero - - - - | ||
// with the use of synapticloop templar templating language | ||
// (java-create-select-clause-bean.templar) | ||
|
||
import java.sql.Date; | ||
import java.sql.Timestamp; | ||
|
||
|
||
|
||
public class FindNmUserDtmSignupBean { | ||
private String nmUser = null; | ||
private Timestamp dtmSignup = null; | ||
|
||
public FindNmUserDtmSignupBean(String nmUser, Timestamp dtmSignup) { | ||
this.nmUser = nmUser; | ||
this.dtmSignup = dtmSignup; | ||
} | ||
|
||
public String getNmUser() { return(this.nmUser); } | ||
public void setNmUser(String nmUser) { this.nmUser = nmUser; } | ||
public Timestamp getDtmSignup() { return(this.dtmSignup); } | ||
public void setDtmSignup(Timestamp dtmSignup) { this.dtmSignup = dtmSignup; } | ||
} |
144 changes: 144 additions & 0 deletions
144
generate/src/main/java/synapticloop/sample/h2zero/counter/PetCounter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,144 @@ | ||
package synapticloop.sample.h2zero.counter; | ||
|
||
// - - - - thoughtfully generated by synapticloop h2zero - - - - | ||
// with the use of synapticloop templar templating language | ||
// (java-create-counter.templar) | ||
|
||
import java.sql.Connection; | ||
import java.sql.PreparedStatement; | ||
import java.sql.ResultSet; | ||
import java.sql.SQLException; | ||
import java.util.HashMap; | ||
import java.util.Map; | ||
import java.util.List; | ||
|
||
import synapticloop.h2zero.base.manager.ConnectionManager; | ||
|
||
import org.apache.log4j.Level; | ||
import org.apache.log4j.Logger; | ||
|
||
import synapticloop.sample.h2zero.model.util.Constants; | ||
|
||
public class PetCounter { | ||
// the binder is unused in code, but will generate compile problems if this | ||
// class is no longer referenced in the h2zero file. Just a nicety for | ||
// removing dead code | ||
@SuppressWarnings("unused") | ||
private static final String BINDER = Constants.PET_BINDER; | ||
|
||
private static final Logger LOGGER = Logger.getLogger(PetCounter.class); | ||
|
||
private static final String SQL_BUILTIN_COUNT_ALL = "select count(*) from pet"; | ||
|
||
|
||
|
||
private PetCounter() {} | ||
|
||
/** | ||
* Find the count of all Pet objects | ||
* | ||
* @param connection the passed in connection object, useful for queries within | ||
* a transaction. | ||
* | ||
* @return the count of Pet objects | ||
* | ||
* @throws SQLException if there was an error in the SQL statement | ||
*/ | ||
public static int countAll(Connection connection) throws SQLException { | ||
PreparedStatement preparedStatement = null; | ||
ResultSet resultSet = null; | ||
int count = -1; | ||
|
||
try { | ||
preparedStatement = connection.prepareStatement(SQL_BUILTIN_COUNT_ALL); | ||
resultSet = preparedStatement.executeQuery(); | ||
if(resultSet.next()) { | ||
count = resultSet.getInt(1); | ||
} | ||
} catch(SQLException sqlex) { | ||
if(LOGGER.isEnabledFor(Level.WARN)) { | ||
LOGGER.warn("SQLException countAll(connection): " + sqlex.getMessage()); | ||
if(LOGGER.isEnabledFor(Level.DEBUG)) { | ||
sqlex.printStackTrace(); | ||
} | ||
} | ||
throw sqlex; | ||
} finally { | ||
ConnectionManager.closeAll(resultSet, preparedStatement); | ||
} | ||
|
||
return(count); | ||
} | ||
|
||
/** | ||
* Find the count of all Pet objects | ||
* | ||
* @return the count of Pet objects | ||
* | ||
* @throws SQLException if there was an error in the SQL statement | ||
*/ | ||
public static int countAll() throws SQLException { | ||
Connection connection = null; | ||
|
||
try { | ||
connection = ConnectionManager.getConnection(); | ||
return(countAll(connection)); | ||
} catch(SQLException sqlex) { | ||
if(LOGGER.isEnabledFor(Level.WARN)) { | ||
LOGGER.warn("SQLException countAll(): " + sqlex.getMessage()); | ||
if(LOGGER.isEnabledFor(Level.DEBUG)) { | ||
sqlex.printStackTrace(); | ||
} | ||
} | ||
throw sqlex; | ||
} finally { | ||
ConnectionManager.closeAll(connection); | ||
} | ||
} | ||
|
||
/** | ||
* Find the count of all Pet objects and if there is an error | ||
* fail silently and log the error. | ||
* | ||
* @param connection the passed in connection object, useful for queries within | ||
* a transaction. | ||
* | ||
* @return the count of Pet objects | ||
* | ||
*/ | ||
public static int countAllSilent(Connection connection) { | ||
try { | ||
return(countAll(connection)); | ||
} catch(SQLException sqlex){ | ||
if(LOGGER.isEnabledFor(Level.WARN)) { | ||
LOGGER.warn("SQLException countAllSilent(connection): " + sqlex.getMessage()); | ||
if(LOGGER.isEnabledFor(Level.DEBUG)) { | ||
sqlex.printStackTrace(); | ||
} | ||
} | ||
return(-1); | ||
} | ||
} | ||
|
||
/** | ||
* Find the count of all Pet objects and if there is an error | ||
* fail silently and log the error. | ||
* | ||
* @return the count of Pet objects | ||
* | ||
*/ | ||
public static int countAllSilent() { | ||
try { | ||
return(countAll()); | ||
} catch(SQLException sqlex){ | ||
if(LOGGER.isEnabledFor(Level.WARN)) { | ||
LOGGER.warn("SQLException countAllSilent(): " + sqlex.getMessage()); | ||
if(LOGGER.isEnabledFor(Level.DEBUG)) { | ||
sqlex.printStackTrace(); | ||
} | ||
} | ||
return(-1); | ||
} | ||
} | ||
|
||
} |
Oops, something went wrong.