Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[eclipselink-users] Is there a method for checking if an object (Entity or attribute) is loaded?

I'm looking for an equivalent of Hibernate.isInitialized(object) which checks if the passed object is "initialized".
 
- If object is null, it returns true.
- If the object is an Entity and the entity is loaded it returns true.
- If the object is something other than null or an Entity (String, Collection, @ManyToOne or whatever) it returns true unless the object is a lazy-mapped attribute with isn't loaded yet.
 
I'ved tried to use persistenceUnitUtil.isLoaded(value) but it fails if the value is null or not an Entity....
 
Thanks.
 
--
Andreas Joseph Krogh <andreak@xxxxxxxxxxxx>      mob: +47 909 56 963
Senior Software Developer / CTO - OfficeNet AS - http://www.officenet.no
Public key: http://home.officenet.no/~andreak/public_key.asc

Back to the top