cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From johnth...@apache.org
Subject svn commit: r1422243 - /cayenne/main/trunk/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/Main.java
Date Sat, 15 Dec 2012 13:10:06 GMT
Author: johnthuss
Date: Sat Dec 15 13:10:05 2012
New Revision: 1422243

URL: http://svn.apache.org/viewvc?rev=1422243&view=rev
Log:
Fix tutorial build

Modified:
    cayenne/main/trunk/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/Main.java

Modified: cayenne/main/trunk/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/Main.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/Main.java?rev=1422243&r1=1422242&r2=1422243&view=diff
==============================================================================
--- cayenne/main/trunk/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/Main.java
(original)
+++ cayenne/main/trunk/tutorials/tutorial/src/main/java/org/apache/cayenne/tutorial/Main.java
Sat Dec 15 13:10:05 2012
@@ -79,12 +79,12 @@ public class Main {
 
 	static void selectTutorial(ObjectContext context) {
 		// SelectQuery examples
-		SelectQuery<Painting> select1 = SelectQuery.from(Painting.class, null);
+		SelectQuery<Painting> select1 = SelectQuery.query(Painting.class, null);
 		List<Painting> paintings1 = context.performQuery(select1);
 
 		Expression qualifier2 = ExpressionFactory.likeIgnoreCaseExp(
 				Painting.NAME_PROPERTY, "gi%");
-		SelectQuery<Painting> select2 = SelectQuery.from(Painting.class, qualifier2);
+		SelectQuery<Painting> select2 = SelectQuery.query(Painting.class, qualifier2);
 		List<Painting> paintings2 = context.performQuery(select2);
 
 		Calendar c = new GregorianCalendar();
@@ -94,7 +94,7 @@ public class Main {
 				.fromString("artist.dateOfBirth < $date");
 		qualifier3 = qualifier3.expWithParameters(Collections.singletonMap(
 				"date", c.getTime()));
-		SelectQuery<Painting> select3 = SelectQuery.from(Painting.class, qualifier3);
+		SelectQuery<Painting> select3 = SelectQuery.query(Painting.class, qualifier3);
 		List<Painting> paintings3 = context.performQuery(select3);
 	}
 
@@ -102,7 +102,7 @@ public class Main {
 		// Delete object examples
 		Expression qualifier = ExpressionFactory.matchExp(Artist.NAME_PROPERTY,
 				"Pablo Picasso");
-		SelectQuery<Artist> selectToDelete = SelectQuery.from(Artist.class, qualifier);
+		SelectQuery<Artist> selectToDelete = SelectQuery.query(Artist.class, qualifier);
 		Artist picasso = (Artist) Cayenne.objectForQuery(context,
 				selectToDelete);
 



Mime
View raw message