Revision: 10487
Author:   [email protected]
Date:     Tue Aug  2 07:46:31 2011
Log: Adding a spot for database column name in Column. Allows us to create an updated SQL statement when the sort column changes, using only the Column itself.

Review at http://gwt-code-reviews.appspot.com/1503806

Review by: [email protected]
http://code.google.com/p/google-web-toolkit/source/detail?r=10487

Modified:
 /trunk/user/src/com/google/gwt/user/cellview/client/Column.java

=======================================
--- /trunk/user/src/com/google/gwt/user/cellview/client/Column.java Wed Jul 27 04:19:13 2011 +++ /trunk/user/src/com/google/gwt/user/cellview/client/Column.java Tue Aug 2 07:46:31 2011
@@ -50,6 +50,7 @@

   private boolean isDefaultSortAscending = true;
   private boolean isSortable = false;
+  private String dataStoreName = null;
   private HorizontalAlignmentConstant hAlign = null;
   private VerticalAlignmentConstant vAlign = null;

@@ -84,6 +85,13 @@
   public String getCellStyleNames(Context context, T object) {
     return cellStyleNames;
   }
+
+  /**
+ * @return the database name of the column, or null if it's never been set
+   */
+  public String getDataStoreName() {
+    return dataStoreName;
+  }

   /**
* Returns the {@link FieldUpdater} used for updating values in the column.
@@ -100,7 +108,7 @@
   public HorizontalAlignmentConstant getHorizontalAlignment() {
     return hAlign;
   }
-
+
   /**
    * Returns the column value from within the underlying data object.
    */
@@ -174,6 +182,15 @@
   public void setCellStyleNames(String styleNames) {
     this.cellStyleNames = styleNames;
   }
+
+  /**
+   * Sets a string that identifies this column in a data query.
+   *
+   * @param name name of the column from the data store's perspective
+   */
+  public void setDataStoreName(String name) {
+    this.dataStoreName = name;
+  }

   /**
    * Set whether or not the default sort order is ascending.

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors

Reply via email to