This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company.hibernate.dao; | |
import java.util.List; | |
import com.company.hibernate.domain.Contact; | |
public interface ContactDao { | |
// Find all contacts | |
public List<Contact> findAll(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created on Oct 12, 2011 | |
*/ | |
package com.company.hibernate.domain; | |
import java.io.Serializable; | |
import java.util.HashSet; | |
import java.util.Set; | |
import javax.persistence.Column; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* Created on Oct 12, 2011 | |
*/ | |
package com.company.hibernate.domain; | |
import static javax.persistence.GenerationType.IDENTITY; | |
import java.io.Serializable; | |
import java.util.Date; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<project xmlns="http://maven.apache.org/POM/4.0.0" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>org.springframework.samples.spring</groupId> | |
<artifactId>spring-utility</artifactId> | |
<version>1.0.0.CI-SNAPSHOT</version> | |
<packaging>jar</packaging> | |
<name>Spring Utility</name> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
jdbc.driverClassName=com.mysql.jdbc.Driver | |
jdbc.url=jdbc:mysql://54.172.6.102:3306/spring | |
jdbc.username=fractalystlab | |
jdbc.password=fractalystlab |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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-3.1.xsd | |
http://www.springframework.org/schema/context | |
http://www.springframework.org/schema/context/spring-context-3.1.xsd"> | |
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" | |
destroy-method="close"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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-3.1.xsd | |
http://www.springframework.org/schema/context | |
http://www.springframework.org/schema/context/spring-context-3.1.xsd"> | |
<description>JDBC Pool con DataSource MySQL y StoredProcedure</description> | |
<import resource="datasource-dbcp.xml"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company.app.annotation.procedure; | |
import java.sql.Types; | |
import javax.sql.DataSource; | |
import org.springframework.jdbc.core.SqlParameter; | |
import org.springframework.jdbc.object.SqlFunction; | |
public class SfFirstNameById extends SqlFunction<String> { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company.app.annotation.dao; | |
import java.util.List; | |
import javax.annotation.Resource; | |
import javax.sql.DataSource; | |
import org.springframework.stereotype.Repository; | |
import com.company.app.annotation.procedure.SfFirstNameById; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.company.app.annotation.dao; | |
public interface ContactSfDao { | |
public String getFirstNameById(Long id); | |
} |