-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
54f54c5
commit 75eb6fd
Showing
63 changed files
with
51,718 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,95 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" output="target/classes" path="src/main/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry excluding="**/*.java" including="**/*.java" kind="src" path="src/main/resources"/> | ||
<classpathentry kind="var" path="M2_REPO/javax/ws/rs/javax.ws.rs-api/2.0.1/javax.ws.rs-api-2.0.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/javax/annotation/javax.annotation-api/1.2/javax.annotation-api-1.2.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/javax/validation/validation-api/1.1.0.Final/validation-api-1.1.0.Final.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/glassfish/jersey/containers/jersey-container-servlet-core/2.17/jersey-container-servlet-core-2.17.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/glassfish/hk2/external/javax.inject/2.4.0-b10/javax.inject-2.4.0-b10.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/glassfish/jersey/core/jersey-common/2.17/jersey-common-2.17.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/glassfish/jersey/bundles/repackaged/jersey-guava/2.17/jersey-guava-2.17.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/glassfish/hk2/hk2-api/2.4.0-b10/hk2-api-2.4.0-b10.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/glassfish/hk2/hk2-utils/2.4.0-b10/hk2-utils-2.4.0-b10.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/glassfish/hk2/external/aopalliance-repackaged/2.4.0-b10/aopalliance-repackaged-2.4.0-b10.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/glassfish/hk2/hk2-locator/2.4.0-b10/hk2-locator-2.4.0-b10.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/javassist/javassist/3.17.1-GA/javassist-3.17.1-GA.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/glassfish/hk2/osgi-resource-locator/1.0.1/osgi-resource-locator-1.0.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/glassfish/jersey/core/jersey-server/2.17/jersey-server-2.17.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/glassfish/jersey/core/jersey-client/2.17/jersey-client-2.17.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/glassfish/jersey/media/jersey-media-jaxb/2.17/jersey-media-jaxb-2.17.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/glassfish/jersey/media/jersey-media-moxy/2.17/jersey-media-moxy-2.17.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/glassfish/jersey/ext/jersey-entity-filtering/2.17/jersey-entity-filtering-2.17.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/eclipse/persistence/org.eclipse.persistence.moxy/2.5.0/org.eclipse.persistence.moxy-2.5.0.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/eclipse/persistence/org.eclipse.persistence.core/2.5.0/org.eclipse.persistence.core-2.5.0.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/eclipse/persistence/org.eclipse.persistence.asm/2.5.0/org.eclipse.persistence.asm-2.5.0.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/eclipse/persistence/org.eclipse.persistence.antlr/2.5.0/org.eclipse.persistence.antlr-2.5.0.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/cglib/cglib-nodep/2.2.2/cglib-nodep-2.2.2.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/commons-dbcp/commons-dbcp/1.4/commons-dbcp-1.4.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/commons-pool/commons-pool/1.5.4/commons-pool-1.5.4.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-core/4.1.9.Final/hibernate-core-4.1.9.Final.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/antlr/antlr/2.7.7/antlr-2.7.7.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging/3.1.0.GA/jboss-logging-3.1.0.GA.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/jboss/spec/javax/transaction/jboss-transaction-api_1.1_spec/1.0.0.Final/jboss-transaction-api_1.1_spec-1.0.0.Final.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/dom4j/dom4j/1.6.1/dom4j-1.6.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/hibernate/javax/persistence/hibernate-jpa-2.0-api/1.0.1.Final/hibernate-jpa-2.0-api-1.0.1.Final.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/hibernate/common/hibernate-commons-annotations/4.0.4.Final/hibernate-commons-annotations-4.0.4.Final.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-ehcache/4.3.0.Final/hibernate-ehcache-4.3.0.Final.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/jboss/logging/jboss-logging-annotations/1.2.0.Beta1/jboss-logging-annotations-1.2.0.Beta1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/net/sf/ehcache/ehcache-core/2.4.3/ehcache-core-2.4.3.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/slf4j/slf4j-api/1.6.1/slf4j-api-1.6.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-validator/5.1.0.Alpha1/hibernate-validator-5.1.0.Alpha1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/com/fasterxml/classmate/0.8.0/classmate-0.8.0.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-search/4.2.0.Beta2/hibernate-search-4.2.0.Beta2.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-search-orm/4.2.0.Beta2/hibernate-search-orm-4.2.0.Beta2.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-search-engine/4.2.0.Beta2/hibernate-search-engine-4.2.0.Beta2.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/hibernate/hibernate-search-analyzers/4.2.0.Beta2/hibernate-search-analyzers-4.2.0.Beta2.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-core/3.6.1/lucene-core-3.6.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-analyzers/3.6.1/lucene-analyzers-3.6.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/apache/solr/solr-analysis-extras/3.6.1/solr-analysis-extras-3.6.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/apache/solr/solr-core/3.6.1/solr-core-3.6.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/apache/solr/solr-solrj/3.6.1/solr-solrj-3.6.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/commons-io/commons-io/2.1/commons-io-2.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-highlighter/3.6.1/lucene-highlighter-3.6.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-memory/3.6.1/lucene-memory-3.6.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-kuromoji/3.6.1/lucene-kuromoji-3.6.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-misc/3.6.1/lucene-misc-3.6.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-phonetic/3.6.1/lucene-phonetic-3.6.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/commons-codec/commons-codec/1.6/commons-codec-1.6.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-spatial/3.6.1/lucene-spatial-3.6.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-spellchecker/3.6.1/lucene-spellchecker-3.6.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-grouping/3.6.1/lucene-grouping-3.6.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/commons-lang/commons-lang/2.6/commons-lang-2.6.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/com/google/guava/guava/r05/guava-r05.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-smartcn/3.6.1/lucene-smartcn-3.6.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/apache/lucene/lucene-stempel/3.6.1/lucene-stempel-3.6.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/apache/avro/avro/1.6.3/avro-1.6.3.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/codehaus/jackson/jackson-core-asl/1.8.8/jackson-core-asl-1.8.8.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/codehaus/jackson/jackson-mapper-asl/1.8.8/jackson-mapper-asl-1.8.8.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/com/thoughtworks/paranamer/paranamer/2.3/paranamer-2.3.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/org/xerial/snappy/snappy-java/1.0.4.1/snappy-java-1.0.4.1.jar"/> | ||
<classpathentry kind="var" path="M2_REPO/mysql/mysql-connector-java/5.1.22/mysql-connector-java-5.1.22.jar"/> | ||
<classpathentry kind="src" output="target/test-classes" path="src/test/java"> | ||
<attributes> | ||
<attribute name="optional" value="true"/> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER"> | ||
<attributes> | ||
<attribute name="maven.pomderived" value="true"/> | ||
<attribute name="org.eclipse.jst.component.dependency" value="/WEB-INF/lib"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="output" path="target/classes"/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<projectDescription> | ||
<name>hibernate-jersey-angularjs</name> | ||
<comment>NO_M2ECLIPSE_SUPPORT: Project files created with the maven-eclipse-plugin are not supported in M2Eclipse.</comment> | ||
<projects/> | ||
<buildSpec> | ||
<buildCommand> | ||
<name>org.eclipse.wst.jsdt.core.javascriptValidator</name> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.wst.common.project.facet.core.builder</name> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.jdt.core.javabuilder</name> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.wst.validation.validationbuilder</name> | ||
</buildCommand> | ||
<buildCommand> | ||
<name>org.eclipse.m2e.core.maven2Builder</name> | ||
</buildCommand> | ||
</buildSpec> | ||
<natures> | ||
<nature>org.eclipse.jem.workbench.JavaEMFNature</nature> | ||
<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature> | ||
<nature>org.eclipse.m2e.core.maven2Nature</nature> | ||
<nature>org.eclipse.jdt.core.javanature</nature> | ||
<nature>org.eclipse.wst.common.project.facet.core.nature</nature> | ||
<nature>org.eclipse.wst.jsdt.core.jsNature</nature> | ||
</natures> | ||
</projectDescription> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<classpath> | ||
<classpathentry kind="src" path="src/main/webapp"/> | ||
<classpathentry kind="src" path="target/m2e-wtp/web-resources"/> | ||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.JRE_CONTAINER"/> | ||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.WebProject"> | ||
<attributes> | ||
<attribute name="hide" value="true"/> | ||
</attributes> | ||
</classpathentry> | ||
<classpathentry kind="con" path="org.eclipse.wst.jsdt.launching.baseBrowserLibrary"/> | ||
<classpathentry kind="output" path=""/> | ||
</classpath> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
eclipse.preferences.version=1 | ||
encoding//src/main/java=UTF-8 | ||
encoding//src/main/resources=UTF-8 | ||
encoding/<project>=UTF-8 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
eclipse.preferences.version=1 | ||
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled | ||
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 | ||
org.eclipse.jdt.core.compiler.compliance=1.7 | ||
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning | ||
org.eclipse.jdt.core.compiler.source=1.7 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
activeProfiles= | ||
eclipse.preferences.version=1 | ||
resolveWorkspaceProjects=true | ||
version=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0"> | ||
<wb-module deploy-name="hibernate-jersey-angularjs"> | ||
<wb-resource deploy-path="/" source-path="/target/m2e-wtp/web-resources"/> | ||
<wb-resource deploy-path="/" source-path="/src/main/webapp" tag="defaultRootSource"/> | ||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/java"/> | ||
<wb-resource deploy-path="/WEB-INF/classes" source-path="/src/main/resources"/> | ||
<property name="context-root" value="hibernate-jersey-angularjs"/> | ||
<property name="java-output-path" value="/hibernate-jersey-angularjs/target/classes"/> | ||
</wb-module> | ||
</project-modules> |
7 changes: 7 additions & 0 deletions
7
.settings/org.eclipse.wst.common.project.facet.core.prefs.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<root> | ||
<facet id="jst.jaxrs"> | ||
<node name="libprov"> | ||
<attribute name="provider-id" value="jaxrs-no-op-library-provider"/> | ||
</node> | ||
</facet> | ||
</root> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<faceted-project> | ||
<fixed facet="wst.jsdt.web"/> | ||
<installed facet="java" version="1.7"/> | ||
<installed facet="jst.web" version="2.5"/> | ||
<installed facet="jst.jaxrs" version="2.0"/> | ||
<installed facet="wst.jsdt.web" version="1.0"/> | ||
</faceted-project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
org.eclipse.wst.jsdt.launching.baseBrowserLibrary |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Window |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
disabled=06target | ||
eclipse.preferences.version=1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,112 @@ | ||
<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> | ||
|
||
<groupId>com.king</groupId> | ||
<artifactId>hibernate-jersey-angularjs</artifactId> | ||
<packaging>war</packaging> | ||
<version>1.0</version> | ||
<name>hibernate-jersey-angularjs</name> | ||
<properties> | ||
<jersey.version>2.17</jersey.version> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<hibernate-version>4.1.9.Final</hibernate-version> | ||
<hibernate-search-version>4.2.0.Beta2</hibernate-search-version> | ||
<commons-dbcp-version>1.4</commons-dbcp-version> | ||
<cglib-version>2.2.2</cglib-version> | ||
<mysql-connector-version>5.1.22</mysql-connector-version> | ||
</properties> | ||
|
||
<build> | ||
<finalName>hibernate-jersey-angularjs</finalName> | ||
<plugins> | ||
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>2.5.1</version> | ||
<inherited>true</inherited> | ||
<configuration> | ||
<source>1.7</source> | ||
<target>1.7</target> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
</build> | ||
|
||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>org.glassfish.jersey</groupId> | ||
<artifactId>jersey-bom</artifactId> | ||
<version>${jersey.version}</version> | ||
<type>pom</type> | ||
<scope>import</scope> | ||
</dependency> | ||
</dependencies> | ||
</dependencyManagement> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.glassfish.jersey.containers</groupId> | ||
<artifactId>jersey-container-servlet-core</artifactId> | ||
<!-- use the following artifactId if you don't need servlet 2.x compatibility --> | ||
<!-- artifactId>jersey-container-servlet</artifactId --> | ||
</dependency> | ||
<!-- uncomment this to get JSON support | ||
--> | ||
<dependency> | ||
<groupId>org.glassfish.jersey.media</groupId> | ||
<artifactId>jersey-media-moxy</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>cglib</groupId> | ||
<artifactId>cglib-nodep</artifactId> | ||
<version>${cglib-version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-dbcp</groupId> | ||
<artifactId>commons-dbcp</artifactId> | ||
<version>${commons-dbcp-version}</version> | ||
</dependency> | ||
<!-- Hibernate 4.1.9.Final --> | ||
<dependency> | ||
<groupId>org.hibernate</groupId> | ||
<artifactId>hibernate-core</artifactId> | ||
<version>${hibernate-version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hibernate.javax.persistence</groupId> | ||
<artifactId>hibernate-jpa-2.0-api</artifactId> | ||
<version>1.0.1.Final</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hibernate</groupId> | ||
<artifactId>hibernate-ehcache</artifactId> | ||
<version>4.3.0.Final</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hibernate</groupId> | ||
<artifactId>hibernate-validator</artifactId> | ||
<version>5.1.0.Alpha1</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.hibernate.common</groupId> | ||
<artifactId>hibernate-commons-annotations</artifactId> | ||
<version>4.0.4.Final</version> | ||
</dependency> | ||
<!-- Hibernate Search --> | ||
<dependency> | ||
<groupId>org.hibernate</groupId> | ||
<artifactId>hibernate-search</artifactId> | ||
<version>${hibernate-search-version}</version> | ||
</dependency> | ||
<!-- MySQL Driver --> | ||
<dependency> | ||
<groupId>mysql</groupId> | ||
<artifactId>mysql-connector-java</artifactId> | ||
<version>${mysql-connector-version}</version> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
package com.king.dao; | ||
|
||
import java.util.List; | ||
|
||
import org.hibernate.Query; | ||
import org.hibernate.Session; | ||
import org.hibernate.Transaction; | ||
|
||
import com.king.entity.Address; | ||
import com.king.test.HibernateTest; | ||
|
||
public class AddressDao { | ||
public void getAddress() { | ||
Session session = HibernateTest.getSession(); | ||
Transaction tx = session.beginTransaction(); | ||
|
||
String hql = "from Address"; | ||
Query qry = session.createQuery(hql); | ||
List<Address> list = qry.list(); | ||
System.out.println(list.size()); | ||
tx.commit(); | ||
session.close(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.king.dao; | ||
|
||
import java.util.List; | ||
|
||
import org.hibernate.Query; | ||
import org.hibernate.Session; | ||
import org.hibernate.Transaction; | ||
|
||
import com.king.entity.Blog; | ||
import com.king.test.HibernateTest; | ||
|
||
public class BlogDao { | ||
public Blog findBlogById(String id) { | ||
Session session = HibernateTest.getSession(); | ||
|
||
String hql = "from Blog b where b.id = :id"; | ||
Blog blog = (Blog) (session.createQuery(hql).setString("id", id).uniqueResult()); | ||
|
||
session.close(); | ||
return blog; | ||
} | ||
|
||
public List<Blog> getAllBlogs() { | ||
Session session = HibernateTest.getSession(); | ||
|
||
String hql = "from Blog"; | ||
Query qry = session.createQuery(hql); | ||
List<Blog> list = qry.list(); | ||
|
||
session.close(); | ||
return list; | ||
} | ||
|
||
public void updateBlog(Blog blog) { | ||
Session session = HibernateTest.getSession(); | ||
Transaction ts = session.beginTransaction(); | ||
session.saveOrUpdate(blog); | ||
session.flush(); | ||
ts.commit(); | ||
session.close(); | ||
} | ||
|
||
public static void main(String[] args) { | ||
Blog blog = new Blog(); | ||
blog.setTitle("ttd"); | ||
blog.setContent("conet"); | ||
BlogDao dao = new BlogDao(); | ||
dao.updateBlog(blog); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
package com.king.dao; | ||
|
||
public class UserDao { | ||
|
||
} |
Oops, something went wrong.