/** * INTERNAL: * Return the descriptor for the root object. */ protected DESCRIPTOR getDescriptor(Class clazz, ABSTRACT_SESSION session) throws XMLMarshalException { DESCRIPTOR descriptor = (DESCRIPTOR) session.getDescriptor(clazz); if (descriptor == null) { throw XMLMarshalException.descriptorNotFoundInProject(clazz.getName()); } return descriptor; }
/** * INTERNAL: * Return the descriptor for the root object. */ protected XMLDescriptor getDescriptor(Object object, AbstractSession session) throws XMLMarshalException { XMLDescriptor descriptor = (XMLDescriptor) session.getDescriptor(object); if (descriptor == null) { throw XMLMarshalException.descriptorNotFoundInProject(object.getClass().getName()); } return descriptor; }
/** * INTERNAL: * Return the descriptor for the root object. */ protected DESCRIPTOR getDescriptor(Object object, ABSTRACT_SESSION session) throws XMLMarshalException { DESCRIPTOR descriptor = (DESCRIPTOR) session.getDescriptor(object); if (descriptor == null) { throw XMLMarshalException.descriptorNotFoundInProject(object.getClass().getName()); } return descriptor; }
/** * INTERNAL: * Return the descriptor for the root object. */ protected DESCRIPTOR getDescriptor(Class clazz, ABSTRACT_SESSION session) throws XMLMarshalException { DESCRIPTOR descriptor = (DESCRIPTOR) session.getDescriptor(clazz); if (descriptor == null) { throw XMLMarshalException.descriptorNotFoundInProject(clazz.getName()); } return descriptor; }
/** * INTERNAL: * Return the descriptor for the root object. */ private XMLDescriptor getDescriptor(Class clazz, AbstractSession session) throws XMLMarshalException { XMLDescriptor descriptor = (XMLDescriptor) session.getDescriptor(clazz); if (descriptor == null) { throw XMLMarshalException.descriptorNotFoundInProject(clazz.getName()); } return descriptor; }
/** * INTERNAL: * Return the descriptor for the root object. */ protected DESCRIPTOR getDescriptor(Object object, ABSTRACT_SESSION session) throws XMLMarshalException { DESCRIPTOR descriptor = (DESCRIPTOR) session.getDescriptor(object); if (descriptor == null) { throw XMLMarshalException.descriptorNotFoundInProject(object.getClass().getName()); } return descriptor; }
/** * INTERNAL: Return the session corresponding to this object. Since the * object may be mapped by more that one of the projects used to create the * Context, this method will return the first match. */ protected ABSTRACT_SESSION getSession(Object object) { if (null == object) { return null; } if (session.getDescriptor(object) != null) { return (ABSTRACT_SESSION) session; } throw XMLMarshalException.descriptorNotFoundInProject(object.getClass().getName()); }
/** * INTERNAL: Return the session corresponding to this class. Since the class * may be mapped by more that one of the projects used to create the * Context, this method will return the first match. */ protected ABSTRACT_SESSION getSession(Class clazz) { if (null == clazz) { return null; } if (session.getDescriptor(clazz) != null) { return (ABSTRACT_SESSION) session; } throw XMLMarshalException.descriptorNotFoundInProject(clazz.getName()); }
/** * INTERNAL: Return the session corresponding to this class. Since the class * may be mapped by more that one of the projects used to create the * Context, this method will return the first match. */ protected ABSTRACT_SESSION getSession(Class clazz) { if (null == clazz) { return null; } if (session.getDescriptor(clazz) != null) { return (ABSTRACT_SESSION) session; } throw XMLMarshalException.descriptorNotFoundInProject(clazz.getName()); }
/** * INTERNAL: Return the session corresponding to this object. Since the * object may be mapped by more that one of the projects used to create the * Context, this method will return the first match. */ protected ABSTRACT_SESSION getSession(Object object) { if (null == object) { return null; } if (session.getDescriptor(object) != null) { return (ABSTRACT_SESSION) session; } throw XMLMarshalException.descriptorNotFoundInProject(object.getClass().getName()); }
/** * INTERNAL: Return the session corresponding to this class. Since the class * may be mapped by more that one of the projects used to create the XML * Context, this method will return the first match. */ public AbstractSession getSession(Class clazz) { if (null == clazz) { return null; } int numberOfSessions = sessions.size(); for (int x = 0; x < numberOfSessions; x++) { AbstractSession next = ((AbstractSession) sessions.get(x)); if (next.getDescriptor(clazz) != null) { return next; } } throw XMLMarshalException.descriptorNotFoundInProject(clazz.getName()); }
/** * INTERNAL: * Return the descriptor for the root object. */ public DESCRIPTOR getDescriptor(Object object) throws XMLMarshalException { DESCRIPTOR descriptor = (DESCRIPTOR) context.getSession(object).getDescriptor(object); if (descriptor == null) { throw XMLMarshalException.descriptorNotFoundInProject(object.getClass().getName()); } return descriptor; }
/** * INTERNAL: * Return the descriptor for the root object. */ public DESCRIPTOR getDescriptor(Object object) throws XMLMarshalException { DESCRIPTOR descriptor = (DESCRIPTOR) context.getSession(object).getDescriptor(object); if (descriptor == null) { throw XMLMarshalException.descriptorNotFoundInProject(object.getClass().getName()); } return descriptor; }
/** * INTERNAL: * Return the descriptor for the root object. */ protected XMLDescriptor getDescriptor(Object object) throws XMLMarshalException { XMLDescriptor descriptor = (XMLDescriptor) xmlContext.getSession(object).getDescriptor(object); if (descriptor == null) { throw XMLMarshalException.descriptorNotFoundInProject(object.getClass().getName()); } return descriptor; }
/** * INTERNAL: Return the session corresponding to this object. Since the * object may be mapped by more that one of the projects used to create the * XML Context, this method will return the first match. */ @Override protected AbstractSession getSession(Object object) { if (null == object) { return null; } if (null == sessions) { return super.getSession(object); } for (int x = 0, numberOfSessions = sessions.size(); x < numberOfSessions; x++) { AbstractSession next = ((AbstractSession) sessions.get(x)); if (next.getDescriptor(object) != null) { return next; } } throw XMLMarshalException.descriptorNotFoundInProject(object.getClass().getName()); }
/** * INTERNAL: Return the session corresponding to this Descriptor. Since * the class may be mapped by more that one of the projects used to create * the Context, this method will return the first match. */ protected ABSTRACT_SESSION getSession(DESCRIPTOR descriptor) { if (null == descriptor) { return null; } if (session.getProject().getOrderedDescriptors().contains(descriptor)) { return (ABSTRACT_SESSION) session; } throw XMLMarshalException.descriptorNotFoundInProject(descriptor.getJavaClass().getName()); }
/** * INTERNAL: Return the session corresponding to this Descriptor. Since * the class may be mapped by more that one of the projects used to create * the Context, this method will return the first match. */ protected ABSTRACT_SESSION getSession(DESCRIPTOR descriptor) { if (null == descriptor) { return null; } if (session.getProject().getOrderedDescriptors().contains(descriptor)) { return (ABSTRACT_SESSION) session; } throw XMLMarshalException.descriptorNotFoundInProject(descriptor.getJavaClass().getName()); }
protected DESCRIPTOR getDescriptor(Root object, ABSTRACT_SESSION session) throws XMLMarshalException { DESCRIPTOR descriptor = null; try { if(null == session) { return null; } descriptor = (DESCRIPTOR) session.getDescriptor(object.getObject()); } catch (XMLMarshalException marshalException) { if ((descriptor == null) && isSimpleXMLRoot(object)) { return null; } throw marshalException; } if (descriptor == null) { throw XMLMarshalException.descriptorNotFoundInProject(object.getClass().getName()); } return descriptor; }
protected DESCRIPTOR getDescriptor(Root object, ABSTRACT_SESSION session) throws XMLMarshalException { DESCRIPTOR descriptor = null; try { if(null == session) { return null; } descriptor = (DESCRIPTOR) session.getDescriptor(object.getObject()); } catch (XMLMarshalException marshalException) { if ((descriptor == null) && isSimpleXMLRoot(object)) { return null; } throw marshalException; } if (descriptor == null) { throw XMLMarshalException.descriptorNotFoundInProject(object.getClass().getName()); } return descriptor; }
protected DESCRIPTOR getDescriptor(Root object) throws XMLMarshalException { DESCRIPTOR descriptor = null; try { ABSTRACT_SESSION session = context.getSession(object.getObject()); if(null == session) { return null; } descriptor = (DESCRIPTOR) session.getDescriptor(object.getObject()); } catch (XMLMarshalException marshalException) { if ((descriptor == null) && isSimpleXMLRoot(object)) { return null; } throw marshalException; } if (descriptor == null) { throw XMLMarshalException.descriptorNotFoundInProject(object.getClass().getName()); } return descriptor; }