org.kuali.rice.core.util
Class OrmUtils

java.lang.Object
  extended by org.kuali.rice.core.util.OrmUtils

public class OrmUtils
extends Object

A utility for common ORM related functions.

Author:
Kuali Rice Team (rice.collab@kuali.org)

Field Summary
private static Map<String,Boolean> cache
           
private static org.apache.log4j.Logger LOG
           
 
Constructor Summary
OrmUtils()
           
 
Method Summary
static Long getNextAutoIncValue(Class entityClass, javax.persistence.EntityManager manager)
           
private static Long getNextAutoIncValue(Sequence sequence, javax.persistence.EntityManager manager)
           
private static Field getPrivateField(Class clazz, String fieldName)
           
static boolean isJpaAnnotated(Class<?> clazz)
           
static boolean isJpaEnabled()
           
static boolean isJpaEnabled(String prefix)
           
static void merge(javax.persistence.EntityManager manager, Object entity)
           
static void populateAutoIncValue(Object entity, javax.persistence.EntityManager manager)
           
static void populateAutoIncValue(Object entity, Long value)
           
static void reattach(Object attached, Object detached)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOG

private static final org.apache.log4j.Logger LOG

cache

private static Map<String,Boolean> cache
Constructor Detail

OrmUtils

public OrmUtils()
Method Detail

populateAutoIncValue

public static void populateAutoIncValue(Object entity,
                                        Long value)

populateAutoIncValue

public static void populateAutoIncValue(Object entity,
                                        javax.persistence.EntityManager manager)

getNextAutoIncValue

public static Long getNextAutoIncValue(Class entityClass,
                                       javax.persistence.EntityManager manager)

getNextAutoIncValue

private static Long getNextAutoIncValue(Sequence sequence,
                                        javax.persistence.EntityManager manager)

reattach

public static void reattach(Object attached,
                            Object detached)

merge

public static void merge(javax.persistence.EntityManager manager,
                         Object entity)

isJpaAnnotated

public static boolean isJpaAnnotated(Class<?> clazz)

isJpaEnabled

public static boolean isJpaEnabled()

isJpaEnabled

public static boolean isJpaEnabled(String prefix)

getPrivateField

private static Field getPrivateField(Class clazz,
                                     String fieldName)
                              throws NoSuchFieldException
Throws:
NoSuchFieldException


Copyright © 2004-2011 The Kuali Foundation. All Rights Reserved.