You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@isis.apache.org by os...@apache.org on 2013/12/13 00:35:38 UTC
svn commit: r1550590 -
/isis/site/trunk/content/getting-started/resources/isis-templates.xml
Author: oscarbou
Date: Thu Dec 12 23:35:38 2013
New Revision: 1550590
URL: http://svn.apache.org/r1550590
Log:
JDO templates updated.
Modified:
isis/site/trunk/content/getting-started/resources/isis-templates.xml
Modified: isis/site/trunk/content/getting-started/resources/isis-templates.xml
URL: http://svn.apache.org/viewvc/isis/site/trunk/content/getting-started/resources/isis-templates.xml?rev=1550590&r1=1550589&r2=1550590&view=diff
==============================================================================
--- isis/site/trunk/content/getting-started/resources/isis-templates.xml (original)
+++ isis/site/trunk/content/getting-started/resources/isis-templates.xml Thu Dec 12 23:35:38 2013
@@ -17,7 +17,7 @@
specific language governing permissions and limitations
under the License.
-->
-<templates><template autoinsert="true" context="java-members" deleted="false" description="Action" enabled="true" name="isa">// {{ ${actionName} (action)
+<?xml version="1.0" encoding="UTF-8" standalone="no"?><templates><template autoinsert="true" context="java-members" deleted="false" description="Action" enabled="true" name="isa">// {{ ${actionName} (action)
${:import(org.apache.isis.applib.annotation.MemberOrder)}@MemberOrder(sequence="1")
public ${ReturnType} ${actionName}(final ${ParameterType} ${parameterType}) {
return ${cursor}null; // TODO: business logic here
@@ -59,71 +59,7 @@ public void removeFrom${ChildCollectionN
get${ChildCollectionName}().remove(${childElementName});
// additional business logic
onRemoveFrom${ChildCollectionName}(${childElementName});
-}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (set - 1:n bidir, foreign key)" enabled="true" name="isc-jdo-1n-b-fk">// {{ ${CollectionName} (Collection)
-${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persistent)}@Persistent(mappedBy="${elementNameInChild}", dependentElement="${trueOrFalse}")
-private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
-@MemberOrder(sequence="1")
-public SortedSet<${ElementType}> get${CollectionName}() {
-return ${collectionName};
-}
-public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
-this.${collectionName} = ${collectionName};
-}
-// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (set - 1:n bidir, join table)" enabled="true" name="isc-jdo-1n-b-jt">// {{ ${CollectionName} (Collection)
-${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persitent,javax.jdo.annotations.Join)}@Persistent(mappedBy="${elementNameInChild}", dependentElement="${trueOrFalse}")
-@Join
-private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
-@MemberOrder(sequence="1")
-public SortedSet<${ElementType}> get${CollectionName}() {
-return ${collectionName};
-}
-public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
-this.${collectionName} = ${collectionName};
-}
-// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (set - 1:n unidir, foreign key)" enabled="true" name="isc-jdo-1n-u-fk">// {{ ${CollectionName} (Collection)
-${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Element)}
-@Element(column="${ColumnName}", dependent="${trueOrFalse}")
-private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
-@MemberOrder(sequence="1")
-public SortedSet<${ElementType}> get${CollectionName}() {
-return ${collectionName};
-}
-public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
-this.${collectionName} = ${collectionName};
-}
-// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (set - 1:n unidir, join table)" enabled="true" name="isc-jdo-1n-u-jt">// {{ ${CollectionName} (Collection)
-${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Join,javax.jdo.annotations.Element)}@Join
-@Element(dependent="${trueOrFalse}")
-private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
-@MemberOrder(sequence="1")
-public SortedSet<${ElementType}> get${CollectionName}() {
-return ${collectionName};
-}
-public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
-this.${collectionName} = ${collectionName};
-}
-// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (set - m:n bidir - child)" enabled="true" name="isc-jdo-mn-ub-c">// {{ ${CollectionName} (Collection)
-${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persistent)}@Persistent(mappedBy="${ChildCollectionNameInParent}")
-private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
-public SortedSet<${ElementType}> get${CollectionName}() {
-return ${collectionName};
-}
-public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
-this.${collectionName} = ${collectionName};
-}
-// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (set - m:n unidir & bidir - parent)" enabled="true" name="isc-jdo-mn-ub-p">// {{ ${CollectionName} (Collection)
-${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persistent,javax.jdo.annotations.Join,javax.jdo.annotations.Element)}@Persistent(table="${TableName}")
-@Join(column="${ThisEntityFieldName}")
-@Element(column="${RelatedEntityFieldName}")
-private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();@MemberOrder(sequence="1")
-
-public SortedSet<${ElementType}> get${CollectionName}() {
- return ${collectionName};
-}
-public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
- this.${collectionName} = ${collectionName};
-}
-// }}</template><template autoinsert="true" context="java-members" deleted="false" description="Collection (m:m bidir child)" enabled="true" name="isc-mmc">public void addTo${ParentCollectionName}(final ${ParentElementType} ${parentElementName}) {
+}</template><template autoinsert="true" context="java-members" deleted="false" description="Collection (m:m bidir child)" enabled="true" name="isc-mmc">public void addTo${ParentCollectionName}(final ${ParentElementType} ${parentElementName}) {
// check for no-op
if (${parentElementName} == null ||
get${ParentCollectionName}().contains(${parentElementName})) {
@@ -263,7 +199,94 @@ ${cursor}
${:import(org.apache.isis.applib.util.TitleBuffer)}final TitleBuffer buf = new TitleBuffer();
${cursor}// TODO: append to TitleBuffer, typically value properties
return buf.toString();
-}</template><template autoinsert="true" context="java-members" deleted="false" description="Lifecycle region" enabled="true" name="isl">// {{ Lifecycle methods
+}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (1:n bidir, foreign key)" enabled="true" name="isjdc-1n-b-fk">// {{ ${CollectionName} (Collection)
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persistent)}@Persistent(mappedBy="${elementNameInChild}", dependentElement="${trueOrFalse}")
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
+@MemberOrder(sequence="1")
+public SortedSet<${ElementType}> get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+this.${collectionName} = ${collectionName};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (1:n bidir, join table)" enabled="true" name="isjdc-1n-b-jt">// {{ ${CollectionName} (Collection)
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persitent,javax.jdo.annotations.Join)}@Persistent(mappedBy="${elementNameInChild}", dependentElement="${trueOrFalse}")
+@Join
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
+@MemberOrder(sequence="1")
+public SortedSet<${ElementType}> get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+this.${collectionName} = ${collectionName};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (1:n unidir, foreign key)" enabled="true" name="isjdc-1n-u-fk">// {{ ${CollectionName} (Collection)
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Element)}
+@Element(column="${ColumnName}", dependent="${trueOrFalse}")
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
+@MemberOrder(sequence="1")
+public SortedSet<${ElementType}> get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+this.${collectionName} = ${collectionName};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (1:n unidir, join table)" enabled="true" name="isjdc-1n-u-jt">// {{ ${CollectionName} (Collection)
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Join,javax.jdo.annotations.Element)}@Join
+@Element(dependent="${trueOrFalse}")
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
+@MemberOrder(sequence="1")
+public SortedSet<${ElementType}> get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+this.${collectionName} = ${collectionName};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (m:n bidir - child)" enabled="true" name="isjdc-mn-ub-c">// {{ ${CollectionName} (Collection)
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persistent)}@Persistent(mappedBy="${ChildCollectionNameInParent}")
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();
+public SortedSet<${ElementType}> get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+this.${collectionName} = ${collectionName};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (m:n unidir & bidir - parent)" enabled="true" name="isjdc-mn-ub-p">// {{ ${CollectionName} (Collection)
+${:import(java.util.SortedSet,java.util.TreeSet,org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Persistent,javax.jdo.annotations.Join,javax.jdo.annotations.Element)}@Persistent(table="${TableName}")
+@Join(column="${ThisEntityFieldName}")
+@Element(column="${RelatedEntityFieldName}")
+private SortedSet<${ElementType}> ${collectionName} = new TreeSet<${ElementType}>();@MemberOrder(sequence="1")
+
+public SortedSet<${ElementType}> get${CollectionName}() {
+ return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet<${ElementType}> ${collectionName}) {
+ this.${collectionName} = ${collectionName};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Property (simple & 1:1 bidir - child)" enabled="true" name="isjdp">// {{ ${PropertyName} (property)
+private ${PropertyType} ${propertyName};
+${:import(org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Column)}@MemberOrder(sequence="1")
+@Column(allowsNull="${trueOrFalse}")
+public ${PropertyType} get${PropertyName}() {
+ return ${propertyName};
+}
+public void set${PropertyName}(final ${PropertyType} ${propertyName}) {
+ this.${propertyName} = ${propertyName};
+}
+// }}
+
+</template><template autoinsert="true" context="java" deleted="false" description="JDO Property (1:1 parent)" enabled="true" name="isjdp-11p">// {{ ${PropertyName} (property)
+private ${PropertyType} ${propertyName};
+${:import(org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Column,javax.jdo.annotations.Persistent)}@MemberOrder(sequence="1")
+@Column(allowsNull="${trueOrFalse}")
+@Persistent(mappedBy="${fieldOnChild}")
+public ${PropertyType} get${PropertyName}() {
+ return ${propertyName};
+}
+public void set${PropertyName}(final ${PropertyType} ${propertyName}) {
+ this.${propertyName} = ${propertyName};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="Lifecycle region" enabled="true" name="isl">// {{ Lifecycle methods
${cursor}
// }}