Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
I
IncomeCalculator
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
neel
IncomeCalculator
Commits
f4857f20
Commit
f4857f20
authored
Sep 02, 2020
by
neel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
SQl server migration Key to property change
parent
bb9f7965
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
src/main/java/com/ic/modules/auth/repository/ConfigurationsRepository.java
+1
-1
src/main/java/com/ic/modules/auth/repository/TemplatesRepository.java
+1
-1
src/main/java/com/ic/modules/auth/service/impl/ConfigurationsServiceImpl.java
+2
-2
src/main/java/com/ic/modules/auth/service/impl/TemplatesServiceImpl.java
+2
-2
No files found.
src/main/java/com/ic/modules/auth/repository/ConfigurationsRepository.java
View file @
f4857f20
...
@@ -8,5 +8,5 @@ import org.springframework.data.jpa.repository.JpaRepository;
...
@@ -8,5 +8,5 @@ import org.springframework.data.jpa.repository.JpaRepository;
import
com.ic.modules.auth.model.Configurations
;
import
com.ic.modules.auth.model.Configurations
;
public
interface
ConfigurationsRepository
extends
JpaRepository
<
Configurations
,
Long
>{
public
interface
ConfigurationsRepository
extends
JpaRepository
<
Configurations
,
Long
>{
Optional
<
Configurations
>
findBy
Ke
y
(
String
key
);
Optional
<
Configurations
>
findBy
Propert
y
(
String
key
);
}
}
src/main/java/com/ic/modules/auth/repository/TemplatesRepository.java
View file @
f4857f20
...
@@ -8,5 +8,5 @@ import org.springframework.data.jpa.repository.JpaRepository;
...
@@ -8,5 +8,5 @@ import org.springframework.data.jpa.repository.JpaRepository;
import
com.ic.modules.auth.model.Templates
;
import
com.ic.modules.auth.model.Templates
;
public
interface
TemplatesRepository
extends
JpaRepository
<
Templates
,
Long
>{
public
interface
TemplatesRepository
extends
JpaRepository
<
Templates
,
Long
>{
Optional
<
Templates
>
findBy
Ke
y
(
String
key
);
Optional
<
Templates
>
findBy
Propert
y
(
String
key
);
}
}
src/main/java/com/ic/modules/auth/service/impl/ConfigurationsServiceImpl.java
View file @
f4857f20
...
@@ -25,7 +25,7 @@ public class ConfigurationsServiceImpl implements ConfigurationsService {
...
@@ -25,7 +25,7 @@ public class ConfigurationsServiceImpl implements ConfigurationsService {
public
Configurations
save
(
ConfigurationsDto
dto
,
Boolean
isCreate
)
{
public
Configurations
save
(
ConfigurationsDto
dto
,
Boolean
isCreate
)
{
Configurations
configuration
=
null
;
Configurations
configuration
=
null
;
if
(!
isCreate
)
{
if
(!
isCreate
)
{
configRepo
.
findBy
Ke
y
(
dto
.
getKey
()).
orElseThrow
(()->
new
ResourceNotFoundException
(
"Config"
,
"key"
,
dto
.
getKey
()));
configRepo
.
findBy
Propert
y
(
dto
.
getKey
()).
orElseThrow
(()->
new
ResourceNotFoundException
(
"Config"
,
"key"
,
dto
.
getKey
()));
}
else
{
}
else
{
configuration
=
new
Configurations
();
configuration
=
new
Configurations
();
configuration
.
setProperty
(
dto
.
getKey
());
configuration
.
setProperty
(
dto
.
getKey
());
...
@@ -42,7 +42,7 @@ public class ConfigurationsServiceImpl implements ConfigurationsService {
...
@@ -42,7 +42,7 @@ public class ConfigurationsServiceImpl implements ConfigurationsService {
}
}
@Transactional
(
isolation
=
Isolation
.
READ_UNCOMMITTED
)
@Transactional
(
isolation
=
Isolation
.
READ_UNCOMMITTED
)
public
Configurations
findByKey
(
String
key
)
{
public
Configurations
findByKey
(
String
key
)
{
return
configRepo
.
findBy
Ke
y
(
key
).
orElseThrow
(()->
new
ResourceNotFoundException
(
"Config"
,
"key"
,
key
));
return
configRepo
.
findBy
Propert
y
(
key
).
orElseThrow
(()->
new
ResourceNotFoundException
(
"Config"
,
"key"
,
key
));
}
}
}
}
src/main/java/com/ic/modules/auth/service/impl/TemplatesServiceImpl.java
View file @
f4857f20
...
@@ -26,7 +26,7 @@ public class TemplatesServiceImpl implements TemplatesService {
...
@@ -26,7 +26,7 @@ public class TemplatesServiceImpl implements TemplatesService {
public
Templates
save
(
TemplatesDto
dto
,
Boolean
isCreate
)
{
public
Templates
save
(
TemplatesDto
dto
,
Boolean
isCreate
)
{
Templates
configuration
=
null
;
Templates
configuration
=
null
;
if
(!
isCreate
)
{
if
(!
isCreate
)
{
configRepo
.
findBy
Ke
y
(
dto
.
getKey
()).
orElseThrow
(()->
new
ResourceNotFoundException
(
"Template"
,
"key"
,
dto
.
getKey
()));
configRepo
.
findBy
Propert
y
(
dto
.
getKey
()).
orElseThrow
(()->
new
ResourceNotFoundException
(
"Template"
,
"key"
,
dto
.
getKey
()));
}
else
{
}
else
{
configuration
=
new
Templates
();
configuration
=
new
Templates
();
configuration
.
setProperty
(
dto
.
getKey
());
configuration
.
setProperty
(
dto
.
getKey
());
...
@@ -43,7 +43,7 @@ public class TemplatesServiceImpl implements TemplatesService {
...
@@ -43,7 +43,7 @@ public class TemplatesServiceImpl implements TemplatesService {
}
}
@Transactional
(
isolation
=
Isolation
.
READ_UNCOMMITTED
)
@Transactional
(
isolation
=
Isolation
.
READ_UNCOMMITTED
)
public
Templates
findByKey
(
String
key
)
{
public
Templates
findByKey
(
String
key
)
{
return
configRepo
.
findBy
Ke
y
(
key
).
orElseThrow
(()->
new
ResourceNotFoundException
(
"Template"
,
"key"
,
key
));
return
configRepo
.
findBy
Propert
y
(
key
).
orElseThrow
(()->
new
ResourceNotFoundException
(
"Template"
,
"key"
,
key
));
}
}
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment