gora-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lewi...@apache.org
Subject git commit: GORA-241 Properly document WebServiceBackedDataStore Interface
Date Wed, 25 Jun 2014 21:10:06 GMT
Repository: gora
Updated Branches:
  refs/heads/master 41aae36e9 -> c2a095d4e


GORA-241 Properly document WebServiceBackedDataStore Interface


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

Branch: refs/heads/master
Commit: c2a095d4eb30fcfcc56792d62af3b870bc27f593
Parents: 41aae36
Author: Lewis John McGibbney <lewis.j.mcgibbney@jpl.nasa.gov>
Authored: Wed Jun 25 14:09:51 2014 -0700
Committer: Lewis John McGibbney <lewis.j.mcgibbney@jpl.nasa.gov>
Committed: Wed Jun 25 14:09:51 2014 -0700

----------------------------------------------------------------------
 CHANGES.txt                                     | 12 +++++
 .../gora/store/WebServiceBackedDataStore.java   |  4 +-
 .../store/ws/impl/WSBackedDataStoreBase.java    |  2 +-
 .../gora/store/ws/impl/WSDataStoreBase.java     |  1 -
 .../gora/store/ws/impl/WSDataStoreFactory.java  | 56 ++++++++++++++++----
 5 files changed, 62 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/gora/blob/c2a095d4/CHANGES.txt
----------------------------------------------------------------------
diff --git a/CHANGES.txt b/CHANGES.txt
index 111ff20..15bdc14 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -4,6 +4,18 @@
 
 Current Development 0.5-SNAPSHOT
 
+* GORA-241 Properly document WebServiceBackedDataStore Interface (Tyler Palsulich)
+
+* GORA-347 Column attributes should be obtained using the column name and not the field name.
(kaveh minooie, rmarroquin)
+
+* GORA-348 - Using query for Avro Unions in Cassandra doesn't fully work (rmarroquin)
+
+* GORA-XX Attemtpt to resolve javax.servlet classloading issue within gora-solr (lewismc)
+
+* GORA-339 Upgrade solr dependencies to 4.8.1 (lewismc)
+
+* GORA-341 - Switch gora-orm references to gora-otd in tutorial (MJJoyce via lewismc)
+
 * GORA-332 fix record.vm template to generate deepCopyToReadOnlyBuffer method (drazzib aka
Damien Raude-Morvan via hsaputra)
 
 * GORA-331 Gora 0.4 compiler crash with "enum" type (drazzib aka Damien Raude-Morvan via
hsaputra)

http://git-wip-us.apache.org/repos/asf/gora/blob/c2a095d4/gora-core/src/main/java/org/apache/gora/store/WebServiceBackedDataStore.java
----------------------------------------------------------------------
diff --git a/gora-core/src/main/java/org/apache/gora/store/WebServiceBackedDataStore.java
b/gora-core/src/main/java/org/apache/gora/store/WebServiceBackedDataStore.java
index 75244ec..d7c8ba5 100644
--- a/gora-core/src/main/java/org/apache/gora/store/WebServiceBackedDataStore.java
+++ b/gora-core/src/main/java/org/apache/gora/store/WebServiceBackedDataStore.java
@@ -21,8 +21,8 @@ package org.apache.gora.store;
 import org.apache.gora.persistency.Persistent;
 
 /** 
- * FileBackedDataStore supplies necessary interfaces to set input 
- * and output paths for data stored which are file based.   
+ * WebServiceBackedDataStore supplies necessary interfaces to set input
+ * and output paths for data stored which are web based.
  */
 public interface WebServiceBackedDataStore<K, T extends Persistent> extends DataStore<K,
