Package com.webobjects.eoaccess

Examples of com.webobjects.eoaccess.EOObjectNotAvailableException


        if (eos.count() > 1) {
          throw new MoreThanOneException("Found multiple objects for the entity '" + entity.name() + "' with primary key value: " + primaryKeyValue);
        }
        if (eos.count() == 0) {
          if (throwIfMissing) {
            throw new EOObjectNotAvailableException("There was no '" + entity.name() + "' found with the id '" + primaryKeyValue + "'.");
          }
          return null;
        }
        return (EOEnterpriseObject)eos.lastObject();
    }
View Full Code Here


     */
    public static EOEnterpriseObject requiredObjectWithQualifier(EOEditingContext editingContext, String entityName, EOQualifier qualifier) {
        EOEnterpriseObject result = objectWithQualifier(editingContext, entityName, qualifier);
        if(result == null)
        {
          throw new EOObjectNotAvailableException("objectWithQualifier: No objects match qualifier " + qualifier);
        }
        return result;
    }
View Full Code Here

            eo = (EOEnterpriseObject) objs.objectAtIndex(0);
            if (log.isDebugEnabled()) {
                log.debug("failedEO: "+ eo);
            }
        } else if(objs.count() == 0) {
            throw new EOObjectNotAvailableException("Can't recover: Object was deleted: " + fs);
        } else {
            throw new EOUtilities.MoreThanOneException("Can't recover: More than one object found: " + objs);
        }
        return eo;
    }
View Full Code Here

TOP

Related Classes of com.webobjects.eoaccess.EOObjectNotAvailableException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.