trait DataModelApi extends AnyRef
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 object Seattle extends DataModel(8) { // data model object with input/output arity 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._ object Seattle extends DataModel(15) { 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
- DataModelApi.scala
Linear Supertypes
Known Subclasses
Type Hierarchy
Ordering
- Grouped
- Alphabetic
- By Inheritance
Inherited
- DataModelApi
- AnyRef
- Any
- Hide All
- Show All
Visibility
- Public
- All
Type Members
-
sealed
trait
Options[Self, Tpe, BaseTpe] extends Requierable
Attribute options.
- trait Requierable extends AnyRef
- trait many extends refOptions[many]
- trait one extends refOptions[one]
- trait oneBigDecimal extends Options[oneBigDecimal, BigDecimal, BigDecimal]
- trait oneBigInt extends Options[oneBigInt, BigInt, BigInt]
- trait oneBoolean extends Options[oneBoolean, Boolean, Boolean]
- trait oneByte extends Options[oneByte, Byte, Byte]
- trait oneChar extends Options[oneChar, Char, Char]
- trait oneDate extends Options[oneDate, Date, Date]
- trait oneDouble extends Options[oneDouble, Double, Double]
- trait oneDuration extends Options[oneDuration, Duration, Duration]
- trait oneFloat extends Options[oneFloat, Float, Float]
- trait oneInstant extends Options[oneInstant, Instant, Instant]
- trait oneInt extends Options[oneInt, Int, Int]
- trait oneLocalDate extends Options[oneLocalDate, LocalDate, LocalDate]
- trait oneLocalDateTime extends Options[oneLocalDateTime, LocalDateTime, LocalDateTime]
- trait oneLocalTime extends Options[oneLocalTime, LocalTime, LocalTime]
- trait oneLong extends Options[oneLong, Long, Long]
- trait oneOffsetDateTime extends Options[oneOffsetDateTime, OffsetDateTime, OffsetDateTime]
- trait oneOffsetTime extends Options[oneOffsetTime, OffsetTime, OffsetTime]
- trait oneShort extends Options[oneShort, Short, Short]
- trait oneString extends stringOptions[oneString, String]
- trait oneURI extends Options[oneURI, URI, URI]
- trait oneUUID extends Options[oneUUID, UUID, UUID]
- trait oneZonedDateTime extends Options[oneZonedDateTime, ZonedDateTime, ZonedDateTime]
- trait refOptions[Self] extends Requierable
- trait setBigDecimal extends Options[setBigDecimal, Set[BigDecimal], BigDecimal]
- trait setBigInt extends Options[setBigInt, Set[BigInt], BigInt]
- trait setBoolean extends Options[setBoolean, Set[Boolean], Boolean]
- trait setByte extends Options[setByte, Set[Byte], Byte]
- trait setChar extends Options[setChar, Set[Char], Char]
- trait setDate extends Options[setDate, Set[Date], Date]
- trait setDouble extends Options[setDouble, Set[Double], Double]
- trait setDuration extends Options[setDuration, Set[Duration], Duration]
- trait setFloat extends Options[setFloat, Set[Float], Float]
- trait setInstant extends Options[setInstant, Set[Instant], Instant]
- trait setInt extends Options[setInt, Set[Int], Int]
- trait setLocalDate extends Options[setLocalDate, Set[LocalDate], LocalDate]
- trait setLocalDateTime extends Options[setLocalDateTime, Set[LocalDateTime], LocalDateTime]
- trait setLocalTime extends Options[setLocalTime, Set[LocalTime], LocalTime]
- trait setLong extends Options[setLong, Set[Long], Long]
- trait setOffsetDateTime extends Options[setOffsetDateTime, Set[OffsetDateTime], OffsetDateTime]
- trait setOffsetTime extends Options[setOffsetTime, Set[OffsetTime], OffsetTime]
- trait setShort extends Options[setShort, Set[Short], Short]
- trait setString extends stringOptions[oneString, Set[String]]
- trait setURI extends Options[setURI, Set[URI], URI]
- trait setUUID extends Options[setUUID, Set[UUID], UUID]
- trait setZonedDateTime extends Options[setZonedDateTime, Set[ZonedDateTime], ZonedDateTime]
- trait stringOptions[Self, Tpe] extends Options[Self, Tpe, String]
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( ... ) @native() @IntrinsicCandidate()
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @IntrinsicCandidate()
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
- object many extends many
- object one extends one
- object oneBigDecimal extends oneBigDecimal
- object oneBigInt extends oneBigInt
- object oneBoolean extends oneBoolean
- object oneByte extends oneByte
- object oneChar extends oneChar
- object oneDate extends oneDate
- object oneDouble extends oneDouble
- object oneDuration extends oneDuration
- object oneFloat extends oneFloat
- object oneInstant extends oneInstant
- object oneInt extends oneInt
- object oneLocalDate extends oneLocalDate
- object oneLocalDateTime extends oneLocalDateTime
- object oneLocalTime extends oneLocalTime
- object oneLong extends oneLong
- object oneOffsetDateTime extends oneOffsetDateTime
- object oneOffsetTime extends oneOffsetTime
- object oneShort extends oneShort
- object oneString extends oneString
- object oneURI extends oneURI
- object oneUUID extends oneUUID
- object oneZonedDateTime extends oneZonedDateTime
- object setBigDecimal extends setBigDecimal
- object setBigInt extends setBigInt
- object setBoolean extends setBoolean
- object setByte extends setByte
- object setChar extends setChar
- object setDate extends setDate
- object setDouble extends setDouble
- object setDuration extends setDuration
- object setFloat extends setFloat
- object setInstant extends setInstant
- object setInt extends setInt
- object setLocalDate extends setLocalDate
- object setLocalDateTime extends setLocalDateTime
- object setLocalTime extends setLocalTime
- object setLong extends setLong
- object setOffsetDateTime extends setOffsetDateTime
- object setOffsetTime extends setOffsetTime
- object setShort extends setShort
- object setString extends setString
- object setURI extends setURI
- object setUUID extends setUUID
- object setZonedDateTime extends setZonedDateTime
Deprecated Value Members
-
def
finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] ) @Deprecated
- Deprecated