/** * Gets the jAXB descriptor for class. * * @param clazz the clazz * @return the jAXB descriptor for class */ @SuppressWarnings("rawtypes") public ClassDescriptor getJAXBDescriptorForClass(Class clazz) { ClassDescriptor descriptor = null; for (Object ajaxBSession : getJAXBContext().getXMLContext().getSessions()) { descriptor = ((Session) ajaxBSession).getClassDescriptor(clazz); if (descriptor != null) { break; } } return descriptor; }
/** * Gets the jAXB descriptor for class. * * @param clazz the clazz * @return the jAXB descriptor for class */ @SuppressWarnings("rawtypes") public ClassDescriptor getJAXBDescriptorForClass(Class clazz) { ClassDescriptor descriptor = null; for (Object ajaxBSession : getJAXBContext().getXMLContext().getSessions()) { descriptor = ((Session) ajaxBSession).getClassDescriptor(clazz); if (descriptor != null) { break; } } return descriptor; }
Descriptor desc = (Descriptor) sess.getClassDescriptor(obj);
Descriptor desc = (Descriptor) sess.getClassDescriptor(obj);
XMLDescriptor desc = (XMLDescriptor) sess.getClassDescriptor(obj);
XMLDescriptor desc = (XMLDescriptor) sess.getClassDescriptor(obj);
XMLDescriptor desc = (XMLDescriptor) sess.getClassDescriptor(obj);
/** * Returns true if the cache contains an Object with the id and Class type, and is valid. * @see Cache#contains(Class, Object) */ public boolean contains(Class cls, Object id) { getEntityManagerFactory().verifyOpen(); Object pk = createPrimaryKeyFromId(cls, id); if(null == pk) { return false; } ClassDescriptor descriptor = getSession().getClassDescriptor(cls); // getDescriptor() is the same call /** * Check for no descriptor associated with the class parameter. * This will occur if the class represents a MappedSuperclass (concrete or abstract class), * an interface or Embeddable class. */ if(null == descriptor) { // do not throw an IAException: cache_impl_class_has_no_descriptor_is_not_a_persistent_type - just return false return false; } // we can assume that all implementors of IdentityMapAccessor implement getCacheKeyforObject CacheKey key = ((org.eclipse.persistence.internal.sessions.IdentityMapAccessor)getAccessor()) .getCacheKeyForObject(pk, cls, descriptor, false); return key != null && key.getObject() != null && !descriptor.getCacheInvalidationPolicy().isInvalidated(key); }
ClassDescriptor aPossibleSuperclassDescriptor = getSession().getClassDescriptor(classToEvict);
ClassDescriptor.DeletePredicate deletePredicate = session.getClassDescriptor(entity).getDeletePredicate(); boolean isDeleted = deletePredicate != null && deletePredicate.isDeleted(entity); if (isDeleted && CubaUtil.isSoftDeletion()) {