private String moduleUuidPath;
private Long parentProjectId;
private Long copyResourceId;
+ private Long developerId;
private String path;
private String deprecatedKey;
return this;
}
+ public Long getDeveloperId() {
+ return developerId;
+ }
+
+ public ComponentDto setDeveloperId(Long developerId) {
+ this.developerId = developerId;
+ return this;
+ }
+
public Date getCreatedAt() {
return createdAt;
}
.append("moduleUuidPath", moduleUuidPath)
.append("parentProjectId", parentProjectId)
.append("copyResourceId", copyResourceId)
+ .append("developerId", developerId)
.append("path", path)
.append("deprecatedKey", deprecatedKey)
.append("name", name)
p.path as path,
p.enabled as enabled,
p.copy_resource_id as copyResourceId,
+ p.person_id as developerId,
p.authorization_updated_at as authorizationUpdatedAt,
p.created_at as createdAt
</sql>
<insert id="insert" parameterType="Component" keyColumn="id" useGeneratedKeys="true" keyProperty="id">
INSERT INTO projects (kee, deprecated_kee, uuid, project_uuid, module_uuid, module_uuid_path, name, long_name,
- qualifier, scope, language, description, root_id, path, copy_resource_id, enabled,
+ qualifier, scope, language, description, root_id, path, copy_resource_id, person_id, enabled,
created_at, authorization_updated_at)
VALUES (#{kee,jdbcType=VARCHAR}, #{deprecatedKey,jdbcType=VARCHAR}, #{uuid,jdbcType=VARCHAR},
#{projectUuid,jdbcType=VARCHAR}, #{moduleUuid,jdbcType=VARCHAR}, #{moduleUuidPath,jdbcType=VARCHAR},
#{name,jdbcType=VARCHAR}, #{longName,jdbcType=VARCHAR}, #{qualifier,jdbcType=VARCHAR}, #{scope,jdbcType=VARCHAR},
#{language,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{parentProjectId,jdbcType=BIGINT}, #{path,jdbcType=VARCHAR}, #{copyResourceId,jdbcType=BIGINT},
+ #{developerId,jdbcType=BIGINT},
#{enabled,jdbcType=BOOLEAN},
#{createdAt,jdbcType=TIMESTAMP}, #{authorizationUpdatedAt,jdbcType=BIGINT})
</insert>
root_id=#{parentProjectId,jdbcType=BIGINT},
path=#{path,jdbcType=VARCHAR},
copy_resource_id=#{copyResourceId,jdbcType=BIGINT},
+ person_id=#{developerId,jdbcType=BIGINT},
enabled=#{enabled,jdbcType=BOOLEAN},
authorization_updated_at=#{authorizationUpdatedAt,jdbcType=BIGINT}
WHERE uuid=#{uuid}
assertThat(result.getCopyResourceId()).isEqualTo(1L);
}
+ @Test
+ public void get_by_uuid_on_developer_project_copy() {
+ db.prepareDbUnit(getClass(), "shared.xml");
+
+ ComponentDto result = underTest.selectByUuid(dbSession, "STUV").get();
+ assertThat(result.getDeveloperId()).isEqualTo(11L);
+ }
+
@Test
public void get_by_uuid_on_disabled_component() {
db.prepareDbUnit(getClass(), "shared.xml");
.setPath("src/org/struts/RequestContext.java")
.setParentProjectId(3L)
.setCopyResourceId(5L)
+ .setDeveloperId(7L)
.setEnabled(true)
.setCreatedAt(DateUtils.parseDate("2014-06-18"))
.setAuthorizationUpdatedAt(123456789L);
.setPath("src/org/struts/RequestContext2.java")
.setParentProjectId(4L)
.setCopyResourceId(6L)
+ .setDeveloperId(9L)
.setEnabled(false)
.setAuthorizationUpdatedAt(12345678910L);