/** * Gets an ID number which is unique in the database. * * @return an Integer * @throws ObjectStoreException if a problem occurs */ public Integer getSerial() throws ObjectStoreException { return osw.getSerial(); }
/** * Gets an ID number which is unique in the database. * * @return an Integer * @throws ObjectStoreException if a problem occurs */ public Integer getSerial() throws ObjectStoreException { return osw.getSerial(); }
/** * Perform the actual insertion of data into the userprofile database. * @return The object that represents the database record for this bag. * @throws ObjectStoreException If we cannot store the bag. */ protected SavedBag storeSavedBag() throws ObjectStoreException { SavedBag savedBag = new SavedBag(); savedBag.setId(getSavedBagId()); if (profileId != null) { savedBag.setName(getName()); savedBag.setType(getType()); savedBag.setDescription(getDescription()); savedBag.setDateCreated(getDateCreated()); savedBag.proxyUserProfile(new ProxyReference(null, profileId, UserProfile.class)); savedBag.setOsbId(getOsb().getBagId()); savedBag.setState(getState()); getUserProfileWriter().store(savedBag); } else if (savedBag.getId() == null) { // Even if the list is not saved because we're using an anonymous profile, still // give it an ID so that calling code can manipulate all lists by ID savedBag.setId(getUserProfileWriter().getSerial()); } return savedBag; }
/** * Perform the actual insertion of data into the userprofile database. * @return The object that represents the database record for this bag. * @throws ObjectStoreException If we cannot store the bag. */ protected SavedBag storeSavedBag() throws ObjectStoreException { SavedBag savedBag = new SavedBag(); savedBag.setId(getSavedBagId()); if (profileId != null) { savedBag.setName(getName()); savedBag.setType(getType()); savedBag.setDescription(getDescription()); savedBag.setDateCreated(getDateCreated()); savedBag.proxyUserProfile(new ProxyReference(null, profileId, UserProfile.class)); savedBag.setOsbId(getOsb().getBagId()); savedBag.setState(getState()); getUserProfileWriter().store(savedBag); } else if (savedBag.getId() == null) { // Even if the list is not saved because we're using an anonymous profile, still // give it an ID so that calling code can manipulate all lists by ID savedBag.setId(getUserProfileWriter().getSerial()); } return savedBag; }