Skip to main content

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)) 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: 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)
  • paths: dict with different paths to define the structure of the project. e.g.: 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\' }

Example

from Banz_domainfile_generator import run

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\\'
}
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

banz_domainfile_generator-1.0.0.tar.gz (16.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

banz_domainfile_generator-1.0.0-py3-none-any.whl (25.0 kB view details)

Uploaded Python 3

File details

Details for the file banz_domainfile_generator-1.0.0.tar.gz.

File metadata

File hashes

Hashes for banz_domainfile_generator-1.0.0.tar.gz
Algorithm Hash digest
SHA256 0077379ec83fbfb9e706ce960a7fb93da2a10fb4221bc2c1b371591f82194bb1
MD5 94948451afe061d8c4e58580d28fe7cc
BLAKE2b-256 1b83337ba4fd19d7110d12f6bf8056779fff06168ab02b18254882d41db446d9

See more details on using hashes here.

File details

Details for the file banz_domainfile_generator-1.0.0-py3-none-any.whl.

File metadata

File hashes

Hashes for banz_domainfile_generator-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 045eb8d3bd8eed1c7fdac4b42312b40ce36dd028e5f971a13af763bc670ea30c
MD5 8200f692e38ad6c6bc556ddfa0c253c3
BLAKE2b-256 0ea701540c69960fc85de0d90cd4fee3f3cb13eebdeafc4a218392a718e2312a

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page