All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.broadleafcommerce.core.offer.domain.OfferAudit Maven / Gradle / Ivy

There is a newer version: 3.1.15-GA
Show newest version
/*
 * Copyright 2008-2012 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *       http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package org.broadleafcommerce.core.offer.domain;

import java.io.Serializable;
import java.util.Date;

/**
 * Captures when an offer was applied to a customer.
 *
 * Utilized by the offer process to enforce max use by customer rules and as
 * a high-level audit of what orders and customers have used an offer.
 *
 */
public interface OfferAudit extends Serializable {

    /**
     * System generated unique id for this audit record.
     * @return
     */
    public Long getId();

    /**
     * Sets the id.
     * @param id
     */
    public void setId(Long id);

    /**
     * The associated offer id.
     * @return
     */
    public Long getOfferId();

    /**
     * Sets the associated offer id.
     * @param offerId
     */
    public void setOfferId(Long offerId);
    
    /**
     * 

The offer code that was used to retrieve the offer. This will be null if the offer was automatically applied * and not obtained by an {@link OfferCode}.

* *

For any Broadleaf version prior to 3.1, this has the potential to throw an {@link UnsupportedOperationException}. * This column does not exist until 3.1.0. Rather than prevent a drop-in release by making this database * modification, {@link OfferAuditWeaveImpl} should instead be weaved into this class to obtain the column definition * along with correct implementation of this method.

* @see {@link OfferAuditWeaveImpl} */ public Long getOfferCodeId() throws UnsupportedOperationException; /** *

Sets the offer code that was used to retrieve the offer. This should be null if the offer was automatically applied * and not obtained by an {@link OfferCode}.

* *

For any Broadleaf version prior to 3.1, this has the potential to throw an {@link UnsupportedOperationException}. * This column does not exist until 3.1.0. Rather than prevent a drop-in release of by making this database * modification, {@link OfferAuditWeaveImpl} should instead be weaved into this class to obtain the column definition * along with correct implementation of this method.

* @see {@link OfferAuditWeaveImpl} */ public void setOfferCodeId(Long offerCodeId) throws UnsupportedOperationException; /** * The associated order id. * @return */ public Long getOrderId(); /** * Sets the associated order id. * @param orderId */ public void setOrderId(Long orderId); /** * The id of the associated customer. * @return */ public Long getCustomerId(); /** * Sets the customer id. * @param customerId */ public void setCustomerId(Long customerId); /** * The date the offer was applied to the order. * @return */ public Date getRedeemedDate(); /** * Sets the offer redeemed date. * @param redeemedDate */ public void setRedeemedDate(Date redeemedDate); }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy