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))
      • 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)"
  • 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

banz_domainfile_generator-1.1.0.tar.gz (37.5 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.1.0-py3-none-any.whl (123.9 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for banz_domainfile_generator-1.1.0.tar.gz
Algorithm Hash digest
SHA256 6bc76cdf6efcbcaab60c72de52748a8fc5f59b4b742b6aa5edb7636db756a6a4
MD5 49fc9f449d14e9d2b8e1ff4da8a3633b
BLAKE2b-256 3697d90ac5ee41d305bf3a10a9357d6bd70124c13a00b54cf14e1b3fcb810a67

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for banz_domainfile_generator-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f8cc1dad933f262734a3615974f63955debcf4aef581aac34a43cbcaa5d08212
MD5 805a7ad5a9507f77dd15cb29b7a7ccdb
BLAKE2b-256 bcd3d083e4c0eb317579b6b99d921a61e6d4e0558d8a8cca3b9f8cae911f93cf

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