cayenne-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aadamc...@apache.org
Subject cayenne git commit: cleanup, docs
Date Wed, 28 Sep 2016 15:50:59 GMT
Repository: cayenne
Updated Branches:
  refs/heads/master f7f33b557 -> dacbe043f


cleanup, docs


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

Branch: refs/heads/master
Commit: dacbe043f6309f847bb91ba1fdaf3470b37fb7d2
Parents: f7f33b5
Author: Andrus Adamchik <andrus@objectstyle.com>
Authored: Wed Sep 28 18:47:21 2016 +0300
Committer: Andrus Adamchik <andrus@objectstyle.com>
Committed: Wed Sep 28 18:50:41 2016 +0300

----------------------------------------------------------------------
 .../apache/cayenne/merge/MergeDirection.java    |  7 +++----
 .../org/apache/cayenne/merge/MergerContext.java | 16 +++++++---------
 .../org/apache/cayenne/merge/MergerToken.java   | 20 ++++++++++++++------
 3 files changed, 24 insertions(+), 19 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cayenne/blob/dacbe043/cayenne-server/src/main/java/org/apache/cayenne/merge/MergeDirection.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/merge/MergeDirection.java b/cayenne-server/src/main/java/org/apache/cayenne/merge/MergeDirection.java
index 8577549..d0a95c5 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/merge/MergeDirection.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/merge/MergeDirection.java
@@ -19,8 +19,7 @@
 package org.apache.cayenne.merge;
 
 /**
- * Represent a merge direction that can be one of two. Either from the model to the db or
- * from the db to the model.
+ * Represent a merge direction that can be either from the model to the db or from the db
to the model.
  */
 public enum MergeDirection {
 
@@ -36,7 +35,7 @@ public enum MergeDirection {
 
     private String name;
 
-    private MergeDirection(String name) {
+    MergeDirection(String name) {
         this.name = name;
     }
 
@@ -56,7 +55,7 @@ public enum MergeDirection {
     public String toString() {
         return getName();
     }
-    
+
     public MergeDirection reverseDirection() {
         switch (this) {
             case TO_DB:

http://git-wip-us.apache.org/repos/asf/cayenne/blob/dacbe043/cayenne-server/src/main/java/org/apache/cayenne/merge/MergerContext.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/merge/MergerContext.java b/cayenne-server/src/main/java/org/apache/cayenne/merge/MergerContext.java
index 011cb09..22628e2 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/merge/MergerContext.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/merge/MergerContext.java
@@ -26,18 +26,16 @@ import org.apache.cayenne.validation.ValidationResult;
 /**
  * An object passed as an argument to {@link MergerToken#execute(MergerContext)}s that a
  * {@link MergerToken} can do its work.
- * 
  */
 public interface MergerContext {
 
-    public ModelMergeDelegate getModelMergeDelegate();
-    
-    public DbAdapter getAdapter();
+    ModelMergeDelegate getModelMergeDelegate();
 
-    public DataMap getDataMap();
-    
-    public DataNode getDataNode();
-    
-    public ValidationResult getValidationResult();
+    DbAdapter getAdapter();
 
+    DataMap getDataMap();
+
+    DataNode getDataNode();
+
+    ValidationResult getValidationResult();
 }

http://git-wip-us.apache.org/repos/asf/cayenne/blob/dacbe043/cayenne-server/src/main/java/org/apache/cayenne/merge/MergerToken.java
----------------------------------------------------------------------
diff --git a/cayenne-server/src/main/java/org/apache/cayenne/merge/MergerToken.java b/cayenne-server/src/main/java/org/apache/cayenne/merge/MergerToken.java
index e438c54..99af419 100644
--- a/cayenne-server/src/main/java/org/apache/cayenne/merge/MergerToken.java
+++ b/cayenne-server/src/main/java/org/apache/cayenne/merge/MergerToken.java
@@ -18,26 +18,34 @@
  ****************************************************************/
 package org.apache.cayenne.merge;
 
+/**
+ * Represents a minimal atomic synchronization operation between database and Cayenne model.
+ */
 public interface MergerToken {
 
-    public String getTokenName();
+    String getTokenName();
 
-    public String getTokenValue();
+    String getTokenValue();
 
     /**
      * The direction of this token. One of {@link MergeDirection#TO_DB} or
      * {@link MergeDirection#TO_MODEL}
      */
-    public MergeDirection getDirection();
+    MergeDirection getDirection();
 
     /**
-     * Create a token with the reverse direction. AddColumn in one direction becomes
+     * Create a complimentary token with the reverse direction. AddColumn in one direction
becomes
      * DropColumn in the other direction.
      * <p>
      * Not all tokens are reversible.
      */
-    public MergerToken createReverse(MergerFactory factory);
+    MergerToken createReverse(MergerFactory factory);
 
-    public void execute(MergerContext mergerContext);
+    /**
+     * Executes synchronization operation.
+     *
+     * @param mergerContext operation context.
+     */
+    void execute(MergerContext mergerContext);
 
 }


Mime
View raw message