T> {
 

http://git-wip-us.apache.org/repos/asf/gora/blob/c2a095d4/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSBackedDataStoreBase.java
----------------------------------------------------------------------
diff --git a/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSBackedDataStoreBase.java
b/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSBackedDataStoreBase.java
index a55251d..ac01283 100644
--- a/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSBackedDataStoreBase.java
+++ b/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSBackedDataStoreBase.java
@@ -83,7 +83,7 @@ public abstract class WSBackedDataStoreBase<K, T extends Persistent>
    */
   public void deleteSchema() {
     throw new OperationNotSupportedException("delete schema is not supported for " +
-    		"file backed data stores");
+      "file backed data stores");
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/gora/blob/c2a095d4/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSDataStoreBase.java
----------------------------------------------------------------------
diff --git a/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSDataStoreBase.java b/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSDataStoreBase.java
index 9f19f65..ac37b2c 100644
--- a/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSDataStoreBase.java
+++ b/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSDataStoreBase.java
@@ -18,7 +18,6 @@
 
 package org.apache.gora.store.ws.impl;
 
-import java.io.IOException;
 import java.util.Properties;
 
 import org.apache.gora.persistency.Persistent;

http://git-wip-us.apache.org/repos/asf/gora/blob/c2a095d4/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSDataStoreFactory.java
----------------------------------------------------------------------
diff --git a/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSDataStoreFactory.java
b/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSDataStoreFactory.java
index 4358d95..d59a8f5 100644
--- a/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSDataStoreFactory.java
+++ b/gora-core/src/main/java/org/apache/gora/store/ws/impl/WSDataStoreFactory.java
@@ -30,7 +30,7 @@ import org.apache.gora.util.GoraException;
 import org.apache.gora.util.ReflectionUtils;
 
 /**
- * A Factory for {@link DataStore}s. DataStoreFactory instances are thread-safe.
+ * A Factory for Web-based {@link DataStore}s. DataStoreFactory instances are thread-safe.
  */
 public class WSDataStoreFactory{
 
@@ -106,7 +106,7 @@ public class WSDataStoreFactory{
    * @param dataStoreClass The datastore implementation class.
    * @param keyClass The key class.
    * @param persistent The value class.
-   * @param conf {@link Configuration} to be used be the store.
+   * @param auth an authentication {@link Object} to be used for communication.
    * @return A new store instance.
    * @throws GoraException
    */
@@ -122,7 +122,7 @@ public class WSDataStoreFactory{
    * @param dataStoreClass The datastore implementation class.
    * @param keyClass The key class.
    * @param persistent The value class.
-   * @param conf {@link Configuration} to be used be the store.
+   * @param auth an authentication {@link Object} to be used for communication.
    * @param schemaName A default schemaname that will be put on the properties.
    * @return A new store instance.
    * @throws GoraException
@@ -139,7 +139,7 @@ public class WSDataStoreFactory{
    * @param dataStoreClass The datastore implementation class.
    * @param keyClass The key class.
    * @param persistent The value class.
-   * @param conf {@link Configuration} to be used be the store.
+   * @param auth an authentication {@link Object} to be used for communication.
    * @param properties The properties to be used be the store.
    * @param schemaName A default schemaname that will be put on the properties.
    * @return A new store instance.
@@ -173,7 +173,7 @@ public class WSDataStoreFactory{
    * @param dataStoreClass The datastore implementation class.
    * @param keyClass The key class.
    * @param persistent The value class.
-   * @param conf {@link Configuration} to be used be the store.
+   * @param auth an authentication {@link Object} to be used for communication.
    * @param properties The properties to be used be the store.
    * @return A new store instance.
    * @throws GoraException
@@ -191,7 +191,7 @@ public class WSDataStoreFactory{
    * @param dataStoreClass The datastore implementation class.
    * @param keyClass The key class.
    * @param persistentClass The value class.
-   * @param conf {@link Configuration} to be used be the store.
+   * @param auth an authentication {@link Object} to be used for communication.
    * @return A new store instance.
    * @throws GoraException
    */
@@ -208,7 +208,7 @@ public class WSDataStoreFactory{
    * @param dataStoreClass The datastore implementation class <i>as string</i>.
    * @param keyClass The key class.
    * @param persistentClass The value class.
-   * @param conf {@link Configuration} to be used be the store.
+   * @param auth an authentication {@link Object} to be used for communication.
    * @return A new store instance.
    * @throws GoraException
    */
@@ -233,7 +233,7 @@ public class WSDataStoreFactory{
    * @param dataStoreClass The datastore implementation class <i>as string</i>.
    * @param keyClass The key class <i>as string</i>.
    * @param persistentClass The value class <i>as string</i>.
-   * @param conf {@link Configuration} to be used be the store.
+   * @param auth an authentication {@link Object} to be used for communication.
    * @return A new store instance.
    * @throws GoraException
    */
@@ -260,7 +260,7 @@ public class WSDataStoreFactory{
    * 
    * @param keyClass The key class.
    * @param persistent The value class.
-   * @param conf {@link Configuration} to be used be the store.
+   * @param auth an authentication {@link Object} to be used for communication.
    * @return A new store instance.
    * @throws GoraException
    */
@@ -283,6 +283,10 @@ public class WSDataStoreFactory{
    * If not found, the property keys for all superclasses is recursively
    * tested. Lastly, the property key constructed as
    * "gora.datastore.&lt;baseKey&gt;" is searched.
+   * @param properties The properties to be used be the store.
+   * @param store the datastore class we wish to search for the property within.
+   * @param baseKey the key associated with the property we are trying to find. 
+   * @param defaultValue a default (fallback) value for the property we wish to assert.
    * @return the first found value, or defaultValue
    */
   public static String findProperty(Properties properties
@@ -325,6 +329,9 @@ public class WSDataStoreFactory{
    * If not found, the property keys for all superclasses is recursively
    * tested. Lastly, the property key constructed as
    * "gora.datastore.&lt;baseKey&gt;" is searched.
+   * @param properties The properties to be used be the store.
+   * @param store the datastore class we wish to search for the property within.
+   * @param baseKey the key associated with the property we are trying to find. 
    * @return the first found value, or throws IOException
    */
   public static String findPropertyOrDie(Properties properties
@@ -337,11 +344,33 @@ public class WSDataStoreFactory{
     return val;
   }
 
+  /**
+   * Asserts whether or not we can find a particular property based on the property 
+   * with the given baseKey. First the property
+   * key constructed as "gora.&lt;classname&gt;.&lt;baseKey&gt;" is searched.
+   * If not found, the property keys for all superclasses is recursively
+   * tested. Lastly, the property key constructed as
+   * "gora.datastore.&lt;baseKey&gt;" is searched. We parse the boolean output
+   * and assert whether such a property exists or not.
+   * @param properties The properties to be used be the store.
+   * @param store the datastore class we wish to search for the property within.
+   * @param baseKey the key associated with the property we are trying to find. 
+   * @param defaultValue a default (fallback) value for the property we wish to assert.
+   * @return the first found value, or throws IOException
+   */
   public static boolean findBooleanProperty(Properties properties
       , DataStore<?, ?> store, String baseKey, String defaultValue) {
     return Boolean.parseBoolean(findProperty(properties, store, baseKey, defaultValue));
   }
 
+  /**
+   * Asserts whether schema/datamodel autocreation is supported within datastore
+   * initialization. Assentially we scan the datastore class for a static AUTO_CREATE_SCHEMA
+   * constant. Additionally, we expect this to be true for each datastore.
+   * @param properties The properties to be used be the store.
+   * @param store the datastore class we wish to search for the property within.
+   * @return the first found value, or throws IOException
+   */
   public static boolean getAutoCreateSchema(Properties properties
       , DataStore<?,?> store) {
     return findBooleanProperty(properties, store, AUTO_CREATE_SCHEMA, "true");
@@ -361,6 +390,15 @@ public class WSDataStoreFactory{
     return findProperty(properties, store, OUTPUT_PATH, null);
   }
 
+  /**
+   * Returns a particular instance of an XML mapping file for some particular 
+   * properties and datastore. We can specify numerous mapping files per 
+   * mapping configuration with this option and obtain them at runtime.
+   * @param properties The properties to be used be the store.
+   * @param store The datastore class we wish to search for the property within.
+   * @param defaultValue The name of the XML mapping file we wish to use.
+   * @return
+   */
   public static String getMappingFile(Properties properties, DataStore<?,?> store
       , String defaultValue) {
     return findProperty(properties, store, MAPPING_FILE, defaultValue);


Mime
View raw message