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

org.nuiton.topia.it.mapping.test17.BB17Abstract Maven / Gradle / Ivy

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

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 BB17Abstract extends AbstractTopiaEntity implements BB17 {

    /**
     * Nom de l'attribut en BD : cc
     */
    protected int bb;

    /**
     * Nom de l'attribut en BD : bb1
     */
    protected int bb1;

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

    private static final long serialVersionUID = 7293914085985759331L;

    @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_BB, int.class, bb);
        visitor.visit(this, PROPERTY_BB1, int.class, bb1);
        visitor.visit(this, PROPERTY_B17, Collection.class, B17.class, b17);
    }

    @Override
    public void setBb(int bb) {
        this.bb = bb;
    }

    @Override
    public int getBb() {
        int result = this.bb;
        return result;
    }

    @Override
    public void setBb1(int bb1) {
        this.bb1 = bb1;
    }

    @Override
    public int getBb1() {
        int result = this.bb1;
        return result;
    }

    @Override
    public void addB17(B17 b17) {
        if (this.b17 == null) {
            this.b17 = new LinkedList();
        }
        this.b17.add(b17);
    }

    @Override
    public void addAllB17(Iterable b17) {
        if (b17 == null) {
            return;
        }
        for (B17 item : b17) {
            addB17(item);
        }
    }

    @Override
    public void setB17(Collection b17) {
        this.b17 = b17;
    }

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

    @Override
    public void clearB17() {
        if (this.b17 == null) {
            return;
        }
        this.b17.clear();
    }

    @Override
    public Collection getB17() {
        return b17;
    }

    @Override
    public B17 getB17ByTopiaId(String topiaId) {
        return TopiaEntityHelper.getEntityByTopiaId(b17, topiaId);
    }

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

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

    @Override
    public boolean isB17Empty() {
        int size = sizeB17();
        return size == 0;
    }

    @Override
    public boolean isB17NotEmpty() {
        boolean empty = isB17Empty();
        return ! empty;
    }

    @Override
    public boolean containsB17(B17 b17) {
        boolean contains = this.b17 !=null && this.b17.contains(b17);
        return contains;
    }

} //BB17Abstract




© 2015 - 2024 Weber Informatics LLC | Privacy Policy