Skip to content

Commit

Permalink
EPMRPP-90242 merge conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
grabsefx committed Apr 15, 2024
1 parent 28d16b7 commit dbaae84
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 87 deletions.
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ dependencies {
if (releaseMode) {
compile 'com.epam.reportportal:commons'
} else {
implementation 'com.github.reportportal:commons:d7f9bec'
implementation 'com.github.reportportal:commons:24dde95'
}

implementation 'org.springframework.security:spring-security-core'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@

package com.epam.ta.reportportal.dao;

import static com.epam.ta.reportportal.commons.EntityUtils.INSTANT_TO_TIMESTAMP;
import static com.epam.ta.reportportal.dao.util.RecordMappers.ACTIVITY_MAPPER;
import static com.epam.ta.reportportal.dao.util.ResultFetchers.ACTIVITY_FETCHER;
import static com.epam.ta.reportportal.jooq.tables.JActivity.ACTIVITY;

import com.epam.ta.reportportal.commons.querygen.QueryBuilder;
import com.epam.ta.reportportal.commons.querygen.Queryable;
import com.epam.ta.reportportal.entity.activity.Activity;
import java.sql.Timestamp;
import java.time.Duration;
import java.time.LocalDateTime;
import java.time.Instant;
import java.util.List;
import org.jooq.DSLContext;
import org.springframework.beans.factory.annotation.Autowired;
Expand All @@ -50,9 +50,9 @@ public ActivityRepositoryCustomImpl(DSLContext dsl) {

@Override
public void deleteModifiedLaterAgo(Long projectId, Duration period) {
LocalDateTime bound = LocalDateTime.now().minus(period);
Instant bound = Instant.now().minus(period);
dsl.delete(ACTIVITY).where(ACTIVITY.PROJECT_ID.eq(projectId))
.and(ACTIVITY.CREATED_AT.lt(Timestamp.valueOf(bound))).execute();
.and(ACTIVITY.CREATED_AT.lt(INSTANT_TO_TIMESTAMP.apply(bound))).execute();
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@

package com.epam.ta.reportportal.entity.enums.converter;

import com.epam.reportportal.rules.exception.ReportPortalException;
import com.epam.ta.reportportal.entity.enums.OrganizationType;
import com.epam.ta.reportportal.exception.ReportPortalException;
import javax.persistence.AttributeConverter;
import javax.persistence.Converter;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

import com.epam.ta.reportportal.entity.enums.OrganizationType;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.Instant;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
Expand All @@ -43,7 +43,7 @@ public class Organization implements Serializable {
private Long id;

@Column(name = "creation_date", nullable = false)
private LocalDateTime creationDate;
private Instant creationDate;

@Column(name = "name")
private String name;
Expand All @@ -57,7 +57,7 @@ public class Organization implements Serializable {
public Organization() {
}

public Organization(Long id, LocalDateTime creationDate, String name,
public Organization(Long id, Instant creationDate, String name,
OrganizationType organizationType, String slug) {
this.id = id;
this.creationDate = creationDate;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,17 @@

import com.epam.ta.reportportal.entity.enums.OrganizationType;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.time.Instant;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

/**
* @author Siarhei Hrabko
*/
@Getter
@Setter
@NoArgsConstructor
public class OrganizationInfo implements Serializable {

public static final String USERS_QUANTITY = "usersQuantity";
Expand All @@ -31,7 +37,7 @@ public class OrganizationInfo implements Serializable {
public static final String LAST_RUN = "lastRun";

private Long id;
private LocalDateTime creationDate;
private Instant creationDate;
private String name;
private OrganizationType organizationType;
private String slug;
Expand All @@ -40,81 +46,6 @@ public class OrganizationInfo implements Serializable {
private int projectsQuantity;
private int launchesQuantity;

private LocalDateTime lastRun;

public OrganizationInfo() {
}

public Long getId() {
return id;
}

public void setId(Long id) {
this.id = id;
}

public LocalDateTime getCreationDate() {
return creationDate;
}

public void setCreationDate(LocalDateTime creationDate) {
this.creationDate = creationDate;
}

public String getName() {
return name;
}

public void setName(String name) {
this.name = name;
}

public OrganizationType getOrganizationType() {
return organizationType;
}

public void setOrganizationType(OrganizationType organizationType) {
this.organizationType = organizationType;
}

public String getSlug() {
return slug;
}

public void setSlug(String slug) {
this.slug = slug;
}

public int getUsersQuantity() {
return usersQuantity;
}

public void setUsersQuantity(int usersQuantity) {
this.usersQuantity = usersQuantity;
}

public int getProjectsQuantity() {
return projectsQuantity;
}

public void setProjectsQuantity(int projectsQuantity) {
this.projectsQuantity = projectsQuantity;
}

public int getLaunchesQuantity() {
return launchesQuantity;
}

public void setLaunchesQuantity(int launchesQuantity) {
this.launchesQuantity = launchesQuantity;
}

public LocalDateTime getLastRun() {
return lastRun;
}

public void setLastRun(LocalDateTime lastRun) {
this.lastRun = lastRun;
}
private Instant lastRun;

}

0 comments on commit dbaae84

Please sign in to comment.