You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by da...@apache.org on 2021/07/23 07:42:21 UTC
[isis] 01/02: ISIS-2819: creates variants for jdo applib that
includes @Column aliasFor's
This is an automated email from the ASF dual-hosted git repository.
danhaywood pushed a commit to branch ISIS-2819
in repository https://gitbox.apache.org/repos/asf/isis.git
commit 2b5bb95876d4071f2d23a6f143fe5d148be65a90
Author: danhaywood <da...@haywood-associates.co.uk>
AuthorDate: Fri Jul 23 08:40:56 2021 +0100
ISIS-2819: creates variants for jdo applib that includes @Column aliasFor's
---
.../persistence/jdo/applib/types/AddressLine.java | 79 ++++++++++++++++
.../persistence/jdo/applib/types/Description.java | 88 ++++++++++++++++++
.../isis/persistence/jdo/applib/types/Email.java | 103 +++++++++++++++++++++
.../isis/persistence/jdo/applib/types/Fqcn.java | 80 ++++++++++++++++
.../jdo/applib/types/LogicalTypeName.java | 87 +++++++++++++++++
.../isis/persistence/jdo/applib/types/Money.java | 83 +++++++++++++++++
.../isis/persistence/jdo/applib/types/Name.java | 80 ++++++++++++++++
.../isis/persistence/jdo/applib/types/Notes.java | 88 ++++++++++++++++++
.../jdo/applib/types/ObjectIdentifier.java | 85 +++++++++++++++++
.../persistence/jdo/applib/types/Percentage.java | 82 ++++++++++++++++
.../persistence/jdo/applib/types/PhoneNumber.java | 96 +++++++++++++++++++
.../persistence/jdo/applib/types/PostalCode.java | 79 ++++++++++++++++
.../persistence/jdo/applib/types/ProperName.java | 80 ++++++++++++++++
.../persistence/jdo/applib/types/Reference.java | 96 +++++++++++++++++++
.../isis/persistence/jdo/applib/types/Title.java | 80 ++++++++++++++++
.../persistence/jdo/applib/types/UrlTemplate.java | 80 ++++++++++++++++
.../persistence/jdo/applib/types/Username.java | 80 ++++++++++++++++
17 files changed, 1446 insertions(+)
diff --git a/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/AddressLine.java b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/AddressLine.java
new file mode 100644
index 0000000..b435ad6
--- /dev/null
+++ b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/AddressLine.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.persistence.jdo.applib.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.springframework.core.annotation.AliasFor;
+
+/**
+ * Meta-annotation for a mandatory {@link String} property or parameter representing a line of an address.
+ *
+ * @since 2.0 {@index}
+ */
+@Property(
+ maxLength = AddressLine.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@PropertyLayout(
+ named = AddressLine.NAMED
+)
+@Parameter(
+ maxLength = AddressLine.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@ParameterLayout(
+ named = AddressLine.NAMED
+)
+@javax.jdo.annotations.Column(length = AddressLine.MAX_LENGTH, allowsNull = "false")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface AddressLine {
+
+ int MAX_LENGTH = 100;
+ @AliasFor( annotation = Property.class, attribute = "maxLength")
+ int propertyMaxLength() default MAX_LENGTH;
+ @AliasFor( annotation = Parameter.class, attribute = "maxLength")
+ int parameterMaxLength() default MAX_LENGTH;
+
+ @AliasFor( annotation = Property.class, attribute = "optionality")
+ Optionality propertyOptionality() default Optionality.MANDATORY;
+ @AliasFor( annotation = Parameter.class, attribute = "optionality")
+ Optionality parameterOptionality() default Optionality.MANDATORY;
+
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
+ String columnAllowsNull() default "false";
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
+ int columnLength() default MAX_LENGTH;
+
+ String NAMED = "Address Line";
+ @AliasFor( annotation = PropertyLayout.class, attribute = "named")
+ String propertyLayoutNamed() default "";
+ @AliasFor( annotation = ParameterLayout.class, attribute = "named")
+ String parameterLayoutNamed() default "";
+
+}
\ No newline at end of file
diff --git a/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Description.java b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Description.java
new file mode 100644
index 0000000..865424c
--- /dev/null
+++ b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Description.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.persistence.jdo.applib.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.springframework.core.annotation.AliasFor;
+
+/**
+ * Meta-annotation for an optional {@link String} property or parameter representing a
+ * description of some sort.
+ *
+ * @since 2.0 {@index}
+ */
+@Property(
+ maxLength = Description.MAX_LENGTH,
+ optionality = Optionality.OPTIONAL
+)
+@PropertyLayout(
+ named = Description.NAMED,
+ multiLine = Description.MULTI_LINE
+)
+@Parameter(
+ maxLength = Description.MAX_LENGTH,
+ optionality = Optionality.OPTIONAL
+)
+@ParameterLayout(
+ named = Description.NAMED,
+ multiLine = Description.MULTI_LINE
+)
+@javax.jdo.annotations.Column(length = Description.MAX_LENGTH, allowsNull = "true")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Description {
+
+ int MAX_LENGTH = 254;
+ @AliasFor( annotation = Property.class, attribute = "maxLength")
+ int propertyMaxLength() default MAX_LENGTH;
+ @AliasFor( annotation = Parameter.class, attribute = "maxLength")
+ int parameterMaxLength() default MAX_LENGTH;
+
+ @AliasFor( annotation = Property.class, attribute = "optionality")
+ Optionality propertyOptionality() default Optionality.OPTIONAL;
+ @AliasFor( annotation = Parameter.class, attribute = "optionality")
+ Optionality parameterOptionality() default Optionality.OPTIONAL;
+
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
+ String columnAllowsNull() default "true";
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
+ int columnLength() default MAX_LENGTH;
+
+ String NAMED = "Description";
+ @AliasFor( annotation = PropertyLayout.class, attribute = "named")
+ String propertyLayoutNamed() default NAMED;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "named")
+ String parameterLayoutNamed() default NAMED;
+
+ int MULTI_LINE = 1;
+ @AliasFor( annotation = PropertyLayout.class, attribute = "multiLine")
+ int propertyLayoutMultiLine() default MULTI_LINE;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "multiLine")
+ int parameterLayoutMultiLine() default MULTI_LINE;
+
+}
diff --git a/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Email.java b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Email.java
new file mode 100644
index 0000000..dd35749
--- /dev/null
+++ b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Email.java
@@ -0,0 +1,103 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.persistence.jdo.applib.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.springframework.core.annotation.AliasFor;
+
+/**
+ * Meta-annotation for an optional {@link String} property or parameter representing an
+ * email address.
+ *
+ * @since 2.0 {@index}
+ */
+@Property(
+ maxLength = Email.MAX_LENGTH,
+ optionality = Optionality.OPTIONAL,
+ regexPattern = Email.REGEX_PATTERN,
+ regexPatternReplacement = Email.REGEX_PATTERN_REPLACEMENT
+)
+@PropertyLayout(
+ named = Email.NAMED
+)
+@Parameter(
+ maxLength = Email.MAX_LENGTH,
+ optionality = Optionality.OPTIONAL,
+ regexPattern = Email.REGEX_PATTERN,
+ regexPatternReplacement = Email.REGEX_PATTERN_REPLACEMENT
+)
+@ParameterLayout(
+ named = Email.NAMED
+)
+@javax.jdo.annotations.Column(length = Email.MAX_LENGTH, allowsNull = "true")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Email {
+
+ /**
+ * See <a href="http://stackoverflow.com/questions/386294/what-is-the-maximum-length-of-a-valid-email-address">maximum length of an email address</a>.
+ */
+ int MAX_LENGTH = 254;
+ @AliasFor( annotation = Property.class, attribute = "maxLength")
+ int propertyMaxLength() default MAX_LENGTH;
+ @AliasFor( annotation = Parameter.class, attribute = "maxLength")
+ int parameterMaxLength() default MAX_LENGTH;
+
+ @AliasFor( annotation = Property.class, attribute = "optionality")
+ Optionality propertyOptionality() default Optionality.OPTIONAL;
+ @AliasFor( annotation = Parameter.class, attribute = "optionality")
+ Optionality parameterOptionality() default Optionality.OPTIONAL;
+
+ /**
+ * as per http://emailregex.com/
+ */
+ String REGEX_PATTERN = "(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\"(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21\\x23-\\x5b\\x5d-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f])*\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\x01-\\x08\\x0b\\x0c\\x0e-\\x1f\\x21-\\x5a\\x53-\\x7f]|\\\\[\\x01-\\x09\\x0b\\x0c\\x0e-\\x7f]) [...]
+ @AliasFor( annotation = Property.class, attribute = "regexPattern")
+ String propertyRegexPattern() default REGEX_PATTERN;
+ @AliasFor( annotation = Parameter.class, attribute = "regexPattern")
+ String parameterRegexPattern() default REGEX_PATTERN;
+
+ String REGEX_PATTERN_REPLACEMENT = "Email address is badly formed";
+ @AliasFor( annotation = Property.class, attribute = "regexPatternReplacement")
+ String propertyRegexPatternReplacement() default REGEX_PATTERN_REPLACEMENT;
+ @AliasFor( annotation = Parameter.class, attribute = "regexPatternReplacement")
+ String parameterRegexPatternReplacement() default REGEX_PATTERN_REPLACEMENT;
+
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
+ String columnAllowsNull() default "true";
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
+ int columnLength() default MAX_LENGTH;
+
+ String NAMED = "Email";
+ @AliasFor( annotation = PropertyLayout.class, attribute = "named")
+ String propertyLayoutNamed() default NAMED;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "named")
+ String parameterLayoutNamed() default NAMED;
+
+
+}
diff --git a/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Fqcn.java b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Fqcn.java
new file mode 100644
index 0000000..4252f8a
--- /dev/null
+++ b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Fqcn.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.persistence.jdo.applib.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.springframework.core.annotation.AliasFor;
+
+/**
+ * Meta-annotation for a {@link String} property or parameter representing a
+ * fully qualified class name
+ *
+ * @since 2.0 {@index}
+ */
+@Property(
+ maxLength = Fqcn.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@PropertyLayout(
+ named = Fqcn.NAMED
+)
+@Parameter(
+ maxLength = Fqcn.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@ParameterLayout(
+ named = Fqcn.NAMED
+)
+@javax.jdo.annotations.Column(length = Fqcn.MAX_LENGTH, allowsNull = "false")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Fqcn {
+
+ int MAX_LENGTH = 254;
+ @AliasFor( annotation = Property.class, attribute = "maxLength")
+ int propertyMaxLength() default MAX_LENGTH;
+ @AliasFor( annotation = Parameter.class, attribute = "maxLength")
+ int parameterMaxLength() default MAX_LENGTH;
+
+ @AliasFor( annotation = Property.class, attribute = "optionality")
+ Optionality propertyOptionality() default Optionality.MANDATORY;
+ @AliasFor( annotation = Parameter.class, attribute = "optionality")
+ Optionality parameterOptionality() default Optionality.MANDATORY;
+
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
+ String columnAllowsNull() default "false";
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
+ int columnLength() default MAX_LENGTH;
+
+ String NAMED = "Fully qualified class name";
+ @AliasFor( annotation = PropertyLayout.class, attribute = "named")
+ String propertyLayoutNamed() default NAMED;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "named")
+ String parameterLayoutNamed() default NAMED;
+
+}
diff --git a/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/LogicalTypeName.java b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/LogicalTypeName.java
new file mode 100644
index 0000000..fe00e71
--- /dev/null
+++ b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/LogicalTypeName.java
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.persistence.jdo.applib.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.DomainObject;
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.springframework.core.annotation.AliasFor;
+
+/**
+ * Meta-annotation for a mandatory {@link String} property or parameter representing a
+ * logical type name of a domain object (as per @{@link DomainObject#logicalTypeName() DomainObject#logicalTypeName}
+ * or @{@link DomainService#logicalTypeName() DomainObject#logicalTypeName}).
+ *
+ * @see DomainObject
+ * @see DomainService
+ * @see ObjectIdentifier
+ *
+ * @since 2.0 {@index}
+ */
+@Property(
+ maxLength = LogicalTypeName.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@PropertyLayout(
+ named = LogicalTypeName.NAMED
+)
+@Parameter(
+ maxLength = LogicalTypeName.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@ParameterLayout(
+ named = LogicalTypeName.NAMED
+)
+@javax.jdo.annotations.Column(length = LogicalTypeName.MAX_LENGTH, allowsNull = "false")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface LogicalTypeName {
+
+ int MAX_LENGTH = 254;
+ @AliasFor( annotation = Property.class, attribute = "maxLength")
+ int propertyMaxLength() default MAX_LENGTH;
+ @AliasFor( annotation = Parameter.class, attribute = "maxLength")
+ int parameterMaxLength() default MAX_LENGTH;
+
+ @AliasFor( annotation = Property.class, attribute = "optionality")
+ Optionality propertyOptionality() default Optionality.MANDATORY;
+ @AliasFor( annotation = Parameter.class, attribute = "optionality")
+ Optionality parameterOptionality() default Optionality.MANDATORY;
+
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
+ String columnAllowsNull() default "false";
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
+ int columnLength() default MAX_LENGTH;
+
+ String NAMED = "Logical type name";
+ @AliasFor( annotation = PropertyLayout.class, attribute = "named")
+ String propertyLayoutNamed() default NAMED;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "named")
+ String parameterLayoutNamed() default NAMED;
+
+}
diff --git a/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Money.java b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Money.java
new file mode 100644
index 0000000..822c506
--- /dev/null
+++ b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Money.java
@@ -0,0 +1,83 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.persistence.jdo.applib.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.springframework.core.annotation.AliasFor;
+
+/**
+ * Meta-annotation for an optional {@link java.math.BigDecimal} property or parameter
+ * representing a monetary amount.
+ *
+ * @since 2.0 {@index}
+ */
+@Property(
+ optionality = Optionality.OPTIONAL
+)
+@PropertyLayout(
+ named = Money.NAMED
+)
+@Parameter(
+ optionality = Optionality.OPTIONAL
+)
+@ParameterLayout(
+ named = Money.NAMED
+)
+@javax.validation.constraints.Digits(
+ integer = Money.INTEGER,
+ fraction = Money.FRACTION
+)
+@javax.jdo.annotations.Column(allowsNull = "true")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Money {
+
+ @AliasFor( annotation = Property.class, attribute = "optionality")
+ Optionality propertyOptionality() default Optionality.OPTIONAL;
+ @AliasFor( annotation = Parameter.class, attribute = "optionality")
+ Optionality parameterOptionality() default Optionality.OPTIONAL;
+
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
+ String columnAllowsNull() default "true";
+
+ String NAMED = "Amount";
+ @AliasFor( annotation = PropertyLayout.class, attribute = "named")
+ String propertyLayoutNamed() default NAMED;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "named")
+ String parameterLayoutNamed() default NAMED;
+
+ int INTEGER = 10;
+ @AliasFor( annotation = javax.validation.constraints.Digits.class, attribute = "integer")
+ int digitsInteger() default Money.INTEGER;
+
+ int FRACTION = 2;
+ @AliasFor( annotation = javax.validation.constraints.Digits.class, attribute = "fraction")
+ int digitsFraction() default Money.FRACTION;
+
+
+}
diff --git a/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Name.java b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Name.java
new file mode 100644
index 0000000..f306745
--- /dev/null
+++ b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Name.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.persistence.jdo.applib.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.springframework.core.annotation.AliasFor;
+
+/**
+ * Meta-annotation for a mandatory {@link String} property or parameter representing a
+ * name of some sort.
+ *
+ * @since 2.0 {@index}
+ */
+@Property(
+ maxLength = Name.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@PropertyLayout(
+ named = Name.NAMED
+)
+@Parameter(
+ maxLength = Name.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@ParameterLayout(
+ named = Name.NAMED
+)
+@javax.jdo.annotations.Column(length = Name.MAX_LENGTH, allowsNull = "false")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Name {
+
+ int MAX_LENGTH = 50;
+ @AliasFor( annotation = Property.class, attribute = "maxLength")
+ int propertyMaxLength() default MAX_LENGTH;
+ @AliasFor( annotation = Parameter.class, attribute = "maxLength")
+ int parameterMaxLength() default MAX_LENGTH;
+
+ @AliasFor( annotation = Property.class, attribute = "optionality")
+ Optionality propertyOptionality() default Optionality.MANDATORY;
+ @AliasFor( annotation = Parameter.class, attribute = "optionality")
+ Optionality parameterOptionality() default Optionality.MANDATORY;
+
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
+ String columnAllowsNull() default "false";
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
+ int columnLength() default MAX_LENGTH;
+
+ String NAMED = "Name";
+ @AliasFor( annotation = PropertyLayout.class, attribute = "named")
+ String propertyLayoutNamed() default NAMED;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "named")
+ String parameterLayoutNamed() default NAMED;
+
+}
\ No newline at end of file
diff --git a/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Notes.java b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Notes.java
new file mode 100644
index 0000000..a8144cf
--- /dev/null
+++ b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Notes.java
@@ -0,0 +1,88 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.persistence.jdo.applib.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.springframework.core.annotation.AliasFor;
+
+/**
+ * Meta-annotation for an optional {@link String} property or parameter representing a
+ * notes or comments about some object.
+ *
+ * @since 2.0 {@index}
+ */
+@Property(
+ maxLength = Notes.MAX_LENGTH,
+ optionality = Optionality.OPTIONAL
+)
+@PropertyLayout(
+ named = Notes.NAMED,
+ multiLine = Notes.MULTI_LINE
+)
+@Parameter(
+ maxLength = Notes.MAX_LENGTH,
+ optionality = Optionality.OPTIONAL
+)
+@ParameterLayout(
+ named = Notes.NAMED,
+ multiLine = Notes.MULTI_LINE
+)
+@javax.jdo.annotations.Column(length = Notes.MAX_LENGTH, allowsNull = "true")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Notes {
+
+ int MAX_LENGTH = 4000;
+ @AliasFor( annotation = Property.class, attribute = "maxLength")
+ int propertyMaxLength() default MAX_LENGTH;
+ @AliasFor( annotation = Parameter.class, attribute = "maxLength")
+ int parameterMaxLength() default MAX_LENGTH;
+
+ @AliasFor( annotation = Property.class, attribute = "optionality")
+ Optionality propertyOptionality() default Optionality.OPTIONAL;
+ @AliasFor( annotation = Parameter.class, attribute = "optionality")
+ Optionality parameterOptionality() default Optionality.OPTIONAL;
+
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
+ String columnAllowsNull() default "true";
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
+ int columnLength() default MAX_LENGTH;
+
+ String NAMED = "Notes";
+ @AliasFor( annotation = PropertyLayout.class, attribute = "named")
+ String propertyLayoutNamed() default NAMED;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "named")
+ String parameterLayoutNamed() default NAMED;
+
+ int MULTI_LINE = 10;
+ @AliasFor( annotation = PropertyLayout.class, attribute = "multiLine")
+ int propertyLayoutMultiLine() default MULTI_LINE;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "multiLine")
+ int parameterLayoutMultiLine() default MULTI_LINE;
+
+}
diff --git a/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/ObjectIdentifier.java b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/ObjectIdentifier.java
new file mode 100644
index 0000000..e4200ad
--- /dev/null
+++ b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/ObjectIdentifier.java
@@ -0,0 +1,85 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.persistence.jdo.applib.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.DomainObject;
+import org.apache.isis.applib.annotation.DomainService;
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.springframework.core.annotation.AliasFor;
+
+/**
+ * Meta-annotation for a mandatory {@link String} property or parameter representing a
+ * the identity of a domain object (with respect to its logical type, as per @{@link DomainObject#logicalTypeName() DomainObject#logicalTypeName}
+ * or @{@link DomainService#logicalTypeName() DomainObject#logicalTypeName}).
+ *
+ * @see LogicalTypeName
+ *
+ * @since 2.0 {@index}
+ */
+@Property(
+ maxLength = ObjectIdentifier.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@PropertyLayout(
+ named = ObjectIdentifier.NAMED
+)
+@Parameter(
+ maxLength = ObjectIdentifier.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@ParameterLayout(
+ named = ObjectIdentifier.NAMED
+)
+@javax.jdo.annotations.Column(length = ObjectIdentifier.MAX_LENGTH, allowsNull = "false")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ObjectIdentifier {
+
+ int MAX_LENGTH = 50;
+ @AliasFor( annotation = Property.class, attribute = "maxLength")
+ int propertyMaxLength() default MAX_LENGTH;
+ @AliasFor( annotation = Parameter.class, attribute = "maxLength")
+ int parameterMaxLength() default MAX_LENGTH;
+
+ @AliasFor( annotation = Property.class, attribute = "optionality")
+ Optionality propertyOptionality() default Optionality.MANDATORY;
+ @AliasFor( annotation = Parameter.class, attribute = "optionality")
+ Optionality parameterOptionality() default Optionality.MANDATORY;
+
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
+ String columnAllowsNull() default "false";
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
+ int columnLength() default MAX_LENGTH;
+
+ String NAMED = "Object identifier";
+ @AliasFor( annotation = PropertyLayout.class, attribute = "named")
+ String propertyLayoutNamed() default NAMED;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "named")
+ String parameterLayoutNamed() default NAMED;
+
+}
diff --git a/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Percentage.java b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Percentage.java
new file mode 100644
index 0000000..305c910
--- /dev/null
+++ b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Percentage.java
@@ -0,0 +1,82 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.persistence.jdo.applib.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.springframework.core.annotation.AliasFor;
+
+/**
+ * Meta-annotation for an optional {@link java.math.BigDecimal} property or parameter
+ * representing a percentage amount.
+ *
+ * @since 2.0 {@index}
+ */
+@Property(
+ optionality = Optionality.OPTIONAL
+)
+@PropertyLayout(
+ named = Percentage.NAMED
+)
+@Parameter(
+ optionality = Optionality.OPTIONAL
+)
+@ParameterLayout(
+ named = Percentage.NAMED
+)
+@javax.validation.constraints.Digits(
+ integer = Percentage.INTEGER,
+ fraction = Percentage.FRACTION
+)
+@javax.jdo.annotations.Column(allowsNull = "true")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Percentage {
+
+ @AliasFor( annotation = Property.class, attribute = "optionality")
+ Optionality propertyOptionality() default Optionality.OPTIONAL;
+ @AliasFor( annotation = Parameter.class, attribute = "optionality")
+ Optionality parameterOptionality() default Optionality.OPTIONAL;
+
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
+ String columnAllowsNull() default "true";
+
+ String NAMED = "Percentage (%)";
+ @AliasFor( annotation = PropertyLayout.class, attribute = "named")
+ String propertyLayoutNamed() default NAMED;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "named")
+ String parameterLayoutNamed() default NAMED;
+
+ int INTEGER = 3;
+ @AliasFor( annotation = javax.validation.constraints.Digits.class, attribute = "integer")
+ int digitsInteger() default Money.INTEGER;
+
+ int FRACTION = 2;
+ @AliasFor( annotation = javax.validation.constraints.Digits.class, attribute = "fraction")
+ int digitsFraction() default Money.FRACTION;
+
+}
diff --git a/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/PhoneNumber.java b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/PhoneNumber.java
new file mode 100644
index 0000000..fe67938
--- /dev/null
+++ b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/PhoneNumber.java
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.persistence.jdo.applib.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.springframework.core.annotation.AliasFor;
+
+/**
+ * Meta-annotation for an optional {@link String} property or parameter representing a
+ * phone number.
+ *
+ * @since 2.0 {@index}
+ */
+@Property(
+ maxLength = PhoneNumber.MAX_LENGTH,
+ optionality = Optionality.OPTIONAL,
+ regexPattern = PhoneNumber.REGEX_PATTERN,
+ regexPatternReplacement = PhoneNumber.REGEX_PATTERN_REPLACEMENT
+)
+@PropertyLayout(
+ named = PhoneNumber.NAMED
+)
+@Parameter(
+ maxLength = PhoneNumber.MAX_LENGTH,
+ optionality = Optionality.OPTIONAL,
+ regexPattern = PhoneNumber.REGEX_PATTERN,
+ regexPatternReplacement = PhoneNumber.REGEX_PATTERN_REPLACEMENT
+)
+@ParameterLayout(
+ named = PhoneNumber.NAMED
+)
+@javax.jdo.annotations.Column(length = PhoneNumber.MAX_LENGTH, allowsNull = "true")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface PhoneNumber {
+
+ int MAX_LENGTH = 20;
+ @AliasFor( annotation = Property.class, attribute = "maxLength")
+ int propertyMaxLength() default MAX_LENGTH;
+ @AliasFor( annotation = Parameter.class, attribute = "maxLength")
+ int parameterMaxLength() default MAX_LENGTH;
+
+ @AliasFor( annotation = Property.class, attribute = "optionality")
+ Optionality propertyOptionality() default Optionality.OPTIONAL;
+ @AliasFor( annotation = Parameter.class, attribute = "optionality")
+ Optionality parameterOptionality() default Optionality.OPTIONAL;
+
+ String REGEX_PATTERN = "[+]?[0-9 -]*";
+ @AliasFor( annotation = Property.class, attribute = "regexPattern")
+ String propertyRegexPattern() default REGEX_PATTERN;
+ @AliasFor( annotation = Parameter.class, attribute = "regexPattern")
+ String parameterRegexPattern() default REGEX_PATTERN;
+
+ String REGEX_PATTERN_REPLACEMENT = "Only numbers and two symbols being \"-\" and \"+\" are allowed ";
+ @AliasFor( annotation = Property.class, attribute = "regexPatternReplacement")
+ String propertyRegexPatternReplacement() default REGEX_PATTERN_REPLACEMENT;
+ @AliasFor( annotation = Parameter.class, attribute = "regexPatternReplacement")
+ String parameterRegexPatternReplacement() default REGEX_PATTERN_REPLACEMENT;
+
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
+ String columnAllowsNull() default "true";
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
+ int columnLength() default MAX_LENGTH;
+
+ String NAMED = "Phone Number";
+ @AliasFor( annotation = PropertyLayout.class, attribute = "named")
+ String propertyLayoutNamed() default NAMED;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "named")
+ String parameterLayoutNamed() default NAMED;
+
+}
diff --git a/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/PostalCode.java b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/PostalCode.java
new file mode 100644
index 0000000..a89c622
--- /dev/null
+++ b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/PostalCode.java
@@ -0,0 +1,79 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.persistence.jdo.applib.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.springframework.core.annotation.AliasFor;
+
+/**
+ * Meta-annotation for a mandatory {@link String} property or parameter representing a
+ * postal code or zip code.
+ *
+ * @since 2.0 {@index}
+ */
+@Property(
+ maxLength = PostalCode.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@PropertyLayout(
+ named = PostalCode.NAMED
+)
+@Parameter(
+ maxLength = PostalCode.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@ParameterLayout(
+ named = PostalCode.NAMED
+)
+@javax.jdo.annotations.Column(length = PostalCode.MAX_LENGTH, allowsNull = "false")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface PostalCode {
+
+ int MAX_LENGTH = 12;
+ @AliasFor( annotation = Property.class, attribute = "maxLength")
+ int propertyMaxLength() default MAX_LENGTH;
+ @AliasFor( annotation = Parameter.class, attribute = "maxLength")
+ int parameterMaxLength() default MAX_LENGTH;
+
+ @AliasFor( annotation = Property.class, attribute = "optionality")
+ Optionality propertyOptionality() default Optionality.MANDATORY;
+ @AliasFor( annotation = Parameter.class, attribute = "optionality")
+ Optionality parameterOptionality() default Optionality.MANDATORY;
+
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
+ String columnAllowsNull() default "false";
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
+ int columnLength() default MAX_LENGTH;
+
+ String NAMED = "Postal code";
+ @AliasFor( annotation = PropertyLayout.class, attribute = "named")
+ String propertyLayoutNamed() default NAMED;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "named")
+ String parameterLayoutNamed() default NAMED;
+}
\ No newline at end of file
diff --git a/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/ProperName.java b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/ProperName.java
new file mode 100644
index 0000000..e3ba407
--- /dev/null
+++ b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/ProperName.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.persistence.jdo.applib.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.springframework.core.annotation.AliasFor;
+
+/**
+ * Meta-annotation for a mandatory {@link String} property or parameter representing the
+ * "proper" (or formal) name of some sort.
+ *
+ * @since 2.0 {@index}
+ */
+@Property(
+ maxLength = ProperName.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@PropertyLayout(
+ named = ProperName.NAMED
+)
+@Parameter(
+ maxLength = ProperName.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@ParameterLayout(
+ named = ProperName.NAMED
+)
+@javax.jdo.annotations.Column(length = ProperName.MAX_LENGTH, allowsNull = "false")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface ProperName {
+
+ int MAX_LENGTH = 50;
+ @AliasFor( annotation = Property.class, attribute = "maxLength")
+ int propertyMaxLength() default MAX_LENGTH;
+ @AliasFor( annotation = Parameter.class, attribute = "maxLength")
+ int parameterMaxLength() default MAX_LENGTH;
+
+ @AliasFor( annotation = Property.class, attribute = "optionality")
+ Optionality propertyOptionality() default Optionality.MANDATORY;
+ @AliasFor( annotation = Parameter.class, attribute = "optionality")
+ Optionality parameterOptionality() default Optionality.MANDATORY;
+
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
+ String columnAllowsNull() default "false";
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
+ int columnLength() default MAX_LENGTH;
+
+ String NAMED = "Proper (or formal) name";
+ @AliasFor( annotation = PropertyLayout.class, attribute = "named")
+ String propertyLayoutNamed() default NAMED;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "named")
+ String parameterLayoutNamed() default NAMED;
+
+}
diff --git a/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Reference.java b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Reference.java
new file mode 100644
index 0000000..c8ece86
--- /dev/null
+++ b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Reference.java
@@ -0,0 +1,96 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.persistence.jdo.applib.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.springframework.core.annotation.AliasFor;
+
+/**
+ * Meta-annotation for a mandatory {@link String} property or parameter representing A
+ * unique reference code of some sort, restricted to capitals, numbers and '_', '/' and '-'.
+ *
+ * @since 2.0 {@index}
+ */
+@Property(
+ maxLength = Reference.MAX_LENGTH,
+ optionality = Optionality.MANDATORY,
+ regexPattern = Reference.REGEX_PATTERN,
+ regexPatternReplacement = Reference.REGEX_PATTERN_REPLACEMENT
+)
+@PropertyLayout(
+ named = Reference.NAMED
+)
+@Parameter(
+ maxLength = Reference.MAX_LENGTH,
+ optionality = Optionality.MANDATORY,
+ regexPattern = Reference.REGEX_PATTERN,
+ regexPatternReplacement = Reference.REGEX_PATTERN_REPLACEMENT
+)
+@ParameterLayout(
+ named = Reference.NAMED
+)
+@javax.jdo.annotations.Column(length = Reference.MAX_LENGTH, allowsNull = "false")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Reference {
+
+ int MAX_LENGTH = 24;
+ @AliasFor( annotation = Property.class, attribute = "maxLength")
+ int propertyMaxLength() default MAX_LENGTH;
+ @AliasFor( annotation = Parameter.class, attribute = "maxLength")
+ int parameterMaxLength() default MAX_LENGTH;
+
+ @AliasFor( annotation = Property.class, attribute = "optionality")
+ Optionality propertyOptionality() default Optionality.OPTIONAL;
+ @AliasFor( annotation = Parameter.class, attribute = "optionality")
+ Optionality parameterOptionality() default Optionality.OPTIONAL;
+
+ String REGEX_PATTERN = "[ -/_A-Z0-9]+";
+ @AliasFor( annotation = Property.class, attribute = "regexPattern")
+ String propertyRegexPattern() default REGEX_PATTERN;
+ @AliasFor( annotation = Parameter.class, attribute = "regexPattern")
+ String parameterRegexPattern() default REGEX_PATTERN;
+
+ String REGEX_PATTERN_REPLACEMENT = "Only capital letters, numbers and 3 symbols being: \"_\" , \"-\" and \"/\" are allowed";
+ @AliasFor( annotation = Property.class, attribute = "regexPatternReplacement")
+ String propertyRegexPatternReplacement() default REGEX_PATTERN_REPLACEMENT;
+ @AliasFor( annotation = Parameter.class, attribute = "regexPatternReplacement")
+ String parameterRegexPatternReplacement() default REGEX_PATTERN_REPLACEMENT;
+
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
+ String columnAllowsNull() default "false";
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
+ int columnLength() default MAX_LENGTH;
+
+ String NAMED = "Reference";
+ @AliasFor( annotation = PropertyLayout.class, attribute = "named")
+ String propertyLayoutNamed() default NAMED;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "named")
+ String parameterLayoutNamed() default NAMED;
+
+}
diff --git a/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Title.java b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Title.java
new file mode 100644
index 0000000..55e75a4
--- /dev/null
+++ b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Title.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.persistence.jdo.applib.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.springframework.core.annotation.AliasFor;
+
+/**
+ * Meta-annotation for a mandatory {@link String} property or parameter representing a
+ * title (or perhaps label) of some sort.
+ *
+ * @since 2.0 {@index}
+ */
+@Property(
+ maxLength = Title.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@PropertyLayout(
+ named = Title.NAMED
+)
+@Parameter(
+ maxLength = Title.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@ParameterLayout(
+ named = Title.NAMED
+)
+@javax.jdo.annotations.Column(length = Title.MAX_LENGTH, allowsNull = "false")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Title {
+
+ int MAX_LENGTH = 50;
+ @AliasFor( annotation = Property.class, attribute = "maxLength")
+ int propertyMaxLength() default MAX_LENGTH;
+ @AliasFor( annotation = Parameter.class, attribute = "maxLength")
+ int parameterMaxLength() default MAX_LENGTH;
+
+ @AliasFor( annotation = Property.class, attribute = "optionality")
+ Optionality propertyOptionality() default Optionality.MANDATORY;
+ @AliasFor( annotation = Parameter.class, attribute = "optionality")
+ Optionality parameterOptionality() default Optionality.MANDATORY;
+
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
+ String columnAllowsNull() default "false";
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
+ int columnLength() default MAX_LENGTH;
+
+ String NAMED = "Name";
+ @AliasFor( annotation = PropertyLayout.class, attribute = "named")
+ String propertyLayoutNamed() default NAMED;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "named")
+ String parameterLayoutNamed() default NAMED;
+
+}
diff --git a/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/UrlTemplate.java b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/UrlTemplate.java
new file mode 100644
index 0000000..6762df8
--- /dev/null
+++ b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/UrlTemplate.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.persistence.jdo.applib.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.springframework.core.annotation.AliasFor;
+
+/**
+ * Meta-annotation for a mandatory {@link String} property or parameter representing a
+ * URL template, for example for an entity that holds configuration data to access external systems.
+ *
+ * @since 2.0 {@index}
+ */
+@Property(
+ maxLength = UrlTemplate.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@PropertyLayout(
+ named = UrlTemplate.NAMED
+)
+@Parameter(
+ maxLength = UrlTemplate.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@ParameterLayout(
+ named = UrlTemplate.NAMED
+)
+@javax.jdo.annotations.Column(length = UrlTemplate.MAX_LENGTH, allowsNull = "false")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface UrlTemplate {
+
+ int MAX_LENGTH = 254;
+ @AliasFor( annotation = Property.class, attribute = "maxLength")
+ int propertyMaxLength() default MAX_LENGTH;
+ @AliasFor( annotation = Parameter.class, attribute = "maxLength")
+ int parameterMaxLength() default MAX_LENGTH;
+
+ @AliasFor( annotation = Property.class, attribute = "optionality")
+ Optionality propertyOptionality() default Optionality.MANDATORY;
+ @AliasFor( annotation = Parameter.class, attribute = "optionality")
+ Optionality parameterOptionality() default Optionality.MANDATORY;
+
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
+ String columnAllowsNull() default "false";
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
+ int columnLength() default MAX_LENGTH;
+
+ String NAMED = "URL Template";
+ @AliasFor( annotation = PropertyLayout.class, attribute = "named")
+ String propertyLayoutNamed() default NAMED;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "named")
+ String parameterLayoutNamed() default NAMED;
+
+}
diff --git a/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Username.java b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Username.java
new file mode 100644
index 0000000..916cc35
--- /dev/null
+++ b/persistence/jdo/applib/src/main/java/org/apache/isis/persistence/jdo/applib/types/Username.java
@@ -0,0 +1,80 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements. See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership. The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied. See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+package org.apache.isis.persistence.jdo.applib.types;
+
+import java.lang.annotation.ElementType;
+import java.lang.annotation.Retention;
+import java.lang.annotation.RetentionPolicy;
+import java.lang.annotation.Target;
+
+import org.apache.isis.applib.annotation.Optionality;
+import org.apache.isis.applib.annotation.Parameter;
+import org.apache.isis.applib.annotation.ParameterLayout;
+import org.apache.isis.applib.annotation.Property;
+import org.apache.isis.applib.annotation.PropertyLayout;
+import org.springframework.core.annotation.AliasFor;
+
+/**
+ * Meta-annotation for a mandatory {@link String} property or parameter representing the
+ * unique username (or login name) of a user of the system.
+ *
+ * @since 2.0 {@index}
+ */
+@Property(
+ maxLength = Username.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@PropertyLayout(
+ named = Username.NAMED
+)
+@Parameter(
+ maxLength = Username.MAX_LENGTH,
+ optionality = Optionality.MANDATORY
+)
+@ParameterLayout(
+ named = Username.NAMED
+)
+@javax.jdo.annotations.Column(length = Username.MAX_LENGTH, allowsNull = "false")
+@Target({ ElementType.METHOD, ElementType.FIELD, ElementType.PARAMETER, ElementType.ANNOTATION_TYPE })
+@Retention(RetentionPolicy.RUNTIME)
+public @interface Username {
+
+ int MAX_LENGTH = 120;
+ @AliasFor( annotation = Property.class, attribute = "maxLength")
+ int propertyMaxLength() default MAX_LENGTH;
+ @AliasFor( annotation = Parameter.class, attribute = "maxLength")
+ int parameterMaxLength() default MAX_LENGTH;
+
+ @AliasFor( annotation = Property.class, attribute = "optionality")
+ Optionality propertyOptionality() default Optionality.MANDATORY;
+ @AliasFor( annotation = Parameter.class, attribute = "optionality")
+ Optionality parameterOptionality() default Optionality.MANDATORY;
+
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "allowsNull")
+ String columnAllowsNull() default "false";
+ @AliasFor( annotation = javax.jdo.annotations.Column.class, attribute = "length")
+ int columnLength() default MAX_LENGTH;
+
+ String NAMED = "Name";
+ @AliasFor( annotation = PropertyLayout.class, attribute = "named")
+ String propertyLayoutNamed() default NAMED;
+ @AliasFor( annotation = ParameterLayout.class, attribute = "named")
+ String parameterLayoutNamed() default NAMED;
+
+}