Skip to content

Commit

Permalink
Minor improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
azizbekxm committed Aug 2, 2024
1 parent 7150eaf commit fa3796b
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
@RequestMapping("/consortia/{consortiumId}/sharing")
@RequiredArgsConstructor
public class SharingPolicyController implements PoliciesApi {

private final SharingPolicyService sharingPolicyService;

@Override
Expand Down
13 changes: 5 additions & 8 deletions src/main/java/org/folio/consortia/domain/dto/SourceValues.java
Original file line number Diff line number Diff line change
@@ -1,18 +1,15 @@
package org.folio.consortia.domain.dto;

import lombok.AllArgsConstructor;
import lombok.Getter;

@Getter
@AllArgsConstructor
public enum SourceValues {
CONSORTIUM_FOLIO_INSTANCE("CONSORTIUM-FOLIO"),
CONSORTIUM_MARC_INSTANCE("CONSORTIUM-MARC"),
CONSORTIUM("consortium"),
USER("user");

private final String value;

SourceValues(String value) {
this.value = value;
}

public String getValue() {
return value;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ public interface SharingPolicyRepository extends JpaRepository<SharingPolicyEnti
boolean existsByPolicyId(UUID policyId);

@Modifying
@Query("DELETE FROM SharingPolicyEntity sp where sp.policyId = ?1")
@Query("DELETE FROM SharingPolicyEntity sp WHERE sp.policyId = ?1")
void deleteByPolicyId(UUID policyId);
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,12 @@
<column name="id" type="uuid">
<constraints primaryKey="true" primaryKeyName="pk_shared_policy_id"/>
</column>
<column name="policy_id" type="uuid"/>
<column name="tenant_id" type="text"/>
<column name="policy_id" type="uuid">
<constraints nullable="false"/>
</column>
<column name="tenant_id" type="text">
<constraints nullable="false"/>
</column>
<column name="created_by" type="uuid"/>
<column name="created_date" type="timestamp without time zone" defaultValueComputed="now()">
<constraints nullable="false"/>
Expand Down

0 comments on commit fa3796b

Please sign in to comment.