本文整理了Java中org.eclipse.persistence.exceptions.QueryException.descriptorIsMissing
方法的一些代码示例,展示了QueryException.descriptorIsMissing
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。QueryException.descriptorIsMissing
方法的具体详情如下:
包路径:org.eclipse.persistence.exceptions.QueryException
类名称:QueryException
方法名:descriptorIsMissing
暂无
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* Ensure that the descriptor has been set.
*/
public void checkDescriptor(Object object, AbstractSession session) throws QueryException {
if (this.descriptor == null) {
if (object == null) {
throw QueryException.objectToModifyNotSpecified(this);
}
//Bug#3947714 Pass the object instead of class in case object is proxy
ClassDescriptor referenceDescriptor = session.getDescriptor(object);
if (referenceDescriptor == null) {
throw QueryException.descriptorIsMissing(object.getClass(), this);
}
setDescriptor(referenceDescriptor);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* Ensure that the descriptor has been set.
*/
public void checkDescriptor(Object object, AbstractSession session) throws QueryException {
if (this.descriptor == null) {
if (object == null) {
throw QueryException.objectToModifyNotSpecified(this);
}
//Bug#3947714 Pass the object instead of class in case object is proxy
ClassDescriptor referenceDescriptor = session.getDescriptor(object);
if (referenceDescriptor == null) {
throw QueryException.descriptorIsMissing(object.getClass(), this);
}
setDescriptor(referenceDescriptor);
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
* Ensure that the descriptor has been set.
*/
public void checkDescriptor(Object object, AbstractSession session) throws QueryException {
if (this.descriptor == null) {
if (object == null) {
throw QueryException.objectToModifyNotSpecified(this);
}
//Bug#3947714 Pass the object instead of class in case object is proxy
ClassDescriptor referenceDescriptor = session.getDescriptor(object);
if (referenceDescriptor == null) {
throw QueryException.descriptorIsMissing(object.getClass(), this);
}
setDescriptor(referenceDescriptor);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* Ensure that the descriptor has been set.
*/
public void checkDescriptor(AbstractSession session) throws QueryException {
if (this.descriptor == null) {
if (getObject() == null) {
throw QueryException.objectToModifyNotSpecified(this);
}
//Bug#3947714 Pass the object instead of class in case object is proxy
ClassDescriptor referenceDescriptor = session.getDescriptor(getObject());
if (referenceDescriptor == null) {
throw QueryException.descriptorIsMissing(getObject().getClass(), this);
}
setDescriptor(referenceDescriptor);
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
* Ensure that the descriptor has been set.
*/
public void checkDescriptor(AbstractSession session) throws QueryException {
if (this.descriptor == null) {
if (getObject() == null) {
throw QueryException.objectToModifyNotSpecified(this);
}
//Bug#3947714 Pass the object instead of class in case object is proxy
ClassDescriptor referenceDescriptor = session.getDescriptor(getObject());
if (referenceDescriptor == null) {
throw QueryException.descriptorIsMissing(getObject().getClass(), this);
}
setDescriptor(referenceDescriptor);
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* Ensure that the descriptor has been set.
*/
public void checkDescriptor(AbstractSession session) throws QueryException {
if (this.descriptor == null) {
if (getObject() == null) {
throw QueryException.objectToModifyNotSpecified(this);
}
//Bug#3947714 Pass the object instead of class in case object is proxy
ClassDescriptor referenceDescriptor = session.getDescriptor(getObject());
if (referenceDescriptor == null) {
throw QueryException.descriptorIsMissing(getObject().getClass(), this);
}
setDescriptor(referenceDescriptor);
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
* Ensure that the descriptor has been set.
*/
public void checkDescriptor(AbstractSession session) throws QueryException {
if (this.descriptor == null) {
if (getReferenceClass() == null) {
throw QueryException.referenceClassMissing(this);
}
ClassDescriptor referenceDescriptor = session.getDescriptor(getReferenceClass());
if (referenceDescriptor == null) {
throw QueryException.descriptorIsMissing(getReferenceClass(), this);
}
setDescriptor(referenceDescriptor);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* Ensure that the descriptor has been set.
* @param session Current session.
*/
@Override
public void checkDescriptor(AbstractSession session) throws QueryException {
if (this.descriptor == null) {
if (getReferenceClass() == null) {
throw QueryException.referenceClassMissing(this);
}
ClassDescriptor referenceDescriptor = session.getDescriptor(getReferenceClass());
if (referenceDescriptor == null) {
throw QueryException.descriptorIsMissing(getReferenceClass(), this);
}
setDescriptor(referenceDescriptor);
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* Ensure that the descriptor has been set.
*/
@Override
public void checkDescriptor(AbstractSession session) throws QueryException {
if (this.descriptor == null) {
if (getReferenceClass() == null) {
throw QueryException.referenceClassMissing(this);
}
ClassDescriptor referenceDescriptor = session.getDescriptor(getReferenceClass());
if (referenceDescriptor == null) {
throw QueryException.descriptorIsMissing(getReferenceClass(), this);
}
setDescriptor(referenceDescriptor);
}
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* Ensure that the descriptor has been set.
*/
public void checkDescriptor(AbstractSession session) throws QueryException {
if (this.descriptor == null) {
if (getReferenceClass() == null) {
throw QueryException.referenceClassMissing(this);
}
ClassDescriptor referenceDescriptor;
//Bug#3947714 In case getSelectionObject() is proxy
if (getSelectionObject() != null && session.getProject().hasProxyIndirection()) {
referenceDescriptor = session.getDescriptor(getSelectionObject());
} else {
referenceDescriptor = session.getDescriptor(getReferenceClass());
}
if (referenceDescriptor == null) {
throw QueryException.descriptorIsMissing(getReferenceClass(), this);
}
setDescriptor(referenceDescriptor);
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
* Ensure that the descriptor has been set.
*/
public void checkDescriptor(AbstractSession session) throws QueryException {
if (this.descriptor == null) {
if (getReferenceClass() == null) {
throw QueryException.referenceClassMissing(this);
}
ClassDescriptor referenceDescriptor;
//Bug#3947714 In case getSelectionObject() is proxy
if (getSelectionObject() != null && session.getProject().hasProxyIndirection()) {
referenceDescriptor = session.getDescriptor(getSelectionObject());
} else {
referenceDescriptor = session.getDescriptor(getReferenceClass());
}
if (referenceDescriptor == null) {
throw QueryException.descriptorIsMissing(getReferenceClass(), this);
}
setDescriptor(referenceDescriptor);
}
}
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* Ensure that the descriptor has been set.
*/
public void checkDescriptor(AbstractSession session) throws QueryException {
if (this.descriptor == null) {
if (getReferenceClass() == null) {
throw QueryException.referenceClassMissing(this);
}
ClassDescriptor referenceDescriptor;
//Bug#3947714 In case getSelectionObject() is proxy
if (getSelectionObject() != null && session.getProject().hasProxyIndirection()) {
referenceDescriptor = session.getDescriptor(getSelectionObject());
} else {
referenceDescriptor = session.getDescriptor(getReferenceClass());
}
if (referenceDescriptor == null) {
throw QueryException.descriptorIsMissing(getReferenceClass(), this);
}
setDescriptor(referenceDescriptor);
}
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
throw QueryException.descriptorIsMissing(referenceClass, this);
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
throw QueryException.descriptorIsMissing(referenceClass, this);
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
throw QueryException.descriptorIsMissing(referenceClass, this);
代码示例来源:origin: org.eclipse.persistence/org.eclipse.persistence.core
/**
* INTERNAL:
* Prepare the receiver for execution in a session.
*/
protected void prepare() throws QueryException {
super.prepare();
if (getReferenceClass() == null) {
throw QueryException.referenceClassMissing(this);
}
if (getDescriptor() == null) {
ClassDescriptor referenceDescriptor = getSession().getDescriptor(getReferenceClass());
if (referenceDescriptor == null) {
throw QueryException.descriptorIsMissing(getReferenceClass(), this);
}
setDescriptor(referenceDescriptor);
}
if (getDescriptor().isAggregateDescriptor()) {
throw QueryException.aggregateObjectCannotBeDeletedOrWritten(getDescriptor(), this);
}
getQueryMechanism().prepareDeleteAll();
}
代码示例来源:origin: com.haulmont.thirdparty/eclipselink
/**
* INTERNAL:
* Prepare the receiver for execution in a session.
*/
protected void prepare() throws QueryException {
super.prepare();
if (getReferenceClass() == null) {
throw QueryException.referenceClassMissing(this);
}
if (getDescriptor() == null) {
ClassDescriptor referenceDescriptor = getSession().getDescriptor(getReferenceClass());
if (referenceDescriptor == null) {
throw QueryException.descriptorIsMissing(getReferenceClass(), this);
}
setDescriptor(referenceDescriptor);
}
if (getDescriptor().isAggregateDescriptor()) {
throw QueryException.aggregateObjectCannotBeDeletedOrWritten(getDescriptor(), this);
}
getQueryMechanism().prepareDeleteAll();
}
代码示例来源:origin: org.eclipse.persistence/com.springsource.org.eclipse.persistence
/**
* INTERNAL:
* Prepare the receiver for execution in a session.
*/
protected void prepare() throws QueryException {
super.prepare();
if (getReferenceClass() == null) {
throw QueryException.referenceClassMissing(this);
}
if (getDescriptor() == null) {
ClassDescriptor referenceDescriptor = getSession().getDescriptor(getReferenceClass());
if (referenceDescriptor == null) {
throw QueryException.descriptorIsMissing(getReferenceClass(), this);
}
setDescriptor(referenceDescriptor);
}
if (getDescriptor().isAggregateDescriptor()) {
throw QueryException.aggregateObjectCannotBeDeletedOrWritten(getDescriptor(), this);
}
getQueryMechanism().prepareDeleteAll();
}
内容来源于网络,如有侵权,请联系作者删除!