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.0.1.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.1-py3-none-any.whl (25.1 kB view details)

Uploaded Python 3

File details

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

File metadata

File hashes

Hashes for banz_domainfile_generator-1.0.1.tar.gz
Algorithm Hash digest
SHA256 3d1b0b85f43350efb90f2666aea4e494f00a9ffba7db84a905447a371eda8baa
MD5 0dc116a7643a7a092bb4d1facfdb684a
BLAKE2b-256 8479c60453e4f22321c7f7ced9b1dffb9347b9ac97348121afbcdcc22d880aa9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for banz_domainfile_generator-1.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 d1840f107bb9886a9846bfdb595ef6b3ee76449c1c306c8b006670977878ae26
MD5 7095613c41bffc8513444ff5bc668e40
BLAKE2b-256 824bdc9cf48068578ee6871106578ac8a9ecf6823a908756d0d8b9465c46f645

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