Toggle navigation
Toggle navigation
This project
Loading...
Sign in
grogv3
/
grog-cubi
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Authored by
JR Utily
2017-04-30 17:51:53 +0200
Browse Files
Options
Browse Files
Download
Email Patches
Plain Diff
Commit
10e4aa4356ac2d28cade350a1e05a45fff9a3bd7
10e4aa43
1 parent
9ff9dfaf
fix the big issue regarding transaction at startup
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
19 additions
and
12 deletions
grog-entities/src/main/java/org/legrog/entities/AccountAttributeRepository.java
grog-entities/src/main/java/org/legrog/entities/AccountPropertyRepository.java
grog-entities/src/main/java/org/legrog/entities/AccountRepository.java
grog-entities/src/main/java/org/legrog/entities/AccountRoleRepository.java
grog-entities/src/main/java/org/legrog/entities/CountryRepository.java
grog-entities/src/main/java/org/legrog/entities/PublisherActionRepository.java
grog-entities/src/main/java/org/legrog/entities/PublisherRepository.java
grog-entities/src/main/java/org/legrog/entities/PublisherVersionRepository.java
grog-webapp/src/main/java/org/legrog/configuration/EntityManagerProducer.java
grog-entities/src/main/java/org/legrog/entities/AccountAttributeRepository.java
View file @
10e4aa4
package
org
.
legrog
.
entities
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.repository.cdi.Eager
;
@Eager
public
interface
AccountAttributeRepository
extends
JpaRepository
<
AccountAttribute
,
Integer
>
{
}
...
...
grog-entities/src/main/java/org/legrog/entities/AccountPropertyRepository.java
View file @
10e4aa4
package
org
.
legrog
.
entities
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.repository.cdi.Eager
;
@Eager
public
interface
AccountPropertyRepository
extends
JpaRepository
<
AccountProperty
,
Integer
>
{
}
...
...
grog-entities/src/main/java/org/legrog/entities/AccountRepository.java
View file @
10e4aa4
package
org
.
legrog
.
entities
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.repository.cdi.Eager
;
import
java.util.List
;
@Eager
public
interface
AccountRepository
extends
JpaRepository
<
Account
,
Integer
>
{
/**
*
...
...
grog-entities/src/main/java/org/legrog/entities/AccountRoleRepository.java
View file @
10e4aa4
package
org
.
legrog
.
entities
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.repository.cdi.Eager
;
@Eager
public
interface
AccountRoleRepository
extends
JpaRepository
<
AccountRole
,
Integer
>
{
}
\ No newline at end of file
...
...
grog-entities/src/main/java/org/legrog/entities/CountryRepository.java
View file @
10e4aa4
package
org
.
legrog
.
entities
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.repository.cdi.Eager
;
@Eager
public
interface
CountryRepository
extends
JpaRepository
<
Country
,
Integer
>
{
}
...
...
grog-entities/src/main/java/org/legrog/entities/PublisherActionRepository.java
View file @
10e4aa4
package
org
.
legrog
.
entities
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.repository.cdi.Eager
;
import
java.util.List
;
/**
* Interface for accessing PublisherAction
*/
@Eager
public
interface
PublisherActionRepository
extends
JpaRepository
<
PublisherAction
,
Integer
>
{
/**
...
...
grog-entities/src/main/java/org/legrog/entities/PublisherRepository.java
View file @
10e4aa4
package
org
.
legrog
.
entities
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.repository.cdi.Eager
;
import
java.util.List
;
@Eager
public
interface
PublisherRepository
extends
JpaRepository
<
Publisher
,
Integer
>
{
List
<
Publisher
>
findByValidatedVersionIsNotNull
();
}
...
...
grog-entities/src/main/java/org/legrog/entities/PublisherVersionRepository.java
View file @
10e4aa4
package
org
.
legrog
.
entities
;
import
org.springframework.data.jpa.repository.JpaRepository
;
import
org.springframework.data.repository.cdi.Eager
;
import
java.util.List
;
@Eager
public
interface
PublisherVersionRepository
extends
JpaRepository
<
PublisherVersion
,
Integer
>
{
/**
*
...
...
grog-webapp/src/main/java/org/legrog/configuration/EntityManagerProducer.java
View file @
10e4aa4
package
org
.
legrog
.
configuration
;
import
javax.enterprise.context.RequestScoped
;
import
javax.enterprise.inject.Disposes
;
import
javax.enterprise.context.Dependent
;
import
javax.enterprise.inject.Produces
;
import
javax.persistence.EntityManager
;
import
javax.persistence.PersistenceContext
;
...
...
@@ -18,17 +17,9 @@ public class EntityManagerProducer {
/**
* Injectable interface for persistence handling
*/
@Produces
@RequestScoped
@Produces
@Dependent
@PersistenceContext
(
unitName
=
"Grog-DB"
)
public
EntityManager
entityManager
;
public
void
closeEntityManager
(
@Disposes
EntityManager
entityManager
)
{
if
(
entityManager
.
isOpen
())
{
entityManager
.
close
();
}
}
}
...
...
Please
register
or
login
to post a comment