init
This commit is contained in:
+231
@@ -0,0 +1,231 @@
|
||||
# Package Files #
|
||||
*.war
|
||||
src/main/generated
|
||||
|
||||
# Eclipse #
|
||||
.metadata
|
||||
bin/
|
||||
tmp/
|
||||
*.tmp
|
||||
*.bak
|
||||
*.swp
|
||||
*~.nib
|
||||
local.properties
|
||||
.settings/
|
||||
.loadpath
|
||||
.recommenders
|
||||
|
||||
.classpath
|
||||
.project
|
||||
|
||||
# External tool builders
|
||||
.externalToolBuilders/
|
||||
|
||||
# Locally stored "Eclipse launch configurations"
|
||||
*.launch
|
||||
|
||||
# PyDev specific (Python IDE for Eclipse)
|
||||
*.pydevproject
|
||||
|
||||
# CDT-specific (C/C++ Development Tooling)
|
||||
.cproject
|
||||
|
||||
# CDT- autotools
|
||||
.autotools
|
||||
|
||||
# Java annotation processor (APT)
|
||||
.factorypath
|
||||
|
||||
# PDT-specific (PHP Development Tools)
|
||||
.buildpath
|
||||
|
||||
# sbteclipse plugin
|
||||
.target
|
||||
|
||||
# Tern plugin
|
||||
.tern-project
|
||||
|
||||
# TeXlipse plugin
|
||||
.texlipse
|
||||
|
||||
# STS (Spring Tool Suite)
|
||||
.springBeans
|
||||
|
||||
# Code Recommenders
|
||||
.recommenders/
|
||||
|
||||
# Annotation Processing
|
||||
.apt_generated/
|
||||
.apt_generated_test/
|
||||
|
||||
# Scala IDE specific (Scala & Java development for Eclipse)
|
||||
.cache-main
|
||||
.scala_dependencies
|
||||
.worksheet
|
||||
|
||||
# Uncomment this line if you wish to ignore the project description file.
|
||||
# Typically, this file would be tracked if it contains build/dependency configurations:
|
||||
#.project
|
||||
|
||||
### Intellij ###
|
||||
.idea
|
||||
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and WebStorm
|
||||
# Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
|
||||
|
||||
# User-specific stuff
|
||||
.idea/**/workspace.xml
|
||||
.idea/**/tasks.xml
|
||||
.idea/**/usage.statistics.xml
|
||||
.idea/**/dictionaries
|
||||
.idea/**/shelf
|
||||
|
||||
# Generated files
|
||||
.idea/**/contentModel.xml
|
||||
|
||||
# Sensitive or high-churn files
|
||||
.idea/**/dataSources/
|
||||
.idea/**/dataSources.ids
|
||||
.idea/**/dataSources.local.xml
|
||||
.idea/**/sqlDataSources.xml
|
||||
.idea/**/dynamic.xml
|
||||
.idea/**/uiDesigner.xml
|
||||
.idea/**/dbnavigator.xml
|
||||
|
||||
# Gradle
|
||||
.idea/**/gradle.xml
|
||||
.idea/**/libraries
|
||||
|
||||
# Gradle and Maven with auto-import
|
||||
# When using Gradle or Maven with auto-import, you should exclude module files,
|
||||
# since they will be recreated, and may cause churn. Uncomment if using
|
||||
# auto-import.
|
||||
# .idea/modules.xml
|
||||
# .idea/*.iml
|
||||
# .idea/modules
|
||||
# *.iml
|
||||
# *.ipr
|
||||
|
||||
# CMake
|
||||
cmake-build-*/
|
||||
|
||||
# Mongo Explorer plugin
|
||||
.idea/**/mongoSettings.xml
|
||||
|
||||
# File-based project format
|
||||
*.iws
|
||||
|
||||
# IntelliJ
|
||||
out/
|
||||
|
||||
# mpeltonen/sbt-idea plugin
|
||||
.idea_modules/
|
||||
|
||||
# JIRA plugin
|
||||
atlassian-ide-plugin.xml
|
||||
|
||||
# Cursive Clojure plugin
|
||||
.idea/replstate.xml
|
||||
|
||||
# Crashlytics plugin (for Android Studio and IntelliJ)
|
||||
com_crashlytics_export_strings.xml
|
||||
crashlytics.properties
|
||||
crashlytics-build.properties
|
||||
fabric.properties
|
||||
|
||||
# Editor-based Rest Client
|
||||
.idea/httpRequests
|
||||
|
||||
# Android studio 3.1+ serialized cache file
|
||||
.idea/caches/build_file_checksums.ser
|
||||
|
||||
### Intellij Patch ###
|
||||
# Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
|
||||
|
||||
# *.iml
|
||||
# modules.xml
|
||||
# .idea/misc.xml
|
||||
# *.ipr
|
||||
|
||||
# Sonarlint plugin
|
||||
.idea/**/sonarlint/
|
||||
|
||||
# SonarQube Plugin
|
||||
.idea/**/sonarIssues.xml
|
||||
|
||||
# Markdown Navigator plugin
|
||||
.idea/**/markdown-navigator.xml
|
||||
.idea/**/markdown-navigator/
|
||||
|
||||
### Java ###
|
||||
# Compiled class file
|
||||
*.class
|
||||
|
||||
# Log file
|
||||
*.log
|
||||
|
||||
# BlueJ files
|
||||
*.ctxt
|
||||
|
||||
# Mobile Tools for Java (J2ME)
|
||||
.mtj.tmp/
|
||||
|
||||
# Package Files #
|
||||
*.war
|
||||
*.nar
|
||||
*.ear
|
||||
*.zip
|
||||
*.tar.gz
|
||||
*.rar
|
||||
|
||||
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
|
||||
hs_err_pid*
|
||||
|
||||
### macOS ###
|
||||
# General
|
||||
.DS_Store
|
||||
.AppleDouble
|
||||
.LSOverride
|
||||
|
||||
# Icon must end with two \r
|
||||
Icon
|
||||
|
||||
# Thumbnails
|
||||
._*
|
||||
|
||||
# Files that might appear in the root of a volume
|
||||
.DocumentRevisions-V100
|
||||
.fseventsd
|
||||
.Spotlight-V100
|
||||
.TemporaryItems
|
||||
.Trashes
|
||||
.VolumeIcon.icns
|
||||
.com.apple.timemachine.donotpresent
|
||||
|
||||
# Directories potentially created on remote AFP share
|
||||
.AppleDB
|
||||
.AppleDesktop
|
||||
Network Trash Folder
|
||||
Temporary Items
|
||||
.apdisk
|
||||
|
||||
### Gradle ###
|
||||
.gradle
|
||||
build/
|
||||
|
||||
# Ignore Gradle GUI config
|
||||
gradle-app.setting
|
||||
|
||||
# Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
|
||||
!gradle-wrapper.jar
|
||||
|
||||
# Cache of project
|
||||
.gradletasknamecache
|
||||
|
||||
# # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
|
||||
# gradle/wrapper/gradle-wrapper.properties
|
||||
|
||||
### Gradle Patch ###
|
||||
**/build/
|
||||
|
||||
# End of https://www.gitignore.io/api/java,macos,gradle,intellij
|
||||
/EAISIMWeb/
|
||||
+166
@@ -0,0 +1,166 @@
|
||||
plugins {
|
||||
id 'java-library'
|
||||
id 'maven-publish'
|
||||
id 'eclipse-wtp'
|
||||
id 'idea'
|
||||
id 'com.diffplug.eclipse.apt' version '3.41.1'
|
||||
id 'net.researchgate.release' version '3.0.2'
|
||||
}
|
||||
|
||||
def springVersion = "5.3.27"
|
||||
//def quartzVersion = "2.2.1"
|
||||
def queryDslVersion = "5.0.0"
|
||||
def hibernateVersion = "5.6.15.Final"
|
||||
|
||||
def nexusUrl = "https://nexus.eactive.synology.me:8090"
|
||||
def generatedJavaDir = "$buildDir/generated/java"
|
||||
def generatedTestJavaDir = "$buildDir/generated-test/java"
|
||||
|
||||
|
||||
java {
|
||||
toolchain {
|
||||
languageVersion = JavaLanguageVersion.of(8)
|
||||
}
|
||||
}
|
||||
|
||||
compileJava {
|
||||
options.encoding = 'UTF-8'
|
||||
options.compilerArgs += [
|
||||
'-Amapstruct.verbose=false'
|
||||
]
|
||||
sourceSets.main.java { srcDir generatedJavaDir }
|
||||
sourceSets.test.java { srcDir generatedTestJavaDir }
|
||||
options.generatedSourceOutputDirectory = project.file(generatedJavaDir)
|
||||
|
||||
aptOptions {
|
||||
processorArgs = [ 'querydsl.generatedAnnotationClass' : 'com.querydsl.core.annotations.Generated' ]
|
||||
}
|
||||
}
|
||||
|
||||
jar {
|
||||
exclude '**/persistence.xml'
|
||||
}
|
||||
|
||||
tasks.withType(JavaCompile) {
|
||||
options.encoding = 'UTF-8'
|
||||
}
|
||||
|
||||
dependencies {
|
||||
|
||||
api "com.querydsl:querydsl-jpa:${queryDslVersion}"
|
||||
api "com.querydsl:querydsl-apt:${queryDslVersion}"
|
||||
api "org.mapstruct:mapstruct:1.5.5.Final", "org.projectlombok:lombok:1.18.28"
|
||||
|
||||
// project > properties > Java Compiler > Annoation Processing
|
||||
annotationProcessor "org.projectlombok:lombok:1.18.28", "org.projectlombok:lombok-mapstruct-binding:0.2.0", "org.mapstruct:mapstruct-processor:1.5.5.Final"
|
||||
annotationProcessor "com.querydsl:querydsl-apt:${queryDslVersion}:jpa", "jakarta.persistence:jakarta.persistence-api:2.2.3", "jakarta.annotation:jakarta.annotation-api:1.3.5"
|
||||
|
||||
//api 'com.eactive.elink.common:elink-common-data:4.5.4'
|
||||
api 'com.eactive.elink.common:elink-common-data:4.5.5'
|
||||
api 'org.slf4j:slf4j-api:1.7.35'
|
||||
api 'com.google.code.findbugs:jsr305:3.0.2'
|
||||
|
||||
api 'org.springframework.data:spring-data-jpa:2.7.12'
|
||||
|
||||
api "org.hibernate:hibernate-core:${hibernateVersion}"
|
||||
api "org.hibernate:hibernate-entitymanager:${hibernateVersion}"
|
||||
api "org.hibernate:hibernate-ehcache:${hibernateVersion}"
|
||||
api "org.hibernate:hibernate-validator:5.4.3.Final"
|
||||
api "org.hibernate:hibernate-envers:${hibernateVersion}"
|
||||
|
||||
api 'org.springframework.data:spring-data-envers:2.7.12'
|
||||
|
||||
api "org.springframework:spring-aspects:${springVersion}"
|
||||
|
||||
api group: 'org.apache.commons', name: 'commons-lang3', version: '3.9'
|
||||
|
||||
testRuntimeOnly 'com.h2database:h2:2.1.214'
|
||||
testImplementation 'org.junit.jupiter:junit-jupiter-api:5.8.1'
|
||||
testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.8.1'
|
||||
testRuntimeOnly 'org.junit.platform:junit-platform-launcher:1.8.2'
|
||||
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.6.15'
|
||||
}
|
||||
|
||||
test {
|
||||
useJUnitPlatform()
|
||||
}
|
||||
|
||||
task sourcesJar(type: Jar, dependsOn: classes) {
|
||||
archiveClassifier = 'sources'
|
||||
from sourceSets.main.allSource
|
||||
}
|
||||
|
||||
publishing {
|
||||
repositories {
|
||||
maven {
|
||||
name = 'eactiveRepository'
|
||||
def releasesRepoUrl = "${nexusUrl}/repository/maven-releases/"
|
||||
def snapshotsRepoUrl = "${nexusUrl}/repository/maven-snapshots/"
|
||||
url = version.endsWith('SNAPSHOT') ? snapshotsRepoUrl : releasesRepoUrl
|
||||
credentials(PasswordCredentials)
|
||||
}
|
||||
}
|
||||
|
||||
publications {
|
||||
mavenJava(MavenPublication) {
|
||||
from components.java
|
||||
// artifact(sourcesJar) {
|
||||
// classifier 'sources'
|
||||
// }
|
||||
pom {
|
||||
description = "eLink Core JPA module"
|
||||
licenses {
|
||||
license {
|
||||
name = "Commercial License"
|
||||
url = "http://eactive.co.kr"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
task settingEclipseEncoding {
|
||||
if (project.file('.settings').exists()) {
|
||||
File f = file('.settings/org.eclipse.core.resources.prefs')
|
||||
f.write('eclipse.preferences.version=1\n')
|
||||
f.append('encoding/<project>=utf-8')
|
||||
}
|
||||
}
|
||||
|
||||
task initDirs() {
|
||||
if (!project.file(generatedJavaDir).exists()) {
|
||||
file(generatedJavaDir).mkdirs()
|
||||
}
|
||||
|
||||
if (!project.file(generatedTestJavaDir).exists()) {
|
||||
file(generatedTestJavaDir).mkdirs()
|
||||
}
|
||||
}
|
||||
|
||||
eclipse {
|
||||
synchronizationTasks settingEclipseEncoding, initDirs
|
||||
jdt {
|
||||
apt {
|
||||
genSrcDir = file(generatedJavaDir)
|
||||
genTestSrcDir = file(generatedTestJavaDir)
|
||||
}
|
||||
}
|
||||
wtp {
|
||||
facet {
|
||||
//you can add some extra wtp facets or update existing ones; mandatory keys: 'name', 'version':
|
||||
facet name: 'jpt.jpa', version: '2.2'
|
||||
}
|
||||
}
|
||||
project {
|
||||
natures = ['org.eclipse.buildship.core.gradleprojectnature',
|
||||
'org.eclipse.jdt.core.javanature',
|
||||
'org.eclipse.wst.common.project.facet.core.nature',
|
||||
'org.eclipse.wst.common.modulecore.ModuleCoreNature',
|
||||
'org.eclipse.jem.workbench.JavaEMFNature']
|
||||
buildCommand 'org.eclipse.buildship.core.gradleprojectbuilder'
|
||||
buildCommand 'org.eclipse.wst.validation.validationbuilder'
|
||||
buildCommand 'org.eclipse.wst.common.project.facet.core.builder'
|
||||
buildCommand 'org.eclipse.jdt.core.javabuilder'
|
||||
}
|
||||
}
|
||||
Vendored
BIN
Binary file not shown.
+6
@@ -0,0 +1,6 @@
|
||||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
zipStorePath=wrapper/dists
|
||||
networkTimeout=10000
|
||||
@@ -0,0 +1,234 @@
|
||||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Copyright © 2015-2021 the original authors.
|
||||
#
|
||||
# Licensed 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
|
||||
#
|
||||
# https://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.
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
# Gradle start up script for POSIX generated by Gradle.
|
||||
#
|
||||
# Important for running:
|
||||
#
|
||||
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
|
||||
# noncompliant, but you have some other compliant shell such as ksh or
|
||||
# bash, then to run this script, type that shell name before the whole
|
||||
# command line, like:
|
||||
#
|
||||
# ksh Gradle
|
||||
#
|
||||
# Busybox and similar reduced shells will NOT work, because this script
|
||||
# requires all of these POSIX shell features:
|
||||
# * functions;
|
||||
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
|
||||
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
|
||||
# * compound commands having a testable exit status, especially «case»;
|
||||
# * various built-in commands including «command», «set», and «ulimit».
|
||||
#
|
||||
# Important for patching:
|
||||
#
|
||||
# (2) This script targets any POSIX shell, so it avoids extensions provided
|
||||
# by Bash, Ksh, etc; in particular arrays are avoided.
|
||||
#
|
||||
# The "traditional" practice of packing multiple parameters into a
|
||||
# space-separated string is a well documented source of bugs and security
|
||||
# problems, so this is (mostly) avoided, by progressively accumulating
|
||||
# options in "$@", and eventually passing that to Java.
|
||||
#
|
||||
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
|
||||
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
|
||||
# see the in-line comments for details.
|
||||
#
|
||||
# There are tweaks for specific operating systems such as AIX, CygWin,
|
||||
# Darwin, MinGW, and NonStop.
|
||||
#
|
||||
# (3) This script is generated from the Groovy template
|
||||
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||
# within the Gradle project.
|
||||
#
|
||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||
#
|
||||
##############################################################################
|
||||
|
||||
# Attempt to set APP_HOME
|
||||
|
||||
# Resolve links: $0 may be a link
|
||||
app_path=$0
|
||||
|
||||
# Need this for daisy-chained symlinks.
|
||||
while
|
||||
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
|
||||
[ -h "$app_path" ]
|
||||
do
|
||||
ls=$( ls -ld "$app_path" )
|
||||
link=${ls#*' -> '}
|
||||
case $link in #(
|
||||
/*) app_path=$link ;; #(
|
||||
*) app_path=$APP_HOME$link ;;
|
||||
esac
|
||||
done
|
||||
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
|
||||
|
||||
APP_NAME="Gradle"
|
||||
APP_BASE_NAME=${0##*/}
|
||||
|
||||
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
||||
warn () {
|
||||
echo "$*"
|
||||
} >&2
|
||||
|
||||
die () {
|
||||
echo
|
||||
echo "$*"
|
||||
echo
|
||||
exit 1
|
||||
} >&2
|
||||
|
||||
# OS specific support (must be 'true' or 'false').
|
||||
cygwin=false
|
||||
msys=false
|
||||
darwin=false
|
||||
nonstop=false
|
||||
case "$( uname )" in #(
|
||||
CYGWIN* ) cygwin=true ;; #(
|
||||
Darwin* ) darwin=true ;; #(
|
||||
MSYS* | MINGW* ) msys=true ;; #(
|
||||
NONSTOP* ) nonstop=true ;;
|
||||
esac
|
||||
|
||||
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
|
||||
|
||||
|
||||
# Determine the Java command to use to start the JVM.
|
||||
if [ -n "$JAVA_HOME" ] ; then
|
||||
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
|
||||
# IBM's JDK on AIX uses strange locations for the executables
|
||||
JAVACMD=$JAVA_HOME/jre/sh/java
|
||||
else
|
||||
JAVACMD=$JAVA_HOME/bin/java
|
||||
fi
|
||||
if [ ! -x "$JAVACMD" ] ; then
|
||||
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
else
|
||||
JAVACMD=java
|
||||
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
|
||||
Please set the JAVA_HOME variable in your environment to match the
|
||||
location of your Java installation."
|
||||
fi
|
||||
|
||||
# Increase the maximum file descriptors if we can.
|
||||
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
|
||||
case $MAX_FD in #(
|
||||
max*)
|
||||
MAX_FD=$( ulimit -H -n ) ||
|
||||
warn "Could not query maximum file descriptor limit"
|
||||
esac
|
||||
case $MAX_FD in #(
|
||||
'' | soft) :;; #(
|
||||
*)
|
||||
ulimit -n "$MAX_FD" ||
|
||||
warn "Could not set maximum file descriptor limit to $MAX_FD"
|
||||
esac
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command, stacking in reverse order:
|
||||
# * args from the command line
|
||||
# * the main class name
|
||||
# * -classpath
|
||||
# * -D...appname settings
|
||||
# * --module-path (only if needed)
|
||||
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
|
||||
|
||||
# For Cygwin or MSYS, switch paths to Windows format before running java
|
||||
if "$cygwin" || "$msys" ; then
|
||||
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
|
||||
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
|
||||
|
||||
JAVACMD=$( cygpath --unix "$JAVACMD" )
|
||||
|
||||
# Now convert the arguments - kludge to limit ourselves to /bin/sh
|
||||
for arg do
|
||||
if
|
||||
case $arg in #(
|
||||
-*) false ;; # don't mess with options #(
|
||||
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
|
||||
[ -e "$t" ] ;; #(
|
||||
*) false ;;
|
||||
esac
|
||||
then
|
||||
arg=$( cygpath --path --ignore --mixed "$arg" )
|
||||
fi
|
||||
# Roll the args list around exactly as many times as the number of
|
||||
# args, so each arg winds up back in the position where it started, but
|
||||
# possibly modified.
|
||||
#
|
||||
# NB: a `for` loop captures its iteration list before it begins, so
|
||||
# changing the positional parameters here affects neither the number of
|
||||
# iterations, nor the values presented in `arg`.
|
||||
shift # remove old arg
|
||||
set -- "$@" "$arg" # push replacement arg
|
||||
done
|
||||
fi
|
||||
|
||||
# Collect all arguments for the java command;
|
||||
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
|
||||
# shell script including quotes and variable substitutions, so put them in
|
||||
# double quotes to make sure that they get re-expanded; and
|
||||
# * put everything else in single quotes, so that it's not re-expanded.
|
||||
|
||||
set -- \
|
||||
"-Dorg.gradle.appname=$APP_BASE_NAME" \
|
||||
-classpath "$CLASSPATH" \
|
||||
org.gradle.wrapper.GradleWrapperMain \
|
||||
"$@"
|
||||
|
||||
# Use "xargs" to parse quoted args.
|
||||
#
|
||||
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
|
||||
#
|
||||
# In Bash we could simply go:
|
||||
#
|
||||
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
|
||||
# set -- "${ARGS[@]}" "$@"
|
||||
#
|
||||
# but POSIX shell has neither arrays nor command substitution, so instead we
|
||||
# post-process each arg (as a line of input to sed) to backslash-escape any
|
||||
# character that might be a shell metacharacter, then use eval to reverse
|
||||
# that process (while maintaining the separation between arguments), and wrap
|
||||
# the whole thing up as a single "set" statement.
|
||||
#
|
||||
# This will of course break if any of these variables contains a newline or
|
||||
# an unmatched quote.
|
||||
#
|
||||
|
||||
eval "set -- $(
|
||||
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
|
||||
xargs -n1 |
|
||||
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
|
||||
tr '\n' ' '
|
||||
)" '"$@"'
|
||||
|
||||
exec "$JAVACMD" "$@"
|
||||
Vendored
+89
@@ -0,0 +1,89 @@
|
||||
@rem
|
||||
@rem Copyright 2015 the original author or authors.
|
||||
@rem
|
||||
@rem Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@rem you may not use this file except in compliance with the License.
|
||||
@rem You may obtain a copy of the License at
|
||||
@rem
|
||||
@rem https://www.apache.org/licenses/LICENSE-2.0
|
||||
@rem
|
||||
@rem Unless required by applicable law or agreed to in writing, software
|
||||
@rem distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%" == "" @echo off
|
||||
@rem ##########################################################################
|
||||
@rem
|
||||
@rem Gradle startup script for Windows
|
||||
@rem
|
||||
@rem ##########################################################################
|
||||
|
||||
@rem Set local scope for the variables with windows NT shell
|
||||
if "%OS%"=="Windows_NT" setlocal
|
||||
|
||||
set DIRNAME=%~dp0
|
||||
if "%DIRNAME%" == "" set DIRNAME=.
|
||||
set APP_BASE_NAME=%~n0
|
||||
set APP_HOME=%DIRNAME%
|
||||
|
||||
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
|
||||
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
|
||||
|
||||
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
|
||||
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
|
||||
|
||||
@rem Find java.exe
|
||||
if defined JAVA_HOME goto findJavaFromJavaHome
|
||||
|
||||
set JAVA_EXE=java.exe
|
||||
%JAVA_EXE% -version >NUL 2>&1
|
||||
if "%ERRORLEVEL%" == "0" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:findJavaFromJavaHome
|
||||
set JAVA_HOME=%JAVA_HOME:"=%
|
||||
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
|
||||
|
||||
if exist "%JAVA_EXE%" goto execute
|
||||
|
||||
echo.
|
||||
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME%
|
||||
echo.
|
||||
echo Please set the JAVA_HOME variable in your environment to match the
|
||||
echo location of your Java installation.
|
||||
|
||||
goto fail
|
||||
|
||||
:execute
|
||||
@rem Setup the command line
|
||||
|
||||
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
|
||||
|
||||
|
||||
@rem Execute Gradle
|
||||
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
|
||||
|
||||
:end
|
||||
@rem End local scope for the variables with windows NT shell
|
||||
if "%ERRORLEVEL%"=="0" goto mainEnd
|
||||
|
||||
:fail
|
||||
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
|
||||
rem the _cmd.exe /c_ return code!
|
||||
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1
|
||||
exit /b 1
|
||||
|
||||
:mainEnd
|
||||
if "%OS%"=="Windows_NT" endlocal
|
||||
|
||||
:omega
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.eactive.eai.adapter.loader;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.adapter.AdapterGroup;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class AdapterGroupLoader extends AbstractDataLoader<AdapterGroup, String, AdapterGroupLoaderRepository> {
|
||||
|
||||
public List<AdapterGroup> selectAllGroups() {
|
||||
return repository.selectAllGroups();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,21 @@
|
||||
package com.eactive.eai.adapter.loader;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.adapter.AdapterGroup;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface AdapterGroupLoaderRepository extends BaseRepository<AdapterGroup, String>,
|
||||
QuerydslPredicateExecutor<AdapterGroup>, DataLoaderRepository<AdapterGroup> {
|
||||
|
||||
@Query("from AdapterGroup where adptruseyn = '1' order by adptriodstcd desc")
|
||||
List<AdapterGroup> selectAllGroups();
|
||||
|
||||
List<AdapterGroup> findByAdptrcd(String adptrcd, Sort by);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.eactive.eai.adapter.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.adapter.Adapter;
|
||||
import com.eactive.eai.data.entity.onl.adapter.AdapterId;
|
||||
import com.eactive.eai.data.entity.onl.adapter.QAdapter;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class AdapterLoader extends AbstractDataLoader<Adapter, AdapterId, AdapterLoaderRepository> {
|
||||
|
||||
public Iterable<Adapter> selectAdaptersByGroup(String defaultServer, String adapterGroupName,
|
||||
String localServerName) {
|
||||
QAdapter qAdapter = QAdapter.adapter;
|
||||
return repository
|
||||
.findAll(qAdapter.id.adptrbzwkgroupname
|
||||
.eq(adapterGroupName)
|
||||
.and(qAdapter.eaisevrinstncname.in(defaultServer, localServerName)));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.eactive.eai.adapter.loader;
|
||||
|
||||
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.adapter.Adapter;
|
||||
import com.eactive.eai.data.entity.onl.adapter.AdapterId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface AdapterLoaderRepository
|
||||
extends BaseRepository<Adapter, AdapterId>, QuerydslPredicateExecutor<Adapter>, DataLoaderRepository<Adapter> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.eactive.eai.adapter.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.adapter.AdapterPropGroup;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class AdapterPropGroupLoader
|
||||
extends AbstractDataLoader<AdapterPropGroup, String, AdapterPropGroupLoaderRepository> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.eactive.eai.adapter.loader;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.adapter.AdapterPropGroup;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface AdapterPropGroupLoaderRepository
|
||||
extends DataLoaderRepository<AdapterPropGroup>, BaseRepository<AdapterPropGroup, String> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.eactive.eai.adapter.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.adapter.AdapterProp;
|
||||
import com.eactive.eai.data.entity.onl.adapter.AdapterPropId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class AdapterPropLoader extends AbstractDataLoader<AdapterProp, AdapterPropId, AdapterPropLoaderRepository> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.eactive.eai.adapter.loader;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.adapter.AdapterProp;
|
||||
import com.eactive.eai.data.entity.onl.adapter.AdapterPropId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface AdapterPropLoaderRepository
|
||||
extends DataLoaderRepository<AdapterProp>, BaseRepository<AdapterProp, AdapterPropId> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.eactive.eai.adapter.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.adapter.AdapterType;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class AdapterTypeLoader extends AbstractDataLoader<AdapterType, String, AdapterTypeLoaderRepository> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.eactive.eai.adapter.loader;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.adapter.AdapterType;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface AdapterTypeLoaderRepository extends DataLoaderRepository<AdapterType>, BaseRepository<AdapterType, String> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.eactive.eai.apim.apigroup.loader;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.apim.apigroup.ApiGroupApi;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class ApiGroupApiLoader extends AbstractDataLoader<ApiGroupApi, String, ApiGroupApiLoaderRepository> {
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.eactive.eai.apim.apigroup.loader;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.apim.apigroup.ApiGroupApi;
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
|
||||
|
||||
public interface ApiGroupApiLoaderRepository extends BaseRepository<ApiGroupApi, String>,
|
||||
QuerydslPredicateExecutor<ApiGroupApi>, DataLoaderRepository<ApiGroupApi> {
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.eactive.eai.apim.apigroup.loader;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.apim.apigroup.ApiGroup;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class ApiGroupLoader extends AbstractDataLoader<ApiGroup, String, ApiGroupLoaderRepository> {
|
||||
public List<ApiGroup> selectAllGroups() {
|
||||
return repository.findAll();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.eactive.eai.apim.apigroup.loader;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.apim.apigroup.ApiGroup;
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ApiGroupLoaderRepository extends BaseRepository<ApiGroup, String>,
|
||||
QuerydslPredicateExecutor<ApiGroup>, DataLoaderRepository<ApiGroup> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.eactive.eai.authserver.dao;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.authserver.ClientEntity;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class ClientLoader extends AbstractDataLoader<ClientEntity, String, ClientLoaderRepository> {
|
||||
|
||||
@Override
|
||||
public Stream<ClientEntity> loadAll() {
|
||||
return repository.loadAll();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.eactive.eai.authserver.dao;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.authserver.ClientEntity;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface ClientLoaderRepository extends DataLoaderRepository<ClientEntity>, BaseRepository<ClientEntity, String> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,26 @@
|
||||
package com.eactive.eai.authserver.dao;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.authserver.ScopeEntity;
|
||||
import com.eactive.eai.data.entity.onl.authserver.ScopeEntityId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class ScopeLoader extends AbstractDataLoader<ScopeEntity, ScopeEntityId, ScopeLoaderRepository> {
|
||||
|
||||
public ScopeEntity findByIdBzwksvckeyname(String apiId) {
|
||||
return repository.findByIdBzwksvckeyname(apiId);
|
||||
}
|
||||
|
||||
public ScopeEntity findByIdScopeid(String scopeId) {
|
||||
return repository.findByIdScopeid(scopeId);
|
||||
}
|
||||
|
||||
public ScopeEntity findByIdBzwksvckeynameAndIdScopeid(String apiId, String scopeId) {
|
||||
return repository.findByIdBzwksvckeynameAndIdScopeid(apiId, scopeId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.eactive.eai.authserver.dao;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.authserver.ScopeEntity;
|
||||
import com.eactive.eai.data.entity.onl.authserver.ScopeEntityId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface ScopeLoaderRepository extends DataLoaderRepository<ScopeEntity>, BaseRepository<ScopeEntity, ScopeEntityId> {
|
||||
|
||||
ScopeEntity findByIdBzwksvckeyname(String apiId);
|
||||
|
||||
ScopeEntity findByIdScopeid(String scopeId);
|
||||
|
||||
ScopeEntity findByIdBzwksvckeynameAndIdScopeid(String apiId, String scopeId);
|
||||
}
|
||||
@@ -0,0 +1,57 @@
|
||||
package com.eactive.eai.authserver.dao;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
import java.util.Optional;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.authserver.TokenIssuanceLog;
|
||||
|
||||
@Component
|
||||
public class TokenIssuanceLogLoader {
|
||||
|
||||
@Autowired
|
||||
private TokenIssuanceLogLoaderRepository tokenIssuanceLogLoaderRepository;
|
||||
|
||||
public Stream<TokenIssuanceLog> loadAll() {
|
||||
return tokenIssuanceLogLoaderRepository.findAll().stream();
|
||||
}
|
||||
|
||||
public Optional<TokenIssuanceLog> findById(String id) {
|
||||
return tokenIssuanceLogLoaderRepository.findById(id);
|
||||
}
|
||||
|
||||
public List<TokenIssuanceLog> findByClientId(String clientId) {
|
||||
return tokenIssuanceLogLoaderRepository.findByClientId(clientId);
|
||||
}
|
||||
|
||||
public List<TokenIssuanceLog> findByAppName(String appName) {
|
||||
return tokenIssuanceLogLoaderRepository.findByAppName(appName);
|
||||
}
|
||||
|
||||
public List<TokenIssuanceLog> findByIssuanceDateTimeBetween(LocalDateTime start, LocalDateTime end) {
|
||||
return tokenIssuanceLogLoaderRepository.findByIssuanceDateTimeBetween(start, end);
|
||||
}
|
||||
|
||||
public List<TokenIssuanceLog> findBySuccessYn(String successYn) {
|
||||
return tokenIssuanceLogLoaderRepository.findBySuccessYn(successYn);
|
||||
}
|
||||
|
||||
public TokenIssuanceLog save(TokenIssuanceLog tokenIssuanceLog) {
|
||||
return tokenIssuanceLogLoaderRepository.save(tokenIssuanceLog);
|
||||
}
|
||||
|
||||
public int findRecentLogsForRestrictionCount(
|
||||
String clientId, LocalDateTime startDateTime) {
|
||||
List<TokenIssuanceLog> tokenIssuanceLogs = tokenIssuanceLogLoaderRepository.findRecentLogsForRestrictionCount(
|
||||
clientId, startDateTime);
|
||||
if(tokenIssuanceLogs == null){
|
||||
return 0;
|
||||
} else {
|
||||
return tokenIssuanceLogs.size();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.eactive.eai.authserver.dao;
|
||||
|
||||
import java.time.LocalDateTime;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.authserver.TokenIssuanceLog;
|
||||
|
||||
@Repository
|
||||
public interface TokenIssuanceLogLoaderRepository extends JpaRepository<TokenIssuanceLog, String> {
|
||||
|
||||
List<TokenIssuanceLog> findByClientId(String clientId);
|
||||
|
||||
List<TokenIssuanceLog> findByAppName(String appName);
|
||||
|
||||
List<TokenIssuanceLog> findByIssuanceDateTimeBetween(LocalDateTime start, LocalDateTime end);
|
||||
|
||||
List<TokenIssuanceLog> findBySuccessYn(String successYn);
|
||||
|
||||
@Query("SELECT t FROM TokenIssuanceLog t WHERE t.clientId = :clientId " +
|
||||
"AND t.issuanceDateTime >= :startDateTime " +
|
||||
"AND (t.restrictionExemptYn = 'N' OR t.restrictionExemptYn IS NULL)")
|
||||
List<TokenIssuanceLog> findRecentLogsForRestrictionCount(
|
||||
@Param("clientId") String clientId,
|
||||
@Param("startDateTime") LocalDateTime startDateTime
|
||||
);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.eactive.eai.authserver.dao;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.authserver.UserEntity;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class UserLoader extends AbstractDataLoader<UserEntity, String, UserLoaderRepository> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.eactive.eai.authserver.dao;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.authserver.UserEntity;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface UserLoaderRepository extends DataLoaderRepository<UserEntity>, BaseRepository<UserEntity, String> {
|
||||
|
||||
}
|
||||
+17
@@ -0,0 +1,17 @@
|
||||
package com.eactive.eai.common.authoutbound.loader;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.authoutbound.OutboundOAuthCredential;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class OutboundOAuthCredentialLoader extends AbstractDataLoader<OutboundOAuthCredential, String, OutboundOAuthCredentialLoaderRepository> {
|
||||
|
||||
public List<OutboundOAuthCredential> findAllByUseYn(String useYn){
|
||||
return this.repository.findAllByUseYn(useYn);
|
||||
}
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.eactive.eai.common.authoutbound.loader;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.authoutbound.OutboundOAuthCredential;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface OutboundOAuthCredentialLoaderRepository extends DataLoaderRepository<OutboundOAuthCredential>, BaseRepository<OutboundOAuthCredential, String> {
|
||||
|
||||
List<OutboundOAuthCredential>findAllByUseYn(String useYn);
|
||||
}
|
||||
+43
@@ -0,0 +1,43 @@
|
||||
package com.eactive.eai.common.b2badaptermapping.loader;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.domain.Sort.Order;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.b2badaptermapping.B2BAdapterMap;
|
||||
import com.eactive.eai.data.entity.onl.b2badaptermapping.B2BAdapterMapId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class B2BAdapterMapLoader extends AbstractDataLoader<B2BAdapterMap, B2BAdapterMapId, B2BAdapterMapLoaderRepository> {
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
public List<B2BAdapterMap> findByIdEaisevrinstncnameOrderByDefault(String eaiSevrInstncName) {
|
||||
|
||||
List<Order> orders = new ArrayList<>();
|
||||
orders.add(Order.asc("id.eaisvcname"));
|
||||
orders.add(Order.asc("id.extnlinstiidnfiname"));
|
||||
orders.add(Order.asc("id.dmnddtalsbzwkdsticname"));
|
||||
Sort sort = Sort.by(orders);
|
||||
|
||||
return repository.findByIdEaisevrinstncname(eaiSevrInstncName, sort);
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
public Collection<B2BAdapterMap> findByIdEaisevrinstncnameAndIdEaisvcname(String eaiInstCd, String eaiSvcCd) {
|
||||
List<Order> orders = new ArrayList<>();
|
||||
orders.add(Order.asc("id.eaisvcname"));
|
||||
orders.add(Order.asc("id.dmnddtalsbzwkdsticname"));
|
||||
Sort sort = Sort.by(orders);
|
||||
|
||||
return repository.findByIdEaisevrinstncnameAndIdEaisvcname(eaiInstCd, eaiSvcCd, sort);
|
||||
}
|
||||
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.eactive.eai.common.b2badaptermapping.loader;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.domain.Sort;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.b2badaptermapping.B2BAdapterMap;
|
||||
import com.eactive.eai.data.entity.onl.b2badaptermapping.B2BAdapterMapId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface B2BAdapterMapLoaderRepository
|
||||
extends DataLoaderRepository<B2BAdapterMap>, BaseRepository<B2BAdapterMap, B2BAdapterMapId> {
|
||||
|
||||
List<B2BAdapterMap> findByIdEaisevrinstncname(String eaiSevrInstncName, Sort sort);
|
||||
|
||||
Collection<B2BAdapterMap> findByIdEaisevrinstncnameAndIdEaisvcname(String eaiInstCd, String eaiSvcCd, Sort sort);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
package com.eactive.eai.common.b2bextractor.loader;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.domain.Sort.Order;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.b2bextractor.B2BExtract;
|
||||
import com.eactive.eai.data.entity.onl.b2bextractor.B2BExtractId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class B2BExtractLoader extends AbstractDataLoader<B2BExtract, B2BExtractId, B2BExtractLoaderRepository> {
|
||||
|
||||
public List<B2BExtract> findAllOrderByEaisvcname() {
|
||||
try (Stream<B2BExtract> b2bStream = repository.loadAll(sortByEaisvcname())) {
|
||||
return b2bStream.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
private Sort sortByEaisvcname() {
|
||||
List<Order> orders = new ArrayList<>();
|
||||
orders.add(Order.asc("id.eaisvcname"));
|
||||
return Sort.by(orders);
|
||||
}
|
||||
|
||||
public B2BExtract findByIdEaisvcname(String eaisvcname) {
|
||||
return repository.findByIdEaisvcname(eaisvcname);
|
||||
}
|
||||
|
||||
}
|
||||
+12
@@ -0,0 +1,12 @@
|
||||
package com.eactive.eai.common.b2bextractor.loader;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.b2bextractor.B2BExtract;
|
||||
import com.eactive.eai.data.entity.onl.b2bextractor.B2BExtractId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface B2BExtractLoaderRepository
|
||||
extends DataLoaderRepository<B2BExtract>, BaseRepository<B2BExtract, B2BExtractId> {
|
||||
|
||||
B2BExtract findByIdEaisvcname(String eaisvcname);
|
||||
}
|
||||
@@ -0,0 +1,36 @@
|
||||
package com.eactive.eai.common.b2bservice.loader;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.domain.Sort.Order;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.b2bservice.B2BService;
|
||||
import com.eactive.eai.data.entity.onl.b2bservice.B2BServiceId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class B2BServiceLoader extends AbstractDataLoader<B2BService, B2BServiceId, B2BServiceLoaderRepository> {
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
public List<B2BService> findByUseynOrderByDefault(String useyn) {
|
||||
return repository.findByUseyn(useyn, sortByDefault());
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
public Collection<B2BService> findByIdExtnlinstiidnfinameOrderByDefault(String extnlinstiidnfiname) {
|
||||
return repository.findByIdExtnlinstiidnfiname(extnlinstiidnfiname, sortByDefault());
|
||||
}
|
||||
|
||||
private Sort sortByDefault() {
|
||||
List<Order> orders = new ArrayList<>();
|
||||
orders.add(Order.asc("id.extnlinstiidnfiname"));
|
||||
orders.add(Order.asc("id.svcprcssno"));
|
||||
return Sort.by(orders);
|
||||
}
|
||||
}
|
||||
+20
@@ -0,0 +1,20 @@
|
||||
package com.eactive.eai.common.b2bservice.loader;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.domain.Sort;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.b2bservice.B2BService;
|
||||
import com.eactive.eai.data.entity.onl.b2bservice.B2BServiceId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
public interface B2BServiceLoaderRepository
|
||||
extends DataLoaderRepository<B2BService>, BaseRepository<B2BService, B2BServiceId> {
|
||||
|
||||
List<B2BService> findByUseyn(String useyn, Sort sortByDefault);
|
||||
|
||||
Collection<B2BService> findByIdExtnlinstiidnfiname(String extnlinstiidnfiname, Sort sortByDefault);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,41 @@
|
||||
package com.eactive.eai.common.bizkey.loader;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.domain.Sort.Order;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.bizkey.BizKey;
|
||||
import com.eactive.eai.data.entity.onl.bizkey.BizKeyId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class BizKeyLoader extends AbstractDataLoader<BizKey, BizKeyId, BizKeyLoaderRepository> {
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
public List<BizKey> findAllOrderByDefault() {
|
||||
try (Stream<BizKey> stream = repository.loadAll(sortByDefault())) {
|
||||
return stream.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
public Collection<BizKey> findByIdEaisvcnameAndIdEtractdstcd(String eaiSvcCd, String exrClsNm) {
|
||||
return repository.findByIdEaisvcnameAndIdEtractdstcd(eaiSvcCd, exrClsNm, sortByDefault());
|
||||
}
|
||||
|
||||
protected Sort sortByDefault() {
|
||||
List<Order> orders = new ArrayList<>();
|
||||
orders.add(Order.asc("id.eaisvcname"));
|
||||
orders.add(Order.asc("id.etractdstcd"));
|
||||
orders.add(Order.asc("id.fldprcssno"));
|
||||
return Sort.by(orders);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.eactive.eai.common.bizkey.loader;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
import org.springframework.data.domain.Sort;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.bizkey.BizKey;
|
||||
import com.eactive.eai.data.entity.onl.bizkey.BizKeyId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface BizKeyLoaderRepository extends DataLoaderRepository<BizKey>, BaseRepository<BizKey, BizKeyId> {
|
||||
|
||||
Collection<BizKey> findByIdEaisvcnameAndIdEtractdstcd(String eaiSvcCd, String exrClsNm, Sort sortByDefault);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,35 @@
|
||||
package com.eactive.eai.common.c2rservice.loader;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.domain.Sort.Order;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.c2rservice.C2RService;
|
||||
import com.eactive.eai.data.entity.onl.c2rservice.C2RServiceId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class C2RServiceLoader extends AbstractDataLoader<C2RService, C2RServiceId, C2RServiceLoaderRepository> {
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
public List<C2RService> findByUseynOrderByDefault(String string) {
|
||||
|
||||
return repository.findByUseyn("1", sortByDefault());
|
||||
}
|
||||
|
||||
public C2RService findByIdExtnlinstiidnfinameOrderByDefault(String c2rExtnlInstiCd) {
|
||||
return repository.findByIdExtnlinstiidnfiname(c2rExtnlInstiCd, sortByDefault());
|
||||
}
|
||||
|
||||
private Sort sortByDefault() {
|
||||
List<Order> orders = new ArrayList<>();
|
||||
orders.add(Order.asc("id.extnlinstiidnfiname"));
|
||||
orders.add(Order.asc("id.svcprcssno"));
|
||||
return Sort.by(orders);
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.eactive.eai.common.c2rservice.loader;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.domain.Sort;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.c2rservice.C2RService;
|
||||
import com.eactive.eai.data.entity.onl.c2rservice.C2RServiceId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface C2RServiceLoaderRepository extends DataLoaderRepository<C2RService>, BaseRepository<C2RService, C2RServiceId> {
|
||||
|
||||
List<C2RService> findByUseyn(String string, Sort sortByDefault);
|
||||
|
||||
C2RService findByIdExtnlinstiidnfiname(String c2rExtnlInstiCd, Sort sortByDefault);
|
||||
|
||||
}
|
||||
+15
@@ -0,0 +1,15 @@
|
||||
package com.eactive.eai.common.duplication.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.duplication.DuplicationGuidData;
|
||||
import com.eactive.eai.data.entity.onl.duplication.DuplicationGuidDataId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLogger;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class DuplicationGuidDataLogger
|
||||
extends AbstractDataLogger<DuplicationGuidData, DuplicationGuidDataId, DuplicationGuidDataLoggerRepository> {
|
||||
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package com.eactive.eai.common.duplication.loader;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.duplication.DuplicationGuidData;
|
||||
import com.eactive.eai.data.entity.onl.duplication.DuplicationGuidDataId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface DuplicationGuidDataLoggerRepository extends BaseRepository<DuplicationGuidData, DuplicationGuidDataId> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.eactive.eai.common.duplication.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.duplication.DuplicationGuidLog;
|
||||
import com.eactive.eai.data.entity.onl.duplication.DuplicationGuidLogId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLogger;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class DuplicationGuidLogLogger
|
||||
extends AbstractDataLogger<DuplicationGuidLog, DuplicationGuidLogId, DuplicationGuidLogLoggerRepository> {
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.eactive.eai.common.duplication.loader;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.duplication.DuplicationGuidLog;
|
||||
import com.eactive.eai.data.entity.onl.duplication.DuplicationGuidLogId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface DuplicationGuidLogLoggerRepository extends BaseRepository<DuplicationGuidLog, DuplicationGuidLogId> {
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.eactive.eai.common.errorcode.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.errorcode.ErrorCode;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class ErrorCodeLoader extends AbstractDataLoader<ErrorCode, String, ErrorCodeLoaderRepository> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
package com.eactive.eai.common.errorcode.loader;
|
||||
|
||||
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.errorcode.ErrorCode;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface ErrorCodeLoaderRepository extends DataLoaderRepository<ErrorCode>, BaseRepository<ErrorCode, String>,
|
||||
QuerydslPredicateExecutor<ErrorCode> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,30 @@
|
||||
package com.eactive.eai.common.inflow.loader;
|
||||
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.inflow.InflowControl;
|
||||
import com.eactive.eai.data.entity.onl.inflow.InflowControlId;
|
||||
import com.eactive.eai.data.entity.onl.inflow.QInflowControl;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
import com.querydsl.core.types.dsl.BooleanExpression;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class InflowControlLoader extends AbstractDataLoader<InflowControl, InflowControlId, InflowControlLoaderRepository> {
|
||||
|
||||
public Iterable<InflowControl> findByConditions(String type, String name) {
|
||||
QInflowControl q = QInflowControl.inflowControl;
|
||||
BooleanExpression expression = q.id.type.eq(type);
|
||||
|
||||
if (StringUtils.isNotBlank(name)) {
|
||||
expression = expression.and(q.id.name.eq(name));
|
||||
}
|
||||
Sort sort = Sort.by("id.name").and(Sort.by("useyn"));
|
||||
return repository.findAll(expression, sort);
|
||||
// return repository.findAll(expression, Sort.by("id.name", "useyn"));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.eactive.eai.common.inflow.loader;
|
||||
|
||||
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.inflow.InflowControl;
|
||||
import com.eactive.eai.data.entity.onl.inflow.InflowControlId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface InflowControlLoaderRepository extends DataLoaderRepository<InflowControl>,
|
||||
BaseRepository<InflowControl, InflowControlId>, QuerydslPredicateExecutor<InflowControl> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.eactive.eai.common.inflow.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.inflow.InflowControlLog;
|
||||
import com.eactive.eai.data.entity.onl.inflow.InflowControlLogId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLogger;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class InflowControlLogLogger
|
||||
extends AbstractDataLogger<InflowControlLog, InflowControlLogId, InflowControlLogLoggerRepository> {
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.eactive.eai.common.inflow.loader;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.inflow.InflowControlLog;
|
||||
import com.eactive.eai.data.entity.onl.inflow.InflowControlLogId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface InflowControlLogLoggerRepository
|
||||
extends DataLoaderRepository<InflowControlLog>, BaseRepository<InflowControlLog, InflowControlLogId> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.eactive.eai.common.lifecycle.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.lifecycle.LifeCycle;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class LifeCycleLoader extends AbstractDataLoader<LifeCycle, String, LifeCycleLoaderRepository> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.eactive.eai.common.lifecycle.loader;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.lifecycle.LifeCycle;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface LifeCycleLoaderRepository extends DataLoaderRepository<LifeCycle>, BaseRepository<LifeCycle, String> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,29 @@
|
||||
package com.eactive.eai.common.logger;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import javax.transaction.Transactional;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.logger.EAIErrorLog;
|
||||
import com.eactive.eai.data.entity.onl.logger.EAIErrorLogId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLogger;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class EAIErrorLogLogger extends AbstractDataLogger<EAIErrorLog, EAIErrorLogId, EAIErrorLogLoggerRepository> {
|
||||
|
||||
private EAIErrorLogLoggerRepository eaiErrorLogRepository;
|
||||
|
||||
@Autowired
|
||||
public EAIErrorLogLogger(EAIErrorLogLoggerRepository eaiErrorLogRepository) {
|
||||
this.eaiErrorLogRepository = eaiErrorLogRepository;
|
||||
}
|
||||
|
||||
public <S extends EAIErrorLog> Optional<EAIErrorLog> findById(Class<S> clazz, EAIErrorLogId eaiLogId) {
|
||||
return eaiErrorLogRepository.findById(clazz, eaiLogId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.eactive.eai.common.logger;
|
||||
|
||||
import com.eactive.eai.data.RollingTableRepository;
|
||||
import com.eactive.eai.data.entity.onl.logger.EAIErrorLog;
|
||||
import com.eactive.eai.data.entity.onl.logger.EAIErrorLogId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface EAIErrorLogLoggerRepository
|
||||
extends BaseRepository<EAIErrorLog, EAIErrorLogId>, RollingTableRepository<EAIErrorLog, EAIErrorLogId> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,31 @@
|
||||
package com.eactive.eai.common.logger;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.logger.EAILog;
|
||||
import com.eactive.eai.data.entity.onl.logger.EAILogId;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class EAILogLogger {
|
||||
|
||||
private EAILogLoggerRepository eaiLogRepository;
|
||||
|
||||
@Autowired
|
||||
public EAILogLogger(EAILogLoggerRepository eaiLogRepository) {
|
||||
this.eaiLogRepository = eaiLogRepository;
|
||||
}
|
||||
|
||||
public <S extends EAILog> Optional<EAILog> findById(Class<S> clazz, EAILogId eaiLogId) {
|
||||
return eaiLogRepository.findById(clazz, eaiLogId);
|
||||
}
|
||||
|
||||
public void save(EAILog eaiLog) {
|
||||
eaiLogRepository.save(eaiLog);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.eactive.eai.common.logger;
|
||||
|
||||
import com.eactive.eai.data.RollingTableRepository;
|
||||
import com.eactive.eai.data.entity.onl.logger.EAILog;
|
||||
import com.eactive.eai.data.entity.onl.logger.EAILogId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface EAILogLoggerRepository extends BaseRepository<EAILog, EAILogId>, RollingTableRepository<EAILog, EAILogId> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.eactive.eai.common.logger;
|
||||
|
||||
import javax.transaction.Transactional;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.logger.HttpAdapterExtraLog;
|
||||
import com.eactive.eai.data.entity.onl.logger.HttpAdapterExtraLogId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLogger;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class HttpAdapterExtraLogLogger
|
||||
extends AbstractDataLogger<HttpAdapterExtraLog, HttpAdapterExtraLogId, HttpAdapterExtraLogLoggerRepository> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,8 @@
|
||||
package com.eactive.eai.common.logger;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.logger.HttpAdapterExtraLog;
|
||||
import com.eactive.eai.data.entity.onl.logger.HttpAdapterExtraLogId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface HttpAdapterExtraLogLoggerRepository extends BaseRepository<HttpAdapterExtraLog, HttpAdapterExtraLogId> {
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.eactive.eai.common.logger;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.Optional;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
|
||||
import com.eactive.eai.data.RollingTable;
|
||||
import com.eactive.eai.data.RollingTableRepository;
|
||||
|
||||
class RollingTableRepositoryImpl<T extends RollingTable, I extends Serializable>
|
||||
implements RollingTableRepository<T, I> {
|
||||
|
||||
@PersistenceContext
|
||||
private EntityManager em;
|
||||
|
||||
@Override
|
||||
public <S extends T> Optional<T> findById(Class<S> clazz, I id) {
|
||||
return Optional.ofNullable(em.find(clazz, id));
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.eactive.eai.common.logger;
|
||||
|
||||
import javax.transaction.Transactional;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.logger.StatAdapterLog;
|
||||
import com.eactive.eai.data.entity.onl.logger.StatAdapterLogId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLogger;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class StatAdapterLogLogger
|
||||
extends AbstractDataLogger<StatAdapterLog, StatAdapterLogId, StatAdapterLogLoggerRepository> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.eactive.eai.common.logger;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.logger.StatAdapterLog;
|
||||
import com.eactive.eai.data.entity.onl.logger.StatAdapterLogId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface StatAdapterLogLoggerRepository extends BaseRepository<StatAdapterLog, StatAdapterLogId> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,16 @@
|
||||
package com.eactive.eai.common.logger;
|
||||
|
||||
import javax.transaction.Transactional;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.logger.StatLog;
|
||||
import com.eactive.eai.data.entity.onl.logger.StatLogId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLogger;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class StatLogLogger
|
||||
extends AbstractDataLogger<StatLog, StatLogId, StatLogLoggerRepository> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.eactive.eai.common.logger;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.logger.StatLog;
|
||||
import com.eactive.eai.data.entity.onl.logger.StatLogId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface StatLogLoggerRepository extends BaseRepository<StatLog, StatLogId> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.eactive.eai.common.logger;
|
||||
|
||||
import javax.transaction.Transactional;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.logger.StatTranLog;
|
||||
import com.eactive.eai.data.entity.onl.logger.StatTranLogId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLogger;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class StatTranLogLogger extends AbstractDataLogger<StatTranLog, StatTranLogId, StatTranLogLoggerRepository> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.eactive.eai.common.logger;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.logger.StatTranLog;
|
||||
import com.eactive.eai.data.entity.onl.logger.StatTranLogId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface StatTranLogLoggerRepository extends BaseRepository<StatTranLog, StatTranLogId> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,24 @@
|
||||
package com.eactive.eai.common.logger;
|
||||
|
||||
import java.util.Optional;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.logger.SubMessageLog;
|
||||
import com.eactive.eai.data.entity.onl.logger.SubMessageLogId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLogger;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class SubMessageLogLogger extends AbstractDataLogger<SubMessageLog, SubMessageLogId, SubMessageLogLoggerRepository> {
|
||||
|
||||
@Autowired
|
||||
private SubMessageLogLoggerRepository subMessageLogLoggerRepository;
|
||||
|
||||
public <S extends SubMessageLog> Optional<SubMessageLog> findById(Class<S> clazz, SubMessageLogId subMessageLogId) {
|
||||
return subMessageLogLoggerRepository.findById(clazz, subMessageLogId);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
package com.eactive.eai.common.logger;
|
||||
|
||||
import com.eactive.eai.data.RollingTableRepository;
|
||||
import com.eactive.eai.data.entity.onl.logger.SubMessageLog;
|
||||
import com.eactive.eai.data.entity.onl.logger.SubMessageLogId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface SubMessageLogLoggerRepository
|
||||
extends BaseRepository<SubMessageLog, SubMessageLogId>, RollingTableRepository<SubMessageLog, SubMessageLogId> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.eactive.eai.common.message.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.message.CondPerRtgInfoEntity;
|
||||
import com.eactive.eai.data.entity.onl.message.CondPerRtgInfoEntityId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class CondPerRtgInfoLoader
|
||||
extends AbstractDataLoader<CondPerRtgInfoEntity, CondPerRtgInfoEntityId, CondPerRtgInfoLoaderRepository> {
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.eactive.eai.common.message.loader;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.message.CondPerRtgInfoEntity;
|
||||
import com.eactive.eai.data.entity.onl.message.CondPerRtgInfoEntityId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface CondPerRtgInfoLoaderRepository extends DataLoaderRepository<CondPerRtgInfoEntity>,
|
||||
BaseRepository<CondPerRtgInfoEntity, CondPerRtgInfoEntityId> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,19 @@
|
||||
package com.eactive.eai.common.message.loader;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.message.EAIMessageEntity;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class EAIMessageLoader extends AbstractDataLoader<EAIMessageEntity, String, EAIMessageLoaderRepository> {
|
||||
|
||||
public List<EAIMessageEntity> findByUseynOrderByEaisvcname(String useyn) {
|
||||
return repository.findByUseynOrderByEaisvcname(useyn);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.eactive.eai.common.message.loader;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.message.EAIMessageEntity;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface EAIMessageLoaderRepository
|
||||
extends DataLoaderRepository<EAIMessageEntity>, BaseRepository<EAIMessageEntity, String> {
|
||||
|
||||
List<EAIMessageEntity> findByUseynOrderByEaisvcname(String string);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.eactive.eai.common.message.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.message.EAIReferenceMessage;
|
||||
import com.eactive.eai.data.entity.onl.message.EAIReferenceMessageId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class EAIReferenceMessageLoader
|
||||
extends AbstractDataLoader<EAIReferenceMessage, EAIReferenceMessageId, EAIReferenceMessageLoaderRepository> {
|
||||
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package com.eactive.eai.common.message.loader;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.message.EAIReferenceMessage;
|
||||
import com.eactive.eai.data.entity.onl.message.EAIReferenceMessageId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface EAIReferenceMessageLoaderRepository
|
||||
extends DataLoaderRepository<EAIReferenceMessage>, BaseRepository<EAIReferenceMessage, EAIReferenceMessageId> {
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.eactive.eai.common.message.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.message.ServiceMessageEntity;
|
||||
import com.eactive.eai.data.entity.onl.message.ServiceMessageEntityId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class ServiceMessageLoader
|
||||
extends AbstractDataLoader<ServiceMessageEntity, ServiceMessageEntityId, ServiceMessageLoaderRepository> {
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.eactive.eai.common.message.loader;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.message.ServiceMessageEntity;
|
||||
import com.eactive.eai.data.entity.onl.message.ServiceMessageEntityId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface ServiceMessageLoaderRepository extends DataLoaderRepository<ServiceMessageEntity>,
|
||||
BaseRepository<ServiceMessageEntity, ServiceMessageEntityId> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,38 @@
|
||||
package com.eactive.eai.common.messagekey.loader;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.messagekey.MessageKey;
|
||||
import com.eactive.eai.data.entity.onl.messagekey.MessageKeyId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class MessageKeyLoader extends AbstractDataLoader<MessageKey, MessageKeyId, MessageKeyLoaderRepository> {
|
||||
@Transactional(readOnly = true)
|
||||
public List<MessageKey> loadAllByOrderByDefault() {
|
||||
try (Stream<MessageKey> stream = repository.loadAll(sortByDefault())) {
|
||||
return stream.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
private Sort sortByDefault() {
|
||||
return Sort.by(
|
||||
Sort.Order.asc("id.adptrbzwkgroupname"),
|
||||
Sort.Order.asc("id.msgdstcd"),
|
||||
Sort.Order.asc("id.iodstcd"),
|
||||
Sort.Order.asc("id.groupinorno"),
|
||||
Sort.Order.asc("id.fldprcssno")
|
||||
);
|
||||
}
|
||||
|
||||
public List<MessageKey> selectMessageKeyByNameAndIoDstCode(String adptrbzwkgroupname,String iodstcd) {
|
||||
return repository.selectMessageKeyByNameAndIoDstCode(adptrbzwkgroupname, iodstcd);
|
||||
}
|
||||
}
|
||||
+18
@@ -0,0 +1,18 @@
|
||||
package com.eactive.eai.common.messagekey.loader;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.messagekey.MessageKey;
|
||||
import com.eactive.eai.data.entity.onl.messagekey.MessageKeyId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface MessageKeyLoaderRepository
|
||||
extends DataLoaderRepository<MessageKey>, BaseRepository<MessageKey, MessageKeyId> {
|
||||
@Query("from MessageKey u where u.id.adptrbzwkgroupname = :pAdptrbzwkgroupname and u.id.iodstcd = :pIodstcd")
|
||||
List<MessageKey> selectMessageKeyByNameAndIoDstCode(@Param("pAdptrbzwkgroupname") String adptrbzwkgroupname,
|
||||
@Param("pIodstcd") String iodstcd);
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.eactive.eai.common.property.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.property.PropGroup;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class PropGroupLoader extends AbstractDataLoader<PropGroup, String, PropGroupLoaderRepository> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.eactive.eai.common.property.loader;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import org.springframework.data.jpa.repository.EntityGraph;
|
||||
import org.springframework.data.jpa.repository.EntityGraph.EntityGraphType;
|
||||
import org.springframework.data.querydsl.QuerydslPredicateExecutor;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.property.PropGroup;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface PropGroupLoaderRepository extends DataLoaderRepository<PropGroup>, BaseRepository<PropGroup, String>,
|
||||
QuerydslPredicateExecutor<PropGroup> {
|
||||
|
||||
@EntityGraph(type = EntityGraphType.FETCH, attributePaths = "props")
|
||||
@Override
|
||||
List<PropGroup> findAll();
|
||||
|
||||
}
|
||||
@@ -0,0 +1,14 @@
|
||||
package com.eactive.eai.common.property.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.property.Prop;
|
||||
import com.eactive.eai.data.entity.onl.property.PropId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class PropLoader extends AbstractDataLoader<Prop, PropId, PropLoaderRepository> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.eactive.eai.common.property.loader;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.property.Prop;
|
||||
import com.eactive.eai.data.entity.onl.property.PropId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface PropLoaderRepository extends DataLoaderRepository<Prop>, BaseRepository<Prop, PropId> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.eactive.eai.common.pushinfo.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.pushinfo.PushInfoDetail;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class PushInfoDetailLoader extends AbstractDataLoader<PushInfoDetail, String, PushInfoDetailLoaderRepository> {
|
||||
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package com.eactive.eai.common.pushinfo.loader;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.pushinfo.PushInfoDetail;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface PushInfoDetailLoaderRepository
|
||||
extends DataLoaderRepository<PushInfoDetail>, BaseRepository<PushInfoDetail, String> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.eactive.eai.common.pushinfo.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.pushinfo.PushInfo;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class PushInfoLoader extends AbstractDataLoader<PushInfo, String, PushInfoLoaderRepository> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.eactive.eai.common.pushinfo.loader;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.pushinfo.PushInfo;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface PushInfoLoaderRepository extends DataLoaderRepository<PushInfo>, BaseRepository<PushInfo, String> {
|
||||
|
||||
}
|
||||
+9
@@ -0,0 +1,9 @@
|
||||
package com.eactive.eai.common.restrict.logger;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.restrict.RestrictInfoHistory;
|
||||
import com.eactive.eai.data.entity.onl.restrict.RestrictInfoHistoryId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface RestrictInfoHistoryRepository extends BaseRepository<RestrictInfoHistory, RestrictInfoHistoryId> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.eactive.eai.common.restrict.logger;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.restrict.RestrictInfo;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class RestrictInfoLoader extends AbstractDataLoader<RestrictInfo, String, RestrictInfoLoaderRepository> {
|
||||
|
||||
}
|
||||
+10
@@ -0,0 +1,10 @@
|
||||
package com.eactive.eai.common.restrict.logger;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.restrict.RestrictInfo;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface RestrictInfoLoaderRepository
|
||||
extends DataLoaderRepository<RestrictInfo>, BaseRepository<RestrictInfo, String> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.eactive.eai.common.restrict.logger;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.restrict.RestrictInfoLog;
|
||||
import com.eactive.eai.data.entity.onl.restrict.RestrictInfoLogId;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLogger;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class RestrictInfoLogLogger
|
||||
extends AbstractDataLogger<RestrictInfoLog, RestrictInfoLogId, RestrictInfoLogLoggerRepository> {
|
||||
|
||||
}
|
||||
+11
@@ -0,0 +1,11 @@
|
||||
package com.eactive.eai.common.restrict.logger;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.restrict.RestrictInfoLog;
|
||||
import com.eactive.eai.data.entity.onl.restrict.RestrictInfoLogId;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface RestrictInfoLogLoggerRepository
|
||||
extends DataLoaderRepository<RestrictInfoLog>, BaseRepository<RestrictInfoLog, RestrictInfoLogId> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,34 @@
|
||||
package com.eactive.eai.common.routing.loader;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.springframework.data.domain.Sort;
|
||||
import org.springframework.data.domain.Sort.Order;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.routing.Routing;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class RoutingLoader extends AbstractDataLoader<Routing, String, RoutingLoaderRepository> {
|
||||
|
||||
@Transactional(readOnly = true)
|
||||
public List<Routing> findAllByOrderByDefault() {
|
||||
try (Stream<Routing> routingStream = repository.loadAll(sortByDefault())) {
|
||||
return routingStream.collect(Collectors.toList());
|
||||
}
|
||||
}
|
||||
|
||||
private Sort sortByDefault() {
|
||||
List<Order> orders = new ArrayList<>();
|
||||
orders.add(Order.asc("routname"));
|
||||
orders.add(Order.desc("layerdstcd"));
|
||||
return Sort.by(orders);
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,9 @@
|
||||
package com.eactive.eai.common.routing.loader;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.routing.Routing;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface RoutingLoaderRepository extends BaseRepository<Routing, String>, DataLoaderRepository<Routing> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.eactive.eai.common.server.loader;
|
||||
|
||||
interface DatabaseHealthCheckRepository {
|
||||
|
||||
public boolean checkConnection();
|
||||
|
||||
}
|
||||
+28
@@ -0,0 +1,28 @@
|
||||
package com.eactive.eai.common.server.loader;
|
||||
|
||||
import javax.persistence.EntityManager;
|
||||
import javax.persistence.PersistenceContext;
|
||||
import javax.persistence.criteria.CriteriaBuilder;
|
||||
import javax.persistence.criteria.CriteriaQuery;
|
||||
import javax.persistence.criteria.Root;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.server.EAIServer;
|
||||
|
||||
class DatabaseHealthCheckRepositoryImpl implements DatabaseHealthCheckRepository {
|
||||
|
||||
@PersistenceContext
|
||||
private EntityManager em;
|
||||
|
||||
@Override
|
||||
public boolean checkConnection() {
|
||||
CriteriaBuilder builder = em.getCriteriaBuilder();
|
||||
CriteriaQuery<Long> countQuery = builder.createQuery(Long.class);
|
||||
Root<EAIServer> root = countQuery.from(EAIServer.class);
|
||||
countQuery.select(builder.count(root));
|
||||
|
||||
Long count = em.createQuery(countQuery).getSingleResult();
|
||||
|
||||
return count > 0;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,23 @@
|
||||
package com.eactive.eai.common.server.loader;
|
||||
|
||||
import java.util.stream.Stream;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.server.EAIServer;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class EAIServerLoader extends AbstractDataLoader<EAIServer, String, EAIServerLoaderRepository> {
|
||||
|
||||
public Stream<EAIServer> loadAll() {
|
||||
return repository.loadAll();
|
||||
}
|
||||
|
||||
public boolean checkConnection() {
|
||||
return repository.checkConnection();
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
package com.eactive.eai.common.server.loader;
|
||||
|
||||
import com.eactive.eai.data.DataLoaderRepository;
|
||||
import com.eactive.eai.data.entity.onl.server.EAIServer;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface EAIServerLoaderRepository
|
||||
extends BaseRepository<EAIServer, String>, DatabaseHealthCheckRepository, DataLoaderRepository<EAIServer> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.eactive.eai.common.sessioninfo.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.sessioninfo.SessionHistory;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLogger;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class SessionHistoryLogger extends AbstractDataLogger<SessionHistory, String, SessionHistoryLoggerRepository> {
|
||||
|
||||
}
|
||||
+8
@@ -0,0 +1,8 @@
|
||||
package com.eactive.eai.common.sessioninfo.loader;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.sessioninfo.SessionHistory;
|
||||
import com.eactive.eai.data.jpa.BaseRepository;
|
||||
|
||||
interface SessionHistoryLoggerRepository extends BaseRepository<SessionHistory, String> {
|
||||
|
||||
}
|
||||
@@ -0,0 +1,13 @@
|
||||
package com.eactive.eai.common.sessioninfo.loader;
|
||||
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.eactive.eai.data.entity.onl.sessioninfo.SessionInfo;
|
||||
import com.eactive.eai.data.jpa.AbstractDataLoader;
|
||||
|
||||
@Service
|
||||
@Transactional
|
||||
public class SessionInfoLoader extends AbstractDataLoader<SessionInfo, String, SessionInfoLoaderRepository> {
|
||||
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user