Browse documentation

Annotations

Use the actual QField annotation and metadata builder classes in QQQ 4.0.

Metadata classes

QTableMetaData, QProcessMetaData, QAppMetaData, and QWidgetMetaData are classes. Create them using constructors and fluent builder methods, often inside MetaDataProducerInterface implementations. They are not @QTableMetaData or @QProcessMetaData annotations.

Record entities

QRecordEntity is a Java base class for typed record values. The QField annotation in com.kingsrook.qqq.backend.core.model.data adds field metadata such as label, backendName, isPrimaryKey, isRequired, isEditable, maxLength, and possibleValueSourceName. Its attribute types and defaults are defined in the source.

Java
import com.kingsrook.qqq.backend.core.model.data.QField;
import com.kingsrook.qqq.backend.core.model.data.QRecordEntity;

public class PersonEntity extends QRecordEntity
{
   @QField(isPrimaryKey = true)
   private Integer id;

   @QField(isRequired = true)
   private String name;
}

This fragment illustrates annotation placement. A usable entity also needs the accessors and table-production pattern used by your application. See QRecordEntities and the template entity classes. QQQTable is another existing entity/table annotation; inspect its actual attributes rather than inventing a @QRecordEntity annotation.

Powered by qqq