Package to generate a base structure for given java objects.
Project description
domain file generator
Provided information about object names and fields, creates base java classes for the objects
Usage
call domainfile_generator.run(objects: string, paths: dict).
- objects: comma separated string of objects to be created. Contains:
- package
- objectName
- fields (name,type,required(optional))
- Possible data types:
- INTEGER
- STRING
- DECIMAL
- BOOLEAN
- DATE
- TIMESTAMP
- ENUM (with slash-separated list of name and values)
- REFERENCE and INCOMING_REFERENCE (both followed by /n for multiple targets, /1 or nothing for a to-1 relationship)
- An example object "Person" inside the package "company" could look like this: "company;Person;name,STRING,required;firstName,STRING;dateOfBirth,DATE;gender,ENUM(Gender/MALE/FEMALE/DIVERSE),required;employments,INCOMING_REFERENCE(company.Employment/n);manager,REFERENCE(company.Person)"
- Possible data types:
- paths: dict with different paths to define the structure of the project. e.g.:
paths = {
'domain': '\backend\domain\src\main\java\org\derbanz\test\domain\',
'schema': '\backend\domain\src\main\resources\schema\',
'logic': '\backend\logic\src\main\java\org\derbanz\test\logic\',
'commonService': '\backend\service\common\src\main\java\org\derbanz\test\commonservice\',
'uiService': '\backend\service\ui\src\main\java\org\derbanz\test\uiservice\'
}
Example
from Banz_domainfile_generator import domainfile_generator
csv = "company;Person;name,STRING,required;firstName,STRING;dateOfBirth,DATE;gender,ENUM(Gender/MALE/FEMALE/DIVERSE),required;employments,INCOMING_REFERENCE(company.Employment/n);manager,REFERENCE(company.Person)"
paths = {
'domain': '\\test\\backend\\domain\\src\\main\\java\\org\\derbanz\\test\\domain\\',
'schema': '\\test\\backend\\domain\\src\\main\\resources\\schema\\',
'logic': '\\test\\backend\\logic\\src\\main\\java\\org\\derbanz\\test\\logic\\',
'commonService': '\\test\\backend\\service\\common\\src\\main\\java\\org\\derbanz\\test\\commonservice\\',
'uiService': '\\test\\backend\\service\\ui\\src\\main\\java\\org\\derbanz\\test\\uiservice\\'
}
domainfile_generator.run(csv, paths)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file banz_domainfile_generator-1.1.0.tar.gz.
File metadata
- Download URL: banz_domainfile_generator-1.1.0.tar.gz
- Upload date:
- Size: 37.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6bc76cdf6efcbcaab60c72de52748a8fc5f59b4b742b6aa5edb7636db756a6a4
|
|
| MD5 |
49fc9f449d14e9d2b8e1ff4da8a3633b
|
|
| BLAKE2b-256 |
3697d90ac5ee41d305bf3a10a9357d6bd70124c13a00b54cf14e1b3fcb810a67
|
File details
Details for the file banz_domainfile_generator-1.1.0-py3-none-any.whl.
File metadata
- Download URL: banz_domainfile_generator-1.1.0-py3-none-any.whl
- Upload date:
- Size: 123.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8cc1dad933f262734a3615974f63955debcf4aef581aac34a43cbcaa5d08212
|
|
| MD5 |
805a7ad5a9507f77dd15cb29b7a7ccdb
|
|
| BLAKE2b-256 |
bcd3d083e4c0eb317579b6b99d921a61e6d4e0558d8a8cca3b9f8cae911f93cf
|