All Downloads are FREE. Search and download functionalities are using the official Maven repository.
Please wait. This can take some minutes ...
Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance.
Project price only 1 $
You can buy this project and download/modify it how often you want.
biz.lobachev.annette.data_dictionary.builder.dsl.Entities.scala Maven / Gradle / Ivy
package biz.lobachev.annette.data_dictionary.builder.dsl
import biz.lobachev.annette.data_dictionary.builder.model.{EmbeddedEntity, Entity, StructEntity, TableEntity}
import biz.lobachev.annette.data_dictionary.builder.utils.StringSyntax._
trait Entities {
def structEntity(id: String, name: String, entityName: String): Entity =
Entity(
id = id.trim.pascalCase,
name = name.trim,
entityType = StructEntity,
entityName = entityName.trim.pascalCase,
tableName = entityName.trim.pluralize.snakeCase
)
def tableEntity(id: String, name: String, entityName: String): Entity =
Entity(
id = id.trim.pascalCase,
name = name.trim,
entityType = TableEntity,
entityName = entityName.trim.pascalCase,
tableName = entityName.trim.pluralize.snakeCase
)
def embeddedEntity(id: String, name: String, entityName: String): Entity =
Entity(
id = id.trim.pascalCase,
name = name.trim,
entityType = EmbeddedEntity,
entityName = entityName.trim.pascalCase,
tableName = entityName.trim.pluralize.snakeCase
)
def structEntity(id: String, name: String): Entity =
Entity(
id = id.trim.pascalCase,
name = name.trim,
entityType = StructEntity,
entityName = id.trim.pascalCase,
tableName = id.trim.pluralize.snakeCase
)
def tableEntity(id: String, name: String): Entity =
Entity(
id = id.trim.pascalCase,
name = name.trim,
entityType = TableEntity,
entityName = id.trim.pascalCase,
tableName = id.trim.pluralize.snakeCase
)
def embeddedEntity(id: String, name: String): Entity =
Entity(
id = id.trim.pascalCase,
name = name.trim,
entityType = EmbeddedEntity,
entityName = id.trim.pascalCase,
tableName = id.trim.pluralize.snakeCase
)
}