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

org.beigesoft.acc.mdlp.WrhItm Maven / Gradle / Ivy

Go to download

It consists of double entry accounting and trading (web-store) business logic. It's based on previous beigesoft-accounting and beigesoft-webstore projects.

The newest version!
/*
BSD 2-Clause License

Copyright (c) 2019, Beigesoft™
All rights reserved.

Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions are met:

* Redistributions of source code must retain the above copyright notice, this
  list of conditions and the following disclaimer.

* Redistributions in binary form must reproduce the above copyright notice,
  this list of conditions and the following disclaimer in the documentation
  and/or other materials provided with the distribution.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 */

package org.beigesoft.acc.mdlp;

import java.math.BigDecimal;

import org.beigesoft.mdl.IHasId;
import org.beigesoft.mdl.AHasVr;

/**
 * 

Model of item in warehouse place.

* * @author Yury Demidenko */ public class WrhItm extends AHasVr implements IHasId { /** *

Composite ID.

**/ private WrhItmId iid; /** *

Warehouse place, not null, PK.

**/ private WrhPl wrhp; /** *

Item, not null, PK.

**/ private Itm itm; /** *

Uom, not null, PK.

**/ private Uom uom; /** *

Items left (the rest) to draw.

**/ private BigDecimal itLf = BigDecimal.ZERO; /** *

Getter for iid.

* @return WrhItmId **/ @Override public final WrhItmId getIid() { return this.iid; } /** *

Setter for iid.

* @param pIid reference **/ @Override public final void setIid(final WrhItmId pIid) { this.iid = pIid; if (this.iid == null) { this.wrhp = null; this.itm = null; this.uom = null; } else { this.wrhp = this.iid.getWrhp(); this.itm = this.iid.getItm(); this.uom = this.iid.getUom(); } } //Customized setters: /** *

Setter for wrhp.

* @param pWrhp reference **/ public final void setWrhp(final WrhPl pWrhp) { this.wrhp = pWrhp; if (this.wrhp != null) { if (this.iid == null) { this.iid = new WrhItmId(); } this.iid.setWrhp(this.wrhp); } else { this.iid = null; } } /** *

Setter for itm.

* @param pItm reference **/ public final void setItm(final Itm pItm) { this.itm = pItm; if (this.itm != null) { if (this.iid == null) { this.iid = new WrhItmId(); } this.iid.setItm(this.itm); } else { this.iid = null; } } /** *

Setter for uom.

* @param pUom reference **/ public final void setUom(final Uom pUom) { this.uom = pUom; if (this.wrhp != null) { if (this.iid == null) { this.iid = new WrhItmId(); } this.iid.setUom(this.uom); } else { this.iid = null; } } //Simple getters and setters: /** *

Getter for wrhp.

* @return WrhPl **/ public final WrhPl getWrhp() { return this.wrhp; } /** *

Getter for itm.

* @return Itm **/ public final Itm getItm() { return this.itm; } /** *

Getter for uom.

* @return Uom **/ public final Uom getUom() { return this.uom; } /** *

Getter for itLf.

* @return BigDecimal **/ public final BigDecimal getItLf() { return this.itLf; } /** *

Setter for itLf.

* @param pItLf reference **/ public final void setItLf(final BigDecimal pItLf) { this.itLf = pItLf; } }




© 2015 - 2025 Weber Informatics LLC | Privacy Policy