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

org.nuiton.topia.it.mapping.test14.A14DAbstract 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 A14DAbstract extends AbstractTopiaEntity implements A14D {

    /**
     * Nom de l'attribut en BD : b14D
     */
    protected Collection b14DAssoc14D;

    private static final long serialVersionUID = 3559593450472027491L;

    @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_DASSOC14_D, Collection.class, Assoc14D.class, b14DAssoc14D);
    }

    @Override
    public void addB14DAssoc14D(Assoc14D b14DAssoc14D) {
        if (this.b14DAssoc14D == null) {
            this.b14DAssoc14D = new LinkedList();
        }
        this.b14DAssoc14D.add(b14DAssoc14D);
    }

    @Override
    public void addAllB14DAssoc14D(Iterable b14DAssoc14D) {
        if (b14DAssoc14D == null) {
            return;
        }
        for (Assoc14D item : b14DAssoc14D) {
            addB14DAssoc14D(item);
        }
    }

    @Override
    public void setB14DAssoc14D(Collection b14DAssoc14D) {
        this.b14DAssoc14D = b14DAssoc14D;
    }

    @Override
    public void removeB14DAssoc14D(Assoc14D b14DAssoc14D) {
        if (this.b14DAssoc14D == null || !this.b14DAssoc14D.remove(b14DAssoc14D)) {
            throw new IllegalArgumentException("List does not contain given element");
        }
    }

    @Override
    public void clearB14DAssoc14D() {
        if (this.b14DAssoc14D == null) {
            return;
        }
        for (Assoc14D item : this.b14DAssoc14D) {
        }
        this.b14DAssoc14D.clear();
    }

    @Override
    public Collection getB14DAssoc14D() {
        return b14DAssoc14D;
    }

    @Override
    public Assoc14D getB14DAssoc14DByTopiaId(String topiaId) {
        return TopiaEntityHelper.getEntityByTopiaId(b14DAssoc14D, topiaId);
    }

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

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

    @Override
    public boolean isB14DAssoc14DEmpty() {
        int size = sizeB14DAssoc14D();
        return size == 0;
    }

    @Override
    public boolean isB14DAssoc14DNotEmpty() {
        boolean empty = isB14DAssoc14DEmpty();
        return ! empty;
    }

    @Override
    public boolean containsB14DAssoc14D(Assoc14D b14DAssoc14D) {
        boolean contains = this.b14DAssoc14D !=null && this.b14DAssoc14D.contains(b14DAssoc14D);
        return contains;
    }

} //A14DAbstract




© 2015 - 2024 Weber Informatics LLC | Privacy Policy