com.khubla.pragmatach.plugin.mongodb.util
Class ClassTypeUtils

java.lang.Object
  extended by com.khubla.pragmatach.plugin.mongodb.util.ClassTypeUtils

public class ClassTypeUtils
extends Object

Author:
tom

Constructor Summary
ClassTypeUtils(Class<?> typeClazz)
           
 
Method Summary
 String getId(Object t)
          get id
 String getIdFieldName()
          get the id field
static boolean isCascadeDelete(Field field)
          check if its cascade delete field
static boolean isCascadeSave(Field field)
          check if its cascade saved field
static boolean isEagerLoad(Field field)
          check if its an eager loaded field
 boolean isGeneratedId()
          Entity has an @GeneratedValue?
static boolean isLazyLoad(Field field)
          check if its an eager loaded field
 void setId(Object t, String i)
          set id
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ClassTypeUtils

public ClassTypeUtils(Class<?> typeClazz)
Method Detail

isCascadeDelete

public static boolean isCascadeDelete(Field field)
check if its cascade delete field


isCascadeSave

public static boolean isCascadeSave(Field field)
check if its cascade saved field


isEagerLoad

public static boolean isEagerLoad(Field field)
check if its an eager loaded field


isLazyLoad

public static boolean isLazyLoad(Field field)
check if its an eager loaded field


getId

public String getId(Object t)
             throws PragmatachException
get id

Throws:
PragmatachException

getIdFieldName

public String getIdFieldName()
get the id field


isGeneratedId

public boolean isGeneratedId()
                      throws PragmatachException
Entity has an @GeneratedValue?

Throws:
PragmatachException

setId

public void setId(Object t,
                  String i)
           throws PragmatachException
set id

Throws:
PragmatachException


Copyright © 2014 khubla.com. All rights reserved.