本文整理匯總了Java中org.kuali.rice.ken.api.notification.Notification.getSenders方法的典型用法代碼示例。如果您正苦於以下問題:Java Notification.getSenders方法的具體用法?Java Notification.getSenders怎麽用?Java Notification.getSenders使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.kuali.rice.ken.api.notification.Notification
的用法示例。
在下文中一共展示了Notification.getSenders方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: from
import org.kuali.rice.ken.api.notification.Notification; //導入方法依賴的package包/類
/**
* Converts a immutable object to its mutable counterpart
* @param im immutable object
* @return the mutable bo
*/
public static NotificationBo from(Notification im) {
if (im == null) {
return null;
}
NotificationBo bo = new NotificationBo();
bo.setId(im.getId());
bo.setVersionNumber(im.getVersionNumber());
bo.setObjectId(im.getObjectId());
bo.setDeliveryType(im.getDeliveryType());
bo.setCreationDateTimeValue(im.getCreationDateTime() == null ? null : new Timestamp(im.getCreationDateTime().getMillis()));
bo.setSendDateTimeValue(im.getSendDateTime() == null ? null : new Timestamp(im.getSendDateTime().getMillis()));
bo.setAutoRemoveDateTimeValue(im.getAutoRemoveDateTime() == null ? null : new Timestamp(im.getAutoRemoveDateTime().getMillis()));
bo.setTitle(im.getTitle());
bo.setContent(im.getContent());
bo.setLockedDateValue(im.getLockedDate() == null ? null : new Timestamp(im.getLockedDate().getMillis()));
bo.setDocTypeName(im.getDocTypeName());
// object references
bo.setPriority(NotificationPriorityBo.from(im.getPriority()));
bo.setContentType(NotificationContentTypeBo.from(im.getContentType()));
bo.setChannel(NotificationChannelBo.from(im.getChannel()));
bo.setProducer(NotificationProducerBo.from(im.getProducer()));
// lists
List<NotificationRecipientBo> tempRecipients = new ArrayList<NotificationRecipientBo>();
if (CollectionUtils.isNotEmpty(im.getRecipients())) {
for (NotificationRecipient recipient : im.getRecipients()) {
tempRecipients.add(NotificationRecipientBo.from(recipient));
}
bo.setRecipients(tempRecipients);
}
List<NotificationSenderBo> tempSenders = new ArrayList<NotificationSenderBo>();
if (CollectionUtils.isNotEmpty(im.getSenders())) {
for (NotificationSender sender : im.getSenders()) {
tempSenders.add(NotificationSenderBo.from(sender));
}
bo.setSenders(tempSenders);
}
return bo;
}
示例2: from
import org.kuali.rice.ken.api.notification.Notification; //導入方法依賴的package包/類
/**
* Converts a immutable object to its mutable counterpart
* @param im immutable object
* @return the mutable bo
*/
public static NotificationBo from(Notification im) {
if (im == null) {
return null;
}
NotificationBo bo = new NotificationBo();
bo.setId(im.getId());
bo.setVersionNumber(im.getVersionNumber());
bo.setObjectId(im.getObjectId());
bo.setDeliveryType(im.getDeliveryType());
bo.setCreationDateTimeValue(im.getCreationDateTime() == null ? null : new Timestamp(im.getCreationDateTime().getMillis()));
bo.setSendDateTimeValue(im.getSendDateTime() == null ? null : new Timestamp(im.getSendDateTime().getMillis()));
bo.setAutoRemoveDateTimeValue(im.getAutoRemoveDateTime() == null ? null : new Timestamp(im.getAutoRemoveDateTime().getMillis()));
bo.setTitle(im.getTitle());
bo.setContent(im.getContent());
bo.setLockedDateValue(im.getLockedDate() == null ? null : new Timestamp(im.getLockedDate().getMillis()));
// object references
bo.setPriority(NotificationPriorityBo.from(im.getPriority()));
bo.setContentType(NotificationContentTypeBo.from(im.getContentType()));
bo.setChannel(NotificationChannelBo.from(im.getChannel()));
bo.setProducer(NotificationProducerBo.from(im.getProducer()));
// lists
List<NotificationRecipientBo> tempRecipients = new ArrayList<NotificationRecipientBo>();
if (CollectionUtils.isNotEmpty(im.getRecipients())) {
for (NotificationRecipient recipient : im.getRecipients()) {
tempRecipients.add(NotificationRecipientBo.from(recipient));
}
bo.setRecipients(tempRecipients);
}
List<NotificationSenderBo> tempSenders = new ArrayList<NotificationSenderBo>();
if (CollectionUtils.isNotEmpty(im.getSenders())) {
for (NotificationSender sender : im.getSenders()) {
tempSenders.add(NotificationSenderBo.from(sender));
}
bo.setSenders(tempSenders);
}
return bo;
}