Questions tagged [telosys]

Use this tag for all Telosys related questions (usage, concepts, code generation, templates, tooling, etc)

Telosys is an Open Source code generator.

It generates the plumbing and repetitive code for any kind of language or framework.

It provides two tools :

The code generator is using templates based on Apache Velocity template language.

The generation process can be described in 3 steps :

  1. Define a lightweight model (from an existing relational database or from scratch with text files)
  2. Get or create templates for the targeted language or framework (some templates are available on GitHub)
  3. Launch the generation

Tagging Recommendation:

Use the tag for all Telosys related questions.


References

34 questions
4
votes
1 answer

Variables in templates.cfg in Telosys

There are some variables in templates.cfg that could be used, like ${SRC} , ${ROOT_PKG} , ${BEANNAME} , ... I would like to know the list of variables that could be used, and also it if it possible to get the database information configured in…
gbelin
  • 365
  • 1
  • 4
  • 14
4
votes
1 answer

Is it possible in a Telosys template to call a function created specifically?

I use Telosys (https://www.telosys.org) to generate Python source code and it works fine. But I have a specific need that could be solved by calling a specific conversion function. Is it possible to create a specific function and to call it inside a…
JackPat99
  • 232
  • 1
  • 10
4
votes
1 answer

Telosys - How to generate files outside the current project location?

I'm using Telosys code generator (the CLI tool). Is it possible to generate files outside Telosys Tools project ?
JackPat99
  • 232
  • 1
  • 10
3
votes
2 answers

How to Generate Spring JPA Entities Given Database Model (Telosys)?

I am currently using Telosys to help me generate Spring JPA Entity Classes from an existing database. So far, I could generate the repository, service, provider directory by using java7-persistence-spring-data-jpa template, but not the entity. Is it…
3
votes
1 answer

How to change Telosys default types according with the target language?

It seems Telosys code generator uses Java types by default. For example, if a field type is “int” in the model the language type generated is “Integer” (or “int” if “@PrimitiveType” or “@NotNull”). Is it possible to change the types according with…
Bob P
  • 73
  • 5
2
votes
3 answers

Telosys & Maven Modules - Code Generation Across Several Modules

I have a Maven project with several submodules inside of it. They are packaged up so that I can reuse the code across several microservices. I can generate my Java classes in the parent project as I would like them to be, however, when I attempt to…
Michael Ressler
  • 851
  • 1
  • 9
  • 17
2
votes
1 answer

Generate a single file with Telosys

how are you? I am learning how to use Telosys to make a code generator for Arduino, I was wondering if there is a way to create a single file for all the entities in my DSL. For example, I have the .entity files "Cars" and "Drivers", which generates…
andbrs
  • 59
  • 5
2
votes
1 answer

How to generate @OneToOne and @ManyToMany JPA relations in Telosys using Dsl Model

Im trying to generate classes using my own springboot template and Dsl models. In my ".entity" files I have: Car {​​​​​ id : int {​​​​​ @Id, @AutoIncremented }​​​​​; users : Employee []; }​​​​​ Employee {​​​​​ id : long {​​​​​ @Id }​​​​​ ; name…
Pedro Araujo
  • 57
  • 1
  • 7
2
votes
1 answer

How can I add Telosys repos as Maven dependencies?

Im trying to add telosys as a maven dependency but Im enable to do it because its not published on Maven Central. I also tried to use jitpack but it doesnt work. Is there any way to do this? Telosys Organization :…
Pedro Araujo
  • 57
  • 1
  • 7
2
votes
2 answers

Browse a directory in Velocity Template Language with Telosys

I am trying to write templates in VTL to generate java classes with telosys. My starting point is a directory (src/main/resources/templates/es) that contains json files (mapping1.json, mapping2.json, ...). The number and names of json files are…
Lazcool
  • 63
  • 8
2
votes
1 answer

How to set the JDBC driver JAR in Telosys CLI to create a dbmodel

I use Telosys Eclipse Plugin regularly to generate my Java code from a “dbmodel” built from a PostgreSQL database. In Eclipse with a Java Project the JDBC driver is already in the Java Build Path so it’s very easy to create the “dbmodel”. Now I’m…
John T
  • 683
  • 8
  • 18
2
votes
1 answer

Telosys : How can i get database table records in template?

I am using Telosys tools for code generation. It's very nice tool and help me a lot. But there is one problem, that is, it provides database schema information and i can access in templates (templates are formerly velocity templates), which is good,…
Jaydeep
  • 446
  • 1
  • 6
  • 17
1
vote
1 answer

Telosys - default values not getting generated for fields

I am using Java7 persistence with Spring Data JPA template to generate my DAL classes using Telosys generator. While my database has default values set for all the columns, my template fails to generate the same in my @column annotation. Kindly…
Sandiip Patil
  • 456
  • 1
  • 4
  • 21
1
vote
1 answer

No configuration for database at org.telosys.tools.commons.dbcfg.DbConnectionManager.getConnection (line 76)

I am trying to get all entities (in STS) from an existing MYSQL data model. I have been researching many tools, and finally decided to use 'telosys'. This marketplace tool allows you to easily obtain the entities, it is only necessary to configure…
Talenel
  • 422
  • 2
  • 6
  • 25
1
vote
1 answer

How to generate Records with links using Telosys

I am using Telosys templates to generate code for data entities. I used template where I can generate entity classes with links i.e. with relationships to other entities. However the DTO records generated do not have the links mapped correctly i.e.…
Sandiip Patil
  • 456
  • 1
  • 4
  • 21
1
2 3