public static Entity forBean(Object bean) { return forClass(bean.getClass()); }
/** * Get the value of the entity version attribute. * * @param bean a managed entity instance */ public Object getVersion(Object bean, EntityManager entityManager) { return Entity.forClass( bean.getClass() ).getVersion(bean); }
public Method getPrePersistMethod(Class beanClass, EntityManager entityManager) { return Entity.forClass(beanClass).getPrePersistMethod(); }
@Deprecated public Method getPrePersistMethod(Class beanClass) { return Entity.forClass(beanClass).getPrePersistMethod(); }
@Deprecated public Method getPreRemoveMethod(Class beanClass) { return Entity.forClass(beanClass).getPreRemoveMethod(); }
@Deprecated public Method getPostLoadMethod(Class beanClass) { return Entity.forClass(beanClass).getPostLoadMethod(); }
@Deprecated public Method getPreUpdateMethod(Class beanClass) { return Entity.forClass(beanClass).getPreUpdateMethod(); }
/** * Get the value of the entity identifier attribute. * * @param bean a managed entity instance */ public Object getId(Object bean, EntityManager entityManager) { return Entity.forClass( bean.getClass() ).getIdentifier(bean); }
/** * Get the name of the entity * * @param bean * @param entityManager * * @throws IllegalArgumentException if the passed object is not an entity */ public String getName(Object bean, EntityManager entityManager) throws IllegalArgumentException { return Entity.forClass(bean.getClass()).getName(); }
/** * Returns the class of an entity bean instance * * @param bean The entity bean instance * @return The class of the entity bean */ public Class getBeanClass(Object bean) { return Entity.forClass(bean.getClass()).getBeanClass(); }
public Method getPostLoadMethod(Class beanClass, EntityManager entityManager) { return Entity.forClass(beanClass).getPostLoadMethod(); }
public Method getPreUpdateMethod(Class beanClass, EntityManager entityManager) { return Entity.forClass(beanClass).getPreUpdateMethod(); }
public Method getPreRemoveMethod(Class beanClass, EntityManager entityManager) { return Entity.forClass(beanClass).getPreRemoveMethod(); }