public interface AtomRepository extends WonRepository<Atom>
| Modifier and Type | Method and Description |
|---|---|
org.springframework.data.domain.Slice<Atom> |
findAtomsInactiveBetween(java.util.Date start,
java.util.Date end,
org.springframework.data.domain.Pageable pageable)
Finds atoms that have been inactive between start and end date
|
org.springframework.data.domain.Slice<Atom> |
findAtomsInactiveBetweenAndNotConnected(java.util.Date start,
java.util.Date end,
org.springframework.data.domain.Pageable pageable)
Finds atoms that have been inactive between start and end date
|
org.springframework.data.domain.Slice<Atom> |
findAtomsInactiveSince(java.util.Date since,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<Atom> |
findAtomsInactiveSinceAndNotConnected(java.util.Date since,
org.springframework.data.domain.Pageable pageable) |
java.util.List<Atom> |
findByAtomURI(java.net.URI URI) |
java.util.Optional<Atom> |
findOneByAtomURI(java.net.URI atomURI) |
Atom |
findOneByAtomURIAndVersionNot(java.net.URI atomURI,
int version) |
java.util.Optional<Atom> |
findOneByAtomURIForUpdate(java.net.URI uri) |
java.util.List<java.net.URI> |
getAllAtomURIs(AtomState atomState) |
org.springframework.data.domain.Slice<java.net.URI> |
getAllAtomURIs(AtomState atomState,
org.springframework.data.domain.Pageable pageable) |
java.util.List<java.net.URI> |
getAllAtomURIsCreatedAfter(java.util.Date createdDate,
AtomState atomState) |
java.util.List<java.net.URI> |
getAllAtomURIsModifiedAfter(java.util.Date modifiedDate,
AtomState atomState) |
org.springframework.data.domain.Slice<java.net.URI> |
getAtomURIsAfter(java.util.Date referenceDate,
AtomState atomState,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<java.net.URI> |
getAtomURIsAfter(java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<java.net.URI> |
getAtomURIsBefore(java.util.Date referenceDate,
AtomState atomState,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<java.net.URI> |
getAtomURIsBefore(java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable) |
java.util.List<java.lang.Object[]> |
getConnectionUrisAndState(java.net.URI atomUri) |
java.util.List<java.lang.Object[]> |
getCountsPerConnectionState(java.net.URI atomURI) |
findById, saveAndFlushjava.util.List<Atom> findByAtomURI(java.net.URI URI)
@Query(value="select atomURI from Atom atom where :atomState is null or atom.state = :atomState")
java.util.List<java.net.URI> getAllAtomURIs(@Param(value="atomState")
AtomState atomState)
@Query(value="select atomURI from Atom atom where :atomState is null or atom.state = :atomState")
org.springframework.data.domain.Slice<java.net.URI> getAllAtomURIs(@Param(value="atomState")
AtomState atomState,
org.springframework.data.domain.Pageable pageable)
java.util.Optional<Atom> findOneByAtomURI(java.net.URI atomURI)
Atom findOneByAtomURIAndVersionNot(java.net.URI atomURI, int version)
@Query(value="select atomURI from Atom atom where atom.creationDate < :referenceDate")
org.springframework.data.domain.Slice<java.net.URI> getAtomURIsBefore(@Param(value="referenceDate")
java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable)
@Query(value="select atomURI from Atom atom where atom.creationDate < :referenceDate and atom.state = :atomState")
org.springframework.data.domain.Slice<java.net.URI> getAtomURIsBefore(@Param(value="referenceDate")
java.util.Date referenceDate,
@Param(value="atomState")
AtomState atomState,
org.springframework.data.domain.Pageable pageable)
@Query(value="select atomURI from Atom atom where atom.creationDate > :referenceDate")
org.springframework.data.domain.Slice<java.net.URI> getAtomURIsAfter(@Param(value="referenceDate")
java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable)
@Query(value="select atomURI from Atom atom where atom.creationDate > :referenceDate and atom.state = :atomState")
org.springframework.data.domain.Slice<java.net.URI> getAtomURIsAfter(@Param(value="referenceDate")
java.util.Date referenceDate,
@Param(value="atomState")
AtomState atomState,
org.springframework.data.domain.Pageable pageable)
@Query(value="select atomURI from Atom atom where atom.lastUpdate > :modifiedDate and (:atomState is null or atom.state = :atomState)")
java.util.List<java.net.URI> getAllAtomURIsModifiedAfter(@Param(value="modifiedDate")
java.util.Date modifiedDate,
@Param(value="atomState")
AtomState atomState)
@Query(value="select atomURI from Atom atom where atom.creationDate > :createdDate and (:atomState is null or atom.state = :atomState)")
java.util.List<java.net.URI> getAllAtomURIsCreatedAfter(@Param(value="createdDate")
java.util.Date createdDate,
@Param(value="atomState")
AtomState atomState)
@Query(value="select state, count(*) from Connection where atomURI = :atom group by state")
java.util.List<java.lang.Object[]> getCountsPerConnectionState(@Param(value="atom")
java.net.URI atomURI)
@Query(value="select state, connectionURI from Connection where atomURI = :atom")
java.util.List<java.lang.Object[]> getConnectionUrisAndState(@Param(value="atom")
java.net.URI atomUri)
@Lock(value=PESSIMISTIC_WRITE) @Query(value="select atom from Atom atom where atomURI= :uri") java.util.Optional<Atom> findOneByAtomURIForUpdate(@Param(value="uri") java.net.URI uri)
@Query(value="select distinct atom from Atom atom join Connection c on ( c.atomURI = atom.atomURI ) join MessageEvent mep on (mep.parentURI = atom.atomURI or mep.parentURI = c.connectionURI) where atom.state = \'ACTIVE\' and mep.messageType <> \'ATOM_MESSAGE\' and (select count(*) from Connection con where con.atomURI = atom.atomURI and con.state = \'CONNECTED\') = 0and ( mep.senderURI = c.connectionURI or mep.senderAtomURI = atom.atomURI)group by atom having max(mep.creationDate) > :startDate and max(mep.creationDate) < :endDate ") org.springframework.data.domain.Slice<Atom> findAtomsInactiveBetweenAndNotConnected(@Param(value="startDate") java.util.Date start, @Param(value="endDate") java.util.Date end, org.springframework.data.domain.Pageable pageable)
start - end - pageable - @Query(value="select distinct atom from Atom atom join Connection c on ( c.atomURI = atom.atomURI ) join MessageEvent mep on (mep.parentURI = atom.atomURI or mep.parentURI = c.connectionURI) where atom.state = \'ACTIVE\' and mep.messageType <> \'ATOM_MESSAGE\' and ( mep.senderURI = c.connectionURI or mep.senderAtomURI = atom.atomURI)group by atom having max(mep.creationDate) > :startDate and max(mep.creationDate) < :endDate ") org.springframework.data.domain.Slice<Atom> findAtomsInactiveBetween(@Param(value="startDate") java.util.Date start, @Param(value="endDate") java.util.Date end, org.springframework.data.domain.Pageable pageable)
start - end - pageable - @Query(value="select distinct atom from Atom atom join Connection c on ( c.atomURI = atom.atomURI ) join MessageEvent mep on (mep.parentURI = atom.atomURI or mep.parentURI = c.connectionURI) where atom.state = \'ACTIVE\' and mep.messageType <> \'ATOM_MESSAGE\' and (select count(*) from Connection con where con.atomURI = atom.atomURI and con.state = \'CONNECTED\') = 0and ( mep.senderURI = c.connectionURI or mep.senderAtomURI = atom.atomURI)group by atom having max(mep.creationDate) < :sinceDate") org.springframework.data.domain.Slice<Atom> findAtomsInactiveSinceAndNotConnected(@Param(value="sinceDate") java.util.Date since, org.springframework.data.domain.Pageable pageable)
@Query(value="select distinct atom from Atom atom join Connection c on ( c.atomURI = atom.atomURI ) join MessageEvent mep on (mep.parentURI = atom.atomURI or mep.parentURI = c.connectionURI) where atom.state = \'ACTIVE\' and mep.messageType <> \'ATOM_MESSAGE\' and ( mep.senderURI = c.connectionURI or mep.senderAtomURI = atom.atomURI)group by atom having max(mep.creationDate) < :sinceDate") org.springframework.data.domain.Slice<Atom> findAtomsInactiveSince(@Param(value="sinceDate") java.util.Date since, org.springframework.data.domain.Pageable pageable)
Copyright © 2020. All Rights Reserved.