public interface ConnectionRepository extends WonRepository<Connection>
| Modifier and Type | Method and Description |
|---|---|
long |
countByAtomURIAndState(java.net.URI atomURI,
ConnectionState connectionState) |
long |
countBySocketURIAndState(java.net.URI socketURI,
ConnectionState connectionState) |
long |
countBySocketUriForUpdate(java.net.URI socketURI)
Locks all connections for a given socket.
|
java.util.List<Connection> |
findByAtomURI(java.net.URI URI) |
java.util.List<Connection> |
findByAtomURIAndNotState(java.net.URI atomURI,
ConnectionState connectionState) |
java.util.List<Connection> |
findByAtomURIAndNotStateForUpdate(java.net.URI atomURI,
ConnectionState connectionState) |
java.util.List<Connection> |
findByAtomURIAndSocketURIAndNotState(java.net.URI atomURI,
java.net.URI socketURI,
ConnectionState connectionState) |
java.util.List<Connection> |
findByAtomURIAndSocketURIAndNotStateForUpdate(java.net.URI atomURI,
java.net.URI socketURI,
ConnectionState connectionState) |
java.util.List<Connection> |
findByAtomURIAndState(java.net.URI atomURI,
ConnectionState connectionState) |
java.util.List<Connection> |
findByAtomURIAndStateAndTypeURI(java.net.URI atomURI,
ConnectionState connectionState,
java.net.URI socketType) |
java.util.List<Connection> |
findByAtomURIAndTypeURI(java.net.URI atomURI,
java.net.URI socketType) |
java.util.List<Connection> |
findByConnectionURI(java.net.URI URI) |
java.util.List<Connection> |
findBySocketURIAndState(java.net.URI socketURI,
ConnectionState connectionState) |
java.util.List<Connection> |
findModifiedConnectionsAfter(java.util.Date modifiedAfter) |
java.util.Optional<Connection> |
findOneByAtomURIAndTargetAtomURIAndSocketURIAndNullTargetSocketForUpdate(java.net.URI atomURI,
java.net.URI targetAtomURI,
java.net.URI socketUri) |
java.util.Optional<Connection> |
findOneByAtomURIAndTargetAtomURIAndSocketURIAndTargetSocketURIForUpdate(java.net.URI atomURI,
java.net.URI targetAtomURI,
java.net.URI socketUri,
java.net.URI targetSocketURI) |
Connection |
findOneByConnectionURI(java.net.URI URI) |
Connection |
findOneByConnectionURIAndVersionNot(java.net.URI URI,
int version) |
java.util.Optional<Connection> |
findOneByConnectionURIForUpdate(java.net.URI uri) |
java.util.List<Connection> |
getAllConnections() |
java.util.List<java.net.URI> |
getAllConnectionURIs() |
java.util.List<java.net.URI> |
getAllConnectionURIsForAtomURI(java.net.URI atomURI) |
org.springframework.data.domain.Slice<Connection> |
getConnectionsAfterByActivityDate(java.util.Date resumeEventDate,
java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<Connection> |
getConnectionsAfterByActivityDate(java.net.URI atomURI,
java.util.Date resumeEventDate,
java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<Connection> |
getConnectionsAfterByActivityDate(java.net.URI atomURI,
java.util.Date resumeEventDate,
WonMessageType messageType,
java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<Connection> |
getConnectionsBeforeByActivityDate(java.util.Date resumeEventDate,
java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<Connection> |
getConnectionsBeforeByActivityDate(java.net.URI atomURI,
java.util.Date resumeEventDate,
java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<Connection> |
getConnectionsBeforeByActivityDate(java.net.URI atomURI,
java.util.Date resumeEventDate,
WonMessageType messageType,
java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<Connection> |
getConnectionsByActivityDate(java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<Connection> |
getConnectionsByActivityDate(org.springframework.data.domain.Pageable pageable)
Obtains connectionURIs grouped by the connectionURI itself and with message
properties attached.
|
org.springframework.data.domain.Slice<Connection> |
getConnectionsByActivityDate(java.net.URI atomURI,
java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<Connection> |
getConnectionsByActivityDate(java.net.URI atomURI,
org.springframework.data.domain.Pageable pageable)
Obtains connections of the provided Atom grouped by the connectionURI itself
and with message properties attached.
|
org.springframework.data.domain.Slice<Connection> |
getConnectionsByActivityDate(java.net.URI atomURI,
WonMessageType messageType,
java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<Connection> |
getConnectionsByActivityDate(java.net.URI atomURI,
WonMessageType messageType,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<java.net.URI> |
getConnectionURIByActivityDate(java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<java.net.URI> |
getConnectionURIByActivityDate(org.springframework.data.domain.Pageable pageable)
Obtains connectionURIs grouped by the connectionURI itself and with message
properties attached.
|
org.springframework.data.domain.Slice<java.net.URI> |
getConnectionURIByActivityDate(java.net.URI atomURI,
java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<java.net.URI> |
getConnectionURIByActivityDate(java.net.URI atomURI,
org.springframework.data.domain.Pageable pageable)
Obtains connectionURIs of the provided Atom grouped by the connectionURI
itself and with message properties attached.
|
org.springframework.data.domain.Slice<java.net.URI> |
getConnectionURIByActivityDate(java.net.URI atomURI,
WonMessageType messageType,
java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable) |
org.springframework.data.domain.Slice<java.net.URI> |
getConnectionURIByActivityDate(java.net.URI atomURI,
WonMessageType messageType,
org.springframework.data.domain.Pageable pageable) |
findById, saveAndFlushjava.util.List<Connection> findByConnectionURI(java.net.URI URI)
Connection findOneByConnectionURI(java.net.URI URI)
@Lock(value=PESSIMISTIC_WRITE) @Query(value="select con from Connection con where connectionURI = :uri") java.util.Optional<Connection> findOneByConnectionURIForUpdate(@Param(value="uri") java.net.URI uri)
Connection findOneByConnectionURIAndVersionNot(java.net.URI URI, int version)
@Lock(value=PESSIMISTIC_WRITE) @Query(value="select con from Connection con where atomURI = :atomUri and targetAtomURI = :targetAtomUri and socketURI = :socketUri and targetSocketURI = :targetSocketUri") java.util.Optional<Connection> findOneByAtomURIAndTargetAtomURIAndSocketURIAndTargetSocketURIForUpdate(@Param(value="atomUri") java.net.URI atomURI, @Param(value="targetAtomUri") java.net.URI targetAtomURI, @Param(value="socketUri") java.net.URI socketUri, @Param(value="targetSocketUri") java.net.URI targetSocketURI)
@Lock(value=PESSIMISTIC_WRITE) @Query(value="select con from Connection con where atomURI = :atomUri and targetAtomURI = :targetAtomUri and socketURI = :socketUri and targetSocketURI is null") java.util.Optional<Connection> findOneByAtomURIAndTargetAtomURIAndSocketURIAndNullTargetSocketForUpdate(@Param(value="atomUri") java.net.URI atomURI, @Param(value="targetAtomUri") java.net.URI targetAtomURI, @Param(value="socketUri") java.net.URI socketUri)
java.util.List<Connection> findByAtomURI(java.net.URI URI)
java.util.List<Connection> findByAtomURIAndStateAndTypeURI(java.net.URI atomURI, ConnectionState connectionState, java.net.URI socketType)
java.util.List<Connection> findByAtomURIAndState(java.net.URI atomURI, ConnectionState connectionState)
java.util.List<Connection> findBySocketURIAndState(java.net.URI socketURI, ConnectionState connectionState)
java.util.List<Connection> findByAtomURIAndTypeURI(java.net.URI atomURI, java.net.URI socketType)
@Lock(value=PESSIMISTIC_WRITE) @Query(value="select count (*) from Connection con where socketURI = :socketUri") long countBySocketUriForUpdate(java.net.URI socketURI)
long countByAtomURIAndState(java.net.URI atomURI,
ConnectionState connectionState)
long countBySocketURIAndState(java.net.URI socketURI,
ConnectionState connectionState)
@Query(value="select connectionURI from Connection") java.util.List<java.net.URI> getAllConnectionURIs()
@Query(value="select conn from Connection conn") java.util.List<Connection> getAllConnections()
@Query(value="select connectionURI from Connection where atomURI = ?1") java.util.List<java.net.URI> getAllConnectionURIsForAtomURI(java.net.URI atomURI)
@Lock(value=PESSIMISTIC_WRITE) @Query(value="select c from Connection c where c.atomURI = ?1 and c.state != ?2") java.util.List<Connection> findByAtomURIAndNotStateForUpdate(java.net.URI atomURI, ConnectionState connectionState)
@Query(value="select c from Connection c where c.atomURI = ?1 and c.state != ?2") java.util.List<Connection> findByAtomURIAndNotState(java.net.URI atomURI, ConnectionState connectionState)
@Lock(value=PESSIMISTIC_WRITE) @Query(value="select c from Connection c where c.atomURI = ?1 and c.socketURI = ?2 and c.state != ?3") java.util.List<Connection> findByAtomURIAndSocketURIAndNotStateForUpdate(java.net.URI atomURI, java.net.URI socketURI, ConnectionState connectionState)
@Query(value="select c from Connection c where c.atomURI = ?1 and c.socketURI = ?2 and c.state != ?3") java.util.List<Connection> findByAtomURIAndSocketURIAndNotState(java.net.URI atomURI, java.net.URI socketURI, ConnectionState connectionState)
@Query(value="select conn from Connection conn where lastUpdate > :modifiedAfter") java.util.List<Connection> findModifiedConnectionsAfter(@Param(value="modifiedAfter") java.util.Date modifiedAfter)
@Query(value="select msg.parentURI from MessageEventPlaceholder msg where (msg.senderURI = msg.parentURI or msg.recipientURI = msg.parentURI) group by msg.parentURI") org.springframework.data.domain.Slice<java.net.URI> getConnectionURIByActivityDate(org.springframework.data.domain.Pageable pageable)
new PageRequest(0, 1, Sort.Direction.DESC, "min(msg.creationDate)"))pageable - @Query(value="select conn from Connection conn where conn.connectionURI in (select distinct msg.parentURI from MessageEventPlaceholder msg where (msg.senderURI = msg.parentURI or msg.recipientURI = msg.parentURI))") org.springframework.data.domain.Slice<Connection> getConnectionsByActivityDate(org.springframework.data.domain.Pageable pageable)
new PageRequest(0, 1, Sort.Direction.DESC, "min(msg.creationDate)"))pageable - @Query(value="select msg.parentURI from MessageEventPlaceholder msg where ((msg.senderURI = msg.parentURI or msg.recipientURI = msg.parentURI) and (msg.creationDate < :referenceDate))group by msg.parentURI")
org.springframework.data.domain.Slice<java.net.URI> getConnectionURIByActivityDate(@Param(value="referenceDate")
java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable)
@Query(value="select conn from Connection conn where conn.connectionURI in (select distinct msg.parentURI from MessageEventPlaceholder msg where ((msg.senderURI = msg.parentURI or msg.recipientURI = msg.parentURI) and (msg.creationDate < :referenceDate)))") org.springframework.data.domain.Slice<Connection> getConnectionsByActivityDate(@Param(value="referenceDate") java.util.Date referenceDate, org.springframework.data.domain.Pageable pageable)
@Query(value="select conn from Connection conn where conn.connectionURI in (select msg.parentURI from MessageEventPlaceholder msg where ((msg.senderURI = msg.parentURI or msg.recipientURI = msg.parentURI) and (msg.creationDate < :referenceDate))group by msg.parentURI having max(msg.creationDate) < :resumeDate)") org.springframework.data.domain.Slice<Connection> getConnectionsBeforeByActivityDate(@Param(value="resumeDate") java.util.Date resumeEventDate, @Param(value="referenceDate") java.util.Date referenceDate, org.springframework.data.domain.Pageable pageable)
@Query(value="select conn from Connection conn where conn.connectionURI in (select msg.parentURI from MessageEventPlaceholder msg where ((msg.senderURI = msg.parentURI or msg.recipientURI = msg.parentURI) and (msg.creationDate < :referenceDate))group by msg.parentURI having max(msg.creationDate) > :resumeDate)") org.springframework.data.domain.Slice<Connection> getConnectionsAfterByActivityDate(@Param(value="resumeDate") java.util.Date resumeEventDate, @Param(value="referenceDate") java.util.Date referenceDate, org.springframework.data.domain.Pageable pageable)
@Query(value="select msg.parentURI from MessageEventPlaceholder msg where (msg.senderAtomURI = :atom and msg.senderURI = msg.parentURI) or (msg.recipientAtomURI = :atom and msg.recipientURI = msg.parentURI) group by msg.parentURI")
org.springframework.data.domain.Slice<java.net.URI> getConnectionURIByActivityDate(@Param(value="atom")
java.net.URI atomURI,
org.springframework.data.domain.Pageable pageable)
new PageRequest(0, 1, Sort.Direction.DESC, "min(msg.creationDate)"))atomURI - pageable - @Query(value="select conn from Connection conn where conn.connectionURI in (select distinct msg.parentURI from MessageEventPlaceholder msg where (msg.senderAtomURI = :atom and msg.senderURI = msg.parentURI) or (msg.recipientAtomURI = :atom and msg.recipientURI = msg.parentURI))") org.springframework.data.domain.Slice<Connection> getConnectionsByActivityDate(@Param(value="atom") java.net.URI atomURI, org.springframework.data.domain.Pageable pageable)
new PageRequest(0, 1, Sort.Direction.DESC, "min(msg.creationDate)"))atomURI - pageable - @Query(value="select msg.parentURI from MessageEventPlaceholder msg where (((msg.senderAtomURI = :atom and msg.senderURI = msg.parentURI) or (msg.recipientAtomURI = :atom and msg.recipientURI = msg.parentURI)) and (msg.creationDate < :referenceDate)) group by msg.parentURI")
org.springframework.data.domain.Slice<java.net.URI> getConnectionURIByActivityDate(@Param(value="atom")
java.net.URI atomURI,
@Param(value="referenceDate")
java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable)
@Query(value="select conn from Connection conn where conn.connectionURI in (select distinct msg.parentURI from MessageEventPlaceholder msg where (((msg.senderAtomURI = :atom and msg.senderURI = msg.parentURI) or (msg.recipientAtomURI = :atom and msg.recipientURI = msg.parentURI)) and (msg.creationDate < :referenceDate)))") org.springframework.data.domain.Slice<Connection> getConnectionsByActivityDate(@Param(value="atom") java.net.URI atomURI, @Param(value="referenceDate") java.util.Date referenceDate, org.springframework.data.domain.Pageable pageable)
@Query(value="select msg.parentURI from MessageEventPlaceholder msg where (((msg.senderAtomURI = :atom and msg.senderURI = msg.parentURI) or (msg.recipientAtomURI = :atom and msg.recipientURI = msg.parentURI)) and (msg.creationDate < :referenceDate) and (msg.messageType = :messageType)) group by msg.parentURI")
org.springframework.data.domain.Slice<java.net.URI> getConnectionURIByActivityDate(@Param(value="atom")
java.net.URI atomURI,
@Param(value="messageType")
WonMessageType messageType,
@Param(value="referenceDate")
java.util.Date referenceDate,
org.springframework.data.domain.Pageable pageable)
@Query(value="select conn from Connection conn where conn.connectionURI in (select distinct msg.parentURI from MessageEventPlaceholder msg where (((msg.senderAtomURI = :atom and msg.senderURI = msg.parentURI) or (msg.recipientAtomURI = :atom and msg.recipientURI = msg.parentURI)) and (msg.creationDate < :referenceDate) and (msg.messageType = :messageType)))") org.springframework.data.domain.Slice<Connection> getConnectionsByActivityDate(@Param(value="atom") java.net.URI atomURI, @Param(value="messageType") WonMessageType messageType, @Param(value="referenceDate") java.util.Date referenceDate, org.springframework.data.domain.Pageable pageable)
@Query(value="select msg.parentURI from MessageEventPlaceholder msg where (((msg.senderAtomURI = :atom and msg.senderURI = msg.parentURI) or (msg.recipientAtomURI = :atom and msg.recipientURI = msg.parentURI)) and (msg.messageType = :messageType)) group by msg.parentURI")
org.springframework.data.domain.Slice<java.net.URI> getConnectionURIByActivityDate(@Param(value="atom")
java.net.URI atomURI,
@Param(value="messageType")
WonMessageType messageType,
org.springframework.data.domain.Pageable pageable)
@Query(value="select conn from Connection conn where conn.connectionURI in (select distinct msg.parentURI from MessageEventPlaceholder msg where (((msg.senderAtomURI = :atom and msg.senderURI = msg.parentURI) or (msg.recipientAtomURI = :atom and msg.recipientURI = msg.parentURI)) and (msg.messageType = :messageType)))") org.springframework.data.domain.Slice<Connection> getConnectionsByActivityDate(@Param(value="atom") java.net.URI atomURI, @Param(value="messageType") WonMessageType messageType, org.springframework.data.domain.Pageable pageable)
@Query(value="select conn from Connection conn where conn.connectionURI in (select msg.parentURI from MessageEventPlaceholder msg where (((msg.senderAtomURI = :atom and msg.senderURI = msg.parentURI) or (msg.recipientAtomURI = :atom and msg.recipientURI = msg.parentURI)) and (msg.creationDate < :referenceDate))group by msg.parentURI having max(msg.creationDate) < :resumeDate)") org.springframework.data.domain.Slice<Connection> getConnectionsBeforeByActivityDate(@Param(value="atom") java.net.URI atomURI, @Param(value="resumeDate") java.util.Date resumeEventDate, @Param(value="referenceDate") java.util.Date referenceDate, org.springframework.data.domain.Pageable pageable)
@Query(value="select conn from Connection conn where conn.connectionURI in (select msg.parentURI from MessageEventPlaceholder msg where (((msg.senderAtomURI = :atom and msg.senderURI = msg.parentURI) or (msg.recipientAtomURI = :atom and msg.recipientURI = msg.parentURI)) and (msg.creationDate < :referenceDate) and (msg.messageType = :messageType))group by msg.parentURI having max(msg.creationDate) < :resumeDate)") org.springframework.data.domain.Slice<Connection> getConnectionsBeforeByActivityDate(@Param(value="atom") java.net.URI atomURI, @Param(value="resumeDate") java.util.Date resumeEventDate, @Param(value="messageType") WonMessageType messageType, @Param(value="referenceDate") java.util.Date referenceDate, org.springframework.data.domain.Pageable pageable)
@Query(value="select conn from Connection conn where conn.connectionURI in (select msg.parentURI from MessageEventPlaceholder msg where (((msg.senderAtomURI = :atom and msg.senderURI = msg.parentURI) or (msg.recipientAtomURI = :atom and msg.recipientURI = msg.parentURI)) and (msg.creationDate < :referenceDate))group by msg.parentURI having max(msg.creationDate) > :resumeDate)") org.springframework.data.domain.Slice<Connection> getConnectionsAfterByActivityDate(@Param(value="atom") java.net.URI atomURI, @Param(value="resumeDate") java.util.Date resumeEventDate, @Param(value="referenceDate") java.util.Date referenceDate, org.springframework.data.domain.Pageable pageable)
@Query(value="select conn from Connection conn where conn.connectionURI in (select msg.parentURI from MessageEventPlaceholder msg where (((msg.senderAtomURI = :atom and msg.senderURI = msg.parentURI) or (msg.recipientAtomURI = :atom and msg.recipientURI = msg.parentURI)) and (msg.creationDate < :referenceDate) and (msg.messageType = :messageType))group by msg.parentURI having max(msg.creationDate) > :resumeDate)") org.springframework.data.domain.Slice<Connection> getConnectionsAfterByActivityDate(@Param(value="atom") java.net.URI atomURI, @Param(value="resumeDate") java.util.Date resumeEventDate, @Param(value="messageType") WonMessageType messageType, @Param(value="referenceDate") java.util.Date referenceDate, org.springframework.data.domain.Pageable pageable)
Copyright © 2019. All Rights Reserved.