SimpleObject

ASAMI, Tomoharu Created: 2025-09-15 Updated: 2025-12-15

In the SimpleModeling Reference Profile (SMRP), the abstract class SimpleEntity is defined as the base class for all entity objects. Except for special cases, all entity objects are expected to derive from SimpleEntity.

SimpleEntity provides a comprehensive set of attributes commonly needed by entity objects, allowing designers to define entity objects by simply adding domain-specific attributes.

SimpleObject is defined as the base class of SimpleEntity.

SimpleObject is an abstract object in SimpleModeling that defines the common attributes of domain objects.

Value objects can optionally use SimpleObject as their base class.

SimpleObject is composed by delegating various generic attribute groups, each of which can also be reused individually as components of value objects.

Definition in CML

This is the CML-based definition of SimpleObject and SimpleEntity.

In CML definitions, the literate modeling style allows descriptive explanations to be placed alongside the model definitions, making this information self-sufficient for understanding.

Error[java.io.FileNotFoundException: ./project.d/simpleobject/src/main/simplemodel/simpleobject_en.cml (No such file or directory)] == Usage of SimpleEntity

Entity objects are persistent objects managed by databases and similar systems. One such use case is representing articles such as news or blog posts. SimpleEntity defines attributes intended for such article-like objects.

In fact, these attributes are often needed even for non-article entities such as SalesOrder or Reservation. For example, displaying a list of Reservations may require various name formats and descriptions depending on the UI layout, and publishing Reservations via AtomFeed would require appropriate metadata. Anticipating such use cases, we provide a base class that consolidates commonly used attributes.

The following attribute groups are defined in SimpleEntity (via SimpleObject):

  • NameAttributes : Name

  • ExplanatoryAttributes : Object Description

  • LifecycleAttributes : Lifecycle

  • PublicationAttributes : Publication

  • SecurityAttributes : Security

  • AuditAttributes : Audit

  • ContextualAttributes : Contextual Metadata

The following state machines are also defined:

  • PostStatus : Publication Status

  • Aliveness : Aliveness State

Usage of SimpleObject

SimpleEntity is a persistent entity object and thus defines an id attribute required for persistence, which makes it unsuitable for non-persistent objects like value objects.

To accommodate use with value objects, a separate class named SimpleObject was defined to hold only common attributes, and SimpleEntity was made a subclass of SimpleObject.

Internationalization

In this article, the file simpleobject.cml is prepared in both Japanese and English versions, but in actual operation, it is also possible to include both Japanese and English descriptions side by side as shown below.

Tools can extract and utilize the respective Japanese and English descriptions as needed.

References

Glossary

SimpleEntity

SimpleObject is an abstract object defined in the SimpleModeling Reference Profile that specifies common attributes for domain objects. SimpleEntity provides a comprehensive set of attributes commonly needed by entity objects, allowing designers to define entity objects by simply adding domain-specific attributes.

SimpleModeling Reference Profile (SMRP)

This is the reference profile of SimpleModeling. To concretely illustrate Literate Model-Driven Development with SimpleModeling, a reference profile is defined.

SimpleObject

SimpleObject is an abstract object defined in the SimpleModeling Reference Profile that specifies common attributes for domain objects. It delegates generic attribute groups—such as NameAttributes and LifecycleAttributes—as value objects, making it reusable as a base class for both entity objects and value objects. SimpleEntity inherits from SimpleObject and adds attributes such as the identifier (id) required for persistence, forming the foundation of entity objects.

entity object

An Entity Object is an object in a domain model that has a unique identifier (ID) and is continuously identified and tracked throughout its lifecycle. Entities are mutable and treated as the same object even if their state changes, as long as they retain the same ID.

Domain Object

A Domain Object is an object that represents concepts from the real-world domain targeted by a software system, encapsulating business logic and conceptual structure. It serves as a central building block of the domain model, encompassing elements such as entities, value objects, services, rules, and events. Domain objects are not just data structures or processing units within the system, but parts of a model that reflect the semantics and behavior of the problem domain.

value object

A Value Object is an object in a domain model that represents a semantically meaningful group of values, such as attributes or descriptions. It does not have a persistent identity like an entity, is immutable, and equality is based on its values.

CML (Cozy Modeling Language)

CML is a literate modeling language for describing Cozy models. It is designed as a domain-specific language (DSL) that forms the core of analysis modeling in SimpleModeling. CML allows model elements and their relationships to be described in a narrative style close to natural language, ensuring strong compatibility with AI support and automated generation. Literate models written in CML function as intermediate representations that can be transformed into design models, program code, or technical documentation.

literate model

A Literate Model is a “readable model” that integrates model structure with natural-language narrative (structured documentation). It extends the idea of literate programming into the modeling domain, unifying structure (model) and narrative (structured text) into a single intelligible artifact interpretable by both humans and AI. The concept of “Literate Modeling” has been explored previously by some researchers and developers, mostly as an approach to improve documentation or code comprehension. However, those attempts did not establish a systematic modeling methodology that integrates models, narrative, and AI assistance as a unified framework. The Literate Model is a modeling concept newly systematized and proposed by SimpleModeling for the AI era. Building upon the ideas of literate modeling, it redefines them as an intelligent modeling foundation that enables AI-collaborative knowledge circulation and model generation. It is not merely a modeling technique but a framework that embeds human reasoning and design intent as narrative within the model, enabling AI to analyze and reconstruct them to assist in design and generation.