public final class GoraUtils extends Object
Modifier and Type | Method and Description |
---|---|
protected static boolean |
configurationExist(GoraAttribute attr,
GoraConfiguration conf)
Utility method to check if a value exist in the configuration class
NOTE:>
Checks only if is not null
|
static org.apache.gora.query.Query<Object,org.apache.gora.persistency.Persistent> |
constractQueryFromConfiguration(org.apache.gora.store.DataStore<Object,org.apache.gora.persistency.Persistent> dataStore,
GoraConfiguration conf)
Utility method to construct a new query from the exchange
NOTE: values used in order construct the query
should be stored in the "in" message headers.
|
static org.apache.gora.query.Query<Object,org.apache.gora.persistency.Persistent> |
constractQueryFromPropertiesMap(Map<String,?> propertiesMap,
org.apache.gora.store.DataStore<Object,org.apache.gora.persistency.Persistent> dataStore,
GoraConfiguration conf)
Utility method to construct a new query from the exchange
NOTE: values used in order construct the query
should be stored in the "in" message headers.
|
protected static Object |
getAttribute(GoraAttribute attr,
GoraConfiguration conf)
Utility method to extract value from configuration
|
protected static Long |
getAttributeAsLong(GoraAttribute attr,
GoraConfiguration conf)
Utility method to extract value from configuration as Long
|
protected static String |
getAttributeAsString(GoraAttribute attr,
GoraConfiguration conf)
Utility method to extract value from configuration as String
|
static Object |
getKeyFromExchange(org.apache.camel.Exchange exchange)
Utility method to extract GORA key from the exchange
NOTE: key value expected to be stored
in the "in" message headers.
|
protected static Object |
getProperty(GoraAttribute attr,
Map<String,?> propertiesMap)
Utility method to extract value of a map
|
protected static Long |
getPropertyAsLong(GoraAttribute attr,
Map<String,?> propertiesMap)
Utility method to extract value of a map as long
|
protected static String |
getPropertyAsString(GoraAttribute attr,
Map<String,?> propertiesMap)
Utility method to extract value of a map as String
|
static org.apache.gora.persistency.Persistent |
getValueFromExchange(org.apache.camel.Exchange exchange)
Utility method to extract the value from the exchange
NOTE: the value expected to be instance
of persistent type.
|
protected static boolean |
propertyExist(GoraAttribute attr,
Map<String,?> propertiesMap)
Utility method to check if a value exist in the properties map
|
public static org.apache.gora.query.Query<Object,org.apache.gora.persistency.Persistent> constractQueryFromConfiguration(org.apache.gora.store.DataStore<Object,org.apache.gora.persistency.Persistent> dataStore, GoraConfiguration conf) throws ClassNotFoundException, IllegalAccessException, NoSuchMethodException, InvocationTargetException
public static org.apache.gora.query.Query<Object,org.apache.gora.persistency.Persistent> constractQueryFromPropertiesMap(Map<String,?> propertiesMap, org.apache.gora.store.DataStore<Object,org.apache.gora.persistency.Persistent> dataStore, GoraConfiguration conf) throws ClassNotFoundException
ClassNotFoundException
protected static boolean configurationExist(GoraAttribute attr, GoraConfiguration conf) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException
protected static boolean propertyExist(GoraAttribute attr, Map<String,?> propertiesMap)
protected static Object getAttribute(GoraAttribute attr, GoraConfiguration conf) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException
protected static String getAttributeAsString(GoraAttribute attr, GoraConfiguration conf) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException
protected static Long getAttributeAsLong(GoraAttribute attr, GoraConfiguration conf) throws IllegalAccessException, NoSuchMethodException, InvocationTargetException
protected static Object getProperty(GoraAttribute attr, Map<String,?> propertiesMap)
protected static String getPropertyAsString(GoraAttribute attr, Map<String,?> propertiesMap)
protected static Long getPropertyAsLong(GoraAttribute attr, Map<String,?> propertiesMap)
public static Object getKeyFromExchange(org.apache.camel.Exchange exchange)
exchange
- The Camel Exchangepublic static org.apache.gora.persistency.Persistent getValueFromExchange(org.apache.camel.Exchange exchange)
exchange
- The Camel ExchangeApache Camel