/** * Force fetching of an abject * * @param <T> the type of the object to fetch * @param object the object to fetch * @return the fetched object */ public static <T> T fetch(T object) { if (isProxy(object)) { ((OcmProxy) object).fetch(); } return object; } }
/** * Check is an Object is not an unitialized OCM proxy * @see OcmProxy.isInitialized() * * @param object * the Object to check * @return true if the object is not an OCM proxy or if it has already been * initialized */ public static boolean isInitialized(Object object) { if (!isProxy(object)) { return true; } else { return ((OcmProxy) object).isInitialized(); } }
/** * Force fetching of an abject * * @param <T> the type of the object to fetch * @param object the object to fetch * @return the fetched object */ public static <T> T fetch(T object) { if (isProxy(object)) { ((OcmProxy) object).fetch(); } return object; } }
/** * Check is an Object is not an unitialized OCM proxy * @see OcmProxy.isInitialized() * * @param object * the Object to check * @return true if the object is not an OCM proxy or if it has already been * initialized */ public static boolean isInitialized(Object object) { if (!isProxy(object)) { return true; } else { return ((OcmProxy) object).isInitialized(); } }