<modelVersion>4.0.0</modelVersion>
<groupId>de.spring.jpa</groupId>
<artifactId>spring-jpa</artifactId>
- <packaging>war</packaging>
<version>1.0-SNAPSHOT</version>
- <name>spring-jpa</name>
+ <packaging>pom</packaging>
+ <name>SPRING JPA</name>
<url>https://gumartinm.name/</url>
<description>JPA Spring Framework</description>
<organization>
<url>https://git.gumartinm.name/Spring/JPA</url>
</scm>
- <properties>
- <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
- <spring.version>4.3.0.RELEASE</spring.version>
- <querydsl.version>4.1.3</querydsl.version>
- </properties>
+ <modules>
+ <module>spring-jpa-bom</module>
+ <module>spring-jpa-persistence</module>
+ <module>spring-jpa-services</module>
+ <module>spring-jpa-resources</module>
+ </modules>
- <profiles>
- <profile>
- <id>release</id>
- <properties>
- <environment.profile>release</environment.profile>
- </properties>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- </profile>
- </profiles>
-
- <dependencies>
- <!--
- 1/3 Required dependency for log4j 2 with slf4j: binding between log4j
- 2 and slf4j
- -->
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-slf4j-impl</artifactId>
- <version>2.6.1</version>
- </dependency>
- <!--
- 2/3 Required dependency for log4j 2 with slf4j: log4j 2 maven plugin
- (it is the log4j 2 implementation)
- -->
- <dependency>
- <groupId>org.apache.logging.log4j</groupId>
- <artifactId>log4j-core</artifactId>
- <version>2.6.1</version>
- </dependency>
- <!--
- 3/3 Required dependency for getting rid of commons logging. This is
- the BRIDGE (no binding) between Jakarta Commons Logging (used by Spring)
- and whatever I am using for logging (in this case I am using log4j 2) See:
- http://www.slf4j.org/legacy.html We need exclusions in every dependency using
- Jakarta Commons Logging (see Spring dependencies below)
- -->
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>jcl-over-slf4j</artifactId>
- <version>1.7.21</version>
- </dependency>
-
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>${spring.version}</version>
- <!--
- Required dependency for getting rid of commons logging and use my
- own logging library (in my case I decided to use log4j 2 under slf4j)
- -->
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-webmvc</artifactId>
- <version>${spring.version}</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-oxm</artifactId>
- <version>${spring.version}</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>javax.inject</groupId>
- <artifactId>javax.inject</artifactId>
- <version>1</version>
- </dependency>
-
- <dependency>
- <groupId>cglib</groupId>
- <artifactId>cglib</artifactId>
- <version>2.2.2</version>
- </dependency>
-
-
- <!-- Required JPA dependencies with hibernate -->
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-orm</artifactId>
- <version>${spring.version}</version>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.springframework.data</groupId>
- <artifactId>spring-data-jpa</artifactId>
- <version>1.10.2.RELEASE</version>
- <exclusions>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-beans</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-jdbc</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-orm</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-aop</artifactId>
- </exclusion>
- <exclusion>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- </exclusion>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
-
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-entitymanager</artifactId>
- <version>5.2.1.Final</version>
- </dependency>
-
- <!-- Auditory using Hibernate Envers -->
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-envers</artifactId>
- <version>5.2.1.Final</version>
- </dependency>
-
- <!-- Required by spring-webmvc -->
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>javax.servlet-api</artifactId>
- <version>4.0.0-b01</version>
- <scope>provided</scope>
- </dependency>
-
- <!--
- Jackson JSON Processor, required by spring-webmvc. See messageConverters
- in rest-config.xml
-
- Non required dependency. It is already declared in jackson-datatype-jsr310
- <dependency>
- <groupId>com.fasterxml.jackson.core</groupId>
- <artifactId>jackson-databind</artifactId>
- <version>2.6.4</version>
- </dependency>
- -->
- <!--
- Jackson dependency required for serializing and deserializing LocalDateTime,
- LocalDate, etc, etc objects.
- -->
- <dependency>
- <groupId>com.fasterxml.jackson.datatype</groupId>
- <artifactId>jackson-datatype-jsr310</artifactId>
- <version>2.8.0.rc2</version>
- </dependency>
-
-
- <!--
- Required by spring-context for using JSR-303. See LocalValidatorFactoryBean
- in rest-config.xml
- -->
- <dependency>
- <groupId>javax.validation</groupId>
- <artifactId>validation-api</artifactId>
- <version>1.1.0.Final</version>
- </dependency>
- <dependency>
- <groupId>org.hibernate</groupId>
- <artifactId>hibernate-validator</artifactId>
- <version>5.2.4.Final</version>
- </dependency>
-
- <!-- Using Querydsl -->
- <dependency>
- <groupId>com.querydsl</groupId>
- <artifactId>querydsl-apt</artifactId>
- <version>${querydsl.version}</version>
- </dependency>
- <dependency>
- <groupId>com.querydsl</groupId>
- <artifactId>querydsl-jpa</artifactId>
- <version>${querydsl.version}</version>
- </dependency>
-
- <!-- Loading data base in run time -->
- <dependency>
- <groupId>org.liquibase</groupId>
- <artifactId>liquibase-core</artifactId>
- <version>3.5.1</version>
- </dependency>
-
- <!-- Unitary and integration tests -->
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>4.12</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-test</artifactId>
- <version>${spring.version}</version>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>commons-logging</groupId>
- <artifactId>commons-logging</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- <dependency>
- <groupId>org.mockito</groupId>
- <artifactId>mockito-core</artifactId>
- <version>2.0.11-beta</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>com.h2database</groupId>
- <artifactId>h2</artifactId>
- <version>1.4.192</version>
- <scope>test</scope>
- </dependency>
- </dependencies>
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-compiler-plugin</artifactId>
- <version>3.3</version>
- <configuration>
- <source>1.8</source>
- <target>1.8</target>
- <encoding>${project.build.sourceEncoding}</encoding>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-resources-plugin</artifactId>
- <version>2.7</version>
- <configuration>
- <encoding>${project.build.sourceEncoding}</encoding>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-jar-plugin</artifactId>
- <version>2.4</version>
- <configuration>
- <archive>
- <manifestEntries>
- <Specification-Title>${project.description}</Specification-Title>
- <Specification-Version>${project.version}</Specification-Version>
- <Specification-Vendor>${project.organization.name}</Specification-Vendor>
- <Implementation-Title>${project.description}</Implementation-Title>
- <Implementation-Version>${project.version}</Implementation-Version>
- <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
- </manifestEntries>
- </archive>
- </configuration>
- </plugin>
-
- <!-- Using Querydsl -->
- <plugin>
- <groupId>com.mysema.maven</groupId>
- <artifactId>apt-maven-plugin</artifactId>
- <version>1.0.4</version>
- <executions>
- <execution>
- <goals>
- <goal>process</goal>
- </goals>
- <configuration>
- <outputDirectory>${project.build.directory}/generated-sources/querydsl</outputDirectory>
- <processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <!-- Required in order to work with m2e plugin for Eclipse -->
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>build-helper-maven-plugin</artifactId>
- <version>1.11</version>
- <executions>
- <execution>
- <id>add-source</id>
- <phase>generate-sources</phase>
- <goals>
- <goal>add-source</goal>
- </goals>
- <configuration>
- <sources>
- <source>${project.build.directory}/generated-sources/querydsl</source>
- </sources>
- </configuration>
- </execution>
- </executions>
- </plugin>
-
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <version>2.18.1</version>
- <configuration>
- <excludes>
- <exclude>**/*IntegrationTest.java</exclude>
- </excludes>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-failsafe-plugin</artifactId>
- <version>2.18.1</version>
- <executions>
- <execution>
- <goals>
- <goal>integration-test</goal>
- <goal>verify</goal>
- </goals>
- </execution>
- </executions>
- <configuration>
- <includes>
- <include>**/*IntegrationTest.java</include>
- </includes>
- </configuration>
- </plugin>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-war-plugin</artifactId>
- <version>2.6</version>
- <configuration>
- <webResources>
- <resource>
- <filtering>true</filtering>
- <directory>src/main/webapp</directory>
- <includes>
- <include>WEB-INF/web.xml</include>
- </includes>
- </resource>
- </webResources>
- </configuration>
- </plugin>
- </plugins>
- </build>
</project>
--- /dev/null
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>de.spring.jpa</groupId>
+ <artifactId>spring-jpa</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>spring-jpa-bom</artifactId>
+ <packaging>pom</packaging>
+ <name>SPRING JPA BOM</name>
+ <url>http://gumartinm.name</url>
+ <description>
+ Spring JPA BOM example.
+ </description>
+ <organization>
+ <name>Gustavo Martin Morcuende</name>
+ <url>http://www.gumartinm.name</url>
+ </organization>
+ <scm>
+ <developerConnection>scm:git:http://git.gumartinm.name/JavaForFun</developerConnection>
+ <url>http://git.gumartinm.name/JavaForFun</url>
+ </scm>
+
+ <properties>
+ <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
+ <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
+ <spring.version>4.3.0.RELEASE</spring.version>
+ <querydsl.version>4.1.3</querydsl.version>
+ </properties>
+
+ <profiles>
+ <profile>
+ <id>release</id>
+ <properties>
+ <environment.profile>release</environment.profile>
+ </properties>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ </profile>
+ </profiles>
+
+ <dependencies>
+ <!--
+ 1/3 Required dependency for log4j 2 with slf4j: binding between log4j
+ 2 and slf4j
+ -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-slf4j-impl</artifactId>
+ <version>2.6.1</version>
+ </dependency>
+ <!--
+ 2/3 Required dependency for log4j 2 with slf4j: log4j 2 maven plugin
+ (it is the log4j 2 implementation)
+ -->
+ <dependency>
+ <groupId>org.apache.logging.log4j</groupId>
+ <artifactId>log4j-core</artifactId>
+ <version>2.6.1</version>
+ </dependency>
+ <!--
+ 3/3 Required dependency for getting rid of commons logging. This is
+ the BRIDGE (no binding) between Jakarta Commons Logging (used by Spring)
+ and whatever I am using for logging (in this case I am using log4j 2) See:
+ http://www.slf4j.org/legacy.html We need exclusions in every dependency using
+ Jakarta Commons Logging (see Spring dependencies below)
+ -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>jcl-over-slf4j</artifactId>
+ <version>1.7.21</version>
+ </dependency>
+
+ <dependency>
+ <groupId>javax.inject</groupId>
+ <artifactId>javax.inject</artifactId>
+ <version>1</version>
+ </dependency>
+
+ <dependency>
+ <groupId>cglib</groupId>
+ <artifactId>cglib</artifactId>
+ <version>2.2.2</version>
+ </dependency>
+
+ <!-- Unitary and integration tests -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.12</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.mockito</groupId>
+ <artifactId>mockito-core</artifactId>
+ <version>2.0.43-beta</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${spring.version}</version>
+ <!--
+ Required dependency for getting rid of commons logging and use my
+ own logging library (in my case I decided to use log4j 2 under slf4j)
+ -->
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <!-- REST API -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ <version>${spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-oxm</artifactId>
+ <version>${spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+
+ <!-- Required by spring-webmvc -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <version>4.0.0-b01</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!--
+ Jackson JSON Processor, required by spring-webmvc. See messageConverters
+ in rest-config.xml
+ -->
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>2.6.4</version>
+ </dependency>
+
+
+ <!-- Required JPA dependencies with hibernate -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-orm</artifactId>
+ <version>${spring.version}</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework.data</groupId>
+ <artifactId>spring-data-jpa</artifactId>
+ <version>1.10.2.RELEASE</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-beans</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-orm</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ <version>5.2.1.Final</version>
+ </dependency>
+
+ <!-- Auditory using Hibernate Envers -->
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-envers</artifactId>
+ <version>5.2.1.Final</version>
+ </dependency>
+
+ <!--
+ Jackson JSON Processor, required by spring-webmvc. See messageConverters
+ in rest-config.xml
+
+ Non required dependency. It is already declared in jackson-datatype-jsr310
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>2.6.4</version>
+ </dependency>
+ -->
+ <!--
+ Jackson dependency required for serializing and deserializing LocalDateTime,
+ LocalDate, etc, etc objects.
+ -->
+ <dependency>
+ <groupId>com.fasterxml.jackson.datatype</groupId>
+ <artifactId>jackson-datatype-jsr310</artifactId>
+ <version>2.8.0.rc2</version>
+ </dependency>
+
+
+ <!--
+ Required by spring-context for using JSR-303. See LocalValidatorFactoryBean
+ in rest-config.xml
+ -->
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ <version>1.1.0.Final</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ <version>5.2.4.Final</version>
+ </dependency>
+
+
+ <!-- Using Querydsl -->
+ <dependency>
+ <groupId>com.querydsl</groupId>
+ <artifactId>querydsl-apt</artifactId>
+ <version>${querydsl.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>com.querydsl</groupId>
+ <artifactId>querydsl-jpa</artifactId>
+ <version>${querydsl.version}</version>
+ </dependency>
+
+ <!-- Loading data base in run time -->
+ <dependency>
+ <groupId>org.liquibase</groupId>
+ <artifactId>liquibase-core</artifactId>
+ <version>3.5.1</version>
+ </dependency>
+
+ <!-- Unitary and integration tests -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <version>${spring.version}</version>
+ <scope>test</scope>
+ <!--
+ Required dependency for getting rid of commons logging and use my
+ own logging library (in my case I decided to use log4j 2 under slf4j)
+ -->
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <version>1.4.192</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+ <build>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <version>2.19.1</version>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <version>2.19.1</version>
+ </plugin>
+
+ <!-- Using Querydsl -->
+ <plugin>
+ <groupId>com.mysema.maven</groupId>
+ <artifactId>apt-maven-plugin</artifactId>
+ <version>1.0.4</version>
+ </plugin>
+ <!-- Required in order to work with m2e plugin for Eclipse -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <version>1.11</version>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <version>3.3</version>
+ <configuration>
+ <source>1.8</source>
+ <target>1.8</target>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.7</version>
+ <configuration>
+ <encoding>${project.build.sourceEncoding}</encoding>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-jar-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <archive>
+ <manifestEntries>
+ <Specification-Title>${project.description}</Specification-Title>
+ <Specification-Version>${project.version}</Specification-Version>
+ <Specification-Vendor>${project.organization.name}</Specification-Vendor>
+ <Implementation-Title>${project.description}</Implementation-Title>
+ <Implementation-Version>${project.version}</Implementation-Version>
+ <Implementation-Vendor>${project.organization.name}</Implementation-Vendor>
+ </manifestEntries>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <excludes>
+ <exclude>**/*IntegrationTest.java</exclude>
+ </excludes>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-failsafe-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>integration-test</goal>
+ <goal>verify</goal>
+ </goals>
+ </execution>
+ </executions>
+ <configuration>
+ <includes>
+ <include>**/*IntegrationTest.java</include>
+ </includes>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
--- /dev/null
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>de.spring.jpa</groupId>
+ <artifactId>spring-jpa-bom</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>spring-jpa-persistence</artifactId>
+ <name>SPRING JPA PERSISTENCE</name>
+ <url>https://gumartinm.name/</url>
+ <description>JPA Spring Framework. Persistence.</description>
+
+
+
+ <dependencies>
+
+ <!-- Required JPA dependencies with hibernate -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-orm</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework.data</groupId>
+ <artifactId>spring-data-jpa</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-entitymanager</artifactId>
+ </dependency>
+
+ <!-- Auditory using Hibernate Envers -->
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-envers</artifactId>
+ </dependency>
+
+ <!--
+ Required by spring-context for using JSR-303. See LocalValidatorFactoryBean
+ in rest-config.xml
+ -->
+ <dependency>
+ <groupId>javax.validation</groupId>
+ <artifactId>validation-api</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-validator</artifactId>
+ </dependency>
+
+
+ <!--
+ Jackson JSON Processor, required by spring-webmvc. See messageConverters
+ in rest-config.xml
+ -->
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ </dependency>
+
+ <!-- Using Querydsl -->
+ <dependency>
+ <groupId>com.querydsl</groupId>
+ <artifactId>querydsl-apt</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>com.querydsl</groupId>
+ <artifactId>querydsl-jpa</artifactId>
+ </dependency>
+
+ <!-- Loading data base in run time -->
+ <dependency>
+ <groupId>org.liquibase</groupId>
+ <artifactId>liquibase-core</artifactId>
+ </dependency>
+
+ <!-- Unitary and integration tests -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <scope>test</scope>
+ </dependency>
+
+ </dependencies>
+ <build>
+ <plugins>
+ <!-- Using Querydsl -->
+ <plugin>
+ <groupId>com.mysema.maven</groupId>
+ <artifactId>apt-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <goals>
+ <goal>process</goal>
+ </goals>
+ <configuration>
+ <outputDirectory>${project.build.directory}/generated-sources/querydsl</outputDirectory>
+ <processor>com.querydsl.apt.jpa.JPAAnnotationProcessor</processor>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <!-- Required in order to work with m2e plugin for Eclipse -->
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>build-helper-maven-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>add-source</id>
+ <phase>generate-sources</phase>
+ <goals>
+ <goal>add-source</goal>
+ </goals>
+ <configuration>
+ <sources>
+ <source>${project.build.directory}/generated-sources/querydsl</source>
+ </sources>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+</project>
--- /dev/null
+package de.spring.example.context;
+
+import javax.inject.Named;
+
+import org.springframework.util.Assert;
+
+@Named("userNameThreadContext")
+public class UsernameThreadContext {
+ public static final String USERNAME_HEADER = "USERNAME";
+
+ private final ThreadLocal<String> contextHolder = new ThreadLocal<>();
+
+ public void setUsername(String username) {
+ Assert.notNull(username);
+
+ contextHolder.set(username);
+ }
+
+ public String getUsername() {
+ return contextHolder.get();
+ }
+
+ public void clearUsername() {
+ contextHolder.remove();
+ }
+}
--- /dev/null
+package de.spring.example.persistence.converters;
+
+import java.sql.Timestamp;
+import java.time.LocalDateTime;
+import java.time.OffsetDateTime;
+import java.time.ZoneId;
+import java.time.ZonedDateTime;
+
+import javax.persistence.AttributeConverter;
+import javax.persistence.Converter;
+
+@Converter(autoApply = true)
+public class OffsetDateTimeAttributeConverter implements AttributeConverter<OffsetDateTime, Timestamp> {
+
+ @Override
+ public Timestamp convertToDatabaseColumn(OffsetDateTime offsetDateTime) {
+ Timestamp timestamp = null;
+
+ if (offsetDateTime != null) {
+ timestamp = Timestamp.valueOf(offsetDateTime.toLocalDateTime());
+ }
+
+ return timestamp;
+ }
+
+ @Override
+ public OffsetDateTime convertToEntityAttribute(Timestamp sqlTimestamp) {
+ OffsetDateTime offsetDateTime = null;
+
+ if (sqlTimestamp != null) {
+ final LocalDateTime localDateTime = sqlTimestamp.toLocalDateTime();
+ final ZonedDateTime zonedDateTime = localDateTime.atZone(ZoneId.systemDefault());
+ offsetDateTime = zonedDateTime.toOffsetDateTime();
+ }
+
+ return offsetDateTime;
+ }
+
+}
--- /dev/null
+package de.spring.example.persistence.domain;
+
+import java.io.Serializable;
+import java.time.OffsetDateTime;
+import java.util.Set;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Convert;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+//import javax.persistence.NamedNativeQueries;
+//import javax.persistence.NamedNativeQuery;
+//import javax.persistence.NamedQueries;
+//import javax.persistence.NamedQuery;
+import javax.persistence.OneToMany;
+import javax.persistence.Table;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import org.hibernate.envers.Audited;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.fasterxml.jackson.annotation.JsonIdentityInfo;
+import com.fasterxml.jackson.annotation.ObjectIdGenerators;
+
+import de.spring.example.persistence.converters.OffsetDateTimeAttributeConverter;
+
+@Entity
+@Audited(withModifiedFlag=true)
+@Table(name="ad", schema="mybatis_example")
+@JsonIdentityInfo(generator=ObjectIdGenerators.IntSequenceGenerator.class, property="jsonId")
+// 1. Named query is JPL. It is portable.
+// 2. Instead of annotating the domain class we should be using @Query annotation at the query method
+// because it should be cleaner :)
+// So you'd better use @Query.
+//http://docs.spring.io/spring-data/jpa/docs/current/reference/html/#jpa.query-methods.at-query
+//See: de.spring.persistence.example.repository.AdRepository
+//@NamedQueries(
+// {
+// @NamedQuery(
+// name="Ad.findByIdQuery",
+// query="select a from Ad a where a.id = :id)
+// }
+//
+//)
+// 1. Native query IS NOT JPL. It is not portable and it is written directly in the native language
+// of the store. We can use special features at the cost of portability.
+// 2. Instead of annotating the domain class we should be using @Query annotation at the query method
+// because it should be cleaner :)
+// So you'd better use @Query.
+// http://docs.spring.io/spring-data/jpa/docs/current/reference/html/#jpa.query-methods.at-query
+// See: de.spring.persistence.example.repository.AdRepository
+//@NamedNativeQueries(
+// {
+// @NamedNativeQuery(
+// name="Ad.findByIdNativeQuery",
+// query="SELECT * FROM ad WHERE ad.id = :id",
+// resultClass=Ad.class)
+// }
+//)
+public class Ad implements Serializable {
+
+ @Id
+ @GeneratedValue(strategy=GenerationType.IDENTITY)
+ @Column(name="id", updatable=false, nullable=false)
+ private Long id;
+
+ @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL)
+ @JoinColumn(name = "ad_id", nullable = false)
+ private Set<AdDescription> adDescriptions;
+
+ @Max(60)
+ @Column(name="company_id")
+ private Long companyId;
+
+ @Max(40)
+ @Column(name="company_categ_id")
+ private Long companyCategId;
+
+ @Size(min=2, max=255)
+ @Column(name="ad_mobile_image")
+ private String adMobileImage;
+
+ @NotNull
+ @Convert(converter=OffsetDateTimeAttributeConverter.class)
+ @Column(name="created_at", nullable=false)
+ @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ssZ")
+ private OffsetDateTime createdAt;
+
+ @NotNull
+ @Convert(converter=OffsetDateTimeAttributeConverter.class)
+ @Column(name="updated_at", nullable = false)
+ @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ssZ")
+ private OffsetDateTime updatedAt;
+
+ // It will be used by JPA when filling the property fields with data coming from data base.
+ protected Ad() {
+
+ }
+
+ // It will be used by my code (for example by Unit Tests)
+ public Ad(Long id, Set<AdDescription> adDescriptions, Long companyId, Long companyCategId, String adMobileImage,
+ OffsetDateTime createdAt, OffsetDateTime updatedAt) {
+ this.id = id;
+ this.adDescriptions = adDescriptions;
+ this.companyId = companyId;
+ this.companyCategId = companyCategId;
+ this.adMobileImage = adMobileImage;
+ this.createdAt = createdAt;
+ this.updatedAt = updatedAt;
+ }
+
+ /**
+ * WARNING: JPA REQUIRES GETTERS!!!
+ */
+
+ public Long getId() {
+ return id;
+ }
+
+ public Set<AdDescription> getAdDescriptions() {
+ return adDescriptions;
+ }
+
+ public Long getCompanyId() {
+ return companyId;
+ }
+
+ public Long getCompanyCategId() {
+ return companyCategId;
+ }
+
+ public String getAdMobileImage() {
+ return adMobileImage;
+ }
+
+ public OffsetDateTime getCreatedAt() {
+ return createdAt;
+ }
+
+ public OffsetDateTime getUpdatedAt() {
+ return updatedAt;
+ }
+}
--- /dev/null
+package de.spring.example.persistence.domain;
+
+import java.io.Serializable;
+
+import javax.persistence.CascadeType;
+import javax.persistence.Column;
+import javax.persistence.Entity;
+import javax.persistence.FetchType;
+import javax.persistence.GeneratedValue;
+import javax.persistence.GenerationType;
+import javax.persistence.Id;
+import javax.persistence.JoinColumn;
+import javax.persistence.ManyToOne;
+import javax.persistence.Table;
+import javax.validation.constraints.Max;
+import javax.validation.constraints.NotNull;
+import javax.validation.constraints.Size;
+
+import org.hibernate.envers.Audited;
+
+import com.fasterxml.jackson.annotation.JsonIdentityInfo;
+import com.fasterxml.jackson.annotation.ObjectIdGenerators;
+
+@Entity
+@Audited
+@Table(name="ad_description", schema="mybatis_example")
+@JsonIdentityInfo(generator=ObjectIdGenerators.IntSequenceGenerator.class, property="jsonId")
+public class AdDescription implements Serializable {
+
+ @Id
+ @GeneratedValue(strategy=GenerationType.IDENTITY)
+ @Column(name="id", updatable=false, nullable=false)
+ private Long id;
+
+ @ManyToOne(fetch=FetchType.LAZY, cascade = CascadeType.ALL, optional=true)
+ @JoinColumn(name="ad_id", nullable=false, updatable = false, insertable = false, referencedColumnName="id")
+ private Ad ad;
+
+ @NotNull
+ @Max(60)
+ @Column(name="laguage_id")
+ private Long languageId;
+
+ @NotNull
+ @Size(min=2, max=255)
+ @Column(name="ad_name")
+ private String adName;
+
+ @NotNull
+ @Size(min=2, max=255)
+ @Column(name="ad_description")
+ private String adDescription;
+
+ @NotNull
+ @Size(min=2, max=500)
+ @Column(name="ad_mobile_text")
+ private String adMobileText;
+
+ @NotNull
+ @Size(min=2, max=3000)
+ @Column(name="ad_link")
+ private String adLink;
+
+ // It will be used by JPA when filling the property fields with data coming from data base.
+ protected AdDescription() {
+
+ }
+
+ // It will be used by my code (for example by Unit Tests)
+ public AdDescription(Long id, Ad ad, Long languageId, String adName, String adDescription,
+ String adMobileText, String adLink) {
+ this.id = id;
+ this.ad = ad;
+ this.languageId = languageId;
+ this.adName = adName;
+ this.adDescription = adDescription;
+ this.adMobileText = adMobileText;
+ this.adLink = adLink;
+ }
+
+ /**
+ * WARNING: JPA REQUIRES GETTERS!!!
+ */
+
+ public Long getId() {
+ return id;
+ }
+
+ public Ad getAd() {
+ return ad;
+ }
+
+ public Long getLanguageId() {
+ return languageId;
+ }
+
+ public String getAdName() {
+ return adName;
+ }
+
+ public String getAdDescription() {
+ return adDescription;
+ }
+
+ public String getAdMobileText() {
+ return adMobileText;
+ }
+
+ public String getAdLink() {
+ return adLink;
+ }
+}
--- /dev/null
+package de.spring.example.persistence.domain.audit;
+
+import javax.persistence.Entity;
+import javax.persistence.Table;
+
+import org.hibernate.envers.RevisionEntity;
+
+@Entity
+@RevisionEntity(MyCustomRevisionListener.class)
+@Table(name="CUSTOM_REVISION", schema="mybatis_example")
+public class MyCustomRevision {
+ private String username;
+
+ // It will be used by JPA when filling the property fields with data coming from data base.
+ protected MyCustomRevision() {
+
+ }
+
+ // It will be used by my code (for example by Unit Tests)
+ public MyCustomRevision(String username) {
+ this.username = username;
+ }
+
+ /**
+ * WARNING: JPA REQUIRES GETTERS!!!
+ */
+
+ public String getUsername() {
+ return username;
+ }
+
+ public void setUsername(String username) {
+ this.username = username;
+ }
+}
--- /dev/null
+package de.spring.example.persistence.domain.audit;
+
+import org.hibernate.envers.RevisionListener;
+
+import de.spring.example.context.UsernameThreadContext;
+
+public class MyCustomRevisionListener implements RevisionListener {
+ private final UsernameThreadContext userNameThreadContext;
+
+ public MyCustomRevisionListener(UsernameThreadContext userNameThreadContext) {
+ this.userNameThreadContext = userNameThreadContext;
+ }
+
+ @Override
+ public void newRevision(Object revisionEntity) {
+ MyCustomRevision myCustomRevision = (MyCustomRevision) revisionEntity;
+
+ final String username = getSafeUsername();
+ myCustomRevision.setUsername(username);
+
+ }
+
+ private String getSafeUsername() {
+ String userName = userNameThreadContext.getUsername();
+
+ if (userName == null) {
+ userName = "NO_USER";
+ }
+
+ return userName;
+ }
+
+}
--- /dev/null
+package de.spring.example.persistence.domain.specifications;
+
+import java.time.LocalDate;
+
+//import javax.persistence.criteria.CriteriaBuilder;
+//import javax.persistence.criteria.CriteriaQuery;
+//import javax.persistence.criteria.Predicate;
+//import javax.persistence.criteria.Root;
+
+import org.springframework.data.jpa.domain.Specification;
+
+import de.spring.example.persistence.domain.Ad;
+
+public class AdSpectifications {
+
+// public static Specification<Ad> createdToday() {
+// return new Specification<Ad>() {
+//
+// @Override
+// public Predicate toPredicate(Root<Ad> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
+// final LocalDate date = LocalDate.now();
+//
+// return cb.equal(root.get("createdAt"), date);
+// }
+//
+// };
+//
+// }
+
+ /**
+ * The same using lambda expressions
+ */
+ public static Specification<Ad> createdToday() {
+ return (root, query, cb) -> {
+ final LocalDate date = LocalDate.now();
+
+ return cb.equal(root.get("createdAt"), date);
+ };
+ }
+
+// public static Specification<Ad> mobileImage(String image) {
+// return new Specification<Ad>() {
+//
+// @Override
+// public Predicate toPredicate(Root<Ad> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
+//
+// return cb.equal(root.get("adMobileImage"), image);
+// }
+//
+// };
+//
+// }
+
+ /**
+ * The same using lambda expressions
+ */
+ public static Specification<Ad> mobileImage(String image) {
+ return (root, query, cb) -> {
+ return cb.equal(root.get("adMobileImage"), image);
+ };
+ }
+}
--- /dev/null
+package de.spring.example.persistence.repository;
+
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.querydsl.QueryDslPredicateExecutor;
+import org.springframework.data.repository.PagingAndSortingRepository;
+
+import de.spring.example.persistence.domain.Ad;
+import de.spring.example.persistence.domain.AdDescription;
+
+/**
+ * By default <code>org.springframework.data.jpa.repository.support.SimpleJpaRepository<code>
+ * will be the implementation for this interface.
+ *
+ * Be careful with <code>@Transactional</code>. SimpleJpaRepository has annotated methods.
+ *
+ */
+public interface AdDescriptionRepository extends PagingAndSortingRepository<AdDescription, Long>, QueryDslPredicateExecutor<AdDescription> {
+
+ // Custom Query method (useful when the offered methods by PagingAndSortingRepository are not enough)
+ Page<AdDescription> findByAd(Ad ad, Pageable pageable);
+}
--- /dev/null
+package de.spring.example.persistence.repository;
+
+import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
+import org.springframework.data.jpa.repository.Query;
+import org.springframework.data.repository.PagingAndSortingRepository;
+import org.springframework.data.repository.query.Param;
+
+import de.spring.example.persistence.domain.Ad;
+
+/**
+ * By default <code>org.springframework.data.jpa.repository.support.SimpleJpaRepository<code>
+ * will be the implementation for this interface.
+ *
+ * Be careful with <code>@Transactional</code>. SimpleJpaRepository has annotated methods.
+ *
+ */
+public interface AdRepository extends PagingAndSortingRepository<Ad, Long>, JpaSpecificationExecutor<Ad> {
+
+ // Named Native Query (using the native language of the store) It is not portable.
+ // See de.spring.persistence.example.domain.Ad
+ @Query(value="SELECT * FROM ad WHERE ad.id = :id", nativeQuery=true)
+ Ad findByIdNativeQuery(@Param("id") Long id);
+
+ // Named Query (using JPL) It is portable.
+ // See de.spring.persistence.example.domain.Ad
+ @Query("select a from Ad a where a.id = :id")
+ Ad findByIdQuery(@Param("id") Long id);
+}
--- /dev/null
+jpa.dialect=org.hibernate.dialect.MySQL5Dialect
+jpa.show_sql=false
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context.xsd">
+
+ <context:component-scan base-package="de.spring.example.context"/>
+
+ <context:property-placeholder location="classpath:jpa.properties" />
+
+</beans>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans xmlns="http://www.springframework.org/schema/beans"\r
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+ xmlns:util="http://www.springframework.org/schema/util"\r
+ xmlns:tx="http://www.springframework.org/schema/tx"\r
+ xmlns:jee="http://www.springframework.org/schema/jee"\r
+ xsi:schemaLocation="http://www.springframework.org/schema/beans\r
+ http://www.springframework.org/schema/beans/spring-beans.xsd\r
+ http://www.springframework.org/schema/util\r
+ http://www.springframework.org/schema/util/spring-util.xsd\r
+ http://www.springframework.org/schema/tx \r
+ http://www.springframework.org/schema/tx/spring-tx.xsd\r
+ http://www.springframework.org/schema/jee\r
+ http://www.springframework.org/schema/jee/spring-jee.xsd">\r
+\r
+ \r
+ <!-- enable the configuration of transactional behavior based on annotations -->\r
+ <tx:annotation-driven transaction-manager="transactionManager"/>\r
+\r
+\r
+ <!-- Using external provided datasource (in my case the one from Tomcat) -->\r
+ <jee:jndi-lookup id="dataSource" jndi-name="jdbc/example" expected-type="javax.sql.DataSource"/>\r
+ \r
+ \r
+ <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">\r
+ <property name="entityManagerFactory" ref="entityManagerFactory" />\r
+ </bean>\r
+ \r
+ <import resource="liquibase/liquibase.xml" />\r
+ \r
+</beans>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans xmlns="http://www.springframework.org/schema/beans"\r
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+ xmlns:context="http://www.springframework.org/schema/context"\r
+ xmlns:util="http://www.springframework.org/schema/util"\r
+ xmlns:jpa="http://www.springframework.org/schema/data/jpa"\r
+ xsi:schemaLocation="http://www.springframework.org/schema/beans\r
+ http://www.springframework.org/schema/beans/spring-beans.xsd\r
+ http://www.springframework.org/schema/context\r
+ http://www.springframework.org/schema/context/spring-context.xsd\r
+ http://www.springframework.org/schema/util\r
+ http://www.springframework.org/schema/util/spring-util.xsd\r
+ http://www.springframework.org/schema/data/jpa \r
+ http://www.springframework.org/schema/data/jpa/spring-jpa.xsd">\r
+\r
+ <context:annotation-config />\r
+\r
+ <context:component-scan base-package="de.spring.example.persistence" />\r
+ \r
+ <bean id="entityManagerFactory"\r
+ class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">\r
+ <property name="dataSource" ref="dataSource" />\r
+ <property name="jpaVendorAdapter">\r
+ <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">\r
+ <property name="databasePlatform" value="${jpa.dialect}" />\r
+ <property name="showSql" value="${jpa.show_sql}" />\r
+ </bean>\r
+ </property>\r
+ <property name="packagesToScan" value="de.spring.example.persistence.**.domain" />\r
+ <property name="jpaProperties">\r
+ <props>\r
+ <!--\r
+ <prop key="hibernate.hbm2ddl.auto">create-drop</prop>\r
+ -->\r
+ <prop key="org.hibernate.envers.audit_table_suffix">_AUDITED</prop>\r
+ <prop key="org.hibernate.envers.revision_field_name">REVISION</prop>\r
+ <prop key="org.hibernate.envers.revision_type_field_name">REVISION_TYPE</prop>\r
+ <prop key="org.hibernate.envers.store_data_at_delete">true</prop>\r
+ <prop key="org.hibernate.envers.audit_strategy">org.hibernate.envers.strategy.ValidityAuditStrategy</prop>\r
+ <prop key="org.hibernate.envers.audit_strategy_validity_end_rev_field_name">REVISION_END</prop>\r
+ <prop key="org.hibernate.envers.audit_strategy_validity_store_revend_timestamp">true</prop>\r
+ <prop key="org.hibernate.envers.audit_strategy_validity_revend_timestamp_field_name">REVISION_END_TIMESTAMP</prop>\r
+ <prop key="org.hibernate.envers.modified_flag_suffix">_MODIFIED</prop> \r
+ </props>\r
+ </property>\r
+ </bean>\r
+\r
+ <jpa:repositories entity-manager-factory-ref="entityManagerFactory"\r
+ base-package="de.spring.example.persistence.**.repository"\r
+ transaction-manager-ref="transactionManager" />\r
+\r
+</beans>\r
--- /dev/null
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog
+ xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
+ http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
+
+ <!-- DDL -->
+ <include file="spring-configuration/liquibase/ddlChangelog.xml" />
+
+ <!-- DML -->
+ <include file="spring-configuration/liquibase/dmlChangelog.xml" />
+ <!--
+ <changeSet author="gustavo" id="1">
+ <sqlFile path="liquibase/dmlChangelog.xml" stripComments="true"/>
+ </changeSet>
+ -->
+
+</databaseChangeLog>
--- /dev/null
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
+ <changeSet author="gustavo (generated)" id="1468267753605-1">
+ <createTable tableName="ad">
+ <column autoIncrement="true" name="id" type="BIGINT">
+ <constraints primaryKey="true"/>
+ </column>
+ <column name="company_id" type="BIGINT"/>
+ <column name="company_categ_id" type="BIGINT"/>
+ <column name="ad_gps" type="BLOB"/>
+ <column name="ad_mobile_image" type="VARCHAR(255)"/>
+ <column defaultValueComputed="CURRENT_TIMESTAMP" name="created_at" type="TIMESTAMP">
+ <constraints nullable="false"/>
+ </column>
+ <column defaultValue="0000-00-00 00:00:00" name="updated_at" type="TIMESTAMP">
+ <constraints nullable="false"/>
+ </column>
+ </createTable>
+ </changeSet>
+ <changeSet author="gustavo (generated)" id="1468267753605-2">
+ <createTable tableName="ad_description">
+ <column autoIncrement="true" name="id" type="BIGINT">
+ <constraints primaryKey="true"/>
+ </column>
+ <column name="laguage_id" type="BIGINT">
+ <constraints nullable="false"/>
+ </column>
+ <column name="ad_id" type="BIGINT"/>
+ <column name="ad_name" type="VARCHAR(255)">
+ <constraints nullable="false"/>
+ </column>
+ <column name="ad_description" type="LONGTEXT"/>
+ <column name="ad_mobile_text" type="VARCHAR(500)">
+ <constraints nullable="false"/>
+ </column>
+ <column name="ad_link" type="VARCHAR(3000)">
+ <constraints nullable="false"/>
+ </column>
+ </createTable>
+ </changeSet>
+ <changeSet author="gustavo (generated)" id="1468267753605-3">
+ <createTable tableName="con_test">
+ <column name="a" type="CHAR(1)"/>
+ </createTable>
+ </changeSet>
+ <changeSet author="gustavo (generated)" id="1468267753605-4">
+ <addUniqueConstraint columnNames="id" constraintName="id" deferrable="false" disabled="false" initiallyDeferred="false" tableName="ad"/>
+ </changeSet>
+ <changeSet author="gustavo (generated)" id="1468267753605-5">
+ <addForeignKeyConstraint baseColumnNames="ad_id" baseTableName="ad_description" constraintName="ad_description_ibfk_1" deferrable="false" initiallyDeferred="false" onDelete="CASCADE" onUpdate="NO ACTION" referencedColumnNames="id" referencedTableName="ad"/>
+ </changeSet>
+</databaseChangeLog>
--- /dev/null
+<?xml version="1.1" encoding="UTF-8" standalone="no"?>
+<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
+ <changeSet author="gustavo (generated)" id="1468267830107-1">
+ <insert tableName="ad">
+ <column name="id" valueNumeric="1"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2014-12-17 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-12-17 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="2"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2014-12-17 23:29:10.0"/>
+ <column name="updated_at" valueDate="2014-12-17 23:29:10.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="3"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-27 17:13:46.0"/>
+ <column name="updated_at" valueDate="2014-12-27 17:13:47.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="4"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-27 17:14:39.0"/>
+ <column name="updated_at" valueDate="2014-12-27 17:15:27.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="5"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-27 23:38:47.0"/>
+ <column name="updated_at" valueDate="2014-12-27 23:38:47.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="6"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-27 23:39:53.0"/>
+ <column name="updated_at" valueDate="2014-12-27 23:39:53.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="7"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-27 23:39:54.0"/>
+ <column name="updated_at" valueDate="2014-12-27 23:39:54.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="8"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-27 23:40:21.0"/>
+ <column name="updated_at" valueDate="2014-12-27 23:40:21.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="9"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-27 23:40:21.0"/>
+ <column name="updated_at" valueDate="2014-12-27 23:40:21.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="10"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-27 23:42:34.0"/>
+ <column name="updated_at" valueDate="2014-12-27 23:42:34.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="11"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-27 23:42:34.0"/>
+ <column name="updated_at" valueDate="2014-12-27 23:42:34.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="12"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-28 00:07:34.0"/>
+ <column name="updated_at" valueDate="2014-12-28 00:07:34.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="13"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-28 00:07:35.0"/>
+ <column name="updated_at" valueDate="2014-12-28 00:07:35.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="14"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-28 00:10:20.0"/>
+ <column name="updated_at" valueDate="2014-12-28 00:10:20.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="15"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-28 00:10:21.0"/>
+ <column name="updated_at" valueDate="2014-12-28 00:10:21.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="16"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-28 00:10:21.0"/>
+ <column name="updated_at" valueDate="2014-12-28 00:10:21.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="17"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-28 00:10:21.0"/>
+ <column name="updated_at" valueDate="2014-12-28 00:10:21.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="18"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-28 00:10:21.0"/>
+ <column name="updated_at" valueDate="2014-12-28 00:10:21.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="19"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-28 00:10:21.0"/>
+ <column name="updated_at" valueDate="2014-12-28 00:10:21.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="20"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-28 00:10:21.0"/>
+ <column name="updated_at" valueDate="2014-12-28 00:10:21.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="21"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-28 00:19:06.0"/>
+ <column name="updated_at" valueDate="2014-12-28 00:19:06.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="23"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-28 00:20:08.0"/>
+ <column name="updated_at" valueDate="2014-12-28 00:20:08.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="25"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-28 00:31:11.0"/>
+ <column name="updated_at" valueDate="2014-12-28 00:31:11.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="26"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-28 00:31:12.0"/>
+ <column name="updated_at" valueDate="2014-12-28 00:31:12.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="27"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="mobileImage.jpg"/>
+ <column name="created_at" valueDate="2014-12-28 00:31:12.0"/>
+ <column name="updated_at" valueDate="2014-12-28 00:31:12.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="28"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="29"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="30"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="31"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="32"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="33"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="34"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="35"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="36"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="37"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="38"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="39"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="40"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="41"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="42"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="43"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="44"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="45"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="46"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="47"/>
+ <column name="company_id"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bitch.jpg"/>
+ <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
+ <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="52"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 12:38:12.0"/>
+ <column name="updated_at" valueDate="2016-04-10 12:38:12.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="53"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 12:40:56.0"/>
+ <column name="updated_at" valueDate="2016-04-10 12:40:56.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="54"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 12:46:02.0"/>
+ <column name="updated_at" valueDate="2016-04-10 12:46:02.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="55"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 12:46:13.0"/>
+ <column name="updated_at" valueDate="2016-04-10 12:46:13.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="56"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 12:52:20.0"/>
+ <column name="updated_at" valueDate="2016-04-10 12:52:20.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="57"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 12:53:07.0"/>
+ <column name="updated_at" valueDate="2016-04-10 12:53:07.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="58"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 12:57:01.0"/>
+ <column name="updated_at" valueDate="2016-04-10 12:57:01.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="59"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 12:57:08.0"/>
+ <column name="updated_at" valueDate="2016-04-10 12:57:08.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="60"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 13:07:24.0"/>
+ <column name="updated_at" valueDate="2016-04-10 13:07:24.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="61"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 13:07:24.0"/>
+ <column name="updated_at" valueDate="2016-04-10 13:07:24.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="62"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 13:07:24.0"/>
+ <column name="updated_at" valueDate="2016-04-10 13:07:24.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="63"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 13:07:24.0"/>
+ <column name="updated_at" valueDate="2016-04-10 13:07:24.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="64"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 13:16:12.0"/>
+ <column name="updated_at" valueDate="2016-04-10 13:16:12.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="65"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 13:16:12.0"/>
+ <column name="updated_at" valueDate="2016-04-10 13:16:12.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="66"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 13:16:12.0"/>
+ <column name="updated_at" valueDate="2016-04-10 13:16:12.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="67"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 13:16:12.0"/>
+ <column name="updated_at" valueDate="2016-04-10 13:16:12.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="68"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 13:22:18.0"/>
+ <column name="updated_at" valueDate="2016-04-10 13:22:18.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="69"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 13:22:19.0"/>
+ <column name="updated_at" valueDate="2016-04-10 13:22:19.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="70"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 13:22:19.0"/>
+ <column name="updated_at" valueDate="2016-04-10 13:22:19.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="71"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 13:22:19.0"/>
+ <column name="updated_at" valueDate="2016-04-10 13:22:19.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="72"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 13:25:50.0"/>
+ <column name="updated_at" valueDate="2016-04-10 13:25:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="73"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 13:26:58.0"/>
+ <column name="updated_at" valueDate="2016-04-10 13:26:58.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="74"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 13:27:18.0"/>
+ <column name="updated_at" valueDate="2016-04-10 13:27:18.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="75"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 13:29:10.0"/>
+ <column name="updated_at" valueDate="2016-04-10 13:29:10.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="76"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 14:06:00.0"/>
+ <column name="updated_at" valueDate="2016-04-10 14:06:00.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="77"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 14:06:00.0"/>
+ <column name="updated_at" valueDate="2016-04-10 14:06:00.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="78"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 14:06:00.0"/>
+ <column name="updated_at" valueDate="2016-04-10 14:06:00.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="79"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 14:06:00.0"/>
+ <column name="updated_at" valueDate="2016-04-10 14:06:00.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="80"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 18:04:43.0"/>
+ <column name="updated_at" valueDate="2016-04-10 18:04:43.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="81"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 18:05:02.0"/>
+ <column name="updated_at" valueDate="2016-04-10 18:05:02.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="82"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 18:11:22.0"/>
+ <column name="updated_at" valueDate="2016-04-10 18:11:23.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="85"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 18:26:26.0"/>
+ <column name="updated_at" valueDate="2016-04-10 18:26:27.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="86"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 19:09:14.0"/>
+ <column name="updated_at" valueDate="2016-04-10 19:09:14.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="87"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 19:10:03.0"/>
+ <column name="updated_at" valueDate="2016-04-10 19:10:03.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="88"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 20:33:52.0"/>
+ <column name="updated_at" valueDate="2016-04-10 20:33:52.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="89"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 20:35:11.0"/>
+ <column name="updated_at" valueDate="2016-04-10 20:35:11.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="90"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 20:35:46.0"/>
+ <column name="updated_at" valueDate="2016-04-10 20:35:46.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="91"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-10 20:35:49.0"/>
+ <column name="updated_at" valueDate="2016-04-10 20:35:49.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="93"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 16:57:50.0"/>
+ <column name="updated_at" valueDate="2016-04-24 16:57:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="94"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 16:57:50.0"/>
+ <column name="updated_at" valueDate="2016-04-24 16:57:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="95"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 16:57:50.0"/>
+ <column name="updated_at" valueDate="2016-04-24 16:57:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="96"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 16:57:50.0"/>
+ <column name="updated_at" valueDate="2016-04-24 16:57:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="97"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 16:57:50.0"/>
+ <column name="updated_at" valueDate="2016-04-24 16:57:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="98"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 16:57:50.0"/>
+ <column name="updated_at" valueDate="2016-04-24 16:57:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="99"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 16:57:50.0"/>
+ <column name="updated_at" valueDate="2016-04-24 16:57:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="100"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 16:57:50.0"/>
+ <column name="updated_at" valueDate="2016-04-24 16:57:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="101"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 17:01:35.0"/>
+ <column name="updated_at" valueDate="2016-04-24 17:01:35.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="102"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 17:01:37.0"/>
+ <column name="updated_at" valueDate="2016-04-24 17:01:37.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="103"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 17:04:43.0"/>
+ <column name="updated_at" valueDate="2016-04-24 17:04:43.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="104"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 17:04:54.0"/>
+ <column name="updated_at" valueDate="2016-04-24 17:04:54.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="105"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 17:42:48.0"/>
+ <column name="updated_at" valueDate="2016-04-24 17:42:48.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="106"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 17:42:50.0"/>
+ <column name="updated_at" valueDate="2016-04-24 17:42:50.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="107"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 17:43:04.0"/>
+ <column name="updated_at" valueDate="2016-04-24 17:43:04.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="108"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 17:43:06.0"/>
+ <column name="updated_at" valueDate="2016-04-24 17:43:06.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="109"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 17:47:20.0"/>
+ <column name="updated_at" valueDate="2016-04-24 17:47:20.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="110"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 17:47:22.0"/>
+ <column name="updated_at" valueDate="2016-04-24 17:47:22.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="111"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 17:47:29.0"/>
+ <column name="updated_at" valueDate="2016-04-24 17:47:29.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="112"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 17:47:31.0"/>
+ <column name="updated_at" valueDate="2016-04-24 17:47:31.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="113"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 17:50:01.0"/>
+ <column name="updated_at" valueDate="2016-04-24 17:50:01.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="114"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 17:50:03.0"/>
+ <column name="updated_at" valueDate="2016-04-24 17:50:03.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="115"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 17:50:09.0"/>
+ <column name="updated_at" valueDate="2016-04-24 17:50:09.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="116"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 17:50:13.0"/>
+ <column name="updated_at" valueDate="2016-04-24 17:50:13.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="117"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 18:16:26.0"/>
+ <column name="updated_at" valueDate="2016-04-24 18:16:26.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="118"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 18:16:26.0"/>
+ <column name="updated_at" valueDate="2016-04-24 18:16:26.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="119"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 18:16:26.0"/>
+ <column name="updated_at" valueDate="2016-04-24 18:16:26.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="120"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 18:16:26.0"/>
+ <column name="updated_at" valueDate="2016-04-24 18:16:26.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="121"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 18:16:26.0"/>
+ <column name="updated_at" valueDate="2016-04-24 18:16:26.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="122"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 18:16:26.0"/>
+ <column name="updated_at" valueDate="2016-04-24 18:16:26.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="123"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 18:16:26.0"/>
+ <column name="updated_at" valueDate="2016-04-24 18:16:26.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="124"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 18:16:26.0"/>
+ <column name="updated_at" valueDate="2016-04-24 18:16:26.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="125"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 18:16:38.0"/>
+ <column name="updated_at" valueDate="2016-04-24 18:16:38.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="126"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 18:16:41.0"/>
+ <column name="updated_at" valueDate="2016-04-24 18:16:41.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="127"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 18:16:46.0"/>
+ <column name="updated_at" valueDate="2016-04-24 18:16:46.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="128"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 18:16:47.0"/>
+ <column name="updated_at" valueDate="2016-04-24 18:16:47.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="129"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildOne.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 18:16:55.0"/>
+ <column name="updated_at" valueDate="2016-04-24 18:16:55.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="130"/>
+ <column name="company_id" valueNumeric="3"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildTwo.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 18:21:48.0"/>
+ <column name="updated_at" valueDate="2016-04-24 18:21:48.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="131"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildThree.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 18:22:17.0"/>
+ <column name="updated_at" valueDate="2016-04-24 18:22:17.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="132"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="200"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bildFour.jpg"/>
+ <column name="created_at" valueDate="2016-04-24 18:22:19.0"/>
+ <column name="updated_at" valueDate="2016-04-24 18:22:19.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="133"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="134"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="135"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="136"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="137"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="138"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="140"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="141"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="142"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="143"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="144"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="145"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="146"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="147"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="148"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="149"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="150"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="151"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="152"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="153"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="154"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2014-12-17 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-12-17 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="155"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="156"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="157"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="158"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="159"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="160"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="161"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="162"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="163"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="164"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="165"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="166"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="167"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="168"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="169"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="170"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="171"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="172"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="173"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="174"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="175"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="176"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="177"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="178"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="179"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="180"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="181"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="182"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="191"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="192"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="193"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="194"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="195"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="197"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="198"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="199"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="200"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="201"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="202"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="203"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="204"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="205"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="206"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="207"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="208"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="209"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="210"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="211"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="212"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="213"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="214"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-10 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-10 23:27:36.0"/>
+ </insert>
+ <insert tableName="ad">
+ <column name="id" valueNumeric="215"/>
+ <column name="company_id" valueNumeric="2"/>
+ <column name="company_categ_id" valueNumeric="40"/>
+ <column name="ad_gps"/>
+ <column name="ad_mobile_image" value="bild.jpg"/>
+ <column name="created_at" valueDate="2016-07-10 23:27:36.0"/>
+ <column name="updated_at" valueDate="2014-07-10 23:27:36.0"/>
+ </insert>
+ </changeSet>
+ <changeSet author="gustavo (generated)" id="1468267830107-2">
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="6"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="7"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="8"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="9"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="10"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="11"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="12"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="13"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="14"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="15"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="16"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id" valueNumeric="207"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="17"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id" valueNumeric="208"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="18"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id" valueNumeric="209"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="19"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id" valueNumeric="210"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="20"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id" valueNumeric="211"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="21"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id" valueNumeric="212"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="22"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id" valueNumeric="213"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="23"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id" valueNumeric="214"/>
+ <column name="ad_name" value="zapatillas"/>
+ <column name="ad_description" value="anuncio sobre zapatillas"/>
+ <column name="ad_mobile_text" value="zapatillas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="24"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id" valueNumeric="214"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="25"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id" valueNumeric="215"/>
+ <column name="ad_name" value="zapatillas"/>
+ <column name="ad_description" value="anuncio sobre zapatillas"/>
+ <column name="ad_mobile_text" value="zapatillas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ <insert tableName="ad_description">
+ <column name="id" valueNumeric="26"/>
+ <column name="laguage_id" valueNumeric="20"/>
+ <column name="ad_id" valueNumeric="215"/>
+ <column name="ad_name" value="babuchas"/>
+ <column name="ad_description" value="anuncio sobre babuchas"/>
+ <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
+ <column name="ad_link" value="http://gumartinm.name"/>
+ </insert>
+ </changeSet>
+</databaseChangeLog>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context.xsd">
+
+ <bean id="commonsLiquibase" class="liquibase.integration.spring.SpringLiquibase">
+ <property name="dataSource" ref="dataSource" />
+ <property name="changeLog" value="classpath:/spring-configuration/liquibase/changeLogs.xml" />
+ <property name="defaultSchema" value="mybatis_example" />
+ </bean>
+
+
+</beans>
\ No newline at end of file
--- /dev/null
+package de.spring.persistence.example.domain;
+
+public class AdTest {
+
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>\r
+<beans xmlns="http://www.springframework.org/schema/beans"\r
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
+ xmlns:util="http://www.springframework.org/schema/util"\r
+ xmlns:tx="http://www.springframework.org/schema/tx"\r
+ xmlns:jee="http://www.springframework.org/schema/jee"\r
+ xsi:schemaLocation="http://www.springframework.org/schema/beans\r
+ http://www.springframework.org/schema/beans/spring-beans.xsd\r
+ http://www.springframework.org/schema/util\r
+ http://www.springframework.org/schema/util/spring-util.xsd\r
+ http://www.springframework.org/schema/tx \r
+ http://www.springframework.org/schema/tx/spring-tx.xsd\r
+ http://www.springframework.org/schema/jee\r
+ http://www.springframework.org/schema/jee/spring-jee.xsd">\r
+\r
+ \r
+ <!-- \r
+ <jdbc:embedded-database id="dataSource" type="H2" />\r
+ -->\r
+ <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">\r
+ <property name="driverClassName" value="org.h2.Driver" />\r
+ <property name="url" value="jdbc:h2:mem:mybatis_example;INIT=create schema if not exists mybatis_example\;SET SCHEMA mybatis_example;MODE=DB2;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE" />\r
+ <property name="username" value="mybatis" />\r
+ <property name="password" value="" />\r
+ </bean>\r
+ \r
+</beans>\r
--- /dev/null
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+
+ <parent>
+ <groupId>de.spring.jpa</groupId>
+ <artifactId>spring-jpa-bom</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>spring-jpa-resources</artifactId>
+ <packaging>war</packaging>
+ <name>SPRING JPA RESOURCES</name>
+ <url>https://gumartinm.name/</url>
+ <description>JPA Spring Framework. Resources.</description>
+
+
+ <dependencies>
+ <dependency>
+ <groupId>de.spring.jpa</groupId>
+ <artifactId>spring-jpa-services</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+
+ <!-- REST API -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-webmvc</artifactId>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-oxm</artifactId>
+ </dependency>
+
+ <!-- Required by spring-webmvc -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>javax.servlet-api</artifactId>
+ <scope>provided</scope>
+ </dependency>
+
+
+
+
+ <!--
+ Jackson JSON Processor, required by spring-webmvc. See messageConverters
+ in rest-config.xml
+
+ Non required dependency. It is already declared in jackson-datatype-jsr310
+ <dependency>
+ <groupId>com.fasterxml.jackson.core</groupId>
+ <artifactId>jackson-databind</artifactId>
+ <version>2.6.4</version>
+ </dependency>
+ -->
+ <!--
+ Jackson dependency required for serializing and deserializing LocalDateTime,
+ LocalDate, etc, etc objects.
+ -->
+ <dependency>
+ <groupId>com.fasterxml.jackson.datatype</groupId>
+ <artifactId>jackson-datatype-jsr310</artifactId>
+ </dependency>
+
+ <!-- Unitary and integration tests -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+
+</project>
--- /dev/null
+package de.spring.example.rest.controllers;
+
+import javax.inject.Inject;
+
+import org.resthub.web.controller.RepositoryBasedRestController;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import de.spring.example.persistence.domain.Ad;
+import de.spring.example.persistence.repository.AdRepository;
+
+@RestController
+@RequestMapping("/ads/")
+public class AdController extends RepositoryBasedRestController<Ad, Long, AdRepository> {
+
+ @Override
+ @Inject
+ public void setRepository(AdRepository repository) {
+ this.repository = repository;
+ }
+
+ // I do not have to do anything here because all I need is implemented by RepositoryBasedRestController :)
+
+ // @Transactional is implemented by org.springframework.data.jpa.repository.support.SimpleJpaRepository
+ // By default, SimpleJpaRepository will be automatically implemented by my
+ // Spring JPA repositories: AdRepository and AdDescriptionRepository.
+}
--- /dev/null
+package de.spring.example.rest.controllers;
+
+import javax.inject.Inject;
+
+import org.resthub.web.controller.ServiceBasedRestController;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import de.spring.example.persistence.domain.AdDescription;
+import de.spring.example.services.AdDescriptionService;
+
+@RestController
+@RequestMapping("/ad-descriptions/")
+public class AdDescriptionController extends ServiceBasedRestController<AdDescription, Long, AdDescriptionService> {
+
+ @Override
+ @Inject
+ public void setService(AdDescriptionService adDescriptionService) {
+ this.service = adDescriptionService;
+ }
+
+ // I do not have to do anything here because all I need is implemented by ServiceBasedRestController :)
+}
--- /dev/null
+package de.spring.example.rest.handler;
+
+import javax.inject.Inject;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+
+import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
+
+import de.spring.example.context.UsernameThreadContext;
+
+public class UsernameHandler extends HandlerInterceptorAdapter {
+ private final UsernameThreadContext usernameThreadContext;
+
+ @Inject
+ public UsernameHandler(UsernameThreadContext userNameThreadContext) {
+ this.usernameThreadContext = userNameThreadContext;
+ }
+
+ @Override
+ public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
+ throws Exception {
+ final String userName = request.getHeader(UsernameThreadContext.USERNAME_HEADER);
+
+ if (userName != null) {
+ usernameThreadContext.setUsername(userName);
+ } else {
+ usernameThreadContext.clearUsername();
+ }
+
+ return super.preHandle(request, response, handler);
+ }
+}
--- /dev/null
+package org.resthub.common.exception;
+
+/**
+ * Exception thrown when not result was found (for example findById with null return value)
+ */
+public class NotFoundException extends RuntimeException {
+
+ public NotFoundException() {
+ super();
+ }
+
+ public NotFoundException(final String message, final Throwable cause) {
+ super(message, cause);
+ }
+
+ public NotFoundException(final String message) {
+ super(message);
+ }
+
+ public NotFoundException(final Throwable cause) {
+ super(cause);
+ }
+
+}
--- /dev/null
+package org.resthub.web.controller;
+
+import org.resthub.common.exception.NotFoundException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Sort;
+import org.springframework.data.repository.PagingAndSortingRepository;
+import org.springframework.util.Assert;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+import java.io.Serializable;
+import java.util.Set;
+
+/**
+ * Abstract REST controller using a repository implementation
+ * <p/>
+ * <p>
+ * You should extend this class when you want to use a 2 layers pattern : Repository and Controller. This is the default
+ * controller implementation to use if you have no service (also called business) layer. You will be able to transform
+ * it to a ServiceBasedRestController later easily if needed.
+ * </p>
+ *
+ * <p>Default implementation uses "id" field (usually a Long) in order to identify resources in web request.
+ * If your want to identity resources by a slug (human readable identifier), your should override findById() method with for example :
+ *
+ * <pre>
+ * <code>
+ {@literal @}Override
+ public Sample findById({@literal @}PathVariable String id) {
+ Sample sample = this.repository.findByName(id);
+ if (sample == null) {
+ throw new NotFoundException();
+ }
+ return sample;
+ }
+ </code>
+ * </pre>
+ *
+ *
+ * @param <T> Your resource class to manage, maybe an entity or DTO class
+ * @param <ID> Resource id type, usually Long or String
+ * @param <R> The repository class
+ * @see ServiceBasedRestController
+ */
+public abstract class RepositoryBasedRestController<T, ID extends Serializable, R extends PagingAndSortingRepository>
+ implements RestController<T, ID> {
+
+ protected R repository;
+
+ protected Logger logger = LoggerFactory.getLogger(RepositoryBasedRestController.class);
+
+ /**
+ * You should override this setter in order to inject your repository with @Inject annotation
+ *
+ * @param repository The repository to be injected
+ */
+ public void setRepository(R repository) {
+ this.repository = repository;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public T create(@RequestBody T resource) {
+ return (T)this.repository.save(resource);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public T update(@PathVariable ID id, @RequestBody T resource) {
+ Assert.notNull(id, "id cannot be null");
+
+ T retrievedResource = this.findById(id);
+ if (retrievedResource == null) {
+ throw new NotFoundException();
+ }
+
+ return (T)this.repository.save(resource);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Iterable<T> findAll() {
+ return repository.findAll();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Page<T> findPaginated(@RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
+ @RequestParam(value = "size", required = false, defaultValue = "10") Integer size,
+ @RequestParam(value = "direction", required = false, defaultValue = "") String direction,
+ @RequestParam(value = "properties", required = false) String properties) {
+ Assert.isTrue(page > 0, "Page index must be greater than 0");
+ Assert.isTrue(direction.isEmpty() || direction.equalsIgnoreCase(Sort.Direction.ASC.toString()) || direction.equalsIgnoreCase(Sort.Direction.DESC.toString()), "Direction should be ASC or DESC");
+ if(direction.isEmpty()) {
+ return this.repository.findAll(new PageRequest(page - 1, size));
+ } else {
+ Assert.notNull(properties);
+ return this.repository.findAll(new PageRequest(page - 1, size, new Sort(Sort.Direction.fromString(direction.toUpperCase()), properties.split(","))));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public T findById(@PathVariable ID id) {
+ T entity = (T)this.repository.findOne(id);
+ if (entity == null) {
+ throw new NotFoundException();
+ }
+
+ return entity;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Iterable<T> findByIds(@RequestParam(value="ids[]") Set<ID> ids){
+ Assert.notNull(ids, "ids list cannot be null");
+ return this.repository.findAll(ids);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void delete() {
+ Iterable<T> list = repository.findAll();
+ for (T entity : list) {
+ repository.delete(entity);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void delete(@PathVariable ID id) {
+ T resource = this.findById(id);
+ this.repository.delete(resource);
+ }
+
+}
--- /dev/null
+package org.resthub.web.controller;
+
+import org.resthub.common.exception.NotFoundException;
+import org.springframework.data.domain.Page;
+import org.springframework.http.HttpStatus;
+import org.springframework.web.bind.annotation.*;
+
+import java.io.Serializable;
+import java.util.Set;
+
+/**
+ * REST controller interface
+ *
+ * @param <T> Your resource POJO to manage, maybe an entity or DTO class
+ * @param <ID> Primary resource identifier at webservice level, usually Long or String
+ */
+public interface RestController<T, ID extends Serializable> {
+
+ /**
+ * Create a new resource<br />
+ * REST webservice published : POST /
+ *
+ * @param resource The resource to create
+ * @return CREATED http status code if the request has been correctly processed, with updated resource enclosed in the body, usually with and additional identifier automatically created by the database
+ */
+ @RequestMapping(method = RequestMethod.POST)
+ @ResponseStatus(HttpStatus.CREATED)
+ @ResponseBody
+ T create(@RequestBody T resource);
+
+ /**
+ * Update an existing resource<br/>
+ * REST webservice published : PUT /{id}
+ *
+ * @param id The identifier of the resource to update, usually a Long or String identifier. It is explicitely provided in order to handle cases where the identifier could be changed.
+ * @param resource The resource to update
+ * @return OK http status code if the request has been correctly processed, with the updated resource enclosed in the body
+ * @throws NotFoundException
+ */
+ @RequestMapping(value = "{id}", method = RequestMethod.PUT)
+ @ResponseBody
+ T update(@PathVariable ID id, @RequestBody T resource);
+
+ /**
+ * Find all resources, and return the full collection (plain list not paginated)<br/>
+ * REST webservice published : GET /?page=no
+ *
+ * @return OK http status code if the request has been correctly processed, with the list of all resource enclosed in the body.
+ * Be careful, this list should be big since it will return ALL resources. In this case, consider using paginated findAll method instead.
+ */
+ @RequestMapping(method = RequestMethod.GET, params = "page=no")
+ @ResponseBody
+ Iterable<T> findAll();
+
+ /**
+ * Find all resources, and return a paginated and optionaly sorted collection<br/>
+ * REST webservice published : GET /search?page=0&size=20 or GET /search?page=0&size=20&direction=desc&properties=name
+ *
+ * @param page Page number starting from 0. default to 0
+ * @param size Number of resources by pages. default to 10
+ * @param direction Optional sort direction, could be "asc" or "desc"
+ * @param properties Ordered list of comma separeted properies used for sorting resulats. At least one property should be provided if direction is specified
+ * @return OK http status code if the request has been correctly processed, with the a paginated collection of all resource enclosed in the body.
+ */
+ @RequestMapping(method = RequestMethod.GET)
+ @ResponseBody
+ Page<T> findPaginated(@RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
+ @RequestParam(value = "size", required = false, defaultValue = "10") Integer size,
+ @RequestParam(value = "direction", required = false, defaultValue = "ASC") String direction,
+ @RequestParam(value = "properties", required = false) String properties);
+
+ /**
+ * Find a resource by its identifier<br/>
+ * REST webservice published : GET /{id}
+ *
+ * @param id The identifier of the resouce to find
+ * @return OK http status code if the request has been correctly processed, with resource found enclosed in the body
+ * @throws NotFoundException
+ */
+ @RequestMapping(value = "{id}", method = RequestMethod.GET)
+ @ResponseBody
+ T findById(@PathVariable ID id);
+
+ /**
+ * Find multiple resources by their identifiers<br/>
+ * REST webservice published : GET /?ids[]=
+ * <p/>
+ * example : /?ids[]=1&ids[]=2&ids[]=3
+ *
+ * @param ids List of ids to retrieve
+ * @return OK http status code with list of retrieved resources. Not found resources are ignored:
+ * no Exception thrown. List is empty if no resource found with any of the given ids.
+ */
+ @RequestMapping(method = RequestMethod.GET, params = "ids[]")
+ @ResponseBody
+ Iterable<T> findByIds(@RequestParam(value = "ids[]") Set<ID> ids);
+
+ /**
+ * Delete all resources<br/>
+ * REST webservice published : DELETE /<br/>
+ * Return No Content http status code if the request has been correctly processed
+ */
+ @RequestMapping(method = RequestMethod.DELETE)
+ @ResponseStatus(HttpStatus.NO_CONTENT)
+ void delete();
+
+ /**
+ * Delete a resource by its identifier<br />
+ * REST webservice published : DELETE /{id}<br />
+ * Return No Content http status code if the request has been correctly processed
+ *
+ * @param id The identifier of the resource to delete
+ * @throws NotFoundException
+ */
+ @RequestMapping(value = "{id}", method = RequestMethod.DELETE)
+ @ResponseStatus(HttpStatus.NO_CONTENT)
+ void delete(@PathVariable ID id);
+
+}
--- /dev/null
+package org.resthub.web.controller;
+
+import java.io.Serializable;
+import java.util.Set;
+
+import org.resthub.common.exception.NotFoundException;
+import org.resthub.common.service.CrudService;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.PageRequest;
+import org.springframework.data.domain.Sort;
+import org.springframework.util.Assert;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestParam;
+
+/**
+ * Abstract REST controller using a service implementation
+ * <p/>
+ * <p>You should extend this class when you want to use a 3 layers pattern : Repository, Service and Controller
+ * If you don't have a real service (also called business layer), consider using RepositoryBasedRestController</p>
+ * <p/>
+ * <p>Default implementation uses "id" field (usually a Long) in order to identify resources in web request.
+ * If your want to identity resources by a slug (human readable identifier), your should override findById() method with for example :
+ * <p/>
+ * <pre>
+ * <code>
+ * {@literal @}Override
+ * public Sample findById({@literal @}PathVariable String id) {
+ * Sample sample = this.service.findByName(id);
+ * if (sample == null) {
+ * throw new NotFoundException();
+ * }
+ * return sample;
+ * }
+ * </code>
+ * </pre>
+ *
+ * @param <T> Your resource class to manage, maybe an entity or DTO class
+ * @param <ID> Resource id type, usually Long or String
+ * @param <S> The service class
+ * @see RepositoryBasedRestController
+ */
+public abstract class ServiceBasedRestController<T, ID extends Serializable, S extends CrudService> implements
+ RestController<T, ID> {
+
+ protected S service;
+
+ /**
+ * You should override this setter in order to inject your service with @Inject annotation
+ *
+ * @param service The service to be injected
+ */
+ public void setService(S service) {
+ this.service = service;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public T create(@RequestBody T resource) {
+ return (T) this.service.create(resource);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public T update(@PathVariable ID id, @RequestBody T resource) {
+ Assert.notNull(id, "id cannot be null");
+
+ T retreivedResource = this.findById(id);
+ if (retreivedResource == null) {
+ throw new NotFoundException();
+ }
+
+ return (T) this.service.update(resource);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Iterable<T> findAll() {
+ return service.findAll();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Page<T> findPaginated(@RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
+ @RequestParam(value = "size", required = false, defaultValue = "10") Integer size,
+ @RequestParam(value = "direction", required = false, defaultValue = "") String direction,
+ @RequestParam(value = "properties", required = false) String properties) {
+ Assert.isTrue(page > 0, "Page index must be greater than 0");
+ Assert.isTrue(direction.isEmpty() || direction.equalsIgnoreCase(Sort.Direction.ASC.toString()) || direction.equalsIgnoreCase(Sort.Direction.DESC.toString()), "Direction should be ASC or DESC");
+ if (direction.isEmpty()) {
+ return this.service.findAll(new PageRequest(page - 1, size));
+ } else {
+ Assert.notNull(properties);
+ return this.service.findAll(new PageRequest(page - 1, size, new Sort(Sort.Direction.fromString(direction.toUpperCase()), properties.split(","))));
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public T findById(@PathVariable ID id) {
+ T resource = (T) this.service.findById(id);
+ if (resource == null) {
+ throw new NotFoundException();
+ }
+
+ return resource;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Iterable<T> findByIds(@RequestParam(value = "ids[]") Set<ID> ids) {
+ Assert.notNull(ids, "ids list cannot be null");
+ return this.service.findByIds(ids);
+ }
+
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void delete() {
+ this.service.deleteAllWithCascade();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void delete(@PathVariable ID id) {
+ T resource = this.findById(id);
+ this.service.delete(resource);
+ }
+}
+
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+
+<!--
+ status: The level of internal Log4j events that should be logged to the console.
+ Valid values for this attribute are "trace", "debug", "info", "warn", "error" and "fatal".
+
+ monitorInterval: The minimum amount of time, in seconds, that must elapse before the file configuration is checked for changes.
+
+
+ see https://logging.apache.org/log4j/2.x/manual/configuration.html
+ -->
+<Configuration status="error" strict="true" monitorInterval="30"
+ name="XMLConfigTest" packages="org.apache.logging.log4j.test">
+
+ <!--
+ ALL > TRACE > DEBUG > INFO > WARN > ERROR > OFF
+
+ ERROR by default.
+ -->
+
+ <Appenders>
+ <Appender type="Console" name="STDOUT">
+ <PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %class{36} %L %M - %msg%xEx%n"/>
+ </Appender>
+ </Appenders>
+ <Loggers>
+
+
+ <!--
+ General logging Spring.
+ -->
+ <Logger name="org.springframework" level="INFO" additivity="false">
+ <AppenderRef ref="STDOUT" />
+ </Logger>
+
+ <!--
+ How to log Hibernate QUERIES by means of LOG4J/SLF4J:
+
+ See: org.hibernate.engine.jdbc.spi.SqlStatementLogger
+
+ 1. With hibernate.show_sql=false we stop Hibernate logging to STDOUT.
+ 2. DEBUG level (see SqlStatementLogger) is the only way of logging QUERIES using LOG4J.
+ SqlStatementLogger uses log.DEBUG and no other level :(
+ 3. JVM requires the following system property: -Dorg.jboss.logging.provider=slf4j for using LOG4J.
+ -->
+ <Logger name="org.hibernate.SQL" level="DEBUG" additivity="false">
+ <AppenderRef ref="STDOUT" />
+ </Logger>
+
+ <!--
+ Anything else will be using TRACE logging level.
+ -->
+ <Root level="INFO">
+ <AppenderRef ref="STDOUT"/>
+ </Root>
+
+ </Loggers>
+</Configuration>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context.xsd">
+
+</beans>
\ No newline at end of file
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:mvc="http://www.springframework.org/schema/mvc"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xmlns:util="http://www.springframework.org/schema/util"
+ xmlns:p="http://www.springframework.org/schema/p"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/mvc
+ http://www.springframework.org/schema/mvc/spring-mvc.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context.xsd
+ http://www.springframework.org/schema/util
+ http://www.springframework.org/schema/util/spring-util.xsd">
+
+ <!--
+ I am declaring my beans without the automatic annotation. :/
+ Better because we are saving memory but it requires more configuration.
+
+ See: org.springframework.web.servlet.config.AnnotationDrivenBeanDefinitionParser
+ <mvc:annotation-driven/>
+ -->
+
+
+ <context:annotation-config />
+
+ <context:component-scan base-package="de.spring.example.rest, org.resthub"/>
+
+ <!--
+ Required beans for generating XML responses from Java objects using JAXB annotations
+ Jackson also works but it doesn't generate XML with namespaces... O.o
+
+ This implementation will be slower than the one using Jackson :( but I am going to use it just for WADL generation :)
+ -->
+ <bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
+ <property name="packagesToScan" value="org.jvnet.ws.wadl"/>
+ </bean>
+ <bean id="jaxbConverter" class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter">
+ <constructor-arg ref="jaxbMarshaller" />
+ </bean>
+
+ <!-- Required beans for generating JSON responses from Java objects -->
+ <bean id="jsonObjectMapperFactory" class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"
+ p:indentOutput="true" p:failOnEmptyBeans="false">
+ <property name="featuresToDisable">
+ <array>
+ <util:constant static-field="com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES"/>
+
+ <!-- Useful when using Java 8 objects like OffsetDateTime.
+ I want to keep the offset in time zone if it exists.
+
+ LIKE THIS ONE: 2014-07-03 23:27:36+0100
+ -->
+ <util:constant static-field="com.fasterxml.jackson.databind.DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE"/>
+
+ <util:constant static-field="com.fasterxml.jackson.databind.MapperFeature.DEFAULT_VIEW_INCLUSION"/>
+ </array>
+ </property>
+ </bean>
+
+ <util:list id="messageConverters">
+ <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" p:objectMapper-ref="jsonObjectMapperFactory"/>
+ <ref bean="jaxbConverter" />
+ <bean class="org.springframework.http.converter.StringHttpMessageConverter" />
+ </util:list>
+
+
+ <bean name="handlerAdapter"
+ class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">
+ <property name="webBindingInitializer">
+ <bean
+ class="org.springframework.web.bind.support.ConfigurableWebBindingInitializer">
+ <!-- It enables us to use JSR-303 -->
+ <property name="validator">
+ <bean class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>
+ </property>
+ </bean>
+ </property>
+ <property name="messageConverters" ref="messageConverters" />
+
+
+ <property name="requestBodyAdvice">
+ <util:list>
+ <bean id="requestBodyAdvice" class="org.springframework.web.servlet.mvc.method.annotation.JsonViewRequestBodyAdvice"/>
+ </util:list>
+ </property>
+
+
+ <property name="responseBodyAdvice">
+ <util:list>
+ <bean id="responseBodyAdvice" class="org.springframework.web.servlet.mvc.method.annotation.JsonViewResponseBodyAdvice"/>
+ </util:list>
+ </property>
+ </bean>
+
+ <bean id="handlerMapping" class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping"/>
+
+ <mvc:default-servlet-handler />
+
+</beans>
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+ version="2.4">
+
+ <display-name>Spring JPA: example JPA</display-name>
+
+ <listener>
+ <listener-class>
+ org.springframework.web.context.ContextLoaderListener
+ </listener-class>
+ </listener>
+
+ <context-param>
+ <param-name>spring.profiles.default</param-name>
+ <param-value>${environment.profile}</param-value>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>
+ classpath*:spring-configuration/*.xml
+ </param-value>
+ </context-param>
+
+ <!-- Spring REST support -->
+ <servlet>
+ <servlet-name>spring-rest</servlet-name>
+ <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ <async-supported>true</async-supported>
+ <init-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>classpath*:spring-configuration/mvc/rest/*.xml</param-value>
+ </init-param>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>spring-rest</servlet-name>
+ <!-- REQUIRED PATTERN BY swagger-ui. IT DOESN'T WORK WITH ANY OTHER o.O -->
+ <url-pattern>/*</url-pattern>
+ </servlet-mapping>
+
+
+ <!--
+ Se serializan objetos Entity al vuelo.
+
+ 1. JACKSON irá accediendo a todas las propiedades de un objeto Entity.
+ 2. Según vaya accediendo se irán haciendo queries a base de datos. NO ANTES porque se hace en
+ modo lazy, lo que quiere decir que tenemos el objeto Entity pero sus datos (lo que se obtiene
+ después de hacer las queries) están vacíos. Hasta que no se accede a una propiedad determinada
+ del objeto Entity no se hará realmente la query en base de datos.
+ -->
+ <filter>
+ <filter-name>OpenEntityManagerInViewFilter</filter-name>
+ <filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>OpenEntityManagerInViewFilter</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+
+</web-app>
--- /dev/null
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>de.spring.jpa</groupId>
+ <artifactId>spring-jpa-bom</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>spring-jpa-services</artifactId>
+ <name>SPRING JPA SERVICES</name>
+ <url>https://gumartinm.name/</url>
+ <description>JPA Spring Framework. Services.</description>
+
+
+ <dependencies>
+ <dependency>
+ <groupId>de.spring.jpa</groupId>
+ <artifactId>spring-jpa-persistence</artifactId>
+ <version>1.0-SNAPSHOT</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ </dependency>
+
+ <!-- Unitary and integration tests -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
--- /dev/null
+package de.spring.example.services;
+
+import org.resthub.common.service.CrudService;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+
+import de.spring.example.persistence.domain.AdDescription;
+
+public interface AdDescriptionService extends CrudService<AdDescription, Long> {
+
+ public Page<AdDescription> queryDslExample(Pageable pageRequest);
+}
--- /dev/null
+package de.spring.example.services;
+
+import org.resthub.common.service.CrudService;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+
+import de.spring.example.persistence.domain.Ad;
+
+public interface AdService extends CrudService<Ad, Long> {
+
+ public Page<Ad> queryCriteriaExample(Pageable pageRequest);
+}
--- /dev/null
+package de.spring.example.services.impl;
+
+import javax.inject.Inject;
+import javax.inject.Named;
+
+import org.resthub.common.service.CrudServiceImpl;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+
+import com.querydsl.core.types.dsl.BooleanExpression;
+
+import de.spring.example.persistence.domain.AdDescription;
+import de.spring.example.persistence.domain.QAdDescription;
+import de.spring.example.persistence.repository.AdDescriptionRepository;
+import de.spring.example.services.AdDescriptionService;
+
+@Named("adDescriptionService")
+public class AdDescriptionServiceImpl
+ extends CrudServiceImpl<AdDescription, Long, AdDescriptionRepository>
+ implements AdDescriptionService {
+
+ @Override
+ @Inject
+ public void setRepository(AdDescriptionRepository repository) {
+ this.repository = repository;
+ }
+
+ // Extending CrudServiceImpl when we need some business logic. Otherwise we would be using
+ // the JPA repositories and nothing else :)
+
+ // In this case there is any business logic, but this is just an example.
+
+
+ /**
+ * Using Querydsl. Giving some business logic to this service :)
+ *
+ * Querydsl: fluent interface done easy. There is no effort because it is already implemented.
+ *
+ * Criteria using Specifications requires some effort.
+ *
+ * See: de.spring.example.services.impl.AdServiceImpl
+ */
+ @Override
+ public Page<AdDescription> queryDslExample(Pageable pageRequest) {
+ final QAdDescription adDescription = QAdDescription.adDescription1;
+ final BooleanExpression adDescriptionHasAdLink = adDescription.adLink.contains("gumartinm");
+ final BooleanExpression adDescriptionHasDescription = adDescription.adDescription.contains("babucha");
+
+ return repository.findAll(adDescriptionHasAdLink.and(adDescriptionHasDescription), pageRequest);
+ }
+}
--- /dev/null
+package de.spring.example.services.impl;
+
+import static org.springframework.data.jpa.domain.Specifications.where;
+
+import javax.inject.Inject;
+
+import org.resthub.common.service.CrudServiceImpl;
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+
+import de.spring.example.persistence.domain.Ad;
+import de.spring.example.persistence.domain.specifications.AdSpectifications;
+import de.spring.example.persistence.repository.AdRepository;
+import de.spring.example.services.AdService;
+
+public class AdServiceImpl
+ extends CrudServiceImpl<Ad, Long, AdRepository>
+ implements AdService {
+
+ @Override
+ @Inject
+ public void setRepository(AdRepository repository) {
+ this.repository = repository;
+ }
+
+ /**
+ * Criteria using Specifications.
+ *
+ * It is more complicated than when using Querydsl because I have to implement the
+ * Specifications. Querydsl is doing everything for me.
+ *
+ * See: de.spring.example.services.impl.AdDescriptionServiceImpl
+ */
+ @Override
+ public Page<Ad> queryCriteriaExample(Pageable pageRequest) {
+ return repository.findAll(
+ where(AdSpectifications.createdToday()).and(AdSpectifications.mobileImage("picasso")),
+ pageRequest);
+ }
+
+}
--- /dev/null
+package org.resthub.common.service;
+
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+
+import java.io.Serializable;
+import java.util.Set;
+
+/**
+ * CRUD Service interface.
+ *
+ * @param <T> Your resource POJO to manage, maybe an entity or DTO class
+ * @param <ID> Resource id type, usually Long or String
+ */
+public interface CrudService<T, ID extends Serializable> {
+
+ /**
+ * Create new resource.
+ *
+ * @param resource Resource to create
+ * @return new resource
+ */
+ T create(T resource);
+
+ /**
+ * Update existing resource.
+ *
+ * @param resource Resource to update
+ * @return resource updated
+ */
+ T update(T resource);
+
+ /**
+ * Delete existing resource.
+ *
+ * @param resource Resource to delete
+ */
+ void delete(T resource);
+
+ /**
+ * Delete existing resource.
+ *
+ * @param id Resource id
+ */
+ void delete(ID id);
+
+ /**
+ * Delete all existing resource. Do not use cascade remove (not a choice -> JPA specs)
+ */
+ void deleteAll();
+
+ /**
+ * Delete all existing resource, including linked entities with cascade delete
+ */
+ void deleteAllWithCascade();
+
+ /**
+ * Find resource by id.
+ *
+ * @param id Resource id
+ * @return resource
+ */
+ T findById(ID id);
+
+ /**
+ * Find resources by their ids.
+ *
+ * @param ids Resource ids
+ * @return a list of retrieved resources, empty if no resource found
+ */
+ Iterable<T> findByIds(Set<ID> ids);
+
+ /**
+ * Find all resources.
+ *
+ * @return a list of all resources.
+ */
+ Iterable<T> findAll();
+
+ /**
+ * Find all resources (pageable).
+ *
+ * @param pageRequest page request
+ * @return resources
+ */
+ Page<T> findAll(Pageable pageRequest);
+
+ /**
+ * Count all resources.
+ *
+ * @return number of resources
+ */
+ Long count();
+}
--- /dev/null
+package org.resthub.common.service;
+
+import org.springframework.data.domain.Page;
+import org.springframework.data.domain.Pageable;
+import org.springframework.data.repository.PagingAndSortingRepository;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.Assert;
+
+import java.io.Serializable;
+import java.util.Set;
+
+/**
+ * CRUD service that uses a {@link org.springframework.data.repository.PagingAndSortingRepository} Spring Data repository implementation
+ *
+ * You should extend it and inject your Repository bean by overriding {@link #setRepository(org.springframework.data.repository.PagingAndSortingRepository)}
+ *
+ * @param <T> Your resource class to manage, usually an entity class
+ * @param <ID> Resource id type, usually Long or String
+ * @param <R> The repository class
+ */
+@Transactional(readOnly = true)
+public class CrudServiceImpl<T, ID extends Serializable, R extends PagingAndSortingRepository<T, ID>> implements
+ CrudService<T, ID> {
+
+ protected R repository;
+
+ /**
+ * @param repository the repository to set
+ */
+ public void setRepository(R repository) {
+ this.repository = repository;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ @Transactional
+ public T create(T resource) {
+ Assert.notNull(resource, "Resource can't be null");
+ return repository.save(resource);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ @Transactional
+ public T update(T resource) {
+ Assert.notNull(resource, "Resource can't be null");
+ return repository.save(resource);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ @Transactional
+ public void delete(T resource) {
+ Assert.notNull(resource, "Resource can't be null");
+ repository.delete(resource);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ @Transactional
+ public void delete(ID id) {
+ Assert.notNull(id, "Resource ID can't be null");
+ repository.delete(id);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ @Transactional
+ public void deleteAll() {
+ repository.deleteAll();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ @Transactional
+ public void deleteAllWithCascade() {
+ Iterable<T> list = repository.findAll();
+ for (T entity : list) {
+ repository.delete(entity);
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public T findById(ID id) {
+ Assert.notNull(id, "Resource ID can't be null");
+ return repository.findOne(id);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Iterable<T> findByIds(Set<ID> ids) {
+ Assert.notNull(ids, "Resource ids can't be null");
+ return repository.findAll(ids);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Iterable<T> findAll() {
+ return repository.findAll();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ @Transactional
+ public Page<T> findAll(Pageable pageRequest) {
+ Assert.notNull(pageRequest, "page request can't be null");
+ return repository.findAll(pageRequest);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Long count() {
+ return repository.count();
+ }
+}
--- /dev/null
+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns:context="http://www.springframework.org/schema/context"
+ xsi:schemaLocation="
+ http://www.springframework.org/schema/beans
+ http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/context
+ http://www.springframework.org/schema/context/spring-context.xsd">
+
+ <context:component-scan base-package="de.spring.example.services, org.resthub.common.service"/>
+
+</beans>
\ No newline at end of file
+++ /dev/null
-package de.spring.example.context;
-
-import javax.inject.Named;
-
-import org.springframework.util.Assert;
-
-@Named("userNameThreadContext")
-public class UsernameThreadContext {
- public static final String USERNAME_HEADER = "USERNAME";
-
- private final ThreadLocal<String> contextHolder = new ThreadLocal<>();
-
- public void setUsername(String username) {
- Assert.notNull(username);
-
- contextHolder.set(username);
- }
-
- public String getUsername() {
- return contextHolder.get();
- }
-
- public void clearUsername() {
- contextHolder.remove();
- }
-}
+++ /dev/null
-package de.spring.example.persistence.converters;
-
-import java.sql.Timestamp;
-import java.time.LocalDateTime;
-import java.time.OffsetDateTime;
-import java.time.ZoneId;
-import java.time.ZonedDateTime;
-
-import javax.persistence.AttributeConverter;
-import javax.persistence.Converter;
-
-@Converter(autoApply = true)
-public class OffsetDateTimeAttributeConverter implements AttributeConverter<OffsetDateTime, Timestamp> {
-
- @Override
- public Timestamp convertToDatabaseColumn(OffsetDateTime offsetDateTime) {
- Timestamp timestamp = null;
-
- if (offsetDateTime != null) {
- timestamp = Timestamp.valueOf(offsetDateTime.toLocalDateTime());
- }
-
- return timestamp;
- }
-
- @Override
- public OffsetDateTime convertToEntityAttribute(Timestamp sqlTimestamp) {
- OffsetDateTime offsetDateTime = null;
-
- if (sqlTimestamp != null) {
- final LocalDateTime localDateTime = sqlTimestamp.toLocalDateTime();
- final ZonedDateTime zonedDateTime = localDateTime.atZone(ZoneId.systemDefault());
- offsetDateTime = zonedDateTime.toOffsetDateTime();
- }
-
- return offsetDateTime;
- }
-
-}
+++ /dev/null
-package de.spring.example.persistence.domain;
-
-import java.io.Serializable;
-import java.time.OffsetDateTime;
-import java.util.Set;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Convert;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-//import javax.persistence.NamedNativeQueries;
-//import javax.persistence.NamedNativeQuery;
-//import javax.persistence.NamedQueries;
-//import javax.persistence.NamedQuery;
-import javax.persistence.OneToMany;
-import javax.persistence.Table;
-import javax.validation.constraints.Max;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-
-import org.hibernate.envers.Audited;
-
-import com.fasterxml.jackson.annotation.JsonFormat;
-import com.fasterxml.jackson.annotation.JsonIdentityInfo;
-import com.fasterxml.jackson.annotation.ObjectIdGenerators;
-
-import de.spring.example.persistence.converters.OffsetDateTimeAttributeConverter;
-
-@Entity
-@Audited(withModifiedFlag=true)
-@Table(name="ad", schema="mybatis_example")
-@JsonIdentityInfo(generator=ObjectIdGenerators.IntSequenceGenerator.class, property="jsonId")
-// 1. Named query is JPL. It is portable.
-// 2. Instead of annotating the domain class we should be using @Query annotation at the query method
-// because it should be cleaner :)
-// So you'd better use @Query.
-//http://docs.spring.io/spring-data/jpa/docs/current/reference/html/#jpa.query-methods.at-query
-//See: de.spring.persistence.example.repository.AdRepository
-//@NamedQueries(
-// {
-// @NamedQuery(
-// name="Ad.findByIdQuery",
-// query="select a from Ad a where a.id = :id)
-// }
-//
-//)
-// 1. Native query IS NOT JPL. It is not portable and it is written directly in the native language
-// of the store. We can use special features at the cost of portability.
-// 2. Instead of annotating the domain class we should be using @Query annotation at the query method
-// because it should be cleaner :)
-// So you'd better use @Query.
-// http://docs.spring.io/spring-data/jpa/docs/current/reference/html/#jpa.query-methods.at-query
-// See: de.spring.persistence.example.repository.AdRepository
-//@NamedNativeQueries(
-// {
-// @NamedNativeQuery(
-// name="Ad.findByIdNativeQuery",
-// query="SELECT * FROM ad WHERE ad.id = :id",
-// resultClass=Ad.class)
-// }
-//)
-public class Ad implements Serializable {
-
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="id", updatable=false, nullable=false)
- private Long id;
-
- @OneToMany(fetch=FetchType.LAZY, cascade = CascadeType.ALL)
- @JoinColumn(name = "ad_id", nullable = false)
- private Set<AdDescription> adDescriptions;
-
- @Max(60)
- @Column(name="company_id")
- private Long companyId;
-
- @Max(40)
- @Column(name="company_categ_id")
- private Long companyCategId;
-
- @Size(min=2, max=255)
- @Column(name="ad_mobile_image")
- private String adMobileImage;
-
- @NotNull
- @Convert(converter=OffsetDateTimeAttributeConverter.class)
- @Column(name="created_at", nullable=false)
- @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ssZ")
- private OffsetDateTime createdAt;
-
- @NotNull
- @Convert(converter=OffsetDateTimeAttributeConverter.class)
- @Column(name="updated_at", nullable = false)
- @JsonFormat(shape=JsonFormat.Shape.STRING, pattern="yyyy-MM-dd HH:mm:ssZ")
- private OffsetDateTime updatedAt;
-
- // It will be used by JPA when filling the property fields with data coming from data base.
- protected Ad() {
-
- }
-
- // It will be used by my code (for example by Unit Tests)
- public Ad(Long id, Set<AdDescription> adDescriptions, Long companyId, Long companyCategId, String adMobileImage,
- OffsetDateTime createdAt, OffsetDateTime updatedAt) {
- this.id = id;
- this.adDescriptions = adDescriptions;
- this.companyId = companyId;
- this.companyCategId = companyCategId;
- this.adMobileImage = adMobileImage;
- this.createdAt = createdAt;
- this.updatedAt = updatedAt;
- }
-
- /**
- * WARNING: JPA REQUIRES GETTERS!!!
- */
-
- public Long getId() {
- return id;
- }
-
- public Set<AdDescription> getAdDescriptions() {
- return adDescriptions;
- }
-
- public Long getCompanyId() {
- return companyId;
- }
-
- public Long getCompanyCategId() {
- return companyCategId;
- }
-
- public String getAdMobileImage() {
- return adMobileImage;
- }
-
- public OffsetDateTime getCreatedAt() {
- return createdAt;
- }
-
- public OffsetDateTime getUpdatedAt() {
- return updatedAt;
- }
-}
+++ /dev/null
-package de.spring.example.persistence.domain;
-
-import java.io.Serializable;
-
-import javax.persistence.CascadeType;
-import javax.persistence.Column;
-import javax.persistence.Entity;
-import javax.persistence.FetchType;
-import javax.persistence.GeneratedValue;
-import javax.persistence.GenerationType;
-import javax.persistence.Id;
-import javax.persistence.JoinColumn;
-import javax.persistence.ManyToOne;
-import javax.persistence.Table;
-import javax.validation.constraints.Max;
-import javax.validation.constraints.NotNull;
-import javax.validation.constraints.Size;
-
-import org.hibernate.envers.Audited;
-
-import com.fasterxml.jackson.annotation.JsonIdentityInfo;
-import com.fasterxml.jackson.annotation.ObjectIdGenerators;
-
-@Entity
-@Audited
-@Table(name="ad_description", schema="mybatis_example")
-@JsonIdentityInfo(generator=ObjectIdGenerators.IntSequenceGenerator.class, property="jsonId")
-public class AdDescription implements Serializable {
-
- @Id
- @GeneratedValue(strategy=GenerationType.IDENTITY)
- @Column(name="id", updatable=false, nullable=false)
- private Long id;
-
- @ManyToOne(fetch=FetchType.LAZY, cascade = CascadeType.ALL, optional=true)
- @JoinColumn(name="ad_id", nullable=false, updatable = false, insertable = false, referencedColumnName="id")
- private Ad ad;
-
- @NotNull
- @Max(60)
- @Column(name="laguage_id")
- private Long languageId;
-
- @NotNull
- @Size(min=2, max=255)
- @Column(name="ad_name")
- private String adName;
-
- @NotNull
- @Size(min=2, max=255)
- @Column(name="ad_description")
- private String adDescription;
-
- @NotNull
- @Size(min=2, max=500)
- @Column(name="ad_mobile_text")
- private String adMobileText;
-
- @NotNull
- @Size(min=2, max=3000)
- @Column(name="ad_link")
- private String adLink;
-
- // It will be used by JPA when filling the property fields with data coming from data base.
- protected AdDescription() {
-
- }
-
- // It will be used by my code (for example by Unit Tests)
- public AdDescription(Long id, Ad ad, Long languageId, String adName, String adDescription,
- String adMobileText, String adLink) {
- this.id = id;
- this.ad = ad;
- this.languageId = languageId;
- this.adName = adName;
- this.adDescription = adDescription;
- this.adMobileText = adMobileText;
- this.adLink = adLink;
- }
-
- /**
- * WARNING: JPA REQUIRES GETTERS!!!
- */
-
- public Long getId() {
- return id;
- }
-
- public Ad getAd() {
- return ad;
- }
-
- public Long getLanguageId() {
- return languageId;
- }
-
- public String getAdName() {
- return adName;
- }
-
- public String getAdDescription() {
- return adDescription;
- }
-
- public String getAdMobileText() {
- return adMobileText;
- }
-
- public String getAdLink() {
- return adLink;
- }
-}
+++ /dev/null
-package de.spring.example.persistence.domain.audit;
-
-import javax.persistence.Entity;
-import javax.persistence.Table;
-
-import org.hibernate.envers.RevisionEntity;
-
-@Entity
-@RevisionEntity(MyCustomRevisionListener.class)
-@Table(name="CUSTOM_REVISION", schema="mybatis_example")
-public class MyCustomRevision {
- private String username;
-
- // It will be used by JPA when filling the property fields with data coming from data base.
- protected MyCustomRevision() {
-
- }
-
- // It will be used by my code (for example by Unit Tests)
- public MyCustomRevision(String username) {
- this.username = username;
- }
-
- /**
- * WARNING: JPA REQUIRES GETTERS!!!
- */
-
- public String getUsername() {
- return username;
- }
-
- public void setUsername(String username) {
- this.username = username;
- }
-}
+++ /dev/null
-package de.spring.example.persistence.domain.audit;
-
-import org.hibernate.envers.RevisionListener;
-
-import de.spring.example.context.UsernameThreadContext;
-
-public class MyCustomRevisionListener implements RevisionListener {
- private final UsernameThreadContext userNameThreadContext;
-
- public MyCustomRevisionListener(UsernameThreadContext userNameThreadContext) {
- this.userNameThreadContext = userNameThreadContext;
- }
-
- @Override
- public void newRevision(Object revisionEntity) {
- MyCustomRevision myCustomRevision = (MyCustomRevision) revisionEntity;
-
- final String username = getSafeUsername();
- myCustomRevision.setUsername(username);
-
- }
-
- private String getSafeUsername() {
- String userName = userNameThreadContext.getUserName();
-
- if (userName == null) {
- userName = "NO_USER";
- }
-
- return userName;
- }
-
-}
+++ /dev/null
-package de.spring.example.persistence.domain.specifications;
-
-import java.time.LocalDate;
-
-//import javax.persistence.criteria.CriteriaBuilder;
-//import javax.persistence.criteria.CriteriaQuery;
-//import javax.persistence.criteria.Predicate;
-//import javax.persistence.criteria.Root;
-
-import org.springframework.data.jpa.domain.Specification;
-
-import de.spring.example.persistence.domain.Ad;
-
-public class AdSpectifications {
-
-// public static Specification<Ad> createdToday() {
-// return new Specification<Ad>() {
-//
-// @Override
-// public Predicate toPredicate(Root<Ad> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
-// final LocalDate date = LocalDate.now();
-//
-// return cb.equal(root.get("createdAt"), date);
-// }
-//
-// };
-//
-// }
-
- /**
- * The same using lambda expressions
- */
- public static Specification<Ad> createdToday() {
- return (root, query, cb) -> {
- final LocalDate date = LocalDate.now();
-
- return cb.equal(root.get("createdAt"), date);
- };
- }
-
-// public static Specification<Ad> mobileImage(String image) {
-// return new Specification<Ad>() {
-//
-// @Override
-// public Predicate toPredicate(Root<Ad> root, CriteriaQuery<?> query, CriteriaBuilder cb) {
-//
-// return cb.equal(root.get("adMobileImage"), image);
-// }
-//
-// };
-//
-// }
-
- /**
- * The same using lambda expressions
- */
- public static Specification<Ad> mobileImage(String image) {
- return (root, query, cb) -> {
- return cb.equal(root.get("adMobileImage"), image);
- };
- }
-}
+++ /dev/null
-package de.spring.example.persistence.repository;
-
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-import org.springframework.data.querydsl.QueryDslPredicateExecutor;
-import org.springframework.data.repository.PagingAndSortingRepository;
-
-import de.spring.example.persistence.domain.Ad;
-import de.spring.example.persistence.domain.AdDescription;
-
-/**
- * By default <code>org.springframework.data.jpa.repository.support.SimpleJpaRepository<code>
- * will be the implementation for this interface.
- *
- * Be careful with <code>@Transactional</code>. SimpleJpaRepository has annotated methods.
- *
- */
-public interface AdDescriptionRepository extends PagingAndSortingRepository<AdDescription, Long>, QueryDslPredicateExecutor<AdDescription> {
-
- // Custom Query method (useful when the offered methods by PagingAndSortingRepository are not enough)
- Page<AdDescription> findByAd(Ad ad, Pageable pageable);
-}
+++ /dev/null
-package de.spring.example.persistence.repository;
-
-import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
-import org.springframework.data.jpa.repository.Query;
-import org.springframework.data.repository.PagingAndSortingRepository;
-import org.springframework.data.repository.query.Param;
-
-import de.spring.example.persistence.domain.Ad;
-
-/**
- * By default <code>org.springframework.data.jpa.repository.support.SimpleJpaRepository<code>
- * will be the implementation for this interface.
- *
- * Be careful with <code>@Transactional</code>. SimpleJpaRepository has annotated methods.
- *
- */
-public interface AdRepository extends PagingAndSortingRepository<Ad, Long>, JpaSpecificationExecutor<Ad> {
-
- // Named Native Query (using the native language of the store) It is not portable.
- // See de.spring.persistence.example.domain.Ad
- @Query(value="SELECT * FROM ad WHERE ad.id = :id", nativeQuery=true)
- Ad findByIdNativeQuery(@Param("id") Long id);
-
- // Named Query (using JPL) It is portable.
- // See de.spring.persistence.example.domain.Ad
- @Query("select a from Ad a where a.id = :id")
- Ad findByIdQuery(@Param("id") Long id);
-}
+++ /dev/null
-package de.spring.example.rest.controllers;
-
-import javax.inject.Inject;
-
-import org.resthub.web.controller.RepositoryBasedRestController;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import de.spring.example.persistence.domain.Ad;
-import de.spring.example.persistence.repository.AdRepository;
-
-@RestController
-@RequestMapping("/ads/")
-public class AdController extends RepositoryBasedRestController<Ad, Long, AdRepository> {
-
- @Override
- @Inject
- public void setRepository(AdRepository repository) {
- this.repository = repository;
- }
-
- // I do not have to do anything here because all I need is implemented by RepositoryBasedRestController :)
-
- // @Transactional is implemented by org.springframework.data.jpa.repository.support.SimpleJpaRepository
- // By default, SimpleJpaRepository will be automatically implemented by my
- // Spring JPA repositories: AdRepository and AdDescriptionRepository.
-}
+++ /dev/null
-package de.spring.example.rest.controllers;
-
-import javax.inject.Inject;
-
-import org.resthub.web.controller.ServiceBasedRestController;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-
-import de.spring.example.persistence.domain.AdDescription;
-import de.spring.example.services.AdDescriptionService;
-
-@RestController
-@RequestMapping("/ad-descriptions/")
-public class AdDescriptionController extends ServiceBasedRestController<AdDescription, Long, AdDescriptionService> {
-
- @Override
- @Inject
- public void setService(AdDescriptionService adDescriptionService) {
- this.service = adDescriptionService;
- }
-
- // I do not have to do anything here because all I need is implemented by ServiceBasedRestController :)
-}
+++ /dev/null
-package de.spring.example.rest.handler;
-
-import javax.inject.Inject;
-import javax.servlet.http.HttpServletRequest;
-import javax.servlet.http.HttpServletResponse;
-
-import org.springframework.web.servlet.handler.HandlerInterceptorAdapter;
-
-import de.spring.example.context.UsernameThreadContext;
-
-public class UsernameHandler extends HandlerInterceptorAdapter {
- private final UsernameThreadContext usernameThreadContext;
-
- @Inject
- public UsernameHandler(UsernameThreadContext userNameThreadContext) {
- this.usernameThreadContext = userNameThreadContext;
- }
-
- @Override
- public boolean preHandle(HttpServletRequest request, HttpServletResponse response, Object handler)
- throws Exception {
- final String userName = request.getHeader(UsernameThreadContext.USERNAME_HEADER);
-
- if (userName != null) {
- usernameThreadContext.setUsername(userName);
- } else {
- usernameThreadContext.clearUsername();
- }
-
- return super.preHandle(request, response, handler);
- }
-}
+++ /dev/null
-package de.spring.example.services;
-
-import org.resthub.common.service.CrudService;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-
-import de.spring.example.persistence.domain.AdDescription;
-
-public interface AdDescriptionService extends CrudService<AdDescription, Long> {
-
- public Page<AdDescription> queryDslExample(Pageable pageRequest);
-}
+++ /dev/null
-package de.spring.example.services;
-
-import org.resthub.common.service.CrudService;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-
-import de.spring.example.persistence.domain.Ad;
-
-public interface AdService extends CrudService<Ad, Long> {
-
- public Page<Ad> queryCriteriaExample(Pageable pageRequest);
-}
+++ /dev/null
-package de.spring.example.services.impl;
-
-import javax.inject.Inject;
-import javax.inject.Named;
-
-import org.resthub.common.service.CrudServiceImpl;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-
-import com.querydsl.core.types.dsl.BooleanExpression;
-
-import de.spring.example.persistence.domain.AdDescription;
-import de.spring.example.persistence.domain.QAdDescription;
-import de.spring.example.persistence.repository.AdDescriptionRepository;
-import de.spring.example.services.AdDescriptionService;
-
-@Named("adDescriptionService")
-public class AdDescriptionServiceImpl
- extends CrudServiceImpl<AdDescription, Long, AdDescriptionRepository>
- implements AdDescriptionService {
-
- @Override
- @Inject
- public void setRepository(AdDescriptionRepository repository) {
- this.repository = repository;
- }
-
- // Extending CrudServiceImpl when we need some business logic. Otherwise we would be using
- // the JPA repositories and nothing else :)
-
- // In this case there is any business logic, but this is just an example.
-
-
- /**
- * Using Querydsl. Giving some business logic to this service :)
- *
- * Querydsl: fluent interface done easy. There is no effort because it is already implemented.
- *
- * Criteria using Specifications requires some effort.
- *
- * See: de.spring.example.services.impl.AdServiceImpl
- */
- @Override
- public Page<AdDescription> queryDslExample(Pageable pageRequest) {
- final QAdDescription adDescription = QAdDescription.adDescription1;
- final BooleanExpression adDescriptionHasAdLink = adDescription.adLink.contains("gumartinm");
- final BooleanExpression adDescriptionHasDescription = adDescription.adDescription.contains("babucha");
-
- return repository.findAll(adDescriptionHasAdLink.and(adDescriptionHasDescription), pageRequest);
- }
-}
+++ /dev/null
-package de.spring.example.services.impl;
-
-import static org.springframework.data.jpa.domain.Specifications.where;
-
-import javax.inject.Inject;
-
-import org.resthub.common.service.CrudServiceImpl;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-
-import de.spring.example.persistence.domain.Ad;
-import de.spring.example.persistence.domain.specifications.AdSpectifications;
-import de.spring.example.persistence.repository.AdRepository;
-import de.spring.example.services.AdService;
-
-public class AdServiceImpl
- extends CrudServiceImpl<Ad, Long, AdRepository>
- implements AdService {
-
- @Override
- @Inject
- public void setRepository(AdRepository repository) {
- this.repository = repository;
- }
-
- /**
- * Criteria using Specifications.
- *
- * It is more complicated than when using Querydsl because I have to implement the
- * Specifications. Querydsl is doing everything for me.
- *
- * See: de.spring.example.services.impl.AdDescriptionServiceImpl
- */
- @Override
- public Page<Ad> queryCriteriaExample(Pageable pageRequest) {
- return repository.findAll(
- where(AdSpectifications.createdToday()).and(AdSpectifications.mobileImage("picasso")),
- pageRequest);
- }
-
-}
+++ /dev/null
-package org.resthub.common.exception;
-
-/**
- * Exception thrown when not result was found (for example findById with null return value)
- */
-public class NotFoundException extends RuntimeException {
-
- public NotFoundException() {
- super();
- }
-
- public NotFoundException(final String message, final Throwable cause) {
- super(message, cause);
- }
-
- public NotFoundException(final String message) {
- super(message);
- }
-
- public NotFoundException(final Throwable cause) {
- super(cause);
- }
-
-}
+++ /dev/null
-package org.resthub.common.service;
-
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-
-import java.io.Serializable;
-import java.util.Set;
-
-/**
- * CRUD Service interface.
- *
- * @param <T> Your resource POJO to manage, maybe an entity or DTO class
- * @param <ID> Resource id type, usually Long or String
- */
-public interface CrudService<T, ID extends Serializable> {
-
- /**
- * Create new resource.
- *
- * @param resource Resource to create
- * @return new resource
- */
- T create(T resource);
-
- /**
- * Update existing resource.
- *
- * @param resource Resource to update
- * @return resource updated
- */
- T update(T resource);
-
- /**
- * Delete existing resource.
- *
- * @param resource Resource to delete
- */
- void delete(T resource);
-
- /**
- * Delete existing resource.
- *
- * @param id Resource id
- */
- void delete(ID id);
-
- /**
- * Delete all existing resource. Do not use cascade remove (not a choice -> JPA specs)
- */
- void deleteAll();
-
- /**
- * Delete all existing resource, including linked entities with cascade delete
- */
- void deleteAllWithCascade();
-
- /**
- * Find resource by id.
- *
- * @param id Resource id
- * @return resource
- */
- T findById(ID id);
-
- /**
- * Find resources by their ids.
- *
- * @param ids Resource ids
- * @return a list of retrieved resources, empty if no resource found
- */
- Iterable<T> findByIds(Set<ID> ids);
-
- /**
- * Find all resources.
- *
- * @return a list of all resources.
- */
- Iterable<T> findAll();
-
- /**
- * Find all resources (pageable).
- *
- * @param pageRequest page request
- * @return resources
- */
- Page<T> findAll(Pageable pageRequest);
-
- /**
- * Count all resources.
- *
- * @return number of resources
- */
- Long count();
-}
+++ /dev/null
-package org.resthub.common.service;
-
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.Pageable;
-import org.springframework.data.repository.PagingAndSortingRepository;
-import org.springframework.transaction.annotation.Transactional;
-import org.springframework.util.Assert;
-
-import java.io.Serializable;
-import java.util.Set;
-
-/**
- * CRUD service that uses a {@link org.springframework.data.repository.PagingAndSortingRepository} Spring Data repository implementation
- *
- * You should extend it and inject your Repository bean by overriding {@link #setRepository(org.springframework.data.repository.PagingAndSortingRepository)}
- *
- * @param <T> Your resource class to manage, usually an entity class
- * @param <ID> Resource id type, usually Long or String
- * @param <R> The repository class
- */
-@Transactional(readOnly = true)
-public class CrudServiceImpl<T, ID extends Serializable, R extends PagingAndSortingRepository<T, ID>> implements
- CrudService<T, ID> {
-
- protected R repository;
-
- /**
- * @param repository the repository to set
- */
- public void setRepository(R repository) {
- this.repository = repository;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- @Transactional
- public T create(T resource) {
- Assert.notNull(resource, "Resource can't be null");
- return repository.save(resource);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- @Transactional
- public T update(T resource) {
- Assert.notNull(resource, "Resource can't be null");
- return repository.save(resource);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- @Transactional
- public void delete(T resource) {
- Assert.notNull(resource, "Resource can't be null");
- repository.delete(resource);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- @Transactional
- public void delete(ID id) {
- Assert.notNull(id, "Resource ID can't be null");
- repository.delete(id);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- @Transactional
- public void deleteAll() {
- repository.deleteAll();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- @Transactional
- public void deleteAllWithCascade() {
- Iterable<T> list = repository.findAll();
- for (T entity : list) {
- repository.delete(entity);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public T findById(ID id) {
- Assert.notNull(id, "Resource ID can't be null");
- return repository.findOne(id);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Iterable<T> findByIds(Set<ID> ids) {
- Assert.notNull(ids, "Resource ids can't be null");
- return repository.findAll(ids);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Iterable<T> findAll() {
- return repository.findAll();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- @Transactional
- public Page<T> findAll(Pageable pageRequest) {
- Assert.notNull(pageRequest, "page request can't be null");
- return repository.findAll(pageRequest);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Long count() {
- return repository.count();
- }
-}
+++ /dev/null
-package org.resthub.web.controller;
-
-import org.resthub.common.exception.NotFoundException;
-import org.slf4j.Logger;
-import org.slf4j.LoggerFactory;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.PageRequest;
-import org.springframework.data.domain.Sort;
-import org.springframework.data.repository.PagingAndSortingRepository;
-import org.springframework.util.Assert;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
-
-import java.io.Serializable;
-import java.util.Set;
-
-/**
- * Abstract REST controller using a repository implementation
- * <p/>
- * <p>
- * You should extend this class when you want to use a 2 layers pattern : Repository and Controller. This is the default
- * controller implementation to use if you have no service (also called business) layer. You will be able to transform
- * it to a ServiceBasedRestController later easily if needed.
- * </p>
- *
- * <p>Default implementation uses "id" field (usually a Long) in order to identify resources in web request.
- * If your want to identity resources by a slug (human readable identifier), your should override findById() method with for example :
- *
- * <pre>
- * <code>
- {@literal @}Override
- public Sample findById({@literal @}PathVariable String id) {
- Sample sample = this.repository.findByName(id);
- if (sample == null) {
- throw new NotFoundException();
- }
- return sample;
- }
- </code>
- * </pre>
- *
- *
- * @param <T> Your resource class to manage, maybe an entity or DTO class
- * @param <ID> Resource id type, usually Long or String
- * @param <R> The repository class
- * @see ServiceBasedRestController
- */
-public abstract class RepositoryBasedRestController<T, ID extends Serializable, R extends PagingAndSortingRepository>
- implements RestController<T, ID> {
-
- protected R repository;
-
- protected Logger logger = LoggerFactory.getLogger(RepositoryBasedRestController.class);
-
- /**
- * You should override this setter in order to inject your repository with @Inject annotation
- *
- * @param repository The repository to be injected
- */
- public void setRepository(R repository) {
- this.repository = repository;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public T create(@RequestBody T resource) {
- return (T)this.repository.save(resource);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public T update(@PathVariable ID id, @RequestBody T resource) {
- Assert.notNull(id, "id cannot be null");
-
- T retrievedResource = this.findById(id);
- if (retrievedResource == null) {
- throw new NotFoundException();
- }
-
- return (T)this.repository.save(resource);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Iterable<T> findAll() {
- return repository.findAll();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Page<T> findPaginated(@RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
- @RequestParam(value = "size", required = false, defaultValue = "10") Integer size,
- @RequestParam(value = "direction", required = false, defaultValue = "") String direction,
- @RequestParam(value = "properties", required = false) String properties) {
- Assert.isTrue(page > 0, "Page index must be greater than 0");
- Assert.isTrue(direction.isEmpty() || direction.equalsIgnoreCase(Sort.Direction.ASC.toString()) || direction.equalsIgnoreCase(Sort.Direction.DESC.toString()), "Direction should be ASC or DESC");
- if(direction.isEmpty()) {
- return this.repository.findAll(new PageRequest(page - 1, size));
- } else {
- Assert.notNull(properties);
- return this.repository.findAll(new PageRequest(page - 1, size, new Sort(Sort.Direction.fromString(direction.toUpperCase()), properties.split(","))));
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public T findById(@PathVariable ID id) {
- T entity = (T)this.repository.findOne(id);
- if (entity == null) {
- throw new NotFoundException();
- }
-
- return entity;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Iterable<T> findByIds(@RequestParam(value="ids[]") Set<ID> ids){
- Assert.notNull(ids, "ids list cannot be null");
- return this.repository.findAll(ids);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void delete() {
- Iterable<T> list = repository.findAll();
- for (T entity : list) {
- repository.delete(entity);
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void delete(@PathVariable ID id) {
- T resource = this.findById(id);
- this.repository.delete(resource);
- }
-
-}
+++ /dev/null
-package org.resthub.web.controller;
-
-import org.resthub.common.exception.NotFoundException;
-import org.springframework.data.domain.Page;
-import org.springframework.http.HttpStatus;
-import org.springframework.web.bind.annotation.*;
-
-import java.io.Serializable;
-import java.util.Set;
-
-/**
- * REST controller interface
- *
- * @param <T> Your resource POJO to manage, maybe an entity or DTO class
- * @param <ID> Primary resource identifier at webservice level, usually Long or String
- */
-public interface RestController<T, ID extends Serializable> {
-
- /**
- * Create a new resource<br />
- * REST webservice published : POST /
- *
- * @param resource The resource to create
- * @return CREATED http status code if the request has been correctly processed, with updated resource enclosed in the body, usually with and additional identifier automatically created by the database
- */
- @RequestMapping(method = RequestMethod.POST)
- @ResponseStatus(HttpStatus.CREATED)
- @ResponseBody
- T create(@RequestBody T resource);
-
- /**
- * Update an existing resource<br/>
- * REST webservice published : PUT /{id}
- *
- * @param id The identifier of the resource to update, usually a Long or String identifier. It is explicitely provided in order to handle cases where the identifier could be changed.
- * @param resource The resource to update
- * @return OK http status code if the request has been correctly processed, with the updated resource enclosed in the body
- * @throws NotFoundException
- */
- @RequestMapping(value = "{id}", method = RequestMethod.PUT)
- @ResponseBody
- T update(@PathVariable ID id, @RequestBody T resource);
-
- /**
- * Find all resources, and return the full collection (plain list not paginated)<br/>
- * REST webservice published : GET /?page=no
- *
- * @return OK http status code if the request has been correctly processed, with the list of all resource enclosed in the body.
- * Be careful, this list should be big since it will return ALL resources. In this case, consider using paginated findAll method instead.
- */
- @RequestMapping(method = RequestMethod.GET, params = "page=no")
- @ResponseBody
- Iterable<T> findAll();
-
- /**
- * Find all resources, and return a paginated and optionaly sorted collection<br/>
- * REST webservice published : GET /search?page=0&size=20 or GET /search?page=0&size=20&direction=desc&properties=name
- *
- * @param page Page number starting from 0. default to 0
- * @param size Number of resources by pages. default to 10
- * @param direction Optional sort direction, could be "asc" or "desc"
- * @param properties Ordered list of comma separeted properies used for sorting resulats. At least one property should be provided if direction is specified
- * @return OK http status code if the request has been correctly processed, with the a paginated collection of all resource enclosed in the body.
- */
- @RequestMapping(method = RequestMethod.GET)
- @ResponseBody
- Page<T> findPaginated(@RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
- @RequestParam(value = "size", required = false, defaultValue = "10") Integer size,
- @RequestParam(value = "direction", required = false, defaultValue = "ASC") String direction,
- @RequestParam(value = "properties", required = false) String properties);
-
- /**
- * Find a resource by its identifier<br/>
- * REST webservice published : GET /{id}
- *
- * @param id The identifier of the resouce to find
- * @return OK http status code if the request has been correctly processed, with resource found enclosed in the body
- * @throws NotFoundException
- */
- @RequestMapping(value = "{id}", method = RequestMethod.GET)
- @ResponseBody
- T findById(@PathVariable ID id);
-
- /**
- * Find multiple resources by their identifiers<br/>
- * REST webservice published : GET /?ids[]=
- * <p/>
- * example : /?ids[]=1&ids[]=2&ids[]=3
- *
- * @param ids List of ids to retrieve
- * @return OK http status code with list of retrieved resources. Not found resources are ignored:
- * no Exception thrown. List is empty if no resource found with any of the given ids.
- */
- @RequestMapping(method = RequestMethod.GET, params = "ids[]")
- @ResponseBody
- Iterable<T> findByIds(@RequestParam(value = "ids[]") Set<ID> ids);
-
- /**
- * Delete all resources<br/>
- * REST webservice published : DELETE /<br/>
- * Return No Content http status code if the request has been correctly processed
- */
- @RequestMapping(method = RequestMethod.DELETE)
- @ResponseStatus(HttpStatus.NO_CONTENT)
- void delete();
-
- /**
- * Delete a resource by its identifier<br />
- * REST webservice published : DELETE /{id}<br />
- * Return No Content http status code if the request has been correctly processed
- *
- * @param id The identifier of the resource to delete
- * @throws NotFoundException
- */
- @RequestMapping(value = "{id}", method = RequestMethod.DELETE)
- @ResponseStatus(HttpStatus.NO_CONTENT)
- void delete(@PathVariable ID id);
-
-}
+++ /dev/null
-package org.resthub.web.controller;
-
-import java.io.Serializable;
-import java.util.Set;
-
-import org.resthub.common.exception.NotFoundException;
-import org.resthub.common.service.CrudService;
-import org.springframework.data.domain.Page;
-import org.springframework.data.domain.PageRequest;
-import org.springframework.data.domain.Sort;
-import org.springframework.util.Assert;
-import org.springframework.web.bind.annotation.PathVariable;
-import org.springframework.web.bind.annotation.RequestBody;
-import org.springframework.web.bind.annotation.RequestParam;
-
-/**
- * Abstract REST controller using a service implementation
- * <p/>
- * <p>You should extend this class when you want to use a 3 layers pattern : Repository, Service and Controller
- * If you don't have a real service (also called business layer), consider using RepositoryBasedRestController</p>
- * <p/>
- * <p>Default implementation uses "id" field (usually a Long) in order to identify resources in web request.
- * If your want to identity resources by a slug (human readable identifier), your should override findById() method with for example :
- * <p/>
- * <pre>
- * <code>
- * {@literal @}Override
- * public Sample findById({@literal @}PathVariable String id) {
- * Sample sample = this.service.findByName(id);
- * if (sample == null) {
- * throw new NotFoundException();
- * }
- * return sample;
- * }
- * </code>
- * </pre>
- *
- * @param <T> Your resource class to manage, maybe an entity or DTO class
- * @param <ID> Resource id type, usually Long or String
- * @param <S> The service class
- * @see RepositoryBasedRestController
- */
-public abstract class ServiceBasedRestController<T, ID extends Serializable, S extends CrudService> implements
- RestController<T, ID> {
-
- protected S service;
-
- /**
- * You should override this setter in order to inject your service with @Inject annotation
- *
- * @param service The service to be injected
- */
- public void setService(S service) {
- this.service = service;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public T create(@RequestBody T resource) {
- return (T) this.service.create(resource);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public T update(@PathVariable ID id, @RequestBody T resource) {
- Assert.notNull(id, "id cannot be null");
-
- T retreivedResource = this.findById(id);
- if (retreivedResource == null) {
- throw new NotFoundException();
- }
-
- return (T) this.service.update(resource);
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Iterable<T> findAll() {
- return service.findAll();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Page<T> findPaginated(@RequestParam(value = "page", required = false, defaultValue = "1") Integer page,
- @RequestParam(value = "size", required = false, defaultValue = "10") Integer size,
- @RequestParam(value = "direction", required = false, defaultValue = "") String direction,
- @RequestParam(value = "properties", required = false) String properties) {
- Assert.isTrue(page > 0, "Page index must be greater than 0");
- Assert.isTrue(direction.isEmpty() || direction.equalsIgnoreCase(Sort.Direction.ASC.toString()) || direction.equalsIgnoreCase(Sort.Direction.DESC.toString()), "Direction should be ASC or DESC");
- if (direction.isEmpty()) {
- return this.service.findAll(new PageRequest(page - 1, size));
- } else {
- Assert.notNull(properties);
- return this.service.findAll(new PageRequest(page - 1, size, new Sort(Sort.Direction.fromString(direction.toUpperCase()), properties.split(","))));
- }
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public T findById(@PathVariable ID id) {
- T resource = (T) this.service.findById(id);
- if (resource == null) {
- throw new NotFoundException();
- }
-
- return resource;
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public Iterable<T> findByIds(@RequestParam(value = "ids[]") Set<ID> ids) {
- Assert.notNull(ids, "ids list cannot be null");
- return this.service.findByIds(ids);
- }
-
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void delete() {
- this.service.deleteAllWithCascade();
- }
-
- /**
- * {@inheritDoc}
- */
- @Override
- public void delete(@PathVariable ID id) {
- T resource = this.findById(id);
- this.service.delete(resource);
- }
-}
-
+++ /dev/null
-jpa.dialect=org.hibernate.dialect.MySQL5Dialect
-jpa.show_sql=false
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-
-<!--
- status: The level of internal Log4j events that should be logged to the console.
- Valid values for this attribute are "trace", "debug", "info", "warn", "error" and "fatal".
-
- monitorInterval: The minimum amount of time, in seconds, that must elapse before the file configuration is checked for changes.
-
-
- see https://logging.apache.org/log4j/2.x/manual/configuration.html
- -->
-<Configuration status="error" strict="true" monitorInterval="30"
- name="XMLConfigTest" packages="org.apache.logging.log4j.test">
-
- <!--
- ALL > TRACE > DEBUG > INFO > WARN > ERROR > OFF
-
- ERROR by default.
- -->
-
- <Appenders>
- <Appender type="Console" name="STDOUT">
- <PatternLayout pattern="%d{HH:mm:ss.SSS} %-5level %class{36} %L %M - %msg%xEx%n"/>
- </Appender>
- </Appenders>
- <Loggers>
-
-
- <!--
- General logging Spring.
- -->
- <Logger name="org.springframework" level="INFO" additivity="false">
- <AppenderRef ref="STDOUT" />
- </Logger>
-
- <!--
- How to log Hibernate QUERIES by means of LOG4J/SLF4J:
-
- See: org.hibernate.engine.jdbc.spi.SqlStatementLogger
-
- 1. With hibernate.show_sql=false we stop Hibernate logging to STDOUT.
- 2. DEBUG level (see SqlStatementLogger) is the only way of logging QUERIES using LOG4J.
- SqlStatementLogger uses log.DEBUG and no other level :(
- 3. JVM requires the following system property: -Dorg.jboss.logging.provider=slf4j for using LOG4J.
- -->
- <Logger name="org.hibernate.SQL" level="DEBUG" additivity="false">
- <AppenderRef ref="STDOUT" />
- </Logger>
-
- <!--
- Anything else will be using TRACE logging level.
- -->
- <Root level="INFO">
- <AppenderRef ref="STDOUT"/>
- </Root>
-
- </Loggers>
-</Configuration>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xmlns:util="http://www.springframework.org/schema/util"\r
- xmlns:tx="http://www.springframework.org/schema/tx"\r
- xmlns:jee="http://www.springframework.org/schema/jee"\r
- xsi:schemaLocation="http://www.springframework.org/schema/beans\r
- http://www.springframework.org/schema/beans/spring-beans.xsd\r
- http://www.springframework.org/schema/util\r
- http://www.springframework.org/schema/util/spring-util.xsd\r
- http://www.springframework.org/schema/tx \r
- http://www.springframework.org/schema/tx/spring-tx.xsd\r
- http://www.springframework.org/schema/jee\r
- http://www.springframework.org/schema/jee/spring-jee.xsd">\r
-\r
- \r
- <!-- enable the configuration of transactional behavior based on annotations -->\r
- <tx:annotation-driven transaction-manager="transactionManager"/>\r
-\r
-\r
- <!-- Using external provided datasource (in my case the one from Tomcat) -->\r
- <jee:jndi-lookup id="dataSource" jndi-name="jdbc/example" expected-type="javax.sql.DataSource"/>\r
- \r
- \r
- <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">\r
- <property name="entityManagerFactory" ref="entityManagerFactory" />\r
- </bean>\r
- \r
- <import resource="liquibase/liquibase.xml" />\r
- \r
-</beans>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xmlns:context="http://www.springframework.org/schema/context"\r
- xmlns:util="http://www.springframework.org/schema/util"\r
- xmlns:jpa="http://www.springframework.org/schema/data/jpa"\r
- xsi:schemaLocation="http://www.springframework.org/schema/beans\r
- http://www.springframework.org/schema/beans/spring-beans.xsd\r
- http://www.springframework.org/schema/context\r
- http://www.springframework.org/schema/context/spring-context.xsd\r
- http://www.springframework.org/schema/util\r
- http://www.springframework.org/schema/util/spring-util.xsd\r
- http://www.springframework.org/schema/data/jpa \r
- http://www.springframework.org/schema/data/jpa/spring-jpa.xsd">\r
-\r
- <context:annotation-config />\r
-\r
- <context:component-scan base-package="de.spring.example.persistence" />\r
- \r
- <bean id="entityManagerFactory"\r
- class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">\r
- <property name="dataSource" ref="dataSource" />\r
- <property name="jpaVendorAdapter">\r
- <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">\r
- <property name="databasePlatform" value="${jpa.dialect}" />\r
- <property name="showSql" value="${jpa.show_sql}" />\r
- </bean>\r
- </property>\r
- <property name="packagesToScan" value="de.spring.example.persistence.**.domain" />\r
- <property name="jpaProperties">\r
- <props>\r
- <!--\r
- <prop key="hibernate.hbm2ddl.auto">create-drop</prop>\r
- -->\r
- <prop key="org.hibernate.envers.audit_table_suffix">_AUDITED</prop>\r
- <prop key="org.hibernate.envers.revision_field_name">REVISION</prop>\r
- <prop key="org.hibernate.envers.revision_type_field_name">REVISION_TYPE</prop>\r
- <prop key="org.hibernate.envers.store_data_at_delete">true</prop>\r
- <prop key="org.hibernate.envers.audit_strategy">org.hibernate.envers.strategy.ValidityAuditStrategy</prop>\r
- <prop key="org.hibernate.envers.audit_strategy_validity_end_rev_field_name">REVISION_END</prop>\r
- <prop key="org.hibernate.envers.audit_strategy_validity_store_revend_timestamp">true</prop>\r
- <prop key="org.hibernate.envers.audit_strategy_validity_revend_timestamp_field_name">REVISION_END_TIMESTAMP</prop>\r
- <prop key="org.hibernate.envers.modified_flag_suffix">_MODIFIED</prop> \r
- </props>\r
- </property>\r
- </bean>\r
-\r
- <jpa:repositories entity-manager-factory-ref="entityManagerFactory"\r
- base-package="de.spring.example.persistence.**.repository"\r
- transaction-manager-ref="transactionManager" />\r
-\r
-</beans>\r
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<databaseChangeLog
- xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog
- http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
-
- <!-- DDL -->
- <include file="spring-configuration/liquibase/ddlChangelog.xml" />
-
- <!-- DML -->
- <include file="spring-configuration/liquibase/dmlChangelog.xml" />
- <!--
- <changeSet author="gustavo" id="1">
- <sqlFile path="liquibase/dmlChangelog.xml" stripComments="true"/>
- </changeSet>
- -->
-
-</databaseChangeLog>
+++ /dev/null
-<?xml version="1.1" encoding="UTF-8" standalone="no"?>
-<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
- <changeSet author="gustavo (generated)" id="1468267753605-1">
- <createTable tableName="ad">
- <column autoIncrement="true" name="id" type="BIGINT">
- <constraints primaryKey="true"/>
- </column>
- <column name="company_id" type="BIGINT"/>
- <column name="company_categ_id" type="BIGINT"/>
- <column name="ad_gps" type="BLOB"/>
- <column name="ad_mobile_image" type="VARCHAR(255)"/>
- <column defaultValueComputed="CURRENT_TIMESTAMP" name="created_at" type="TIMESTAMP">
- <constraints nullable="false"/>
- </column>
- <column defaultValue="0000-00-00 00:00:00" name="updated_at" type="TIMESTAMP">
- <constraints nullable="false"/>
- </column>
- </createTable>
- </changeSet>
- <changeSet author="gustavo (generated)" id="1468267753605-2">
- <createTable tableName="ad_description">
- <column autoIncrement="true" name="id" type="BIGINT">
- <constraints primaryKey="true"/>
- </column>
- <column name="laguage_id" type="BIGINT">
- <constraints nullable="false"/>
- </column>
- <column name="ad_id" type="BIGINT"/>
- <column name="ad_name" type="VARCHAR(255)">
- <constraints nullable="false"/>
- </column>
- <column name="ad_description" type="LONGTEXT"/>
- <column name="ad_mobile_text" type="VARCHAR(500)">
- <constraints nullable="false"/>
- </column>
- <column name="ad_link" type="VARCHAR(3000)">
- <constraints nullable="false"/>
- </column>
- </createTable>
- </changeSet>
- <changeSet author="gustavo (generated)" id="1468267753605-3">
- <createTable tableName="con_test">
- <column name="a" type="CHAR(1)"/>
- </createTable>
- </changeSet>
- <changeSet author="gustavo (generated)" id="1468267753605-4">
- <addUniqueConstraint columnNames="id" constraintName="id" deferrable="false" disabled="false" initiallyDeferred="false" tableName="ad"/>
- </changeSet>
- <changeSet author="gustavo (generated)" id="1468267753605-5">
- <addForeignKeyConstraint baseColumnNames="ad_id" baseTableName="ad_description" constraintName="ad_description_ibfk_1" deferrable="false" initiallyDeferred="false" onDelete="CASCADE" onUpdate="NO ACTION" referencedColumnNames="id" referencedTableName="ad"/>
- </changeSet>
-</databaseChangeLog>
+++ /dev/null
-<?xml version="1.1" encoding="UTF-8" standalone="no"?>
-<databaseChangeLog xmlns="http://www.liquibase.org/xml/ns/dbchangelog" xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-3.5.xsd">
- <changeSet author="gustavo (generated)" id="1468267830107-1">
- <insert tableName="ad">
- <column name="id" valueNumeric="1"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2014-12-17 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-12-17 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="2"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2014-12-17 23:29:10.0"/>
- <column name="updated_at" valueDate="2014-12-17 23:29:10.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="3"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-27 17:13:46.0"/>
- <column name="updated_at" valueDate="2014-12-27 17:13:47.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="4"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-27 17:14:39.0"/>
- <column name="updated_at" valueDate="2014-12-27 17:15:27.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="5"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-27 23:38:47.0"/>
- <column name="updated_at" valueDate="2014-12-27 23:38:47.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="6"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-27 23:39:53.0"/>
- <column name="updated_at" valueDate="2014-12-27 23:39:53.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="7"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-27 23:39:54.0"/>
- <column name="updated_at" valueDate="2014-12-27 23:39:54.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="8"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-27 23:40:21.0"/>
- <column name="updated_at" valueDate="2014-12-27 23:40:21.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="9"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-27 23:40:21.0"/>
- <column name="updated_at" valueDate="2014-12-27 23:40:21.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="10"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-27 23:42:34.0"/>
- <column name="updated_at" valueDate="2014-12-27 23:42:34.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="11"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-27 23:42:34.0"/>
- <column name="updated_at" valueDate="2014-12-27 23:42:34.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="12"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-28 00:07:34.0"/>
- <column name="updated_at" valueDate="2014-12-28 00:07:34.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="13"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-28 00:07:35.0"/>
- <column name="updated_at" valueDate="2014-12-28 00:07:35.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="14"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-28 00:10:20.0"/>
- <column name="updated_at" valueDate="2014-12-28 00:10:20.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="15"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-28 00:10:21.0"/>
- <column name="updated_at" valueDate="2014-12-28 00:10:21.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="16"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-28 00:10:21.0"/>
- <column name="updated_at" valueDate="2014-12-28 00:10:21.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="17"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-28 00:10:21.0"/>
- <column name="updated_at" valueDate="2014-12-28 00:10:21.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="18"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-28 00:10:21.0"/>
- <column name="updated_at" valueDate="2014-12-28 00:10:21.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="19"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-28 00:10:21.0"/>
- <column name="updated_at" valueDate="2014-12-28 00:10:21.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="20"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-28 00:10:21.0"/>
- <column name="updated_at" valueDate="2014-12-28 00:10:21.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="21"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-28 00:19:06.0"/>
- <column name="updated_at" valueDate="2014-12-28 00:19:06.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="23"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-28 00:20:08.0"/>
- <column name="updated_at" valueDate="2014-12-28 00:20:08.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="25"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-28 00:31:11.0"/>
- <column name="updated_at" valueDate="2014-12-28 00:31:11.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="26"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-28 00:31:12.0"/>
- <column name="updated_at" valueDate="2014-12-28 00:31:12.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="27"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="mobileImage.jpg"/>
- <column name="created_at" valueDate="2014-12-28 00:31:12.0"/>
- <column name="updated_at" valueDate="2014-12-28 00:31:12.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="28"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="29"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="30"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="31"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="32"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="33"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="34"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="35"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="36"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="37"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="38"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="39"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="40"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="41"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="42"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="43"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="44"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="45"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="46"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="47"/>
- <column name="company_id"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bitch.jpg"/>
- <column name="created_at" valueDate="2015-08-31 02:54:50.0"/>
- <column name="updated_at" valueDate="2015-08-31 02:54:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="52"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-10 12:38:12.0"/>
- <column name="updated_at" valueDate="2016-04-10 12:38:12.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="53"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-10 12:40:56.0"/>
- <column name="updated_at" valueDate="2016-04-10 12:40:56.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="54"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-10 12:46:02.0"/>
- <column name="updated_at" valueDate="2016-04-10 12:46:02.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="55"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-10 12:46:13.0"/>
- <column name="updated_at" valueDate="2016-04-10 12:46:13.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="56"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-10 12:52:20.0"/>
- <column name="updated_at" valueDate="2016-04-10 12:52:20.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="57"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-10 12:53:07.0"/>
- <column name="updated_at" valueDate="2016-04-10 12:53:07.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="58"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-10 12:57:01.0"/>
- <column name="updated_at" valueDate="2016-04-10 12:57:01.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="59"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-10 12:57:08.0"/>
- <column name="updated_at" valueDate="2016-04-10 12:57:08.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="60"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-10 13:07:24.0"/>
- <column name="updated_at" valueDate="2016-04-10 13:07:24.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="61"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-10 13:07:24.0"/>
- <column name="updated_at" valueDate="2016-04-10 13:07:24.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="62"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-10 13:07:24.0"/>
- <column name="updated_at" valueDate="2016-04-10 13:07:24.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="63"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-10 13:07:24.0"/>
- <column name="updated_at" valueDate="2016-04-10 13:07:24.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="64"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-10 13:16:12.0"/>
- <column name="updated_at" valueDate="2016-04-10 13:16:12.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="65"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-10 13:16:12.0"/>
- <column name="updated_at" valueDate="2016-04-10 13:16:12.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="66"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-10 13:16:12.0"/>
- <column name="updated_at" valueDate="2016-04-10 13:16:12.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="67"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-10 13:16:12.0"/>
- <column name="updated_at" valueDate="2016-04-10 13:16:12.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="68"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-10 13:22:18.0"/>
- <column name="updated_at" valueDate="2016-04-10 13:22:18.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="69"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-10 13:22:19.0"/>
- <column name="updated_at" valueDate="2016-04-10 13:22:19.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="70"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-10 13:22:19.0"/>
- <column name="updated_at" valueDate="2016-04-10 13:22:19.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="71"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-10 13:22:19.0"/>
- <column name="updated_at" valueDate="2016-04-10 13:22:19.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="72"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-10 13:25:50.0"/>
- <column name="updated_at" valueDate="2016-04-10 13:25:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="73"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-10 13:26:58.0"/>
- <column name="updated_at" valueDate="2016-04-10 13:26:58.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="74"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-10 13:27:18.0"/>
- <column name="updated_at" valueDate="2016-04-10 13:27:18.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="75"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-10 13:29:10.0"/>
- <column name="updated_at" valueDate="2016-04-10 13:29:10.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="76"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-10 14:06:00.0"/>
- <column name="updated_at" valueDate="2016-04-10 14:06:00.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="77"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-10 14:06:00.0"/>
- <column name="updated_at" valueDate="2016-04-10 14:06:00.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="78"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-10 14:06:00.0"/>
- <column name="updated_at" valueDate="2016-04-10 14:06:00.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="79"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-10 14:06:00.0"/>
- <column name="updated_at" valueDate="2016-04-10 14:06:00.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="80"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-10 18:04:43.0"/>
- <column name="updated_at" valueDate="2016-04-10 18:04:43.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="81"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-10 18:05:02.0"/>
- <column name="updated_at" valueDate="2016-04-10 18:05:02.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="82"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-10 18:11:22.0"/>
- <column name="updated_at" valueDate="2016-04-10 18:11:23.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="85"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-10 18:26:26.0"/>
- <column name="updated_at" valueDate="2016-04-10 18:26:27.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="86"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-10 19:09:14.0"/>
- <column name="updated_at" valueDate="2016-04-10 19:09:14.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="87"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-10 19:10:03.0"/>
- <column name="updated_at" valueDate="2016-04-10 19:10:03.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="88"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-10 20:33:52.0"/>
- <column name="updated_at" valueDate="2016-04-10 20:33:52.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="89"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-10 20:35:11.0"/>
- <column name="updated_at" valueDate="2016-04-10 20:35:11.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="90"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-10 20:35:46.0"/>
- <column name="updated_at" valueDate="2016-04-10 20:35:46.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="91"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-10 20:35:49.0"/>
- <column name="updated_at" valueDate="2016-04-10 20:35:49.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="93"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-24 16:57:50.0"/>
- <column name="updated_at" valueDate="2016-04-24 16:57:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="94"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-24 16:57:50.0"/>
- <column name="updated_at" valueDate="2016-04-24 16:57:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="95"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-24 16:57:50.0"/>
- <column name="updated_at" valueDate="2016-04-24 16:57:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="96"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-24 16:57:50.0"/>
- <column name="updated_at" valueDate="2016-04-24 16:57:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="97"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-24 16:57:50.0"/>
- <column name="updated_at" valueDate="2016-04-24 16:57:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="98"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-24 16:57:50.0"/>
- <column name="updated_at" valueDate="2016-04-24 16:57:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="99"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-24 16:57:50.0"/>
- <column name="updated_at" valueDate="2016-04-24 16:57:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="100"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-24 16:57:50.0"/>
- <column name="updated_at" valueDate="2016-04-24 16:57:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="101"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-24 17:01:35.0"/>
- <column name="updated_at" valueDate="2016-04-24 17:01:35.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="102"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-24 17:01:37.0"/>
- <column name="updated_at" valueDate="2016-04-24 17:01:37.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="103"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-24 17:04:43.0"/>
- <column name="updated_at" valueDate="2016-04-24 17:04:43.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="104"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-24 17:04:54.0"/>
- <column name="updated_at" valueDate="2016-04-24 17:04:54.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="105"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-24 17:42:48.0"/>
- <column name="updated_at" valueDate="2016-04-24 17:42:48.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="106"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-24 17:42:50.0"/>
- <column name="updated_at" valueDate="2016-04-24 17:42:50.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="107"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-24 17:43:04.0"/>
- <column name="updated_at" valueDate="2016-04-24 17:43:04.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="108"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-24 17:43:06.0"/>
- <column name="updated_at" valueDate="2016-04-24 17:43:06.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="109"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-24 17:47:20.0"/>
- <column name="updated_at" valueDate="2016-04-24 17:47:20.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="110"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-24 17:47:22.0"/>
- <column name="updated_at" valueDate="2016-04-24 17:47:22.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="111"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-24 17:47:29.0"/>
- <column name="updated_at" valueDate="2016-04-24 17:47:29.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="112"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-24 17:47:31.0"/>
- <column name="updated_at" valueDate="2016-04-24 17:47:31.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="113"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-24 17:50:01.0"/>
- <column name="updated_at" valueDate="2016-04-24 17:50:01.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="114"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-24 17:50:03.0"/>
- <column name="updated_at" valueDate="2016-04-24 17:50:03.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="115"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-24 17:50:09.0"/>
- <column name="updated_at" valueDate="2016-04-24 17:50:09.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="116"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-24 17:50:13.0"/>
- <column name="updated_at" valueDate="2016-04-24 17:50:13.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="117"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-24 18:16:26.0"/>
- <column name="updated_at" valueDate="2016-04-24 18:16:26.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="118"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-24 18:16:26.0"/>
- <column name="updated_at" valueDate="2016-04-24 18:16:26.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="119"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-24 18:16:26.0"/>
- <column name="updated_at" valueDate="2016-04-24 18:16:26.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="120"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-24 18:16:26.0"/>
- <column name="updated_at" valueDate="2016-04-24 18:16:26.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="121"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-24 18:16:26.0"/>
- <column name="updated_at" valueDate="2016-04-24 18:16:26.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="122"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-24 18:16:26.0"/>
- <column name="updated_at" valueDate="2016-04-24 18:16:26.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="123"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-24 18:16:26.0"/>
- <column name="updated_at" valueDate="2016-04-24 18:16:26.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="124"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-24 18:16:26.0"/>
- <column name="updated_at" valueDate="2016-04-24 18:16:26.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="125"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-24 18:16:38.0"/>
- <column name="updated_at" valueDate="2016-04-24 18:16:38.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="126"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="updatedBildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-24 18:16:41.0"/>
- <column name="updated_at" valueDate="2016-04-24 18:16:41.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="127"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-24 18:16:46.0"/>
- <column name="updated_at" valueDate="2016-04-24 18:16:46.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="128"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-24 18:16:47.0"/>
- <column name="updated_at" valueDate="2016-04-24 18:16:47.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="129"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildOne.jpg"/>
- <column name="created_at" valueDate="2016-04-24 18:16:55.0"/>
- <column name="updated_at" valueDate="2016-04-24 18:16:55.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="130"/>
- <column name="company_id" valueNumeric="3"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildTwo.jpg"/>
- <column name="created_at" valueDate="2016-04-24 18:21:48.0"/>
- <column name="updated_at" valueDate="2016-04-24 18:21:48.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="131"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildThree.jpg"/>
- <column name="created_at" valueDate="2016-04-24 18:22:17.0"/>
- <column name="updated_at" valueDate="2016-04-24 18:22:17.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="132"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="200"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bildFour.jpg"/>
- <column name="created_at" valueDate="2016-04-24 18:22:19.0"/>
- <column name="updated_at" valueDate="2016-04-24 18:22:19.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="133"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="134"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="135"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="136"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="137"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="138"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="140"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="141"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="142"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="143"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="144"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="145"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="146"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="147"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="148"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="149"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="150"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="151"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="152"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="153"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="154"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2014-12-17 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-12-17 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="155"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="156"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="157"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="158"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="159"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="160"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="161"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="162"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="163"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="164"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="165"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="166"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="167"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="168"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="169"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="170"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="171"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="172"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="173"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="174"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="175"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="176"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 22:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 22:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="177"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="178"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="179"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="180"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="181"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="182"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="191"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="192"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="193"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="194"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="195"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="197"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="198"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="199"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="200"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="201"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="202"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="203"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="204"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="205"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="206"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="207"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="208"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="209"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="210"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="211"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="212"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="213"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-03 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-03 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="214"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-10 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-10 23:27:36.0"/>
- </insert>
- <insert tableName="ad">
- <column name="id" valueNumeric="215"/>
- <column name="company_id" valueNumeric="2"/>
- <column name="company_categ_id" valueNumeric="40"/>
- <column name="ad_gps"/>
- <column name="ad_mobile_image" value="bild.jpg"/>
- <column name="created_at" valueDate="2016-07-10 23:27:36.0"/>
- <column name="updated_at" valueDate="2014-07-10 23:27:36.0"/>
- </insert>
- </changeSet>
- <changeSet author="gustavo (generated)" id="1468267830107-2">
- <insert tableName="ad_description">
- <column name="id" valueNumeric="6"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="7"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="8"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="9"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="10"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="11"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="12"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="13"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="14"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="15"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="16"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id" valueNumeric="207"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="17"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id" valueNumeric="208"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="18"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id" valueNumeric="209"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="19"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id" valueNumeric="210"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="20"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id" valueNumeric="211"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="21"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id" valueNumeric="212"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="22"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id" valueNumeric="213"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="23"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id" valueNumeric="214"/>
- <column name="ad_name" value="zapatillas"/>
- <column name="ad_description" value="anuncio sobre zapatillas"/>
- <column name="ad_mobile_text" value="zapatillas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="24"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id" valueNumeric="214"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="25"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id" valueNumeric="215"/>
- <column name="ad_name" value="zapatillas"/>
- <column name="ad_description" value="anuncio sobre zapatillas"/>
- <column name="ad_mobile_text" value="zapatillas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- <insert tableName="ad_description">
- <column name="id" valueNumeric="26"/>
- <column name="laguage_id" valueNumeric="20"/>
- <column name="ad_id" valueNumeric="215"/>
- <column name="ad_name" value="babuchas"/>
- <column name="ad_description" value="anuncio sobre babuchas"/>
- <column name="ad_mobile_text" value="babuchas en oferta muy buenas"/>
- <column name="ad_link" value="http://gumartinm.name"/>
- </insert>
- </changeSet>
-</databaseChangeLog>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context.xsd">
-
- <bean id="commonsLiquibase" class="liquibase.integration.spring.SpringLiquibase">
- <property name="dataSource" ref="dataSource" />
- <property name="changeLog" value="classpath:/spring-configuration/liquibase/changeLogs.xml" />
- <property name="defaultSchema" value="mybatis_example" />
- </bean>
-
-
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:mvc="http://www.springframework.org/schema/mvc"
- xmlns:context="http://www.springframework.org/schema/context"
- xmlns:util="http://www.springframework.org/schema/util"
- xmlns:p="http://www.springframework.org/schema/p"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/mvc
- http://www.springframework.org/schema/mvc/spring-mvc.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context.xsd
- http://www.springframework.org/schema/util
- http://www.springframework.org/schema/util/spring-util.xsd">
-
- <!--
- I am declaring my beans without the automatic annotation. :/
- Better because we are saving memory but it requires more configuration.
-
- See: org.springframework.web.servlet.config.AnnotationDrivenBeanDefinitionParser
- <mvc:annotation-driven/>
- -->
-
-
- <context:annotation-config />
-
- <context:component-scan base-package="de.spring.example.rest, org.resthub"/>
-
- <!--
- Required beans for generating XML responses from Java objects using JAXB annotations
- Jackson also works but it doesn't generate XML with namespaces... O.o
-
- This implementation will be slower than the one using Jackson :( but I am going to use it just for WADL generation :)
- -->
- <bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
- <property name="packagesToScan" value="org.jvnet.ws.wadl"/>
- </bean>
- <bean id="jaxbConverter" class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter">
- <constructor-arg ref="jaxbMarshaller" />
- </bean>
-
- <!-- Required beans for generating JSON responses from Java objects -->
- <bean id="jsonObjectMapperFactory" class="org.springframework.http.converter.json.Jackson2ObjectMapperFactoryBean"
- p:indentOutput="true" p:failOnEmptyBeans="false">
- <property name="featuresToDisable">
- <array>
- <util:constant static-field="com.fasterxml.jackson.databind.DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES"/>
-
- <!-- Useful when using Java 8 objects like OffsetDateTime.
- I want to keep the offset in time zone if it exists.
-
- LIKE THIS ONE: 2014-07-03 23:27:36+0100
- -->
- <util:constant static-field="com.fasterxml.jackson.databind.DeserializationFeature.ADJUST_DATES_TO_CONTEXT_TIME_ZONE"/>
-
- <util:constant static-field="com.fasterxml.jackson.databind.MapperFeature.DEFAULT_VIEW_INCLUSION"/>
- </array>
- </property>
- </bean>
-
- <util:list id="messageConverters">
- <bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" p:objectMapper-ref="jsonObjectMapperFactory"/>
- <ref bean="jaxbConverter" />
- <bean class="org.springframework.http.converter.StringHttpMessageConverter" />
- </util:list>
-
-
- <bean name="handlerAdapter"
- class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">
- <property name="webBindingInitializer">
- <bean
- class="org.springframework.web.bind.support.ConfigurableWebBindingInitializer">
- <!-- It enables us to use JSR-303 -->
- <property name="validator">
- <bean class="org.springframework.validation.beanvalidation.LocalValidatorFactoryBean"/>
- </property>
- </bean>
- </property>
- <property name="messageConverters" ref="messageConverters" />
-
-
- <property name="requestBodyAdvice">
- <util:list>
- <bean id="requestBodyAdvice" class="org.springframework.web.servlet.mvc.method.annotation.JsonViewRequestBodyAdvice"/>
- </util:list>
- </property>
-
-
- <property name="responseBodyAdvice">
- <util:list>
- <bean id="responseBodyAdvice" class="org.springframework.web.servlet.mvc.method.annotation.JsonViewResponseBodyAdvice"/>
- </util:list>
- </property>
- </bean>
-
- <bean id="handlerMapping" class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerMapping"/>
-
- <mvc:default-servlet-handler />
-
-</beans>
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xmlns:context="http://www.springframework.org/schema/context"
- xsi:schemaLocation="
- http://www.springframework.org/schema/beans
- http://www.springframework.org/schema/beans/spring-beans.xsd
- http://www.springframework.org/schema/context
- http://www.springframework.org/schema/context/spring-context.xsd">
-
- <context:component-scan base-package="de.spring.example.services, de.spring.example.context"/>
-
- <context:property-placeholder location="classpath:jpa.properties" />
-
-</beans>
\ No newline at end of file
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>
-<web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
- xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
- version="2.4">
-
- <display-name>Spring JPA: example JPA</display-name>
-
- <listener>
- <listener-class>
- org.springframework.web.context.ContextLoaderListener
- </listener-class>
- </listener>
-
- <context-param>
- <param-name>spring.profiles.default</param-name>
- <param-value>${environment.profile}</param-value>
- <param-name>contextConfigLocation</param-name>
- <param-value>
- classpath*:spring-configuration/*.xml
- </param-value>
- </context-param>
-
- <!-- Spring REST support -->
- <servlet>
- <servlet-name>spring-rest</servlet-name>
- <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
- <load-on-startup>1</load-on-startup>
- <async-supported>true</async-supported>
- <init-param>
- <param-name>contextConfigLocation</param-name>
- <param-value>classpath*:spring-configuration/mvc/rest/*.xml</param-value>
- </init-param>
- </servlet>
-
- <servlet-mapping>
- <servlet-name>spring-rest</servlet-name>
- <!-- REQUIRED PATTERN BY swagger-ui. IT DOESN'T WORK WITH ANY OTHER o.O -->
- <url-pattern>/*</url-pattern>
- </servlet-mapping>
-
-
- <!--
- Se serializan objetos Entity al vuelo.
-
- 1. JACKSON irá accediendo a todas las propiedades de un objeto Entity.
- 2. Según vaya accediendo se irán haciendo queries a base de datos. NO ANTES porque se hace en
- modo lazy, lo que quiere decir que tenemos el objeto Entity pero sus datos (lo que se obtiene
- después de hacer las queries) están vacíos. Hasta que no se accede a una propiedad determinada
- del objeto Entity no se hará realmente la query en base de datos.
- -->
- <filter>
- <filter-name>OpenEntityManagerInViewFilter</filter-name>
- <filter-class>org.springframework.orm.jpa.support.OpenEntityManagerInViewFilter</filter-class>
- </filter>
- <filter-mapping>
- <filter-name>OpenEntityManagerInViewFilter</filter-name>
- <url-pattern>/*</url-pattern>
- </filter-mapping>
-
-
-</web-app>
+++ /dev/null
-package de.spring.persistence.example.domain;
-
-public class AdTest {
-
-}
+++ /dev/null
-<?xml version="1.0" encoding="UTF-8"?>\r
-<beans xmlns="http://www.springframework.org/schema/beans"\r
- xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\r
- xmlns:util="http://www.springframework.org/schema/util"\r
- xmlns:tx="http://www.springframework.org/schema/tx"\r
- xmlns:jee="http://www.springframework.org/schema/jee"\r
- xsi:schemaLocation="http://www.springframework.org/schema/beans\r
- http://www.springframework.org/schema/beans/spring-beans.xsd\r
- http://www.springframework.org/schema/util\r
- http://www.springframework.org/schema/util/spring-util.xsd\r
- http://www.springframework.org/schema/tx \r
- http://www.springframework.org/schema/tx/spring-tx.xsd\r
- http://www.springframework.org/schema/jee\r
- http://www.springframework.org/schema/jee/spring-jee.xsd">\r
-\r
- \r
- <!-- \r
- <jdbc:embedded-database id="dataSource" type="H2" />\r
- -->\r
- <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">\r
- <property name="driverClassName" value="org.h2.Driver" />\r
- <property name="url" value="jdbc:h2:mem:mybatis_example;INIT=create schema if not exists mybatis_example\;SET SCHEMA mybatis_example;MODE=DB2;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE" />\r
- <property name="username" value="mybatis" />\r
- <property name="password" value="" />\r
- </bean>\r
- \r
-</beans>\r