org.nuiton.topia.it.mapping.test5.A51Abstract Maven / Gradle / Ivy
package org.nuiton.topia.it.mapping.test5;
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 A51Abstract extends AbstractTopiaEntity implements A51 {
/**
* Nom de l'attribut en BD : b51
*/
protected Collection b51;
private static final long serialVersionUID = 3775254783551889718L;
@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_B51, Collection.class, B51.class, b51);
}
@Override
public void addB51(B51 b51) {
if (this.b51 == null) {
this.b51 = new LinkedList();
}
b51.setA51(this);
this.b51.add(b51);
}
@Override
public void addAllB51(Iterable b51) {
if (b51 == null) {
return;
}
for (B51 item : b51) {
addB51(item);
}
}
@Override
public void setB51(Collection b51) {
this.b51 = b51;
}
@Override
public void removeB51(B51 b51) {
if (this.b51 == null || !this.b51.remove(b51)) {
throw new IllegalArgumentException("List does not contain given element");
}
b51.setA51(null);
}
@Override
public void clearB51() {
if (this.b51 == null) {
return;
}
for (B51 item : this.b51) {
item.setA51(null);
}
this.b51.clear();
}
@Override
public Collection getB51() {
return b51;
}
@Override
public B51 getB51ByTopiaId(String topiaId) {
return TopiaEntityHelper.getEntityByTopiaId(b51, topiaId);
}
@Override
public Collection getB51TopiaIds() {
Collection topiaIds = new LinkedList();
Collection tmp = getB51();
if (tmp != null) {
for (TopiaEntity topiaEntity : tmp) {
topiaIds.add(topiaEntity.getTopiaId());
}
}
return topiaIds;
}
@Override
public int sizeB51() {
if (b51 == null) {
return 0;
}
return b51.size();
}
@Override
public boolean isB51Empty() {
int size = sizeB51();
return size == 0;
}
@Override
public boolean isB51NotEmpty() {
boolean empty = isB51Empty();
return ! empty;
}
@Override
public boolean containsB51(B51 b51) {
boolean contains = this.b51 !=null && this.b51.contains(b51);
return contains;
}
} //A51Abstract
© 2015 - 2024 Weber Informatics LLC | Privacy Policy