Skip to content
This repository has been archived by the owner on Jun 7, 2021. It is now read-only.

[TRAFODION-2920]Add hibernate dialect support. #1407

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions tools/hibernate-dialect/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.classpath
.project
.settings
mvn.out
target/*
/target/
*.log
/LICENSE
/NOTICE
33 changes: 33 additions & 0 deletions tools/hibernate-dialect/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# @@@ START COPYRIGHT @@@
# #
# # Licensed to the Apache Software Foundation (ASF) under one
# # or more contributor license agreements. See the NOTICE file
# # distributed with this work for additional information
# # regarding copyright ownership. The ASF licenses this file
# # to you under the Apache License, Version 2.0 (the
# # "License"); you may not use this file except in compliance
# # with the License. You may obtain a copy of the License at
# #
# # http://www.apache.org/licenses/LICENSE-2.0
# #
# # Unless required by applicable law or agreed to in writing,
# # software distributed under the License is distributed on an
# # "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# # KIND, either express or implied. See the License for the
# # specific language governing permissions and limitations
# # under the License.
# #
# # @@@ END COPYRIGHT @@@


.NOTPARALLEL: all

all: build_all

build_all:
echo "$(MAVEN) package -DskipTests"
set -o pipefail && $(MAVEN) package -DskipTests

clean:
$(MAVEN) clean
$(RM) -r target/*
20 changes: 20 additions & 0 deletions tools/hibernate-dialect/README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
Trafodion hibernate dialect
===============================
This is a tool for hibernate to use trafodion.
This tool now support hibernate version 4.x .
To use this tool, you should make all ,then load the jar file to your project,and add following config to you hibernate.cfg.xml file:

<property name="hibernate.dialect">org.hibernate.dialect.TrafodionDialect</property>

ABOUT HIBERNATE:

Hibernate ORM enables developers to more easily write applications whose data outlives the application process. As an Object/Relational Mapping (ORM) framework, Hibernate is concerned with data persistence as it applies to relational databases (via JDBC).

benefit:

Hibernate is one of the most common ORM frameworks and has a very high rate of use in the Java Web project, supporting it to improve the usability of trafodion in OLTP.

To build:
>cd <your path to hibernate dialect>
> make all

55 changes: 55 additions & 0 deletions tools/hibernate-dialect/pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

License head is required for every file.

xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">

<!--
* @@@ START COPYRIGHT @@@
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you under the Apache License, Version 2.0 (the
* "License"); you may not use this file except in compliance
* with the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing,
* software distributed under the License is distributed on an
* "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
* KIND, either express or implied. See the License for the
* specific language governing permissions and limitations
* under the License.
*
* @@@ END COPYRIGHT @@@
-->

<modelVersion>4.0.0</modelVersion>

<groupId>org.trafodion</groupId>
<artifactId>hibernate-dialect</artifactId>
<version>${env.TRAFODION_VER}</version>
<packaging>jar</packaging>

<name>Hibernate dialect tool jar</name>
<url>http://wiki.trafodion.org</url>

<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
</properties>

<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
<version>4.3.10.Final</version>
</dependency>
</dependencies>
</project>
Loading