Skip to content

Commit

Permalink
Make ERXPartials example and frameworks buildable via ant.
Browse files Browse the repository at this point in the history
  • Loading branch information
rkiddy committed Jan 3, 2013
1 parent 57b105d commit a2f3acb
Show file tree
Hide file tree
Showing 14 changed files with 95 additions and 494 deletions.
56 changes: 51 additions & 5 deletions Build/build/build.xml
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@
</antcall>
</target>

<target name="ERIUI.all">
<antcall target="global.framework.${build.action}" >
<target name="ERIUI.all">
<antcall target="global.framework.${build.action}" >
<param name="project.principal.class" value="er.iui.ERIUI" />
<param name="project.name" value="ERIUI" />
<param name="project.dir" value="Frameworks/Ajax/ERIUI" />
Expand Down Expand Up @@ -285,6 +285,35 @@
</antcall>
</target>

<target name="ERXPartialBaseModel.all">
<antcall target="global.framework.${build.action}" >
<param name="project.name" value="ERXPartialBaseModel" />
<param name="project.principal.class" value="" />
<param name="project.dir" value="Examples/ERXPartials/ERXPartialBaseModel" />
<param name="wo.external.root.bundles" value="${frameworks.wonder.core}" />
</antcall>
</target>

<target name="ERXPartialsExampleModel.all">
<antcall target="global.framework.${build.action}" >
<param name="project.name" value="ERXPartialsExampleModel" />
<param name="project.principal.class" value="" />
<param name="project.dir" value="Examples/ERXPartials/ERXPartialsExampleModel" />
<param name="wo.external.root.bundles" value="${frameworks.wonder.core}/ERXPartialBaseModel" />
</antcall>
</target>

<target name="ERXPartialsExampleApp.all">
<antcall target="global.application.${build.action}" >
<param name="project.type" value="application" />
<param name="project.principal.class" value="er.example.erxpartials.Application" />
<param name="project.name" value="ERXPartialsExampleApp" />
<param name="project.dir" value="Examples/ERXPartials/ERXPartialsExampleApp" />
<param name="wo.external.root.bundles" value="${frameworks.wonder.d2w}/ERXPartialBaseModel/ERXPartialBaseModel" />
<param name="wo.system.root.bundles" value="${frameworks.system.d2w}" />
</antcall>
</target>

<target name="ERXTest.all">
<antcall target="global.application.${build.action}" >
<param name="project.type" value="application" />
Expand Down Expand Up @@ -821,6 +850,7 @@
<param name="wo.external.root.bundles" value="${frameworks.wonder.core}/EROpenID" />
</antcall>
</target>

<target name="JavaRESTAdaptorExample.all">
<antcall target="global.application.${build.action}" >
<param name="project.type" value="application" />
Expand All @@ -831,6 +861,7 @@
<param name="wo.external.root.bundles" value="${frameworks.wonder.core}/JavaRESTAdaptor" />
</antcall>
</target>

<target name="AjaxExample.all" depends="examples.embed.check">
<property name="wonder.examples.embed.jars" value="false" />
<antcall target="global.application.${build.action}" >
Expand All @@ -844,6 +875,7 @@
<param name="wo.system.root.bundles.embed" value="${wonder.examples.embed.jars}" />
</antcall>
</target>

<target name="AjaxExample2.all" depends="examples.embed.check">
<property name="wonder.examples.embed.jars" value="false" />
<antcall target="global.application.${build.action}" >
Expand All @@ -857,6 +889,7 @@
<param name="wo.system.root.bundles.embed" value="${wonder.examples.embed.jars}" />
</antcall>
</target>

<target name="ERIUIExample.all">
<antcall target="global.application.${build.action}" >
<param name="project.type" value="application" />
Expand All @@ -883,6 +916,7 @@
<param name="before.build" value="Ajax.pre.build" />
</antcall>
</target>

<target name="YUIExample.all">
<antcall target="global.application.${build.action}" >
<param name="project.type" value="application" />
Expand All @@ -893,6 +927,7 @@
<param name="wo.external.root.bundles" value="${frameworks.wonder.core}/Ajax/YUI" />
</antcall>
</target>

