org.nuiton.topia.it.mapping.test7.A7Abstract Maven / Gradle / Ivy
package org.nuiton.topia.it.mapping.test7;
import java.util.LinkedList;
import java.util.List;
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 A7Abstract extends AbstractTopiaEntity implements A7 {
/**
* Nom de l'attribut en BD : b7
*/
protected List b7;
private static final long serialVersionUID = 4049692852257110071L;
@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_B7, List.class, B7.class, b7);
}
@Override
public void addB7(B7 b7) {
if (this.b7 == null) {
this.b7 = new LinkedList();
}
this.b7.add(b7);
}
@Override
public void addB7(int index, B7 b7) {
if (this.b7 == null) {
this.b7 = new LinkedList();
}
this.b7.add(index, b7);
}
@Override
public void addAllB7(Iterable b7) {
if (b7 == null) {
return;
}
for (B7 item : b7) {
addB7(item);
}
}
@Override
public void setB7(List b7) {
this.b7 = b7;
}
@Override
public void removeB7(B7 b7) {
if (this.b7 == null || !this.b7.remove(b7)) {
throw new IllegalArgumentException("List does not contain given element");
}
}
@Override
public void removeB7(int index) {
if (this.b7 == null) {
throw new IllegalArgumentException("List does not contain given element");
}
B7 oldValue = this.b7.remove(index);
if (oldValue == null) {
throw new IllegalArgumentException("List does not contain given element");
}
}
@Override
public void clearB7() {
if (this.b7 == null) {
return;
}
this.b7.clear();
}
@Override
public List getB7() {
return b7;
}
@Override
public B7 getB7(int index) {
return TopiaEntityHelper.getEntityByIndex(b7, index);
}
@Override
public B7 getB7ByTopiaId(String topiaId) {
return TopiaEntityHelper.getEntityByTopiaId(b7, topiaId);
}
@Override
public List getB7TopiaIds() {
List topiaIds = new LinkedList();
List tmp = getB7();
if (tmp != null) {
for (TopiaEntity topiaEntity : tmp) {
topiaIds.add(topiaEntity.getTopiaId());
}
}
return topiaIds;
}
@Override
public int sizeB7() {
if (b7 == null) {
return 0;
}
return b7.size();
}
@Override
public boolean isB7Empty() {
int size = sizeB7();
return size == 0;
}
@Override
public boolean isB7NotEmpty() {
boolean empty = isB7Empty();
return ! empty;
}
@Override
public boolean containsB7(B7 b7) {
boolean contains = this.b7 !=null && this.b7.contains(b7);
return contains;
}
} //A7Abstract
© 2015 - 2024 Weber Informatics LLC | Privacy Policy