本文整理了Java中org.eclipse.persistence.exceptions.XMLMarshalException.descriptorNotFoundInProject()
方法的一些代码示例,展示了XMLMarshalException.descriptorNotFoundInProject()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。XMLMarshalException.descriptorNotFoundInProject()
方法的具体详情如下:
包路径:org.eclipse.persistence.exceptions.XMLMarshalException
类名称:XMLMarshalException
方法名:descriptorNotFoundInProject
暂无
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* 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;
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* 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;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* 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;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* 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;
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* 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;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* 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;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* 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());
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* 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());
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* 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());
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* 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());
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* 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());
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* 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;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* 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;
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* 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;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* 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());
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* 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());
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* 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());
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
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;
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
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;
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
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;
}
内容来源于网络,如有侵权,请联系作者删除!