com.netflix.astyanax.mapping
Class MappingUtil

java.lang.Object
  extended by com.netflix.astyanax.mapping.MappingUtil

Deprecated. please use DefaultEntityManager

@Deprecated
public class MappingUtil
extends java.lang.Object

Higher level mapping functions. Methods that behave similar to a Map.


Constructor Summary
MappingUtil(Keyspace keyspace)
          Deprecated.  
MappingUtil(Keyspace keyspace, AnnotationSet<?,?> annotationSet)
          Deprecated.  
MappingUtil(Keyspace keyspace, MappingCache cache)
          Deprecated.  
MappingUtil(Keyspace keyspace, MappingCache cache, AnnotationSet<?,?> annotationSet)
          Deprecated.  
 
Method Summary
<T,K> T
get(ColumnFamily<K,java.lang.String> columnFamily, K id, java.lang.Class<T> itemClass)
          Deprecated. Get the specified item by its key/id
<T,K> java.util.List<T>
getAll(ColumnFamily<K,java.lang.String> columnFamily, java.lang.Class<T> itemClass)
          Deprecated. Get all rows of the specified item
<T> Mapping<T>
getMapping(java.lang.Class<T> clazz)
          Deprecated. Return the mapping instance for the given class
<T,K> void
put(ColumnFamily<K,java.lang.String> columnFamily, T item)
          Deprecated. Add/update the given item
<T,K> void
remove(ColumnFamily<K,java.lang.String> columnFamily, T item)
          Deprecated. Remove the given item
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MappingUtil

public MappingUtil(Keyspace keyspace)
Deprecated. 
Parameters:
keyspace - keyspace to use

MappingUtil

public MappingUtil(Keyspace keyspace,
                   AnnotationSet<?,?> annotationSet)
Deprecated. 
Parameters:
keyspace - keyspace to use
annotationSet - annotation set to use

MappingUtil

public MappingUtil(Keyspace keyspace,
                   MappingCache cache)
Deprecated. 
Parameters:
keyspace - keyspace to use
cache - cache to use

MappingUtil

public MappingUtil(Keyspace keyspace,
                   MappingCache cache,
                   AnnotationSet<?,?> annotationSet)
Deprecated. 
Parameters:
keyspace - keyspace to use
cache - cache to use
annotationSet - annotation set to use
Method Detail

remove

public <T,K> void remove(ColumnFamily<K,java.lang.String> columnFamily,
                         T item)
            throws java.lang.Exception
Deprecated. 
Remove the given item

Parameters:
columnFamily - column family of the item
item - the item to remove
Throws:
java.lang.Exception - errors

put

public <T,K> void put(ColumnFamily<K,java.lang.String> columnFamily,
                      T item)
         throws java.lang.Exception
Deprecated. 
Add/update the given item

Parameters:
columnFamily - column family of the item
item - the item to add/update
Throws:
java.lang.Exception - errors

get

public <T,K> T get(ColumnFamily<K,java.lang.String> columnFamily,
                   K id,
                   java.lang.Class<T> itemClass)
      throws java.lang.Exception
Deprecated. 
Get the specified item by its key/id

Parameters:
columnFamily - column family of the item
id - id/key of the item
itemClass - item's class
Returns:
new instance with the item's columns propagated
Throws:
java.lang.Exception - errors

getAll

public <T,K> java.util.List<T> getAll(ColumnFamily<K,java.lang.String> columnFamily,
                                      java.lang.Class<T> itemClass)
                         throws java.lang.Exception
Deprecated. 
Get all rows of the specified item

Parameters:
columnFamily - column family of the item
itemClass - item's class
Returns:
new instances with the item's columns propagated
Throws:
java.lang.Exception - errors

getMapping

public <T> Mapping<T> getMapping(java.lang.Class<T> clazz)
Deprecated. 
Return the mapping instance for the given class

Parameters:
clazz - the class
Returns:
mapping instance (new or from cache)