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)&#13;
+<?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)&#13;
 ${:import(org.apache.isis.applib.annotation.MemberOrder)}@MemberOrder(sequence="1")&#13;
 public ${ReturnType} ${actionName}(final ${ParameterType} ${parameterType}) {&#13;
 	return ${cursor}null; // TODO: business logic here&#13;
@@ -59,71 +59,7 @@ public void removeFrom${ChildCollectionN
 	get${ChildCollectionName}().remove(${childElementName});&#13;
 	// additional business logic&#13;
 	onRemoveFrom${ChildCollectionName}(${childElementName});&#13;
-}</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&lt;${ElementType}&gt; ${collectionName} = new TreeSet&lt;${ElementType}&gt;();
-@MemberOrder(sequence="1")
-public SortedSet&lt;${ElementType}&gt; get${CollectionName}() {
-return ${collectionName};
-}
-public void set${CollectionName}(final SortedSet&lt;${ElementType}&gt; ${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&lt;${ElementType}&gt; ${collectionName} = new TreeSet&lt;${ElementType}&gt;();
-@MemberOrder(sequence="1")
-public SortedSet&lt;${ElementType}&gt; get${CollectionName}() {
-return ${collectionName};
-}
-public void set${CollectionName}(final SortedSet&lt;${ElementType}&gt; ${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&lt;${ElementType}&gt; ${collectionName} = new TreeSet&lt;${ElementType}&gt;();
-@MemberOrder(sequence="1")
-public SortedSet&lt;${ElementType}&gt; get${CollectionName}() {
-return ${collectionName};
-}
-public void set${CollectionName}(final SortedSet&lt;${ElementType}&gt; ${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&lt;${ElementType}&gt; ${collectionName} = new TreeSet&lt;${ElementType}&gt;();
-@MemberOrder(sequence="1")
-public SortedSet&lt;${ElementType}&gt; get${CollectionName}() {
-return ${collectionName};
-}
-public void set${CollectionName}(final SortedSet&lt;${ElementType}&gt; ${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&lt;${ElementType}&gt; ${collectionName} = new TreeSet&lt;${ElementType}&gt;();
-public SortedSet&lt;${ElementType}&gt; get${CollectionName}() {
-return ${collectionName};
-}
-public void set${CollectionName}(final SortedSet&lt;${ElementType}&gt; ${collectionName}) {
-this.${collectionName} = ${collectionName};
-}
-// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (set - m:n unidir &amp; 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&lt;${ElementType}&gt; ${collectionName} = new TreeSet&lt;${ElementType}&gt;();@MemberOrder(sequence="1")
-
-public SortedSet&lt;${ElementType}&gt; get${CollectionName}() {
-	return ${collectionName};
-}
-public void set${CollectionName}(final SortedSet&lt;${ElementType}&gt; ${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}) {&#13;
+}</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}) {&#13;
 	// check for no-op&#13;
 	if (${parentElementName} == null || &#13;
 		get${ParentCollectionName}().contains(${parentElementName})) {&#13;
@@ -263,7 +199,94 @@ ${cursor}&#13;
     ${:import(org.apache.isis.applib.util.TitleBuffer)}final TitleBuffer buf = new TitleBuffer();&#13;
     ${cursor}// TODO: append to TitleBuffer, typically value properties&#13;
 	return buf.toString();&#13;
-}</template><template autoinsert="true" context="java-members" deleted="false" description="Lifecycle region" enabled="true" name="isl">// {{ Lifecycle methods&#13;
+}</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&lt;${ElementType}&gt; ${collectionName} = new TreeSet&lt;${ElementType}&gt;();
+@MemberOrder(sequence="1")
+public SortedSet&lt;${ElementType}&gt; get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet&lt;${ElementType}&gt; ${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&lt;${ElementType}&gt; ${collectionName} = new TreeSet&lt;${ElementType}&gt;();
+@MemberOrder(sequence="1")
+public SortedSet&lt;${ElementType}&gt; get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet&lt;${ElementType}&gt; ${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&lt;${ElementType}&gt; ${collectionName} = new TreeSet&lt;${ElementType}&gt;();
+@MemberOrder(sequence="1")
+public SortedSet&lt;${ElementType}&gt; get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet&lt;${ElementType}&gt; ${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&lt;${ElementType}&gt; ${collectionName} = new TreeSet&lt;${ElementType}&gt;();
+@MemberOrder(sequence="1")
+public SortedSet&lt;${ElementType}&gt; get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet&lt;${ElementType}&gt; ${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&lt;${ElementType}&gt; ${collectionName} = new TreeSet&lt;${ElementType}&gt;();
+public SortedSet&lt;${ElementType}&gt; get${CollectionName}() {
+return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet&lt;${ElementType}&gt; ${collectionName}) {
+this.${collectionName} = ${collectionName};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Collection (m:n unidir &amp; 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&lt;${ElementType}&gt; ${collectionName} = new TreeSet&lt;${ElementType}&gt;();@MemberOrder(sequence="1")
+
+public SortedSet&lt;${ElementType}&gt; get${CollectionName}() {
+	return ${collectionName};
+}
+public void set${CollectionName}(final SortedSet&lt;${ElementType}&gt; ${collectionName}) {
+	this.${collectionName} = ${collectionName};
+}
+// }}</template><template autoinsert="true" context="java-members" deleted="false" description="JDO Property (simple &amp; 1:1 bidir - child)" enabled="true" name="isjdp">// {{ ${PropertyName} (property)&#13;
+private ${PropertyType} ${propertyName};&#13;
+${:import(org.apache.isis.applib.annotation.MemberOrder,javax.jdo.annotations.Column)}@MemberOrder(sequence="1")&#13;
+@Column(allowsNull="${trueOrFalse}")&#13;
+public ${PropertyType} get${PropertyName}() {&#13;
+	return ${propertyName};&#13;
+}&#13;
+public void set${PropertyName}(final ${PropertyType} ${propertyName}) {&#13;
+	this.${propertyName} = ${propertyName};&#13;
+}&#13;
+// }}&#13;
+&#13;
+</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&#13;
 ${cursor}&#13;
 // }}&#13;
 &#13;