Packages

object model

Data Model DSL.

Define a Domain Data Model in a data model file.

For small projects, the schema can be defined without partition definitions where all namespaces reside in a default tacit partition:

package path.to.your.project
import molecule.data.model._       // import data model DSL

@InOut(1, 8)                       // Set input/output arity
object SeattleDataModel {          // data model object

  trait Person {                   // Namespace
    val name = oneString.fulltext  // String attribute definition with fulltext search
    val age  = oneInt              // Int attribute definition
  }

  // Additional namespaces...
}

For larger projects, it is recommended to group namespaces in partitions:

package path.to.your.project
import molecule.data.model._

@InOut(3, 15)
object SeattleDataModel {

  object customer {
    trait Person {
      val name    = oneString.fulltext
      val age     = oneInt
      val address = one[Address]
      val bought  = many[products.Item]
    }
    trait Address {
      val street = oneString.fulltext
      val city   = oneInt
    }
    // ..more namespaces in the `customer` partition
  }

  object products {
    trait Item {
      val title   = oneString
      val inStock = oneInt
    }
    // ..more namespaces in the `products` partition
  }

  // Additional partitions...
}
Source
model.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Grouped
  2. Alphabetic
  3. By Inheritance
Inherited
  1. model
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class InOut extends Annotation with StaticAnnotation

    Arity annotation for number of molecule input/output attributes.

  2. trait many extends refOptionBuilder[many]

    Card-many reference.

  3. trait manyBi extends refOptionBuilder[manyBi]

    Card-many bi-directional reference.

  4. trait manyBiEdge extends refOptionBuilder[manyBiEdge]

    Card-many bi-directional edge reference.

  5. trait manyBigDecimal extends number[manyBigDecimal, BigDecimal]

    Card-many BigDecimal attribute.

  6. trait manyBigInt extends number[manyBigInt, BigInt]

    Card-many BigInt attribute.

  7. trait manyBoolean extends optionBuilder[manyBoolean]

    Card-many Boolean attribute.

  8. trait manyDate extends optionBuilder[manyDate]

    Card-many Date attribute.

  9. trait manyDouble extends number[manyDouble, Double]

    Card-many Double attribute.

  10. trait manyEnum extends enumm

    Card-many Enum attribute.

  11. trait manyInt extends number[manyInt, Int]

    Card-many Int attribute.

  12. trait manyLong extends number[manyLong, Long]

    Card-many Long attribute.

  13. trait manyString extends optionBuilder[manyString]

    Card-many String attribute.

  14. trait manyURI extends optionBuilder[manyURI]

    Card-many URI attribute.

  15. trait manyUUID extends optionBuilder[manyUUID]

    Card-many UUID attribute.

  16. trait mapBigDecimal extends number[mapBigDecimal, BigDecimal]

    BigDecimal map attribute.

  17. trait mapBigInt extends number[mapBigInt, BigInt]

    BigInt map attribute.

  18. trait mapBoolean extends optionBuilder[mapBoolean]

    Boolean map attribute.

  19. trait mapDate extends optionBuilder[mapDate]

    Date map attribute.

  20. trait mapDouble extends number[mapDouble, Double]

    Double map attribute.

  21. trait mapInt extends number[mapInt, Int]

    Int map attribute.

  22. trait mapLong extends number[mapLong, Long]

    Long map attribute.

  23. trait mapString extends optionBuilder[mapString]

    String map attribute.

  24. trait mapURI extends optionBuilder[mapURI]

    URI map attribute.

  25. trait mapUUID extends optionBuilder[mapUUID]

    UUID map attribute.

  26. trait one extends refOptionBuilder[one]

    Card-one reference.

  27. trait oneBi extends refOptionBuilder[oneBi]

    Card-one bi-directional reference.

  28. trait oneBiEdge extends refOptionBuilder[oneBiEdge]

    Card-one bi-directional edge reference.

  29. trait oneBigDecimal extends number[oneBigDecimal, BigDecimal]

    Card-one BigDecimal attribute.

  30. trait oneBigInt extends number[oneBigInt, BigInt]

    Card-one BigInt attribute.

  31. trait oneBoolean extends optionBuilder[oneBoolean]

    Card-one Boolean attribute.

  32. trait oneDate extends optionBuilder[oneDate]

    Card-one Date attribute.

  33. trait oneDouble extends number[oneDouble, Double]

    Card-one Double attribute.

  34. trait oneEnum extends enumm

    Card-one Enum attribute.

  35. trait oneInt extends number[oneInt, Int]

    Card-one Int attribute.

  36. trait oneLong extends number[oneLong, Long]

    Card-one Long attribute.

  37. trait oneString extends optionBuilder[oneString]

    Card-one String attribute.

  38. trait oneURI extends optionBuilder[oneURI]

    Card-one URI attribute.

  39. trait oneUUID extends optionBuilder[oneUUID]

    Card-one UUID attribute.

  40. sealed trait optionBuilder[Self] extends AnyRef

    Attribute options.

  41. trait refOptionBuilder[RefType] extends optionBuilder[RefType]
  42. trait target extends refOptionBuilder[target]

    Bi-directional edge target attribute.

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  8. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  9. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  10. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  11. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  12. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  13. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  14. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  15. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  16. def toString(): String
    Definition Classes
    AnyRef → Any
  17. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  18. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... ) @native()
  20. object many extends many
  21. object manyBi extends manyBi
  22. object manyBiEdge extends manyBiEdge
  23. object manyBigDecimal extends manyBigDecimal
  24. object manyBigInt extends manyBigInt
  25. object manyBoolean extends manyBoolean
  26. object manyDate extends manyDate
  27. object manyDouble extends manyDouble
  28. object manyEnum extends manyEnum
  29. object manyInt extends manyInt
  30. object manyLong extends manyLong
  31. object manyString extends manyString
  32. object manyURI extends manyURI
  33. object manyUUID extends manyUUID
  34. object mapBigDecimal extends mapBigDecimal
  35. object mapBigInt extends mapBigInt
  36. object mapBoolean extends mapBoolean
  37. object mapDate extends mapDate
  38. object mapDouble extends mapDouble
  39. object mapInt extends mapInt
  40. object mapLong extends mapLong
  41. object mapString extends mapString
  42. object mapURI extends mapURI
  43. object mapUUID extends mapUUID
  44. object one extends one
  45. object oneBi extends oneBi
  46. object oneBiEdge extends oneBiEdge
  47. object oneBigDecimal extends oneBigDecimal
  48. object oneBigInt extends oneBigInt
  49. object oneBoolean extends oneBoolean
  50. object oneDate extends oneDate
  51. object oneDouble extends oneDouble
  52. object oneEnum extends oneEnum
  53. object oneInt extends oneInt
  54. object oneLong extends oneLong
  55. object oneString extends oneString
  56. object oneURI extends oneURI
  57. object oneUUID extends oneUUID
  58. object target extends target

Inherited from AnyRef

Inherited from Any

Setup

Options

Cardinality-one attributes

Cardinality-many attributes

Map attributes

References

Bidirectional references

Bidirectional edge references

Ungrouped