order api + statistics + plantuml fix
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
// Entity OmdbMovie
|
||||
|
||||
#Omdb
|
||||
#AddonModel
|
||||
OmdbMovie {
|
||||
imdbID: string {} ;
|
||||
title: string {} ;
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
// Entity OmdbSearch
|
||||
|
||||
#Omdb
|
||||
#AddonModel
|
||||
OmdbSearch {
|
||||
search: OmdbMovie[] {} ;
|
||||
}
|
||||
|
||||
7
TelosysTools/models/InfiniMotion/OrderTransaction.entity
Normal file
7
TelosysTools/models/InfiniMotion/OrderTransaction.entity
Normal file
@@ -0,0 +1,7 @@
|
||||
// Entity OrderTransaction
|
||||
|
||||
#AddonModel
|
||||
OrderTransaction {
|
||||
order: Bestellung { } ;
|
||||
tickets: Eintrittskarte[] {} ;
|
||||
}
|
||||
@@ -4,5 +4,5 @@
|
||||
StatisticsFilm {
|
||||
movie: Film {};
|
||||
tickets: Eintrittskarte[] {};
|
||||
earnings: int {};
|
||||
earnings: int { @NotNull };
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// Entity StatisticsFilmReduced
|
||||
|
||||
#AddonModel
|
||||
StatisticsFilmReduced {
|
||||
movie: Film {};
|
||||
tickets: int { @NotNull };
|
||||
earnings: int { @NotNull };
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
// Entity OmdbMovie
|
||||
|
||||
#AddonModel
|
||||
StatisticsReduced {
|
||||
movies: StatisticsFilmReduced[] {};
|
||||
shows: StatisticsVorstellungReduced[] {};
|
||||
}
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
#Statistics
|
||||
StatisticsVorstellung {
|
||||
show: Vorstellung {};
|
||||
tickets: Eintrittskarte[] {};
|
||||
earnings: int {};
|
||||
show: Vorstellung { };
|
||||
tickets: Eintrittskarte[] { };
|
||||
earnings: int { @NotNull };
|
||||
}
|
||||
|
||||
@@ -0,0 +1,8 @@
|
||||
// Entity StatisticsVorstellungReduced
|
||||
|
||||
#AddonModel
|
||||
StatisticsVorstellungReduced {
|
||||
show: Vorstellung {} ;
|
||||
tickets: int { @NotNull };
|
||||
earnings: int { @NotNull };
|
||||
}
|
||||
@@ -22,7 +22,7 @@ ENTITY_PKG=de.infinimotion.model.bean
|
||||
ProjectVariable.MAVEN_ARTIFACT_ID=model
|
||||
ProjectVariable.MAVEN_GROUP_ID=de.infinimotion
|
||||
ProjectVariable.PROJECT_NAME=infinimodel
|
||||
ProjectVariable.PROJECT_VERSION=0.0.102
|
||||
ProjectVariable.PROJECT_VERSION=0.0.110
|
||||
ProjectVariable.REST_SERVER_PORT=3000
|
||||
ProjectVariable.REST_API_ROOT=/api/v1
|
||||
ProjectVariable.REST_URL_ROOT=http://localhost:3000
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## --------------------------------------------------
|
||||
#if ( !($entity.hasTag("BaseModel") || $entity.hasTag("Omdb") || $entity.hasTag("Statistics")) )
|
||||
#cancel("Not a Base or Omdb Model")
|
||||
#if ( !($entity.hasTag("BaseModel") || $entity.hasTag("AddonModel") || $entity.hasTag("Statistics")) )
|
||||
#cancel("Not a Base or Addon Model")
|
||||
#end
|
||||
## --------------------------------------------------
|
||||
/*
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
## --------------------------------------------------
|
||||
#if ( !($entity.hasTag("BaseModel") || $entity.hasTag("Omdb") || $entity.hasTag("Statistics")) )
|
||||
#cancel("Not a Base or Omdb Model")
|
||||
#if ( !($entity.hasTag("BaseModel") || $entity.hasTag("AddonModel") || $entity.hasTag("Statistics")) )
|
||||
#cancel("Not a Base or Addon Model")
|
||||
#end
|
||||
## --------------------------------------------------
|
||||
#set( $env.language = 'TypeScript' )
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
#foreach( $entity in $model.allEntities )
|
||||
#if ( $entity.hasTag("BaseModel") || $entity.hasTag("Omdb") || $entity.hasTag("Statistics") )
|
||||
#if ( $entity.hasTag("BaseModel") || $entity.hasTag("AddonModel") || $entity.hasTag("Statistics") )
|
||||
import $entity.name from "./${entity.name}";
|
||||
#end
|
||||
#end
|
||||
|
||||
export type {
|
||||
#foreach( $entity in $model.allEntities )
|
||||
#if ( $entity.hasTag("BaseModel") || $entity.hasTag("Omdb") || $entity.hasTag("Statistics") )
|
||||
#if ( $entity.hasTag("BaseModel") || $entity.hasTag("AddonModel") || $entity.hasTag("Statistics") )
|
||||
$entity.name,
|
||||
#end
|
||||
#end
|
||||
|
||||
@@ -0,0 +1,60 @@
|
||||
## --------------------------------------------------
|
||||
#if ( !($entity.hasTag("AddonModel")) )
|
||||
#cancel("Not an Addon Model")
|
||||
#end
|
||||
##
|
||||
/*
|
||||
* Created on $now.date ( $now.time )
|
||||
* Generated by Telosys ( http://www.telosys.org/ ) version $generator.version
|
||||
*/
|
||||
package ${target.javaPackageFromFolder("persistence/${SRC}")};
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Addon model entity class for "${entity.name}"
|
||||
*
|
||||
* @author Telosys
|
||||
*
|
||||
*/
|
||||
@lombok.EqualsAndHashCode
|
||||
public class ${entity.name} {
|
||||
|
||||
#foreach( $attribute in $entity.attributes )
|
||||
private $attribute.formattedType(10) $attribute.name #if($attribute.hasInitialValue())= ${attribute.ini} #end;
|
||||
|
||||
#end
|
||||
|
||||
#foreach( $link in $entity.links )
|
||||
private ${link.formattedFieldType(10)} $link.fieldName ;
|
||||
#end
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*/
|
||||
public ${entity.name}() {
|
||||
super();
|
||||
}
|
||||
|
||||
#foreach( $attribute in $entity.attributes )
|
||||
public void ${attribute.setter}( $attribute.type $attribute.name ) {
|
||||
this.$attribute.name = $attribute.name ;
|
||||
}
|
||||
public $attribute.type ${attribute.getter}() {
|
||||
return this.$attribute.name;
|
||||
}
|
||||
#end
|
||||
|
||||
#foreach( $link in $entity.links )
|
||||
public ${link.formattedFieldType(0)} ${link.getter}() {
|
||||
return this.${link.formattedFieldName(0)};
|
||||
}
|
||||
public void ${link.setter}( ${link.formattedFieldType(0)} $link.fieldName ) {
|
||||
this.$link.fieldName = $link.fieldName ;
|
||||
}
|
||||
#end
|
||||
|
||||
//--- toString specific method
|
||||
@Override
|
||||
$java.toStringMethod($entity, 1)
|
||||
}
|
||||
@@ -8,7 +8,7 @@
|
||||
#if ( $link.isCollectionType() )
|
||||
#set($cardinality = "N" )
|
||||
#end
|
||||
$entity.name --> "$cardinality" $link.targetEntity.name
|
||||
$entity.name --> "$cardinality" $link.targetEntity.name : ${link.fieldName}
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
@@ -21,17 +21,17 @@ $entity.name --> "$cardinality" $link.targetEntity.name
|
||||
#if ( $link.isCollectionType() )
|
||||
#set($cardinality = "N" )
|
||||
#end
|
||||
${entity.name}::${link.fieldName} --> "$cardinality" $link.targetEntity.name
|
||||
${entity.name}::${link.fieldName} --> "$cardinality" $link.targetEntity.name : ${link.fieldName}
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
## -----------------------------------------------------------------------
|
||||
#macro( basicLink $entity $link $cardinality )
|
||||
$entity.name --> "$cardinality" $link.targetEntity.name
|
||||
$entity.name --> "$cardinality" $link.targetEntity.name : ${link.fieldName}
|
||||
#end
|
||||
## -----------------------------------------------------------------------
|
||||
#macro( linkFromField $entity $link $cardinality )
|
||||
${entity.name}::${link.fieldName} --> "$cardinality" $link.targetEntity.name
|
||||
${entity.name}::${link.fieldName} --> "$cardinality" $link.targetEntity.name : ${link.fieldName}
|
||||
#end
|
||||
## -----------------------------------------------------------------------
|
||||
@startuml
|
||||
@@ -45,7 +45,7 @@ end note
|
||||
|
||||
## --- Classes (based on model entities)
|
||||
#foreach( $entity in $selectedEntities )
|
||||
class $entity.name #if ( $entity.isJoinEntity() ) << (J,AliceBlue) Join Entity >> #else << (E,cornsilk) >> #end {
|
||||
#if ( $entity.isAbstract() )abstract#end class $entity.name #if ( $entity.isJoinEntity() ) << (J,AliceBlue) Join Entity >> #else << (E,cornsilk) >> #end {
|
||||
#foreach( $attribute in $entity.keyAttributes )
|
||||
+ $attribute.name : $attribute.neutralType {PK} #if ($attribute.isFK() ){FK}#end
|
||||
|
||||
@@ -55,10 +55,10 @@ class $entity.name #if ( $entity.isJoinEntity() ) << (J,AliceBlue) Join Entity
|
||||
+ $attribute.name : $attribute.neutralType #if ($attribute.isFK() ){FK}#end
|
||||
|
||||
#end
|
||||
....
|
||||
#foreach( $link in $entity.selectedLinks )
|
||||
+ $link.fieldName : $link.fieldType
|
||||
#end
|
||||
## ....
|
||||
###foreach( $link in $entity.selectedLinks )
|
||||
## + $link.fieldName : $link.fieldType
|
||||
###end
|
||||
}
|
||||
#end
|
||||
|
||||
@@ -78,4 +78,10 @@ class $entity.name #if ( $entity.isJoinEntity() ) << (J,AliceBlue) Join Entity
|
||||
#end
|
||||
#end
|
||||
|
||||
#foreach( $entity in $selectedEntities )
|
||||
#if( $entity.hasSuperClass() )
|
||||
$entity.superClass <|-- $entity.name
|
||||
#end
|
||||
#end
|
||||
|
||||
@enduml
|
||||
|
||||
@@ -55,6 +55,7 @@ Java Command Processors (P) ; ${BEANNAME}Processor.java ; persis
|
||||
Java Model Processors ; ${BEANNAME}Processor.java ; persistence/${SRC}/${ROOT_PKG}/persistence ; persistence/processor_entity_java.vm
|
||||
Java Filter Query Interface ; GenericFilterQuery.java ; persistence/${SRC}/${ROOT_PKG}/persistence ; persistence/generic_filter_query_java.vm ; 1
|
||||
Java Statistics Models ; ${BEANNAME}.java ; persistence/${SRC}/${ROOT_PKG}/persistence ; persistence/statistics_entity_java.vm
|
||||
Java Addon Models ; ${BEANNAME}.java ; persistence/${SRC}/${ROOT_PKG}/persistence ; persistence/addon_entity_java.vm
|
||||
|
||||
Java Command GetModels (P) ; CommandGet${BEANNAME}.java ; persistence/${SRC}/${ROOT_PKG}/persistence ; persistence/command/get_java.vm
|
||||
Java Command ListModels (P) ; CommandList${BEANNAME}.java ; persistence/${SRC}/${ROOT_PKG}/persistence ; persistence/command/list_java.vm
|
||||
|
||||
Reference in New Issue
Block a user