cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject svn commit: r632292 - /cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
Date Fri, 29 Feb 2008 10:59:55 GMT
Author: aadamchik
Date: Fri Feb 29 02:59:48 2008
New Revision: 632292

URL: http://svn.apache.org/viewvc?rev=632292&view=rev
Log:
removing old and somewhat confusing javadocs

Modified:
    cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java

Modified: cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
URL: http://svn.apache.org/viewvc/cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java?rev=632292&r1=632291&r2=632292&view=diff
==============================================================================
--- cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
(original)
+++ cayenne/main/trunk/framework/cayenne-jdk1.5-unpublished/src/main/java/org/apache/cayenne/access/DataContext.java
Fri Feb 29 02:59:48 2008
@@ -75,26 +75,10 @@
 import org.apache.cayenne.util.Util;
 
 /**
- * Class that provides applications with access to Cayenne persistence features. In most
- * cases this is the only access class directly used in the application.
- * <p>
- * Most common DataContext use pattern is to create one DataContext per session. "Session"
- * may be a an HttpSession in a web application, or any other similar concept in a
- * multiuser application.
- * </p>
- * <p>
- * DataObjects are registered with DataContext either implicitly when they are fetched via
- * a query, or read via a relationship from another object, or explicitly via calling
- * {@link #newObject(Class)}during new DataObject creation. DataContext tracks changes
- * made to its DataObjects in memory, and flushes them to the database when
- * {@link #commitChanges()}is called. Until DataContext is committed, changes made to its
- * objects are not visible in other DataContexts.
- * </p>
- * <p>
- * Each DataObject can belong only to a single DataContext. To create a replica of an
- * object from a different DataContext in a local context, use
- * {@link #localObject(ObjectId, Object)} method.
- * </p>
+ * The most common implementation of {@link ObjectContext}. DataContext is an isolated
+ * container of an object graph, in a sense that any uncommitted changes to persistent
+ * objects that are registered with the context, are not visible to the users of other
+ * contexts.
  * 
  * @author Andrus Adamchik
  */
@@ -259,9 +243,8 @@
      */
     public synchronized QueryCache getQueryCache() {
         if (queryCache == null) {
-            queryCache = getParentDataDomain()
-                    .getQueryCacheFactory()
-                    .getQueryCache(Collections.EMPTY_MAP);
+            queryCache = getParentDataDomain().getQueryCacheFactory().getQueryCache(
+                    Collections.EMPTY_MAP);
         }
 
         return queryCache;
@@ -679,11 +662,8 @@
             Class<?> objectClass,
             DataRow dataRow,
             boolean refresh) {
-        List<?> list = objectsFromDataRows(
-                objectClass,
-                Collections.singletonList(dataRow),
-                refresh,
-                true);
+        List<?> list = objectsFromDataRows(objectClass, Collections
+                .singletonList(dataRow), refresh, true);
         return (DataObject) list.get(0);
     }
 
@@ -863,8 +843,9 @@
                 if (!property.isFault(persistent)) {
 
                     Object value = property.readProperty(persistent);
-                    Collection<Map.Entry> collection = (value instanceof Map) ? ((Map)
value)
-                            .entrySet() : (Collection) value;
+                    Collection<Map.Entry> collection = (value instanceof Map)
+                            ? ((Map) value).entrySet()
+                            : (Collection) value;
 
                     Iterator<Map.Entry> it = collection.iterator();
                     while (it.hasNext()) {
@@ -1058,7 +1039,10 @@
         }
         else {
             if (channel != null) {
-                channel.onSync(this, new CompoundDiff(), DataChannel.ROLLBACK_CASCADE_SYNC);
+                channel.onSync(
+                        this,
+                        new CompoundDiff(),
+                        DataChannel.ROLLBACK_CASCADE_SYNC);
             }
         }
 



Mime
View raw message