Repository: isis Updated Branches: refs/heads/master fe5a295a0 -> 469751d9c
Changed all occurrences of allowNulls and allowsNulls in the docs to allowsNull Project: http://git-wip-us.apache.org/repos/asf/isis/repo Commit: http://git-wip-us.apache.org/repos/asf/isis/commit/2ab1ac19 Tree: http://git-wip-us.apache.org/repos/asf/isis/tree/2ab1ac19 Diff: http://git-wip-us.apache.org/repos/asf/isis/diff/2ab1ac19 Branch: refs/heads/master Commit: 2ab1ac19a071d4ff45dadba5590db2cc82705084 Parents: 67f6621 Author: Rosco Kalis <roscoka...@gmail.com> Authored: Tue Sep 13 13:39:39 2016 +0200 Committer: Rosco Kalis <roscoka...@gmail.com> Committed: Tue Sep 13 13:39:39 2016 +0200 ---------------------------------------------------------------------- .../src/main/asciidoc/_release-notes_1.3.0.adoc | 2 +- .../src/main/asciidoc/guides/_rgant-Column.adoc | 4 ++-- .../src/main/asciidoc/guides/_rgant-Property.adoc | 4 ++-- .../asciidoc/guides/_rgant-Property_optionality.adoc | 12 ++++++------ .../guides/_ugfun_core-concepts_building-blocks.adoc | 2 +- .../_ugfun_how-tos_class-structure_properties.adoc | 8 ++++---- 6 files changed, 16 insertions(+), 16 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/isis/blob/2ab1ac19/adocs/documentation/src/main/asciidoc/_release-notes_1.3.0.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/_release-notes_1.3.0.adoc b/adocs/documentation/src/main/asciidoc/_release-notes_1.3.0.adoc index be4e631..c3fc460 100644 --- a/adocs/documentation/src/main/asciidoc/_release-notes_1.3.0.adoc +++ b/adocs/documentation/src/main/asciidoc/_release-notes_1.3.0.adoc @@ -213,7 +213,7 @@ * link:https://issues.apache.org/jira/browse/ISIS-427[ISIS-427] - specific), with JDO implementation. * link:https://issues.apache.org/jira/browse/ISIS-450[ISIS-450] - session interaction between entities. * link:https://issues.apache.org/jira/browse/ISIS-459[ISIS-459] - Enhance IsisJdoSupport service to support integration testing (execute arbitrary SQL, delete all instances of an entity) -* link:https://issues.apache.org/jira/browse/ISIS-488[ISIS-488] - Derive Apache Isis' MandatoryFacet from JDO @Column(allowNulls=) annotation, and provide @Mandatory annotation as override +* link:https://issues.apache.org/jira/browse/ISIS-488[ISIS-488] - Derive Apache Isis' MandatoryFacet from JDO @Column(allowsNull=) annotation, and provide @Mandatory annotation as override * link:https://issues.apache.org/jira/browse/ISIS-553[ISIS-553] - Provide view model support, as sketched out in the Restful Objects spec http://git-wip-us.apache.org/repos/asf/isis/blob/2ab1ac19/adocs/documentation/src/main/asciidoc/guides/_rgant-Column.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgant-Column.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgant-Column.adoc index 97a1b12..f782a44 100644 --- a/adocs/documentation/src/main/asciidoc/guides/_rgant-Column.adoc +++ b/adocs/documentation/src/main/asciidoc/guides/_rgant-Column.adoc @@ -29,7 +29,7 @@ For example: [source,java] ---- public class Customer { - @javax.jdo.annotations.Column(allowNulls="true") + @javax.jdo.annotations.Column(allowsNull="true") public String getMiddleInitial() { ... } public void setMiddleInitial(String middleInitial) { ... } ---- @@ -54,7 +54,7 @@ public class Customer { @javax.jdo.annotations.Column(length=20) public String getFirstName() { ... } public void setFirstName(String firstName) { ... } - @javax.jdo.annotations.Column(allowNulls="true", length=1) + @javax.jdo.annotations.Column(allowsNull="true", length=1) public String getMiddleInitial() { ... } public void setMiddleInitial(String middleInitial) { ... } @javax.jdo.annotations.Column(length=30) http://git-wip-us.apache.org/repos/asf/isis/blob/2ab1ac19/adocs/documentation/src/main/asciidoc/guides/_rgant-Property.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgant-Property.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgant-Property.adoc index 9d27376..774741b 100644 --- a/adocs/documentation/src/main/asciidoc/guides/_rgant-Property.adoc +++ b/adocs/documentation/src/main/asciidoc/guides/_rgant-Property.adoc @@ -73,7 +73,7 @@ Property must also be annotated with `@javax.jdo.annotations.NotPersistent` in o | |specifies a property is optional rather than mandatory + -In many/most cases you should however use xref:rgant.adoc#_rgant-Column[`@Column#allowNulls()`] +In many/most cases you should however use xref:rgant.adoc#_rgant-Column[`@Column#allowsNull()`] @@ -102,7 +102,7 @@ public class Customer { return EmailUtil.ensureValidEmail(proposed); // <1> } } - @javax.jdo.annotations.Column(allowNulls="true") // <2> + @javax.jdo.annotations.Column(allowsNull="true") // <2> @Property( maxLength=30, minLength=5, http://git-wip-us.apache.org/repos/asf/isis/blob/2ab1ac19/adocs/documentation/src/main/asciidoc/guides/_rgant-Property_optionality.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/guides/_rgant-Property_optionality.adoc b/adocs/documentation/src/main/asciidoc/guides/_rgant-Property_optionality.adoc index 0d69502..932a20b 100644 --- a/adocs/documentation/src/main/asciidoc/guides/_rgant-Property_optionality.adoc +++ b/adocs/documentation/src/main/asciidoc/guides/_rgant-Property_optionality.adoc @@ -12,14 +12,14 @@ By default, Apache Isis assumes that all properties of an domain object or view That said, properties are most commonly defined on persistent domain objects (entities), in which case the JDO xref:rgant.adoc#_rgant-Column[`@Column`] should be specified. Apache Isis can infer the maxLength directly from the equivalent @Column#length() annotation. -That said, properties are most commonly defined on persistent domain objects (entities), in which case the JDO xref:rgant.adoc#_rgant-Column[`@Column`] will in any case need to be specified. Apache Isis can infer the `optionality` semantic directly from the equivalent `@Column#allowNulls()` annotation/attribute. +That said, properties are most commonly defined on persistent domain objects (entities), in which case the JDO xref:rgant.adoc#_rgant-Column[`@Column`] will in any case need to be specified. Apache Isis can infer the `optionality` semantic directly from the equivalent `@Column#allowsNull()` annotation/attribute. For example: [source,java] ---- public class Customer { - @javax.jdo.annotations.Column(allowNulls="true") + @javax.jdo.annotations.Column(allowsNull="true") public String getMiddleInitial() { ... } public void setMiddleInitial(String middleInitial) { ... } ... @@ -31,9 +31,9 @@ In this case there is no need for the `@Property#optionality()` attribute. == Mismatched defaults -If the `@Column#allowNulls()` attribute is omitted and the `@Property#optionality() attribute is also omitted, then note that Isis' defaults and JDO's defaults differ. Specifically, Isis always assumes properties are mandatory, whereas JDO specifies that primitives are mandatory, but all reference types are optional. +If the `@Column#allowsNull()` attribute is omitted and the `@Property#optionality() attribute is also omitted, then note that Isis' defaults and JDO's defaults differ. Specifically, Isis always assumes properties are mandatory, whereas JDO specifies that primitives are mandatory, but all reference types are optional. -When Apache Isis initializes it checks for these mismatches during its metamodel validation phase, and will fail to boot ("fail-fast") if there is a mismatch. The fix is usually to add the `@Column#allowsNulls()` annotation/attribute. +When Apache Isis initializes it checks for these mismatches during its metamodel validation phase, and will fail to boot ("fail-fast") if there is a mismatch. The fix is usually to add the `@Column#allowsNull()` annotation/attribute. == Superclass inheritance type @@ -53,7 +53,7 @@ public abstract class PaymentMethod { @javax.jdo.annotations.Inheritance(strategy = InheritanceStrategy.SUPERCLASS_TABLE) public class CreditCardPaymentMethod extends PaymentMethod { private String cardNumber; - @javax.jdo.annotations.Column(allowNulls="true") + @javax.jdo.annotations.Column(allowsNull="true") @Property(optionality=Optionality.MANDATORY) public String getCardNumber() { return this.cardNumber; } public void setCardNumber(String cardNumber) { this.cardNumber = cardNumber; } @@ -68,7 +68,7 @@ Alternatively, you could rely on the fact that Apache Isis never looks at fields @javax.jdo.annotations.PersistenceCapable @javax.jdo.annotations.Inheritance(strategy = InheritanceStrategy.SUPERCLASS_TABLE) public class CreditCardPaymentMethod extends PaymentMethod { - @javax.jdo.annotations.Column(allowNulls="true") + @javax.jdo.annotations.Column(allowsNull="true") private String cardNumber; public String getCardNumber() { return this.cardNumber; } public void setCardNumber(String cardNumber) { this.cardNumber = cardNumber; } http://git-wip-us.apache.org/repos/asf/isis/blob/2ab1ac19/adocs/documentation/src/main/asciidoc/guides/_ugfun_core-concepts_building-blocks.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_core-concepts_building-blocks.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_core-concepts_building-blocks.adoc index 45e5bef..6bd4d2e 100644 --- a/adocs/documentation/src/main/asciidoc/guides/_ugfun_core-concepts_building-blocks.adoc +++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_core-concepts_building-blocks.adoc @@ -25,7 +25,7 @@ certain other JEE annotations such as `@javax.inject.Inject` (used for dependenc The framework uses DataNucleus for its persistence mechanism. This is an ORM that implements the JDO and JPA APIs, and which can map domain objects either to an RDBMS or to various NoSQL objectstores such as MongoDB or Neo4J. Apache Isis -recognizes a number of the JDO annotations such as `@javax.jdo.annotations.Column(allowNulls=...)`. +recognizes a number of the JDO annotations such as `@javax.jdo.annotations.Column(allowsNull=...)`. In addition, the framework builds up the metamodel for each domain object using xref:ugfun.adoc#_ugfun_object-layout[layout hints], such as `Customer.layout.json`. These provide metadata such as http://git-wip-us.apache.org/repos/asf/isis/blob/2ab1ac19/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_properties.adoc ---------------------------------------------------------------------- diff --git a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_properties.adoc b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_properties.adoc index c1e5327..a530db6 100644 --- a/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_properties.adoc +++ b/adocs/documentation/src/main/asciidoc/guides/_ugfun_how-tos_class-structure_properties.adoc @@ -31,7 +31,7 @@ For example, rather than: [source,java] ---- -@javax.jdo.annotations.Column(allowNulls="true") +@javax.jdo.annotations.Column(allowsNull="true") private LocalDate date; @Property(optionality=Optionality.OPTIONAL) public LocalDate getDate() { ... } @@ -43,7 +43,7 @@ you should instead simply write: [source,java] ---- private LocalDate date; -@javax.jdo.annotations.Column(allowNulls="true") +@javax.jdo.annotations.Column(allowsNull="true") public LocalDate getDate() { ... } public void setDate(LocalDate d) { ... } ---- @@ -84,7 +84,7 @@ For example: @javax.jdo.annotations.Inheritance(strategy = InheritanceStrategy.SUPER_TABLE) public class SomeSubtype extends SomeSuperType { private LocalDate date; - @javax.jdo.annotations.Column(allowNulls="true") + @javax.jdo.annotations.Column(allowsNull="true") @Property(optionality=Optionality.MANDATORY) public LocalDate getDate() { ... } public void setDate(LocalDate d) { ... } @@ -102,7 +102,7 @@ An alternative way to achieve this is to leave the JDO annotation on the field ( ---- @javax.jdo.annotations.Inheritance(strategy = InheritanceStrategy.SUPER_TABLE) public class SomeSubtype extends SomeSuperType { - @javax.jdo.annotations.Column(allowNulls="true") + @javax.jdo.annotations.Column(allowsNull="true") private LocalDate date; // mandatory in Apache Isis by default public LocalDate getDate() { }