* Never reference this interface directly. Always use {@link com.warrantchange.service.WarrantLocalServiceUtil} to access the Warrant local service.
*/
public Warrant addWarrant(long userId, String summary, int quantity, double price) throws SystemException {
long id = counterLocalService.increment();
Warrant warrant = WarrantLocalServiceUtil.createWarrant(id);
Date now = new Date();
warrant.setUserId(userId);
warrant.setSummary(summary);
warrant.setQuantity(quantity);
warrant.setPrice(price);
warrant.setStatus(WarrantStateType.CREATED.name());
warrant.setCreateDate(now);
warrant.setModifiedDate(now);
return WarrantUtil.update(warrant, true);
}