macro annotation to mark a class as a persistent component.
macro annotation to mark a class or object as a derived persistent component.
macro annotation to mark a class or object as a derived persistent component. creates a
companion object for the class that extends DerivedCType. if the class already has a companion object, then adds a parent
class DerivedCType
to the existing companion object. Note that
this will not work if your companion object already extends an abstract
or concrete class, as DerivedCType
itself is an abstract class. if this
happens, you will see a compiler error such as "class Foo needs to be a trait
to be mixed in".
if the annotated component is already an object, we create the DerivedCType
as
an internal object ctype
.
the type of the polymorphic component that this component is derived from
macro annotation to mark a class as a derived persistent component.
macro annotation to mark a class as a derived persistent component. creates a
companion object for the class that extends DerivedPType. if the class already has a companion object, then adds a parent
class DerivedPType
to the existing companion object. Note that
this will not work if your companion object already extends an abstract
or concrete class, as DerivedPType
itself is an abstract class. if this
happens, you will see a compiler error such as "class Foo needs to be a trait
to be mixed in".
the type of the polymorphic persistent that this persistent is derived from
macro annotation to mark an object as a domain model.
macro annotation to mark an object as a domain model. extends the class with
longevity.model.DomainModel(currentPackage)
, where currentPackage
is
the name of the package in which this annotation was applied.
macro annotation to mark a class as a key value.
macro annotation to mark a class as a key value. extends the class with
longevity.model.KeyVal[P]
.
the persistent object that this type serves as a key value for
macro annotation to generate a inner object props
for your PType
for
you.
macro annotation to generate a inner object props
for your PType
for
you. Recursive members of the type P
in PType[P]
are mirrored in a
structure of nested objects with type Prop[P, A](path)
for appropriate
values A
and path
.
- case classes are traversed according to the parameters of their primary
constructor
- collection properties (Options
, Sets
, and Lists
) are skipped
- traits are traversed according to the abstract public vals they define.
the traits themselves, however, are not mirrored as a Prop[P, A]
NOTE: this traversal process will collect all valid properties for your PType
.
but be aware that the traversal can collect properties that are not actually
valid. for example, it will freely traverse case class elements that appear
to be persistent components, but are not included in your DomainModel. it
will also traverse persistent components that are otherwise illegal, such as
those whose primary constructor has more than one parameter list. in all
these cases, the property created by this macro will cause an exception to be
thrown on domain model construction. but all these cases, which represent a
malformed domain model, would have otherwise produced exceptions on domain model
construction.
macro annotation to mark a class as a persistent component.
macro annotation to mark a class as a persistent component. creates a
companion object for the class that extends PType. if the class already has a companion object, then adds a parent
class PType
to the existing companion object. Note that
this will not work if your companion object already extends an abstract
or concrete class, as PType
itself is an abstract class. if this
happens, you will see a compiler error such as "class Foo needs to be a trait
to be mixed in".
macro annotation to mark a trait as a polymorphic persistent component.
macro annotation to mark a trait as a polymorphic persistent component.
creates a companion object for the trait that extends
PolyCType. if the trait already has a
companion object, then adds a parent class PolyCType
to the existing
companion object. Note that this will not work if your companion object
already extends an abstract or concrete class, as PolyCType
itself is an
abstract class.
macro annotation to mark a trait as a polymorphic persistent component.
macro annotation to mark a trait as a polymorphic persistent component. creates a
companion object for the class that extends PolyPType. if the class already has a companion object, then adds a parent
class PolyPType
to the existing companion object. Note that
this will not work if your companion object already extends an abstract
or concrete class, as PolyPType
itself is an abstract class. if this
happens, you will see a compiler error such as "class Foo needs to be a trait
to be mixed in".
macro annotation to mark a class as a persistent component. creates a companion object for the class that extends CType. if the class already has a companion object, then adds a parent class
CType
to the existing companion object. Note that this will not work if your companion object already extends an abstract or concrete class, asCType
itself is an abstract class. if this happens, you will see a compiler error such as "class Foo needs to be a trait to be mixed in".