Skip to content

Commit

Permalink
added import for deleters
Browse files Browse the repository at this point in the history
  • Loading branch information
synapticloop committed Dec 31, 2015
1 parent f6166a3 commit b7c4310
Show file tree
Hide file tree
Showing 3 changed files with 102 additions and 3 deletions.
98 changes: 98 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,3 +128,101 @@ This will generate the following files
1. You try to find the user by email address and password
1. Couldn't find it - EXCEPTION, EXCEPTION, EXCEPTION
1. you can just choose to return null (by using the *Silent method signature) - in the above case this means that you couldn't find the user and happily display an error message, rather than littering your code with try/catch/finally code everywhere.

# Dependency Management

> Note that the latest version can be found [https://bintray.com/synapticloop/maven/h2zero/view](https://bintray.com/synapticloop/maven/h2zero/view)
Include the dependency

## maven

this comes from the jcenter bintray, to set up your repository:

<?xml version="1.0" encoding="UTF-8" ?>
<settings xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd' xmlns='http://maven.apache.org/SETTINGS/1.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'>
<profiles>
<profile>
<repositories>
<repository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>bintray</name>
<url>http://jcenter.bintray.com</url>
</repository>
</repositories>
<pluginRepositories>
<pluginRepository>
<snapshots>
<enabled>false</enabled>
</snapshots>
<id>central</id>
<name>bintray-plugins</name>
<url>http://jcenter.bintray.com</url>
</pluginRepository>
</pluginRepositories>
<id>bintray</id>
</profile>
</profiles>
<activeProfiles>
<activeProfile>bintray</activeProfile>
</activeProfiles>
</settings>

And now for the dependency

<dependency>
<groupId>synapticloop</groupId>
<artifactId>h2zero</artifactId>
<version>v1.0.5</version>
<type>jar</type>
</dependency>


## gradle

Repository

repositories {
maven {
url "http://jcenter.bintray.com"
}
}

or just

repositories {
jcenter()
}

and then include the dependency:

runtime(group: 'synapticloop', name: 'h2zero', version: 'v1.0.5', ext: 'jar')

compile(group: 'synapticloop', name: 'h2zero', version: 'v1.0.5', ext: 'jar')

or

runtime 'synapticloop:h2zero:v1.0.5'

compile 'synapticloop:h2zero:v1.0.5'


# Gradle generation

assuming that you have added the dependency above to the `runtime` configuration

```
task h2zero << {
ant.taskdef(resource: 'h2zero.properties',
classpath: configurations.runtime.asPath) {
}
ant.h2zero(inFile: 'src/main/resources/sample.h2zero',
outDir: '.',
verbose: 'false') {
}
}
```
6 changes: 3 additions & 3 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ plugins {
group = 'synapticloop'
archivesBaseName = 'h2zero'
description = """lightweight ORM generator for mysql, java and optionally jsp/servlets"""
version = 'v1.0.5'
version = 'v1.0.6'

sourceCompatibility = 1.6
targetCompatibility = 1.6
Expand All @@ -26,7 +26,7 @@ repositories {
dependencies {
runtime 'synapticloop:templar:v1.0.8'
runtime 'org.json:json:20150729'
runtime 'com.mchange:c3p0:0.9.5.1'
runtime 'com.mchange:c3p0:0.9.5.2'
runtime 'commons-validator:commons-validator:1.4.1'
runtime 'org.apache.logging.log4j:log4j-core:2.4.1'
runtime 'io.dropwizard.metrics:metrics-core:3.1.2'
Expand All @@ -37,7 +37,7 @@ dependencies {
compile 'org.apache.ant:ant:1.9.6'
compile 'javax.servlet.jsp:jsp-api:2.2'
compile 'javax.servlet:javax.servlet-api:3.1.0'
compile 'com.mchange:c3p0:0.9.5.1'
compile 'com.mchange:c3p0:0.9.5.2'
compile 'commons-validator:commons-validator:1.4.1'
compile 'org.apache.logging.log4j:log4j-core:2.4.1'
compile 'io.dropwizard.metrics:metrics-core:3.1.2'
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/java-create-deleter.templar
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ package {database.package}.deleter;{\n}{\n}
// with the use of synapticloop templar templating language{\n}
// (java-create-deleter.templar){\n}{\n}
import java.sql.Connection;{\n}
import java.sql.Timestamp;{\n}
import java.sql.PreparedStatement;{\n}
import java.sql.SQLException;{\n}
{\n}
Expand Down

0 comments on commit b7c4310

Please sign in to comment.