# Getting Started

## What This Project Does

This is a Java-based order processing and product management system. It provides services for creating and managing orders (`OrderProcessor`), querying products (`ProductService`), and managing domain entities with field mappings for business labels — many of which are localized for Japanese-language operations.

## Recommended Reading Order

If you are new to this codebase, read the wiki pages in this order:

1. **[Architecture Overview](/wiki/architecture)** — High-level system design and module boundaries.
2. **[Domain Model](/wiki/domain-model)** — Core entities, field mappings, and label conventions.
3. **[API Contracts](/wiki/api-contracts)** — Service interfaces and expected input/output shapes.
4. **[Data Access Layer](/wiki/data-access)** — How persistence and service-IF fields are structured.
5. **[Testing Guide](/wiki/testing)** — How to run and write tests.

## Key Entry Points

Start your investigation with these classes:

### `src/main/java/OrderProcessor.java`
The main entry point for order operations. It exposes a `createOrder(String orderId)` method that accepts an order identifier and returns the created order. This is likely the class you will interact with first when building integrations.

### `src/main/java/ProductService.java`
A lightweight service class for product queries. Holds a `productId` field with a simple getter (`getProduct()`). Use this as your entry point for anything related to product lookups.

### `src/main/java/LargeFieldMap.java`
Represents the service-IF (interface) data model. Contains 10 fields mapping to business concepts identified by Japanese labels — things like service contract numbers, processing type, movement type, tax division, and member numbers. This class is the canonical example of how business-domain data is mapped in this project.

### `src/main/java/PartialLabelEntity.java`
Shows a partially labeled entity pattern — some fields have Japanese comments while others do not. Useful for understanding the labeling convention and its exceptions.

### `src/main/java/MixedLabelClass.java`
Demonstrates a mixed-labeling pattern where fields may have Japanese comments, English comments, or no comment at all. A good reference for how the project handles multilingual labeling consistency.

### `src/main/java/MultiPattern.java`
Contains fields annotated with version markers (e.g., `ANK-4494-00-00 ADD START`/`END`), indicating change-tracking or feature-branch annotation patterns used in code reviews and audits.

## Project Structure

The source code follows a flat package layout under `src/main/java`:

```
src/main/java/
  A.java                    # Placeholder / minimal class
  OrderProcessor.java       # Core order processing entry point
  ProductService.java       # Product query service
  EucJpClass.java           # Entity with Japanese-labeled fields (user, org, status)
  LargeFieldMap.java        # Service-IF data model (10 business fields)
  LargeBusinessLabelClass.java  # Large entity with 50 Japanese-labeled fields
  MixedLabelClass.java      # Mixed comment-style entity (Japanese / English / none)
  MultiPattern.java         # Fields with version/annotation markers
  PartialLabelEntity.java   # Partially labeled entity
```

The project uses a standard Maven-style directory layout (`src/main/java`), with all source classes living directly in the default package (no `package` declaration). This flat structure suggests a small, monolithic codebase or an initial project scaffold.

## Configuration

No build configuration files (e.g., `pom.xml`, `build.gradle`) were found in the repository root. This indicates one of the following:

- The project is managed by an external build system or CI pipeline that generates these files.
- Configuration lives in a separate repository or monorepo workspace.
- This is a minimal code sample extracted for a specific purpose (e.g., code quality analysis).

**Action item:** Check with your team lead about where the build configuration lives and how to compile the project locally.

## Common Patterns

### Field Labeling Convention

Most entity fields include inline comments with Japanese labels describing the business meaning of each field. You will see three styles:

| Style | Example | Class |
|-------|---------|-------|
| Japanese label | `// ユーザーID` | `EucJpClass`, `LargeFieldMap` |
| English label | `// English comment only` | `MixedLabelClass` |
| No comment | (field only) | `ProductService`, `A` |

When adding new fields, prefer the Japanese label style to match the majority of the codebase.

### Change-Marking Annotations

Fields added during specific change requests are wrapped in comment markers like:

```java
// ANK-4494-00-00 ADD START
private String keiNo = "";  // 契約番号
// ANK-4494-00-00 ADD END
```

This pattern appears in `MultiPattern.java`. When modifying existing fields, consider whether your change should also be annotated if it stems from a tracked ticket.

### Default Initialization

All string fields are initialized to the empty string (`""`) rather than `null`. This is a deliberate defensive pattern that avoids `NullPointerException` and ensures fields are always in a valid state. When adding new fields, follow this convention.

```java
private String myField = "";  // Good
private String myField;       // Avoid — may be null
```
