org.granite.client.persistence
Class Persistence

java.lang.Object
  extended by org.granite.client.persistence.Persistence

public class Persistence
extends Object

Author:
Franck WOLFF

Nested Class Summary
static class Persistence.Property
           
 
Constructor Summary
Persistence()
           
 
Method Summary
static String getDetachedState(Object o)
           
static Field getDetachedStateField(Class<?> cls)
           
static
<T> T
getId(Object entity)
           
static Persistence.Property getIdProperty(Object entity)
           
static Field getInitializedField(Class<?> cls)
           
static String getUid(Object entity)
           
static Persistence.Property getUidProperty(Object entity)
           
static
<T> T
getVersion(Object entity)
           
static Persistence.Property getVersionProperty(Object entity)
           
static boolean isInitialized(Object o)
           
static void setDetachedState(Object o, String value)
           
static void setId(Object entity, Object value)
           
static void setInitialized(Object o, boolean value)
           
static void setUid(Object entity, String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Persistence

public Persistence()
Method Detail

getInitializedField

public static Field getInitializedField(Class<?> cls)

getDetachedStateField

public static Field getDetachedStateField(Class<?> cls)

isInitialized

public static boolean isInitialized(Object o)

setInitialized

public static void setInitialized(Object o,
                                  boolean value)
                           throws IllegalAccessException
Throws:
IllegalAccessException

getDetachedState

public static String getDetachedState(Object o)
                               throws IllegalAccessException
Throws:
IllegalAccessException

setDetachedState

public static void setDetachedState(Object o,
                                    String value)
                             throws IllegalAccessException
Throws:
IllegalAccessException

getId

public static <T> T getId(Object entity)
               throws IllegalAccessException
Throws:
IllegalAccessException

setId

public static void setId(Object entity,
                         Object value)
                  throws IllegalAccessException
Throws:
IllegalAccessException

getUid

public static String getUid(Object entity)
                     throws IllegalAccessException
Throws:
IllegalAccessException

setUid

public static void setUid(Object entity,
                          String value)
                   throws IllegalAccessException
Throws:
IllegalAccessException

getVersion

public static <T> T getVersion(Object entity)
                    throws IllegalAccessException
Throws:
IllegalAccessException

getIdProperty

public static Persistence.Property getIdProperty(Object entity)
                                          throws IllegalAccessException
Throws:
IllegalAccessException

getUidProperty

public static Persistence.Property getUidProperty(Object entity)
                                           throws IllegalAccessException
Throws:
IllegalAccessException

getVersionProperty

public static Persistence.Property getVersionProperty(Object entity)
                                               throws IllegalAccessException
Throws:
IllegalAccessException