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

org.nuiton.topia.it.mapping.test14.A14CAbstract Maven / Gradle / Ivy

There is a newer version: 4.0
Show newest version
package org.nuiton.topia.it.mapping.test14;

import java.util.Collection;
import java.util.LinkedList;
import javax.annotation.Generated;
import org.nuiton.topia.persistence.TopiaEntity;
import org.nuiton.topia.persistence.TopiaEntityVisitor;
import org.nuiton.topia.persistence.TopiaException;
import org.nuiton.topia.persistence.internal.AbstractTopiaEntity;
import org.nuiton.topia.persistence.util.TopiaEntityHelper;

@Generated(value = "org.nuiton.topia.templates.EntityTransformer", date = "Thu Oct 13 17:59:13 CEST 2016")
public abstract class A14CAbstract extends AbstractTopiaEntity implements A14C {

    /**
     * Nom de l'attribut en BD : b14C
     */
    protected Collection b14CAssoc14C;

    private static final long serialVersionUID = 7233453040327604533L;

    @Override
    public void accept(TopiaEntityVisitor visitor) throws TopiaException {
        visitor.start(this);
        accept0(visitor);
        visitor.end(this);
    }

    protected void accept0(TopiaEntityVisitor visitor) throws TopiaException {
        visitor.visit(this, PROPERTY_B14_CASSOC14_C, Collection.class, Assoc14C.class, b14CAssoc14C);
    }

    @Override
    public void addB14CAssoc14C(Assoc14C b14CAssoc14C) {
        if (this.b14CAssoc14C == null) {
            this.b14CAssoc14C = new LinkedList();
        }
        b14CAssoc14C.setA14C(this);
        this.b14CAssoc14C.add(b14CAssoc14C);
    }

    @Override
    public void addAllB14CAssoc14C(Iterable b14CAssoc14C) {
        if (b14CAssoc14C == null) {
            return;
        }
        for (Assoc14C item : b14CAssoc14C) {
            addB14CAssoc14C(item);
        }
    }

    @Override
    public void setB14CAssoc14C(Collection b14CAssoc14C) {
        this.b14CAssoc14C = b14CAssoc14C;
    }

    @Override
    public void removeB14CAssoc14C(Assoc14C b14CAssoc14C) {
        if (this.b14CAssoc14C == null || !this.b14CAssoc14C.remove(b14CAssoc14C)) {
            throw new IllegalArgumentException("List does not contain given element");
        }
        b14CAssoc14C.setA14C(null);
    }

    @Override
    public void clearB14CAssoc14C() {
        if (this.b14CAssoc14C == null) {
            return;
        }
        for (Assoc14C item : this.b14CAssoc14C) {
            item.setA14C(null);
        }
        this.b14CAssoc14C.clear();
    }

    @Override
    public Collection getB14CAssoc14C() {
        return b14CAssoc14C;
    }

    @Override
    public Assoc14C getB14CAssoc14CByTopiaId(String topiaId) {
        return TopiaEntityHelper.getEntityByTopiaId(b14CAssoc14C, topiaId);
    }

    @Override
    public Collection getB14CAssoc14CTopiaIds() {
        Collection topiaIds = new LinkedList();
        Collection tmp = getB14CAssoc14C();
        if (tmp != null) {
            for (TopiaEntity topiaEntity : tmp) {
                topiaIds.add(topiaEntity.getTopiaId());
            }
        }
        return topiaIds;
    }

    @Override
    public int sizeB14CAssoc14C() {
        if (b14CAssoc14C == null) {
            return 0;
        }
        return b14CAssoc14C.size();
    }

    @Override
    public boolean isB14CAssoc14CEmpty() {
        int size = sizeB14CAssoc14C();
        return size == 0;
    }

    @Override
    public boolean isB14CAssoc14CNotEmpty() {
        boolean empty = isB14CAssoc14CEmpty();
        return ! empty;
    }

    @Override
    public boolean containsB14CAssoc14C(Assoc14C b14CAssoc14C) {
        boolean contains = this.b14CAssoc14C !=null && this.b14CAssoc14C.contains(b14CAssoc14C);
        return contains;
    }

} //A14CAbstract




© 2015 - 2024 Weber Informatics LLC | Privacy Policy