customer.setLoggedIn(true); boolean publishLoggedInEvent = true; if (CustomerLoggedInEvent.class.getName().equals(lastPublishedEventClass)) {
/** * After a JPA merge occurs, there is a new object created representing the merged changes. The new object does * not reflect the state of transient fields that may have been set on the object that was merged. * * This method, by default, resets the state of transient properties. * and allows the user to override this method to set additional (or different) transient values. * * @param preMergedCustome * @param postMergedCustomer */ protected void resetTransientFields(Customer preMergedCustomer, Customer postMergedCustomer) { postMergedCustomer.setUnencodedPassword(preMergedCustomer.getUnencodedPassword()); postMergedCustomer.setUnencodedChallengeAnswer(preMergedCustomer.getUnencodedChallengeAnswer()); postMergedCustomer.setAnonymous(preMergedCustomer.isAnonymous()); postMergedCustomer.setCookied(preMergedCustomer.isCookied()); postMergedCustomer.setLoggedIn(preMergedCustomer.isRegistered()); postMergedCustomer.getTransientProperties().putAll(preMergedCustomer.getTransientProperties()); }
cloned.getCustomerAttributes().put(entry.getKey(), clonedEntry); cloned.setLoggedIn(loggedIn); cloned.setUsername(username); cloned.setUnencodedPassword(unencodedPassword);
customer.setLoggedIn(true); boolean publishLoggedInEvent = true; if (CustomerLoggedInEvent.class.getName().equals(lastPublishedEventClass)) {
/** * After a JPA merge occurs, there is a new object created representing the merged changes. The new object does * not reflect the state of transient fields that may have been set on the object that was merged. * * This method, by default, resets the state of transient properties. * and allows the user to override this method to set additional (or different) transient values. * * @param preMergedCustome * @param postMergedCustomer */ protected void resetTransientFields(Customer preMergedCustomer, Customer postMergedCustomer) { postMergedCustomer.setUnencodedPassword(preMergedCustomer.getUnencodedPassword()); postMergedCustomer.setUnencodedChallengeAnswer(preMergedCustomer.getUnencodedChallengeAnswer()); postMergedCustomer.setAnonymous(preMergedCustomer.isAnonymous()); postMergedCustomer.setCookied(preMergedCustomer.isCookied()); postMergedCustomer.setLoggedIn(preMergedCustomer.isLoggedIn()); postMergedCustomer.getTransientProperties().putAll(preMergedCustomer.getTransientProperties()); }