org.nuiton.topia.it.mapping.test7.A71Abstract Maven / Gradle / Ivy
package org.nuiton.topia.it.mapping.test7;
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 A71Abstract extends AbstractTopiaEntity implements A71 {
/**
* Nom de l'attribut en BD : b71
*/
protected Collection b71;
private static final long serialVersionUID = 7018076300273529394L;
@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_B71, Collection.class, B71.class, b71);
}
@Override
public void addB71(B71 b71) {
if (this.b71 == null) {
this.b71 = new LinkedList();
}
this.b71.add(b71);
}
@Override
public void addAllB71(Iterable b71) {
if (b71 == null) {
return;
}
for (B71 item : b71) {
addB71(item);
}
}
@Override
public void setB71(Collection b71) {
this.b71 = b71;
}
@Override
public void removeB71(B71 b71) {
if (this.b71 == null || !this.b71.remove(b71)) {
throw new IllegalArgumentException("List does not contain given element");
}
}
@Override
public void clearB71() {
if (this.b71 == null) {
return;
}
this.b71.clear();
}
@Override
public Collection getB71() {
return b71;
}
@Override
public B71 getB71ByTopiaId(String topiaId) {
return TopiaEntityHelper.getEntityByTopiaId(b71, topiaId);
}
@Override
public Collection getB71TopiaIds() {
Collection topiaIds = new LinkedList();
Collection tmp = getB71();
if (tmp != null) {
for (TopiaEntity topiaEntity : tmp) {
topiaIds.add(topiaEntity.getTopiaId());
}
}
return topiaIds;
}
@Override
public int sizeB71() {
if (b71 == null) {
return 0;
}
return b71.size();
}
@Override
public boolean isB71Empty() {
int size = sizeB71();
return size == 0;
}
@Override
public boolean isB71NotEmpty() {
boolean empty = isB71Empty();
return ! empty;
}
@Override
public boolean containsB71(B71 b71) {
boolean contains = this.b71 !=null && this.b71.contains(b71);
return contains;
}
} //A71Abstract
© 2015 - 2024 Weber Informatics LLC | Privacy Policy