1
|
package eu.dnetlib.organizations.repository;
|
2
|
|
3
|
import java.time.OffsetDateTime;
|
4
|
|
5
|
import org.springframework.data.jpa.repository.JpaRepository;
|
6
|
import org.springframework.data.jpa.repository.Modifying;
|
7
|
import org.springframework.data.jpa.repository.Query;
|
8
|
|
9
|
import eu.dnetlib.organizations.model.Organization;
|
10
|
|
11
|
public interface OrganizationRepository extends JpaRepository<Organization, String> {
|
12
|
|
13
|
@Modifying
|
14
|
@Query("update Organization set created_by = ?2, creation_date = ?3 where id = ?1")
|
15
|
void updateCreationDate(String id, String user, OffsetDateTime now);
|
16
|
|
17
|
@Modifying
|
18
|
@Query("update Organization set modified_by = ?2, modification_date = ?3 where id = ?1")
|
19
|
void updateModificationDate(String id, String user, OffsetDateTime now);
|
20
|
|
21
|
}
|