Skip to content

Commit

Permalink
TPCC
Browse files Browse the repository at this point in the history
  • Loading branch information
Nareshit authored and Nareshit committed Mar 26, 2021
1 parent 11f7385 commit 35ee258
Show file tree
Hide file tree
Showing 62 changed files with 1,538 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.nt.entity.Person" table="INH_PERSON_TPCH" discriminator-value="PER">
<class name="com.nt.entity.Person" table="INH_PERSON_TPCH" discriminator-value="PER" polymorphism="explicit">
<id name="pid" type="int">
<generator class="sequence"/>
</id>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.nt.entity.Person" table="INH_PERSON_TPCH" discriminator-value="PER">
<class name="com.nt.entity.Person" table="INH_PERSON_TPCH" discriminator-value="PER" polymorphism="explicit">
<id name="pid" type="int">
<generator class="sequence"/>
</id>
Expand Down
32 changes: 32 additions & 0 deletions HBProj58-InheritenceMapping-TPCC-ImplicitPolymorphism/.classpath
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="bin/main" path="src/main/java">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/main" path="src/main/resources">
<attributes>
<attribute name="gradle_scope" value="main"/>
<attribute name="gradle_used_by_scope" value="main,test"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/test" path="src/test/java">
<attributes>
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="bin/test" path="src/test/resources">
<attributes>
<attribute name="gradle_scope" value="test"/>
<attribute name="gradle_used_by_scope" value="test"/>
<attribute name="test" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-14/"/>
<classpathentry kind="con" path="org.eclipse.buildship.core.gradleclasspathcontainer"/>
<classpathentry kind="output" path="bin/default"/>
</classpath>
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#
# https://help.github.com/articles/dealing-with-line-endings/
#
# These are explicitly windows files and should use crlf
*.bat text eol=crlf

Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Ignore Gradle project-specific cache directory
.gradle

# Ignore Gradle build output directory
build
23 changes: 23 additions & 0 deletions HBProj58-InheritenceMapping-TPCC-ImplicitPolymorphism/.project
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>HBProj58-InheritenceMapping-TPCC-ImplicitPolymorphism</name>
<comment>Project HBProj55-InheritenceMapping-TPCH created by Buildship.</comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.buildship.core.gradleprojectbuilder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.buildship.core.gradleprojectnature</nature>
</natures>
</projectDescription>
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
arguments=
auto.sync=true
build.scans.enabled=false
connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER)
connection.project.dir=
eclipse.preferences.version=1
gradle.user.home=
java.home=
jvm.arguments=
offline.mode=false
override.workspace.settings=true
show.console.view=false
show.executions.view=false
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=14
org.eclipse.jdt.core.compiler.compliance=14
org.eclipse.jdt.core.compiler.source=14
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<!-- Connection properties (mandatory except driver class name) -->
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="connection.url">jdbc:oracle:thin:@localhost:1521:xe</property>
<property name="connection.username">system</property>
<property name="connection.password">manager</property>

<!-- <property name="connection.driver_class">com.mysql.cj.jdbc.Driver</property>
<property name="connection.url">jdbc:mysql:///nthb915db</property>
<property name="connection.username">root</property>
<property name="connection.password">root</property>
-->

<!-- Connection provider to work with Proxool -->
<property name="connection.provider_class">org.hibernate.hikaricp.internal.HikariCPConnectionProvider</property>

<!-- HikariCP settings -->
<property name="hikari.connectionTimeout">50000</property>
<property name="hibernate.hikari.minimumIdle">10</property>
<property name="hibernate.hikari.maximumPoolSize">20</property>
<property name="hibernate.hikari.idleTimeout">30000</property>


<!-- Hibernate properties (optional) -->
<property name="show_sql">true</property>
<property name="format_sql">true</property>
<property name="hbm2ddl.auto">update</property>
<property name="dialect">org.hibernate.dialect.Oracle10gDialect</property>
<!-- mapping classes -->
<mapping resource="com/nt/entity/Person.hbm.xml"/>
</session-factory>
</hibernate-configuration>
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE hibernate-mapping PUBLIC "-//Hibernate/Hibernate Mapping DTD 3.0//EN"
"http://www.hibernate.org/dtd/hibernate-mapping-3.0.dtd">
<hibernate-mapping>
<class name="com.nt.entity.Person" table="INH_PERSON_TPCC_IMPLICITPOLY" polymorphism="explicit">
<id name="pid" type="int">
<generator class="sequence"/>
</id>
<property name="pname" type="string" length="15"/>
<property name="paddrs" type="string" length="15"/>
<property name="company" type="string" length="15"/>
</class>

<class name="com.nt.entity.Customer" table="INH_CUSTOMER_TPCC_IMPLICITPOLY" >
<id name="pid" type="int">
<generator class="sequence"/>
</id>
<property name="pname" type="string" length="15"/>
<property name="paddrs" type="string" length="15"/>
<property name="company" type="string" length="15"/>
<property name="billAmt" type="float"/>
<property name="discount" type="float"/>
</class>

<class name="com.nt.entity.Employee" table="INH_EMPLOYEE_TPCC_IMPLICITPOLY" >
<id name="pid" type="int">
<generator class="sequence"/>
</id>
<property name="pname" type="string" length="15"/>
<property name="paddrs" type="string" length="15"/>
<property name="company" type="string" length="15"/>
<property name="salary" type="float"/>
<property name="desg" type="string" length="15"/>
<property name="deptNo" type="int" />
</class>
</hibernate-mapping>


Binary file not shown.
Binary file not shown.
34 changes: 34 additions & 0 deletions HBProj58-InheritenceMapping-TPCC-ImplicitPolymorphism/build.gradle
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* This file was generated by the Gradle 'init' task.
*
* This generated file contains a sample Java Library project to get you started.
* For more details take a look at the Java Libraries chapter in the Gradle
* User Manual available at https://docs.gradle.org/6.3/userguide/java_library_plugin.html
*/

plugins {
// Apply the java-library plugin to add support for Java Library
id 'application'
}

sourceCompatibility='14.0.1'
targetCompatibility='14.0.1'


repositories {
// Use jcenter for resolving dependencies.
// You can declare any Maven/Ivy/file repository here.
jcenter()
}

dependencies {
// https://mvnrepository.com/artifact/org.hibernate/hibernate-core
implementation group: 'org.hibernate', name: 'hibernate-core', version: '5.4.28.Final'
// https://mvnrepository.com/artifact/com.oracle.ojdbc/ojdbc8
implementation group: 'com.oracle.ojdbc', name: 'ojdbc8', version: '19.3.0.0'
// https://mvnrepository.com/artifact/org.projectlombok/lombok
compileOnly group: 'org.projectlombok', name: 'lombok', version: '1.18.18'
// https://mvnrepository.com/artifact/org.hibernate/hibernate-hikaricp
implementation group: 'org.hibernate', name: 'hibernate-hikaricp', version: '5.4.28.Final'

}
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-6.3-bin.zip
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
Loading

0 comments on commit 35ee258

Please sign in to comment.