Package org.openbel.framework.common

Examples of org.openbel.framework.common.InvalidArgument


     * in the {@link Kam kam}
     * @throws InvalidArgument Thrown if {@code id} is {@code null}
     */
    public KamStoreObjectImpl(Integer id) {
        if (id == null) {
            throw new InvalidArgument("id", id);
        }

        this.id = id;
    }
View Full Code Here


    /**
     * {@inheritDoc}
     */
    @Override
    public boolean exists(final Kam k) {
        if (k == null) throw new InvalidArgument(DEFAULT_MSG);
        return exists(k.getKamInfo());
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean exists(final KamInfo info) {
        if (info == null) throw new InvalidArgument(DEFAULT_MSG);
        return exists(info.getName());
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean exists(final String name) {
        if (name == null) throw new InvalidArgument(DEFAULT_MSG);
        KamInfo ki = search(getCatalog(), new SearchFunction<KamInfo>() {

            @Override
            public boolean match(KamInfo t) {
                return name.equals(t.getName());
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public void close(Kam kam) {
        if (kam == null) throw new InvalidArgument(DEFAULT_MSG);
        final KamInfo ki = kam.getKamInfo();
        KAMStoreDao dao = daomap.get(ki);
        if (dao != null) {
            dao.terminate();
            daomap.remove(ki);
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public KamInfo getKamInfo(String kamName) {
        if (kamName == null) throw new InvalidArgument(DEFAULT_MSG);
        if (!exists(kamName)) return null;
        try {
            return kamCatalogDao().getKamInfoByName(kamName);
        } catch (SQLException e) {
            final String msg = "error getting KAM info by name";
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public Kam getKam(KamInfo kamInfo, KamFilter kamFilter) {
        if (kamInfo == null) throw new InvalidArgument(DEFAULT_MSG);
        if (!exists(kamInfo)) return null;
        try {
            return getKam(kamStoreDao(kamInfo), kamInfo, kamFilter);
        } catch (SQLException e) {
            final String msg = "error getting KAM";
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public Kam getKam(String kamName) {
        if (kamName == null) throw new InvalidArgument(DEFAULT_MSG);
        if (!exists(kamName)) return null;
        final KamInfo ki = getKamInfo(kamName);
        return getKam(ki);
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public List<AnnotationType> getAnnotationTypes(Kam kam) {
        if (kam == null) throw new InvalidArgument(DEFAULT_MSG);
        if (!exists(kam)) return null;
        return getAnnotationTypes(kam.getKamInfo());
    }
View Full Code Here

    /**
     * {@inheritDoc}
     */
    @Override
    public List<AnnotationType> getAnnotationTypes(KamInfo ki) {
        if (ki == null) throw new InvalidArgument(DEFAULT_MSG);
        if (!exists(ki)) return null;
        try {
            return kamStoreDao(ki).getAnnotationTypes();
        } catch (SQLException e) {
            final String fmt = "error getting annotation types for %s";
View Full Code Here

TOP

Related Classes of org.openbel.framework.common.InvalidArgument

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.