|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.zeroexchange.resource.read.DefaultResourceInformant
public class DefaultResourceInformant
Constructor Summary | |
---|---|
DefaultResourceInformant()
|
Method Summary | |
---|---|
BigDecimal |
getConsumeAmount(Resource resource)
Returns the total confirmed consume amount of the resource. |
BigDecimal |
getProductionHours(Resource resource)
Returns total production hours of the 'accepted' supplies. |
String |
getResourceUOM(Resource resource)
Returns UOM's name for the resource. |
BigDecimal |
getSupplyAmount(Resource resource)
Returns the total confirmed supply amount of the resource. |
Date |
getSupplyDate(Resource resource)
Returns resource supply date. |
BigDecimal |
getUserContributionPrice(Resource resource,
User user,
ZECurrency currency)
Returns value of the contribution made by the specified user into the specified resource. |
ResourceTender |
getUserTender(Resource resource,
Integer userId)
Returns the user's tender. |
BigDecimal |
getValue(Resource resource)
Returns the 'accepted' resource supply price in the specified currency. |
String |
getValueUOM(Resource resource)
Returns UOM's name for the exchange worth of the resource. |
boolean |
hasConsumers(Resource resource,
User excludedUser)
Returns true if the resource has at least one consumer. |
boolean |
hasSuppliers(Resource resource,
User excludedUser)
Returns true if the resource has at least one supplier. |
boolean |
isAcceptedTendersCountExceeded(Resource resource,
Class<? extends ResourceTender> tenderClass)
Returns true if allowed tenders count is exceeded. |
boolean |
isUserConsumer(Resource resource,
Integer userId)
Returns true if the user is the consumer of the specified resource. |
boolean |
isUserSupplier(Resource resource,
Integer userId)
Returns true if the user is the supplier of the specified resource. |
void |
setSessionUOMKey(String sessionUOMKey)
|
void |
setUnknownUOMKey(String unknownUOMKey)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public DefaultResourceInformant()
Method Detail |
---|
public void setUnknownUOMKey(String unknownUOMKey)
public void setSessionUOMKey(String sessionUOMKey)
public BigDecimal getSupplyAmount(Resource resource)
getSupplyAmount
in interface ResourceInformant
public BigDecimal getConsumeAmount(Resource resource)
getConsumeAmount
in interface ResourceInformant
public ResourceTender getUserTender(Resource resource, Integer userId)
getUserTender
in interface ResourceInformant
public boolean isUserConsumer(Resource resource, Integer userId)
isUserConsumer
in interface ResourceInformant
public boolean isUserSupplier(Resource resource, Integer userId)
isUserSupplier
in interface ResourceInformant
public BigDecimal getValue(Resource resource)
getValue
in interface ResourceInformant
public BigDecimal getProductionHours(Resource resource)
getProductionHours
in interface ResourceInformant
public BigDecimal getUserContributionPrice(Resource resource, User user, ZECurrency currency)
getUserContributionPrice
in interface ResourceInformant
public boolean isAcceptedTendersCountExceeded(Resource resource, Class<? extends ResourceTender> tenderClass)
isAcceptedTendersCountExceeded
in interface ResourceInformant
public boolean hasConsumers(Resource resource, User excludedUser)
hasConsumers
in interface ResourceInformant
public boolean hasSuppliers(Resource resource, User excludedUser)
hasSuppliers
in interface ResourceInformant
public Date getSupplyDate(Resource resource)
getSupplyDate
in interface ResourceInformant
public String getResourceUOM(Resource resource)
getResourceUOM
in interface ResourceInformant
public String getValueUOM(Resource resource)
ResourceInformant
getValueUOM
in interface ResourceInformant
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |