Skip to main content

エンティティの作成

はじめに

JHipster Quarkusエンティティの作成により以下の生成が可能です。

  • データベーステーブル
  • Liquibaseチェンジセット
  • JPAエンティティ
  • Quarkus Panache Active Recordまたはリポジトリ
  • 基本的なCRUDを操作するResteasyコントローラ
  • データ転送オブジェクト(DTO)
  • ページ区切り
  • テスト

クライアント側のコンポーネント生成はJHipsterに委任します。

$ jhipster-quarkus entity Book
INFO! Using JHipster version installed locally in current project's node_modules
INFO! No custom sharedOptions found within blueprint: generator-jhipster-quarkus at /Users/daniel/workspace/jhipster/jhipster-eleven/node_modules/generator-jhipster-quarkus
INFO! No custom commands found within blueprint: generator-jhipster-quarkus at /Users/daniel/workspace/jhipster/jhipster-eleven/node_modules/generator-jhipster-quarkus
INFO! Executing jhipster:entity Book
info Using blueprint generator-jhipster-quarkus for entity subgenerator

The entity Book is being created.


Generating field #1

? Do you want to add a field to your entity? Yes
? What is the name of your field? isbn
? What is the type of your field? String
? Do you want to add validation rules to your field? Yes
? Which validation rules do you want to add? Required

================= Book =================
Fields
isbn (String) required


Generating field #2

? Do you want to add a field to your entity? No

================= Book =================
Fields
isbn (String) required


Generating relationships to other entities

? Do you want to add a relationship to another entity? No

================= Book =================
Fields
isbn (String) required



? Do you want to use separate repository class for your data access? No, the Entity will be used as an Active Record
? Do you want to use separate service class for your business logic? No, the REST controller should use the active record/repository directly
? Do you want pagination on your entity? Yes, with pagination links

Everything is configured, generating the entity...

JHipster UMLとJDL Studio

JHipster QuarkusはJDLインポートをサポートしています。 *エンティティの構築*のチュートリアルのJHipster UML and JDL Studioセクションを参照してください。