Search in sources :

Example 1 with LegacyLocalBridge

use of eu.ggnet.dwoss.redtape.ee.api.LegacyLocalBridge in project dwoss by gg-net.

the class UnitSupporterOperation method isRefurbishIdAvailable.

/**
 * Returns true if supplied refurbishId is available, meaning not jet in the database.
 *
 * @param refurbishId the refubishedId
 * @return true if available.
 */
@Override
public boolean isRefurbishIdAvailable(String refurbishId) {
    UniqueUnit uniqueUnit = new UniqueUnitEao(uuEm).findByIdentifier(UniqueUnit.Identifier.REFURBISHED_ID, refurbishId);
    if (uniqueUnit != null)
        return false;
    if (bridgeInstance.isUnsatisfied())
        return true;
    LegacyLocalBridge bridge = bridgeInstance.get();
    L.info("Using LegacyBridge ({})", bridge.localName());
    return bridge.isUnitIdentifierAvailable(refurbishId);
}
Also used : UniqueUnit(eu.ggnet.dwoss.uniqueunit.ee.entity.UniqueUnit) LegacyLocalBridge(eu.ggnet.dwoss.redtape.ee.api.LegacyLocalBridge) UniqueUnitEao(eu.ggnet.dwoss.uniqueunit.ee.eao.UniqueUnitEao)

Aggregations

LegacyLocalBridge (eu.ggnet.dwoss.redtape.ee.api.LegacyLocalBridge)1 UniqueUnitEao (eu.ggnet.dwoss.uniqueunit.ee.eao.UniqueUnitEao)1 UniqueUnit (eu.ggnet.dwoss.uniqueunit.ee.entity.UniqueUnit)1