<target name="YUI.all">
<antcall target="global.framework.${build.action}" >
<param name="project.type" value="framework" />
Expand Down Expand Up @@ -1149,41 +1184,47 @@
<param name="project.dir" value="Frameworks/PlugIns/PostgresqlPlugIn" />
</antcall>
</target>

<target name="DerbyPlugIn.all">
<antcall target="global.framework.${build.action}" >
<param name="project.principal.class" value="com.webobjects.jdbcadaptor.DerbyPlugIn" />
<param name="project.name" value="DerbyPlugIn" />
<param name="project.dir" value="Frameworks/PlugIns/DerbyPlugIn" />
</antcall>
</target>

<target name="FrontBasePlugIn.all">
<antcall target="global.framework.${build.action}" >
<param name="project.principal.class" value="com.frontbase.FrontBasePlugInPrincipal" />
<param name="project.name" value="FrontBasePlugIn" />
<param name="project.dir" value="Frameworks/PlugIns/FrontBasePlugIn" />
</antcall>
</target>

<target name="H2PlugIn.all">
<antcall target="global.framework.${build.action}" >
<param name="project.principal.class" value="er.h2.ERH2PlugInPrincipal" />
<param name="project.name" value="H2PlugIn" />
<param name="project.dir" value="Frameworks/PlugIns/H2PlugIn" />
</antcall>
</target>

<target name="DB2PlugIn.all">
<antcall target="global.framework.${build.action}" >
<param name="project.principal.class" value="com.webobjects.jdbcadaptor.DB2PlugIn" />
<param name="project.name" value="DB2PlugIn" />
<param name="project.dir" value="Frameworks/PlugIns/DB2PlugIn" />
</antcall>
</target>

<target name="MySQLPlugIn.all">
<antcall target="global.framework.${build.action}" >
<param name="project.principal.class" value="com.webobjects.jdbcadaptor.MySQLPlugIn" />
<param name="project.name" value="MySQLPlugIn" />
<param name="project.dir" value="Frameworks/PlugIns/MySQLPlugIn" />
</antcall>
</target>

<target name="MooTools.all">
<antcall target="global.framework.${build.action}" >
<param name="project.principal.class" value="er.ajax.Ajax" />
Expand All @@ -1192,6 +1233,7 @@
<param name="wo.external.root.bundles" value="${frameworks.wonder.core}/Ajax/ERAttachment" />
</antcall>
</target>

<target name="MooToolsExample.all" depends="examples.embed.check">
<property name="wonder.examples.embed.jars" value="false" />
<antcall target="global.application.${build.action}" >
Expand All @@ -1205,6 +1247,7 @@
<param name="wo.system.root.bundles.embed" value="${wonder.examples.embed.jars}" />
</antcall>
</target>

<target name="ERJQueryMobile.all">
<antcall target="global.framework.${build.action}" >
<param name="project.principal.class" value="er.jquerymobile.ERJQueryMobile" />
Expand All @@ -1213,6 +1256,7 @@
<param name="wo.external.root.bundles" value="${frameworks.wonder.core}/Ajax/ERAttachment" />
</antcall>
</target>

<target name="JqueryMobileExample.all" depends="examples.embed.check">
<property name="wonder.examples.embed.jars" value="false" />
<antcall target="global.application.${build.action}" >
Expand All @@ -1226,6 +1270,7 @@
<param name="wo.system.root.bundles.embed" value="${wonder.examples.embed.jars}" />
</antcall>
</target>

<target name="ERQuartzScheduler.all">
<antcall target="global.framework.${build.action}" >
<param name="project.principal.class" value="" />
Expand All @@ -1234,6 +1279,7 @@
<param name="wo.external.root.bundles" value="${frameworks.wonder.core}/ERJavaMail" />
</antcall>
</target>

<target name="ERXiss.all">
<antcall target="global.framework.${build.action}" >
<param name="project.principal.class" value="" />
Expand All @@ -1243,7 +1289,7 @@
</antcall>
</target>

<target name="deployment.embed.check" if="deployment.standalone">
<target name="deployment.embed.check" if="deployment.standalone">
<property name="wonder.deployment.embed.jars" value="true" />
</target>

Expand Down Expand Up @@ -1329,11 +1375,11 @@
to add your own, add a target definition above and choose the correct group below
-->

<target name="common.frameworks.all" depends="ERJars.all, JavaWOExtensions.all, ERExtensions.all, Ajax.all, ERDirectToWeb.all, ERNeutralLook.all, ERSelenium.all, WOOgnl.all, ERPrototypes.all, ERPlot.all, ERIndexing.all, ERChronic.all, ERCaptcha.all, ERProfiling.all, EROpenID.all, ERPDFGeneration.all, ERJGroupsSynchronizer.all, ERRest.all, ERAttachment.all, ERTaggable.all, ERJavaMail.all, ERCoreBusinessLogic.all, ERChangeNotificationJMS.all, ERCalendar.all, ERExcelLook.all, BTBusinessLogic.all, JavaMemoryAdaptor.all, JavaNeo4JAdaptor.all, JavaFSAdaptor.all, JavaERJDBCAdaptor.all, WOLips.all, WOJRebel.all, ERMoviesLogic.all, SnapshotExplorer.all, ERJasperReports.all, ERAttributeExtension.all, ERWOAdaptor.all, ERCayenne.all, ERCayenne.all, ERDistribution.all, MooTools.all, ERJQueryMobile.all, ERPersistentSessionStorage.all, ERQuartzScheduler.all, ERXiss.all, ERFirebug.all" />
<target name="common.frameworks.all" depends="ERJars.all, JavaWOExtensions.all, ERExtensions.all, Ajax.all, ERDirectToWeb.all, ERNeutralLook.all, ERSelenium.all, WOOgnl.all, ERPrototypes.all, ERPlot.all, ERIndexing.all, ERChronic.all, ERCaptcha.all, ERProfiling.all, EROpenID.all, ERPDFGeneration.all, ERJGroupsSynchronizer.all, ERRest.all, ERAttachment.all, ERTaggable.all, ERJavaMail.all, ERCoreBusinessLogic.all, ERChangeNotificationJMS.all, ERCalendar.all, ERExcelLook.all, BTBusinessLogic.all, JavaMemoryAdaptor.all, JavaNeo4JAdaptor.all, JavaFSAdaptor.all, JavaERJDBCAdaptor.all, WOLips.all, WOJRebel.all, ERMoviesLogic.all, SnapshotExplorer.all, ERJasperReports.all, ERAttributeExtension.all, ERWOAdaptor.all, ERCayenne.all, ERCayenne.all, ERDistribution.all, MooTools.all, ERJQueryMobile.all, ERPersistentSessionStorage.all, ERQuartzScheduler.all, ERXiss.all, ERFirebug.all, ERXPartialBaseModel.all, ERXPartialsExampleModel.all" />

<target name="common.applications.all" depends="BugTracker.all, ERMailer.all, Uber.all, SecretPal.all, ERXTest.all, PluginTest.all, WOTested.all" />

<target name="common.examples.all" depends="ERSeleniumExample.all, ERIndexingExample.all, ERMovies.all, D2WComponentTour.all, AjaxExample.all, AjaxExample2.all, TickTockMan.all, ERComponentTour.all, ERRestRouteExample.all, Movies.all, ERWebSocketExample.all, ERJasperReportsExample.all, BackgroundTasks.all, ERCayenneExample.all, ERDistributionExampleModel.all, ERDistributionExampleServer.all, ERDistributionExampleClient.all, MooToolsExample.all, ERPDFExamples.all, JqueryMobileExample.all, TextSearchDemo.all" />
<target name="common.examples.all" depends="ERSeleniumExample.all, ERIndexingExample.all, ERMovies.all, D2WComponentTour.all, AjaxExample.all, AjaxExample2.all, TickTockMan.all, ERComponentTour.all, ERRestRouteExample.all, Movies.all, ERWebSocketExample.all, ERJasperReportsExample.all, BackgroundTasks.all, ERCayenneExample.all, ERDistributionExampleModel.all, ERDistributionExampleServer.all, ERDistributionExampleClient.all, MooToolsExample.all, ERPDFExamples.all, JqueryMobileExample.all, TextSearchDemo.all, ERXPartialsExampleApp.all" />

<target name="dynareporting.frameworks.all" depends="DRGrouping.all, WRReporting.all" />
<target name="dynareporting.examples.all" depends="DocsByExample.all, DynaReporter.all" />
Expand Down
1 change: 0 additions & 1 deletion Examples/ERXPartials/ERXPartialBaseModel/.classpath
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="Sources"/>
<classpathentry kind="src" path="GeneratedEOs"/>
<classpathentry kind="con" path="WOFramework/ERExtensions"/>
<classpathentry kind="con" path="WOFramework/ERJars"/>
<classpathentry kind="con" path="WOFramework/ERPrototypes"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// $LastChangedRevision: 4733 $ DO NOT EDIT. Make changes to GenderType.java instead.
// DO NOT EDIT. Make changes to GenderType.java instead.
package er.example.erxpartials.model;

import com.webobjects.eoaccess.*;
Expand Down Expand Up @@ -36,18 +36,18 @@ public GenderType localInstanceIn(EOEditingContext editingContext) {
}

public String name() {
return (String) storedValueForKey("name");
return (String) storedValueForKey(_GenderType.NAME_KEY);
}

public void setName(String value) {
if (_GenderType.LOG.isDebugEnabled()) {
_GenderType.LOG.debug( "updating name from " + name() + " to " + value);
}
takeStoredValueForKey(value, "name");
takeStoredValueForKey(value, _GenderType.NAME_KEY);
}

public NSArray<er.example.erxpartials.model.Person> persons() {
return (NSArray<er.example.erxpartials.model.Person>)storedValueForKey("persons");
return (NSArray<er.example.erxpartials.model.Person>)storedValueForKey(_GenderType.PERSONS_KEY);
}

public NSArray<er.example.erxpartials.model.Person> persons(EOQualifier qualifier) {
Expand All @@ -68,7 +68,7 @@ public NSArray<er.example.erxpartials.model.Person> persons(EOQualifier qualifie
fullQualifier = inverseQualifier;
}
else {
NSMutableArray qualifiers = new NSMutableArray();
NSMutableArray<EOQualifier> qualifiers = new NSMutableArray<EOQualifier>();
qualifiers.addObject(qualifier);
qualifiers.addObject(inverseQualifier);
fullQualifier = new EOAndQualifier(qualifiers);
Expand All @@ -89,11 +89,11 @@ public NSArray<er.example.erxpartials.model.Person> persons(EOQualifier qualifie
}

public void addToPersons(er.example.erxpartials.model.Person object) {
includeObjectIntoPropertyWithKey(object, "persons");
includeObjectIntoPropertyWithKey(object, _GenderType.PERSONS_KEY);
}

public void removeFromPersons(er.example.erxpartials.model.Person object) {
excludeObjectFromPropertyWithKey(object, "persons");
excludeObjectFromPropertyWithKey(object, _GenderType.PERSONS_KEY);
}

public void addToPersonsRelationship(er.example.erxpartials.model.Person object) {
Expand All @@ -104,7 +104,7 @@ public void addToPersonsRelationship(er.example.erxpartials.model.Person object)
addToPersons(object);
}
else {
addObjectToBothSidesOfRelationshipWithKey(object, "persons");
addObjectToBothSidesOfRelationshipWithKey(object, _GenderType.PERSONS_KEY);
}
}

Expand All @@ -116,27 +116,27 @@ public void removeFromPersonsRelationship(er.example.erxpartials.model.Person ob
removeFromPersons(object);
}
else {
removeObjectFromBothSidesOfRelationshipWithKey(object, "persons");
removeObjectFromBothSidesOfRelationshipWithKey(object, _GenderType.PERSONS_KEY);
}
}

public er.example.erxpartials.model.Person createPersonsRelationship() {
EOClassDescription eoClassDesc = EOClassDescription.classDescriptionForEntityName("Person");
EOClassDescription eoClassDesc = EOClassDescription.classDescriptionForEntityName( er.example.erxpartials.model.Person.ENTITY_NAME );
EOEnterpriseObject eo = eoClassDesc.createInstanceWithEditingContext(editingContext(), null);
editingContext().insertObject(eo);
addObjectToBothSidesOfRelationshipWithKey(eo, "persons");
addObjectToBothSidesOfRelationshipWithKey(eo, _GenderType.PERSONS_KEY);
return (er.example.erxpartials.model.Person) eo;
}

public void deletePersonsRelationship(er.example.erxpartials.model.Person object) {
removeObjectFromBothSidesOfRelationshipWithKey(object, "persons");
removeObjectFromBothSidesOfRelationshipWithKey(object, _GenderType.PERSONS_KEY);
editingContext().deleteObject(object);
}

public void deleteAllPersonsRelationships() {
Enumeration objects = persons().immutableClone().objectEnumerator();
Enumeration<er.example.erxpartials.model.Person> objects = persons().immutableClone().objectEnumerator();
while (objects.hasMoreElements()) {
deletePersonsRelationship((er.example.erxpartials.model.Person)objects.nextElement());
deletePersonsRelationship(objects.nextElement());
}
}

Expand All @@ -148,6 +148,10 @@ public static GenderType createGenderType(EOEditingContext editingContext, Strin
return eo;
}

public static ERXFetchSpecification<GenderType> fetchSpec() {
return new ERXFetchSpecification<GenderType>(_GenderType.ENTITY_NAME, null, null, false, true, null);
}

public static NSArray<GenderType> fetchAllGenderTypes(EOEditingContext editingContext) {
return _GenderType.fetchAllGenderTypes(editingContext, null);
}
Expand All @@ -157,9 +161,9 @@ public static NSArray<GenderType> fetchAllGenderTypes(EOEditingContext editingCo
}

public static NSArray<GenderType> fetchGenderTypes(EOEditingContext editingContext, EOQualifier qualifier, NSArray<EOSortOrdering> sortOrderings) {
EOFetchSpecification fetchSpec = new EOFetchSpecification(_GenderType.ENTITY_NAME, qualifier, sortOrderings);
ERXFetchSpecification<GenderType> fetchSpec = new ERXFetchSpecification<GenderType>(_GenderType.ENTITY_NAME, qualifier, sortOrderings);
fetchSpec.setIsDeep(true);
NSArray<GenderType> eoObjects = (NSArray<GenderType>)editingContext.objectsWithFetchSpecification(fetchSpec);
NSArray<GenderType> eoObjects = fetchSpec.fetchObjects(editingContext);
return eoObjects;
}

Expand All @@ -175,7 +179,7 @@ public static GenderType fetchGenderType(EOEditingContext editingContext, EOQual
eoObject = null;
}
else if (count == 1) {
eoObject = (GenderType)eoObjects.objectAtIndex(0);
eoObject = eoObjects.objectAtIndex(0);
}
else {
throw new IllegalStateException("There was more than one GenderType that matched the qualifier '" + qualifier + "'.");
Expand All @@ -196,7 +200,7 @@ public static GenderType fetchRequiredGenderType(EOEditingContext editingContext
}

public static GenderType localInstanceIn(EOEditingContext editingContext, GenderType eo) {
GenderType localInstance = (eo == null) ? null : (GenderType)EOUtilities.localInstanceOfObject(editingContext, eo);
GenderType localInstance = (eo == null) ? null : ERXEOControlUtilities.localInstanceOfObject(editingContext, eo);
if (localInstance == null && eo != null) {
throw new IllegalStateException("You attempted to localInstance " + eo + ", which has not yet committed.");
}
Expand Down
Loading

1 comment on commit a2f3acb

@paulhoadley
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for doing all this Ray.

Please sign in to comment.