cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject [3/4] cayenne git commit: cleaning up deprecated API
Date Tue, 24 May 2016 09:26:58 GMT
cleaning up deprecated API

Project: http://git-wip-us.apache.org/repos/asf/cayenne/repo
Commit: http://git-wip-us.apache.org/repos/asf/cayenne/commit/51e72236
Tree: http://git-wip-us.apache.org/repos/asf/cayenne/tree/51e72236
Diff: http://git-wip-us.apache.org/repos/asf/cayenne/diff/51e72236

Branch: refs/heads/master
Commit: 51e7223660a79f7c624366e58a52cd021a53737f
Parents: 4dd396e
Author: Andrus Adamchik <andrus@objectstyle.com>
Authored: Tue May 24 12:22:26 2016 +0300
Committer: Andrus Adamchik <andrus@objectstyle.com>
Committed: Tue May 24 12:22:26 2016 +0300

----------------------------------------------------------------------
 .../apache/cayenne/query/SelectById_RunIT.java  | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/51e72236/cayenne-server/src/test/java/org/apache/cayenne/query/SelectById_RunIT.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectById_RunIT.java b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectById_RunIT.java
index ab67596..ca3c5c5 100644
--- a/cayenne-server/src/test/java/org/apache/cayenne/query/SelectById_RunIT.java
+++ b/cayenne-server/src/test/java/org/apache/cayenne/query/SelectById_RunIT.java
@@ -129,13 +129,13 @@ public class SelectById_RunIT extends ServerCase {
 
 	@Test
 	public void testMetadataCacheKey() throws Exception {
-		SelectById<Painting> q1 = SelectById.query(Painting.class, 4).useLocalCache();
+		SelectById<Painting> q1 = SelectById.query(Painting.class, 4).localCache();
 		QueryMetadata md1 = q1.getMetaData(resolver);
 		assertNotNull(md1);
 		assertNotNull(md1.getCacheKey());
 
 		SelectById<Painting> q2 = SelectById.query(Painting.class, singletonMap(Painting.PAINTING_ID_PK_COLUMN,
4))
-				.useLocalCache();
+				.localCache();
 		QueryMetadata md2 = q2.getMetaData(resolver);
 		assertNotNull(md2);
 		assertNotNull(md2.getCacheKey());
@@ -144,20 +144,20 @@ public class SelectById_RunIT extends ServerCase {
 		// cache entry
 		assertEquals(md1.getCacheKey(), md2.getCacheKey());
 
-		SelectById<Painting> q3 = SelectById.query(Painting.class, 5).useLocalCache();
+		SelectById<Painting> q3 = SelectById.query(Painting.class, 5).localCache();
 		QueryMetadata md3 = q3.getMetaData(resolver);
 		assertNotNull(md3);
 		assertNotNull(md3.getCacheKey());
 		assertNotEquals(md1.getCacheKey(), md3.getCacheKey());
 
-		SelectById<Artist> q4 = SelectById.query(Artist.class, 4).useLocalCache();
+		SelectById<Artist> q4 = SelectById.query(Artist.class, 4).localCache();
 		QueryMetadata md4 = q4.getMetaData(resolver);
 		assertNotNull(md4);
 		assertNotNull(md4.getCacheKey());
 		assertNotEquals(md1.getCacheKey(), md4.getCacheKey());
 
-		SelectById<Painting> q5 = SelectById.query(Painting.class,
-				new ObjectId("Painting", Painting.PAINTING_ID_PK_COLUMN, 4)).useLocalCache();
+		SelectById<Painting> q5 = SelectById
+				.query(Painting.class, new ObjectId("Painting", Painting.PAINTING_ID_PK_COLUMN, 4)).localCache();
 		QueryMetadata md5 = q5.getMetaData(resolver);
 		assertNotNull(md5);
 		assertNotNull(md5.getCacheKey());
@@ -177,7 +177,7 @@ public class SelectById_RunIT extends ServerCase {
 
 			@Override
 			public void execute() {
-				a3[0] = SelectById.query(Artist.class, 3).useLocalCache("g1").selectOne(context);
+				a3[0] = SelectById.query(Artist.class, 3).localCache("g1").selectOne(context);
 				assertNotNull(a3[0]);
 				assertEquals("artist3", a3[0].getArtistName());
 			}
@@ -187,7 +187,7 @@ public class SelectById_RunIT extends ServerCase {
 
 			@Override
 			public void execute() {
-				Artist a3cached = SelectById.query(Artist.class, 3).useLocalCache("g1").selectOne(context);
+				Artist a3cached = SelectById.query(Artist.class, 3).localCache("g1").selectOne(context);
 				assertSame(a3[0], a3cached);
 			}
 		});
@@ -198,7 +198,7 @@ public class SelectById_RunIT extends ServerCase {
 
 			@Override
 			public void execute() {
-				SelectById.query(Artist.class, 3).useLocalCache("g1").selectOne(context);
+				SelectById.query(Artist.class, 3).localCache("g1").selectOne(context);
 			}
 		}));
 	}
@@ -218,7 +218,7 @@ public class SelectById_RunIT extends ServerCase {
 				assertNotNull(a3);
 				assertEquals("artist3", a3.getArtistName());
 				assertEquals(2, a3.getPaintingArray().size());
-				
+
 				a3.getPaintingArray().get(0).getPaintingTitle();
 				a3.getPaintingArray().get(1).getPaintingTitle();
 			}


Mime
View raw message