-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #54 from aquality-automation/develop
Develop
- Loading branch information
Showing
14 changed files
with
816 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
src/main/java/main/model/db/dao/project/Suite2MilestoneDao.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
package main.model.db.dao.project; | ||
|
||
import com.mysql.cj.core.conf.url.ConnectionUrlParser; | ||
import main.exceptions.AqualityException; | ||
import main.exceptions.AqualitySQLException; | ||
import main.model.db.dao.DAO; | ||
import main.model.dto.DtoMapper; | ||
import main.model.dto.Suite2MilestoneDto; | ||
import main.model.dto.TestSuiteDto; | ||
import java.util.List; | ||
|
||
public class Suite2MilestoneDao extends DAO<Suite2MilestoneDto> { | ||
public Suite2MilestoneDao() { | ||
super(Suite2MilestoneDto.class); | ||
remove = "{call REMOVE_SUITE_FROM_MILESTONE(?,?)}"; | ||
} | ||
|
||
public void addSuite(Suite2MilestoneDto entity) throws AqualityException { | ||
String sql = "{call INSERT_SUITE_TO_MILESTONE(?,?)}"; | ||
List<ConnectionUrlParser.Pair<String, String>> parameters = entity.getParameters(); | ||
CallStoredProcedure(sql, parameters); | ||
} | ||
|
||
public List<TestSuiteDto> getSuites(Suite2MilestoneDto entity) throws AqualityException { | ||
List<ConnectionUrlParser.Pair<String, String>> parameters = entity.getSearchParameters(); | ||
DtoMapper<TestSuiteDto> suiteMapper = new DtoMapper<>(TestSuiteDto.class); | ||
|
||
String sql = "{call SELECT_MILESTONE_SUITES(?)}"; | ||
return suiteMapper.mapObjects(CallStoredProcedure(sql, parameters).toString()); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
package main.model.dto; | ||
|
||
import lombok.Data; | ||
import lombok.EqualsAndHashCode; | ||
import main.annotations.DataBaseID; | ||
import main.annotations.DataBaseInsert; | ||
import main.annotations.DataBaseName; | ||
import main.annotations.DataBaseSearchable; | ||
|
||
|
||
@Data @EqualsAndHashCode(callSuper = true) | ||
public class Suite2MilestoneDto extends BaseDto { | ||
@DataBaseName(name="request_milestone_id") | ||
@DataBaseID | ||
@DataBaseInsert | ||
@DataBaseSearchable | ||
private Integer milestone_id; | ||
@DataBaseName(name="request_suite_id") | ||
@DataBaseID | ||
@DataBaseInsert | ||
private Integer suite_id; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.