You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@isis.apache.org by "ASF subversion and git services (JIRA)" <ji...@apache.org> on 2013/08/07 06:43:48 UTC
[jira] [Commented] (ISIS-488) Derive Isis' MandatoryFacet from JDO
@Column(allowNulls=) annotation, and provide @Mandatory annotation as
override
[ https://issues.apache.org/jira/browse/ISIS-488?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13731631#comment-13731631 ]
ASF subversion and git services commented on ISIS-488:
------------------------------------------------------
Commit f8ebd1bdcc94229209c7b97c2107d176b84cb81f in branch refs/heads/master from [~danhaywood]
[ https://git-wip-us.apache.org/repos/asf?p=isis.git;h=f8ebd1b ]
ISIS-488: facet factory for JDO @Column annotation
- MandatoryDerivedFromJdoColumnAnnotationFacetFactory
- refactored the MandatoryFacetAbstract hierarchy
- check for incompatibilities between Isis' and JDO's default treatments of nullable fields.
- new @Mandatory annotation
- fixes to Isis provided JDO entities (PublishedEvent, ApplicationSettingJdo, UserSettingJdo).
Also:
- trivial refactorings to BigDecimalDerivedFromJdoColumnAnnotationFacetFactory (from whence cloned)
- fix to LayoutMetadataJsonReader unit test
> Derive Isis' MandatoryFacet from JDO @Column(allowNulls=) annotation, and provide @Mandatory annotation as override
> -------------------------------------------------------------------------------------------------------------------
>
> Key: ISIS-488
> URL: https://issues.apache.org/jira/browse/ISIS-488
> Project: Isis
> Issue Type: New Feature
> Components: Objectstore: JDO
> Affects Versions: objectstore-jdo-1.1.0
> Reporter: Dan Haywood
> Assignee: Dan Haywood
> Priority: Minor
> Fix For: objectstore-jdo-1.2.0
>
>
> Thus:
> @javax.jdo.annotations.Column(allowNulls="false")
> public String getFoo() { ... }
> is mandatory
> @javax.jdo.annotations.Column(allowNulls="true")
> public String getFoo() { ... }
> is optional
> @javax.jdo.annotations.Column
> public int getFoo() { ... }
> is mandatory (JDO default for primitives)
> @javax.jdo.annotations.Column
> public String getFoo() { ... }
> is optional (JDO default for non-primitives)
> ~~~
> In certain circumstances (when using roll-up SUPERCLASS_TABLE inheritance) it is necessary to annotate a mandatory property as optional in JDO. To force Isis to implement a mandatory check, use the @Mandatory annotation
> eg:
> @javax.jdo.annotations.Inheritance(strategy = InheritanceStrategy.SUPERCLASS_TABLE)
> public class SomeSubclass {
> @javax.jdo.annotations.Column(allowNulls="false")
> @Mandatory
> public String getFoo() { ... }
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira