Package com.codename1.annotations.db


package com.codename1.annotations.db

Mapping annotations for managed database persistence. Relationships, lifecycle callbacks, converters, and identifier generation are processed at build time. They require the Codename One annotation processor and entity enhancement; they are not runtime reflection annotations or JPA.

The established Entity, Id, Column, and DbTransient annotations remain in com.codename1.annotations for source compatibility. Import those together with this package when declaring managed entity mappings.

  • Class
    Description
    Operations propagated from an entity to its related entities.
    A public no-arg converter for a basic field; converters also receive null values.
    The persistent discriminator for a concrete class in an entity hierarchy.
    Mapping for an owned collection of scalar values.
    A reusable value object whose scalar fields are stored in its owner table.
    Flattens an embeddable value into the owner table using a field-name prefix.
    Flattens an embeddable identifier into the owner table using a field-name prefix.
    Controls when a mapped relationship is loaded.
    Overrides the legacy Id.autoIncrement strategy for this identifier.
    Identifier generation strategies for a single identifier field.
    Database index over mapped field names, declared on an entity.
    Stores an entity hierarchy in one table with an immutable discriminator.
    Foreign key column on the owning table.
    Join table and key column names for an owning to-many association.
    Maps entity collection membership through a join table or an inverse mappedBy field.
    Maps a single related entity using a foreign key on the owning table.
    Uses a target attribute as the key of an entity relationship Map.
    Names the key column of a scalar element-collection Map.
    Contributes inherited scalar and relationship mappings to concrete entities.
    Maps a collection of related entities using a join table or an inverse mappedBy field.
    Maps a single related entity with a unique owning foreign key, or an inverse mappedBy field.
    Orders a loaded entity collection by target attributes.
    Persists the positions of elements in an owning List.
    Invokes a public no-argument callback after an entity is loaded or refreshed.
    Invokes a public no-argument callback after the entity insert succeeds, before commit.
    Invokes a public no-argument callback after the entity row is deleted, before commit.
    Invokes a public no-argument callback after the entity update succeeds, before commit.
    Invokes a public no-argument callback before inserting a new entity during flush.
    Invokes a public no-argument callback before the entity row is deleted during flush.
    Invokes a public no-argument callback before a dirty entity update during flush.
    An int or long counter maintained by a managed session for optimistic locking.