static NucleusObjectNotFoundException wrapEntityNotFoundException( EntityNotFoundException e, Key key) { return new NucleusObjectNotFoundException( "Could not retrieve entity of kind " + key.getKind() + " with key " + key); }
if (code == 404) throw new NucleusObjectNotFoundException();
throw new NucleusObjectNotFoundException(); throw new NucleusObjectNotFoundException(e.getMessage(), e);
for (Key key : keys) { if (!entityMap.containsKey(key)) { excs[excNum++] = new NucleusObjectNotFoundException("Entity with key not found", key); excNum++; throw new NucleusObjectNotFoundException("Some entities could not be found", excs);
throw new NucleusObjectNotFoundException("No object found with type " + type + " and filter " + attributeFilter);
throw new NucleusObjectNotFoundException(Localiser.msg("XML.Object.NotFound", op.getObjectAsPrintable(), op.getInternalObjectId(), expression.toString())); throw new NucleusObjectNotFoundException(Localiser.msg("XML.Object.NotFound", op.getObjectAsPrintable(), op.getInternalObjectId(), expression)); throw new NucleusObjectNotFoundException(Localiser.msg("XML.Object.NotFound", op.getObjectAsPrintable(), op.getInternalObjectId(), expression));
public static Object getObjectByDN(StoreManager storeMgr, ExecutionContext om, Class type, String dnAsString) { AbstractClassMetaData cmd = om.getMetaDataManager().getMetaDataForClass(type, om.getClassLoaderResolver()); LdapName base = getSearchBase(cmd, om.getMetaDataManager()); try { LdapName dn = new LdapName(dnAsString); Rdn rdn = dn.getRdn(dn.size() - 1); String filter = "(" + rdn.getType() + "=" + rdn.getValue() + ")"; List<Object> objects = LDAPUtils.getObjectsOfCandidateType(storeMgr, om, cmd, base, filter, true, false); if (objects.size() == 1) { return objects.get(0); } else if (objects.size() == 0) { // TODO: localise throw new NucleusObjectNotFoundException("No object found with type " + type + " and filter " + filter); } else { // TODO: localise throw new NucleusDataStoreException("Unambiguous match with type " + type + " and filter " + filter); } } catch (NamingException e) { throw new NucleusDataStoreException(e.getMessage(), e); } }
throw new NucleusObjectNotFoundException("Object not found", op.getInternalObjectId());
for (int i=0;i<nfes.length;i++) nfes[i] = new NucleusObjectNotFoundException("Object not found", missingOps[i].getInternalObjectId()); throw new NucleusObjectNotFoundException("Some objects were not found. Look at nested exceptions for details", nfes);
throw new NucleusObjectNotFoundException("object not found", op.getObject());
if (result.getRow() == null) throw new NucleusObjectNotFoundException(); if (cmd.getDiscriminatorStrategy() != DiscriminatorStrategy.NONE && !cmdDiscValue.equals(discValue)) throw new NucleusObjectNotFoundException();
if (dbObject == null) throw new NucleusObjectNotFoundException("Could not find object with id " + op.getInternalObjectId() + " op="+op);
if (rowNumber < 0) throw new NucleusObjectNotFoundException("object not found", op.getObject());
if (propObj == null) throw new NucleusObjectNotFoundException("Datastore object for " + op + " is not found");
throw new NucleusObjectNotFoundException("Object not found", op.getInternalObjectId());
throw new NucleusObjectNotFoundException("Exception thrown finding object with id=" + id, ndse.getNestedExceptions());