Skip to content

Commit

Permalink
๐Ÿ™ˆ chore: QueryDsl ์„ค์ •
Browse files Browse the repository at this point in the history
  • Loading branch information
seheonnn committed Jan 28, 2024
1 parent 9319a60 commit 1da524c
Show file tree
Hide file tree
Showing 13 changed files with 712 additions and 1 deletion.
27 changes: 26 additions & 1 deletion build.gradle
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
buildscript {
ext {
queryDslVersion = "5.0.0"
}
}

plugins {
id 'java'
id 'org.springframework.boot' version '3.2.0'
Expand Down Expand Up @@ -57,13 +63,32 @@ dependencies {

// S3
implementation 'org.springframework.cloud:spring-cloud-starter-aws:2.2.6.RELEASE'

//querydsl
implementation 'com.querydsl:querydsl-jpa:5.0.0:jakarta'
annotationProcessor "com.querydsl:querydsl-apt:${dependencyManagement.importedProperties['querydsl.version']}:jakarta"
annotationProcessor "jakarta.annotation:jakarta.annotation-api"
annotationProcessor "jakarta.persistence:jakarta.persistence-api"
}

tasks.named('test') {
useJUnitPlatform()
}

// enable plain.jar
def generated = 'src/main/generated'

tasks.withType(JavaCompile) {
options.getGeneratedSourceOutputDirectory().set(file(generated))
}

sourceSets {
main.java.srcDirs += [generated]
}

clean {
delete file(generated)
}

jar {
enabled = false
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
package com.sponus.sponusbe.domain.announcement.entity;

import static com.querydsl.core.types.PathMetadataFactory.*;

import com.querydsl.core.types.dsl.*;

import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
import com.querydsl.core.types.dsl.PathInits;


/**
* QAnnouncement is a Querydsl query type for Announcement
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QAnnouncement extends EntityPathBase<Announcement> {

private static final long serialVersionUID = -1589881557L;

private static final PathInits INITS = PathInits.DIRECT2;

public static final QAnnouncement announcement = new QAnnouncement("announcement");

public final com.sponus.sponusbe.global.common.QBaseEntity _super = new com.sponus.sponusbe.global.common.QBaseEntity(this);

public final EnumPath<com.sponus.sponusbe.domain.announcement.entity.enums.AnnouncementCategory> category = createEnum("category", com.sponus.sponusbe.domain.announcement.entity.enums.AnnouncementCategory.class);

public final StringPath content = createString("content");

//inherited
public final DateTimePath<java.time.LocalDateTime> createdAt = _super.createdAt;

public final NumberPath<Long> id = createNumber("id", Long.class);

public final EnumPath<com.sponus.sponusbe.domain.announcement.entity.enums.AnnouncementStatus> status = createEnum("status", com.sponus.sponusbe.domain.announcement.entity.enums.AnnouncementStatus.class);

public final StringPath title = createString("title");

public final EnumPath<com.sponus.sponusbe.domain.announcement.entity.enums.AnnouncementType> type = createEnum("type", com.sponus.sponusbe.domain.announcement.entity.enums.AnnouncementType.class);

//inherited
public final DateTimePath<java.time.LocalDateTime> updatedAt = _super.updatedAt;

public final NumberPath<Long> viewCount = createNumber("viewCount", Long.class);

public final com.sponus.sponusbe.domain.organization.entity.QOrganization writer;

public QAnnouncement(String variable) {
this(Announcement.class, forVariable(variable), INITS);
}

public QAnnouncement(Path<? extends Announcement> path) {
this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
}

public QAnnouncement(PathMetadata metadata) {
this(metadata, PathInits.getFor(metadata, INITS));
}

public QAnnouncement(PathMetadata metadata, PathInits inits) {
this(Announcement.class, metadata, inits);
}

public QAnnouncement(Class<? extends Announcement> type, PathMetadata metadata, PathInits inits) {
super(type, metadata, inits);
this.writer = inits.isInitialized("writer") ? new com.sponus.sponusbe.domain.organization.entity.QOrganization(forProperty("writer")) : null;
}

}

Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package com.sponus.sponusbe.domain.announcement.entity;

import static com.querydsl.core.types.PathMetadataFactory.*;

import com.querydsl.core.types.dsl.*;

import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
import com.querydsl.core.types.dsl.PathInits;


/**
* QAnnouncementAttachment is a Querydsl query type for AnnouncementAttachment
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QAnnouncementAttachment extends EntityPathBase<AnnouncementAttachment> {

private static final long serialVersionUID = 969494702L;

private static final PathInits INITS = PathInits.DIRECT2;

public static final QAnnouncementAttachment announcementAttachment = new QAnnouncementAttachment("announcementAttachment");

public final QAnnouncement announcement;

public final NumberPath<Long> id = createNumber("id", Long.class);

public final StringPath name = createString("name");

public final StringPath url = createString("url");

public QAnnouncementAttachment(String variable) {
this(AnnouncementAttachment.class, forVariable(variable), INITS);
}

public QAnnouncementAttachment(Path<? extends AnnouncementAttachment> path) {
this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
}

public QAnnouncementAttachment(PathMetadata metadata) {
this(metadata, PathInits.getFor(metadata, INITS));
}

public QAnnouncementAttachment(PathMetadata metadata, PathInits inits) {
this(AnnouncementAttachment.class, metadata, inits);
}

public QAnnouncementAttachment(Class<? extends AnnouncementAttachment> type, PathMetadata metadata, PathInits inits) {
super(type, metadata, inits);
this.announcement = inits.isInitialized("announcement") ? new QAnnouncement(forProperty("announcement"), inits.get("announcement")) : null;
}

}

Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package com.sponus.sponusbe.domain.announcement.entity;

import static com.querydsl.core.types.PathMetadataFactory.*;

import com.querydsl.core.types.dsl.*;

import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
import com.querydsl.core.types.dsl.PathInits;


/**
* QAnnouncementImage is a Querydsl query type for AnnouncementImage
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QAnnouncementImage extends EntityPathBase<AnnouncementImage> {

private static final long serialVersionUID = 499705584L;

private static final PathInits INITS = PathInits.DIRECT2;

public static final QAnnouncementImage announcementImage = new QAnnouncementImage("announcementImage");

public final QAnnouncement announcement;

public final NumberPath<Long> id = createNumber("id", Long.class);

public final StringPath name = createString("name");

public final StringPath url = createString("url");

public QAnnouncementImage(String variable) {
this(AnnouncementImage.class, forVariable(variable), INITS);
}

public QAnnouncementImage(Path<? extends AnnouncementImage> path) {
this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
}

public QAnnouncementImage(PathMetadata metadata) {
this(metadata, PathInits.getFor(metadata, INITS));
}

public QAnnouncementImage(PathMetadata metadata, PathInits inits) {
this(AnnouncementImage.class, metadata, inits);
}

public QAnnouncementImage(Class<? extends AnnouncementImage> type, PathMetadata metadata, PathInits inits) {
super(type, metadata, inits);
this.announcement = inits.isInitialized("announcement") ? new QAnnouncement(forProperty("announcement"), inits.get("announcement")) : null;
}

}

Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
package com.sponus.sponusbe.domain.organization.entity;

import static com.querydsl.core.types.PathMetadataFactory.*;

import com.querydsl.core.types.dsl.*;

import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
import com.querydsl.core.types.dsl.PathInits;


/**
* QOrganization is a Querydsl query type for Organization
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QOrganization extends EntityPathBase<Organization> {

private static final long serialVersionUID = 177366787L;

public static final QOrganization organization = new QOrganization("organization");

public final com.sponus.sponusbe.global.common.QBaseEntity _super = new com.sponus.sponusbe.global.common.QBaseEntity(this);

//inherited
public final DateTimePath<java.time.LocalDateTime> createdAt = _super.createdAt;

public final StringPath description = createString("description");

public final StringPath email = createString("email");

public final NumberPath<Long> id = createNumber("id", Long.class);

public final StringPath imageUrl = createString("imageUrl");

public final StringPath location = createString("location");

public final StringPath managerAvailableDay = createString("managerAvailableDay");

public final StringPath managerAvailableHour = createString("managerAvailableHour");

public final StringPath managerContactPreference = createString("managerContactPreference");

public final StringPath managerEmail = createString("managerEmail");

public final StringPath managerName = createString("managerName");

public final StringPath managerPhone = createString("managerPhone");

public final StringPath managerPosition = createString("managerPosition");

public final StringPath name = createString("name");

public final ListPath<OrganizationLink, QOrganizationLink> organizationLinks = this.<OrganizationLink, QOrganizationLink>createList("organizationLinks", OrganizationLink.class, QOrganizationLink.class, PathInits.DIRECT2);

public final EnumPath<com.sponus.sponusbe.domain.organization.entity.enums.OrganizationStatus> organizationStatus = createEnum("organizationStatus", com.sponus.sponusbe.domain.organization.entity.enums.OrganizationStatus.class);

public final ListPath<OrganizationTag, QOrganizationTag> organizationTags = this.<OrganizationTag, QOrganizationTag>createList("organizationTags", OrganizationTag.class, QOrganizationTag.class, PathInits.DIRECT2);

public final EnumPath<com.sponus.sponusbe.domain.organization.entity.enums.OrganizationType> organizationType = createEnum("organizationType", com.sponus.sponusbe.domain.organization.entity.enums.OrganizationType.class);

public final StringPath password = createString("password");

public final EnumPath<com.sponus.sponusbe.domain.organization.entity.enums.SuborganizationType> suborganizationType = createEnum("suborganizationType", com.sponus.sponusbe.domain.organization.entity.enums.SuborganizationType.class);

//inherited
public final DateTimePath<java.time.LocalDateTime> updatedAt = _super.updatedAt;

public QOrganization(String variable) {
super(Organization.class, forVariable(variable));
}

public QOrganization(Path<? extends Organization> path) {
super(path.getType(), path.getMetadata());
}

public QOrganization(PathMetadata metadata) {
super(Organization.class, metadata);
}

}

Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
package com.sponus.sponusbe.domain.organization.entity;

import static com.querydsl.core.types.PathMetadataFactory.*;

import com.querydsl.core.types.dsl.*;

import com.querydsl.core.types.PathMetadata;
import javax.annotation.processing.Generated;
import com.querydsl.core.types.Path;
import com.querydsl.core.types.dsl.PathInits;


/**
* QOrganizationLink is a Querydsl query type for OrganizationLink
*/
@Generated("com.querydsl.codegen.DefaultEntitySerializer")
public class QOrganizationLink extends EntityPathBase<OrganizationLink> {

private static final long serialVersionUID = 492130717L;

private static final PathInits INITS = PathInits.DIRECT2;

public static final QOrganizationLink organizationLink = new QOrganizationLink("organizationLink");

public final NumberPath<Long> id = createNumber("id", Long.class);

public final StringPath name = createString("name");

public final QOrganization organization;

public final StringPath url = createString("url");

public QOrganizationLink(String variable) {
this(OrganizationLink.class, forVariable(variable), INITS);
}

public QOrganizationLink(Path<? extends OrganizationLink> path) {
this(path.getType(), path.getMetadata(), PathInits.getFor(path.getMetadata(), INITS));
}

public QOrganizationLink(PathMetadata metadata) {
this(metadata, PathInits.getFor(metadata, INITS));
}

public QOrganizationLink(PathMetadata metadata, PathInits inits) {
this(OrganizationLink.class, metadata, inits);
}

public QOrganizationLink(Class<? extends OrganizationLink> type, PathMetadata metadata, PathInits inits) {
super(type, metadata, inits);
this.organization = inits.isInitialized("organization") ? new QOrganization(forProperty("organization")) : null;
}

}

Loading

0 comments on commit 1da524c

Please sign in to comment.