jira.codehaus.org

  • Log In Access more options
    • Online Help
    • Keyboard Shortcuts
    • About JIRA
    • JIRA Credits
    • What?s New
  • Dashboards Access more options (Alt+d)
  • Projects Access more options (Alt+p)
  • Issues Access more options (Alt+i)
  • Modello
  • MODELLO-121

Add xsd support for Boolean attributes

  • Log In
  • Views
    • XML
    • Word
    • Printable

Details

  • Type: Improvement Improvement
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.0-alpha-20
  • Fix Version/s: 1.0-alpha-22
  • Component/s: modello-plugin-xsd
  • Labels:
    None
  • Complexity:
    Intermediate

Description

boolean attributes are detected as xs:boolean schema primitive type
Boolean objects are not recognized as primitive type and cause an exception: java.lang.IllegalStateException: Non-association field of a non-primitive type 'Boolean' for 'xxx'

Issue Links

depends upon

Improvement - An improvement or enhancement to an existing feature or task. MODELLO-123 Add support for Integer, Long, Float and Double fields

  • Major - Major loss of function.
  • Open - The issue is open and ready for the assignee to start work on it.
is depended upon by

Bug - A problem which impairs or prevents the functions of the product. MNG-1999 Reporting inheritance does not work properly

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Bug - A problem which impairs or prevents the functions of the product. MNG-3898 can't generate Maven site: modello fails at xsd generation step due to a Boolean field in model

  • Major - Major loss of function.
  • Closed - The issue is considered finished, the resolution is correct. Issues which are not closed can be reopened.

Activity

Ascending order - Click to sort in descending order
  • All
  • Comments
  • Work Log
  • History
  • Activity
Hide
Permalink
Herve Boutemy added a comment - 22/Nov/08 8:17 AM

should it simply be represented like boolean as xs:boolean?
Or is there something more subtle to do to handle null value?
Any thought?

Show
Herve Boutemy added a comment - 22/Nov/08 8:17 AM should it simply be represented like boolean as xs:boolean? Or is there something more subtle to do to handle null value? Any thought?
Hide
Permalink
Benjamin Bentmann added a comment - 22/Nov/08 9:02 AM - edited

should it simply be represented like boolean as xs:boolean?

+1, the semantic still matches the definition of xs:boolean, i.e. the field's value space is {true, false}. Null is only used internally (on the Java side) to detect whether the field was set at all.

BTW, are the other primitive types and their wrappers properly handled, e.g. java.lang.Integer?

Show
Benjamin Bentmann added a comment - 22/Nov/08 9:02 AM - edited
should it simply be represented like boolean as xs:boolean?
+1, the semantic still matches the definition of xs:boolean, i.e. the field's value space is {true, false}. Null is only used internally (on the Java side) to detect whether the field was set at all. BTW, are the other primitive types and their wrappers properly handled, e.g. java.lang.Integer?
Hide
Permalink
Herve Boutemy added a comment - 23/Nov/08 4:21 PM

done in [r936|]

added support for every Object types equivalent to primitives: Integer, Boolean, Long, Float and Double
I'll update the issue title

Show
Herve Boutemy added a comment - 23/Nov/08 4:21 PM done in [r936|] added support for every Object types equivalent to primitives: Integer, Boolean, Long, Float and Double I'll update the issue title
Hide
Permalink
Herve Boutemy added a comment - 29/Nov/08 2:42 AM

after more testing, I found that Boolean was supported by java generator, but not Integer, Long, Float or Double
=> created a specific issue to add these types to java generator (and any other plugins needing changes)

Show
Herve Boutemy added a comment - 29/Nov/08 2:42 AM after more testing, I found that Boolean was supported by java generator, but not Integer, Long, Float or Double => created a specific issue to add these types to java generator (and any other plugins needing changes)

People

  • Assignee:
    Herve Boutemy
    Reporter:
    Herve Boutemy
Vote (0)
Watch (1)

Dates

  • Created:
    22/Nov/08 7:59 AM
    Updated:
    13/Dec/08 4:56 AM
    Resolved:
    23/Nov/08 4:21 PM
  • Atlassian JIRA (v5.0.4#731-sha1:3aa7374)
  • Report a problem
  • Powered by a free Atlassian JIRA open source license for Codehaus. Try JIRA - bug tracking software for your team.